View Full Version : Community Coding project
zachogden
11-30-2004, 04:49 PM
So, I just got this great idea. I realized that this community contains a lot of great minds and at least a few great coders, and what we could potentially do if we work together. I propose the CF comes together and does a community coding project. We come up with an idea and all work together to create it. I think this could be something great.
bioteq
11-30-2004, 04:52 PM
Wow. I'd be all for something like that.
Bring it!
zachogden
11-30-2004, 05:00 PM
Cool. good to know.
SirCodeAlot
11-30-2004, 06:33 PM
I would definately be willing to help out with something like this. It is always good to have the experience of working with other people, while still in the confines of your room :)
zachogden
11-30-2004, 07:14 PM
I think this will have good support, its just a matter of figuring out something everyone would be interesting in doing, i.e. maybe a CF Linux Distro, or a CF compiler, or a CF web browser, or a CF video game, etc.
bioteq
11-30-2004, 07:30 PM
Definitly sounds good.
I'm up for anything y'all want to do -- even if I have no clue what it is. I'll do some research if I have to.
Thing i've had problems with in the past though, with working with a group, is people losing interest. Last project, after 6 months, I was the only one left working.
Hopefully this won't end up like that. And who knows, maybe we'll do something completely awesome and CF will get some noticement.(new word!)
zachogden
11-30-2004, 07:56 PM
Personally, I like the idea of a CF Linux distro.
zachogden
11-30-2004, 07:57 PM
That way, everybody could work in their area of expertise... making the core (C, ASM), making tools and maybe office software (C/C++/C#), making documentation(HTML/XML/PHP/MySQL), you know.
bioteq
11-30-2004, 08:20 PM
Absolutely.
Whiteknight was wanting to begin his own OS of sorts, I believe. Probably be perfect for him.
I'm up for it 100% and willing to help out any way you see fit. When you get some info on it, let me know:
email: mike [at] naFURnoELISEbit [dot] net (subtract the beetoven song out of it. I don't like spam bots)
aim: bi0teq (it's a zero, not an 'o')
msn: bioteq@hotmail.com
[edit]
If we do happen to do this, i've got all the servers/hosting we could ever need if need be. Perks of being the sysadmin for a large hosting company.
zachogden
11-30-2004, 08:26 PM
Yeah, I was just reading that thread. Tonight I am actually hopefully going to make an old machine I have LFS-ready.... just need to fix the MBR on an old drive and pop it into the PII machine... I've already got all of the required Linux packages... its just a matter of doing it.
bioteq
11-30-2004, 08:30 PM
I've got pleanty of spare machines around here too, to mess around with bootstrapping and the like. Although I have next-to-none (huge headache warning) asm expierence, i'm willing to network them and let people give it a try if they wish.
Are you wanting to start from complete scratch? As in, writing boot loaders, our own kernel, own drivers, own software, own emulation, own..well, everything? Or are you just wanting to start with a kernel.org kernel and going from that?
zachogden
11-30-2004, 08:37 PM
I was planning on using the Linux kernel... I'm afraid everyone would get too... frustrated... writing our own, because only maybe 3 or 4 people would know how to do it, and everyone else would just be: "When is it my turn?". I mean, we could always mess with and tweak the Linux one to our liking. Drivers: No. There are plenty of free ones out there. Software: Yes! Absolutley. I mean, why not? This is coderforums, right?
What is bootstrapping? I've heard this term before, but IM not sure I know what it means.
bioteq
11-30-2004, 08:40 PM
Boostrapping is the ability to run/compile your own code.
For example, know how you can compile gcc x.x with gcc x.x?
Kernels have to be able to run their own code, so to speak. Bootloaders, etc.
Not easy stuff, but fun to play with.
zachogden
11-30-2004, 08:45 PM
About you having a lot of server space... this would be good because my webspace has a 1MB file limit (30M total i think), and we would need a place to store the CD .iso's and sources for people to access. You know what I mean.
Although, if this truly became a CF community project, maybe HostRocket (CF parent company) might give us free space.
Whiteknight
12-01-2004, 11:29 AM
I did want to write my own OS, but that project has been taking the back seat to studying for all my finals. I have a basic bootloader in place, and a skeleton kernel in the works, but nothing else. I need to write up a file system (i'm using a microkernel system, so i can add in peices as I need), then I need to write a libc port, and then I am going to need to start writing my Assembler, and then a simple C compiler.
I could help you guys throw together a linux distro. we would need to decide whether we want to start off a premade base (like CORE linux), or if we want to start with a kernel, grub, and Bash, and work from there.
zachogden
12-01-2004, 12:11 PM
As far as the kernel goes, we could use yours, if you are confident enough that it would work well enough :). About what I said earlier about us using the Linux kernel, I take that back. I mean, if this is truly going to be a learning experience and is truly going to be our own, then why not make our own kernel?
Where are you learning how to make your own? I've searched for articles on how to do it on Google and stuff, but haven't turned up anything useful. If you have some good resources, post them or PM me or email me @ zach [dot] ogden [at] gmail [dot] com ... that goes for anyone, BTW, not just whiteknight.
SirCodeAlot
12-01-2004, 07:04 PM
While this sounds like an excellent, fun idea, might I suggest starting a bit smaller at first. Before CF takes on something like this, it looks like we should all learn to work together to see what each other's strengths/weaknesses are first. Possibly some small program for a charity or something of that nature (i.e.: a child-oriented browser, or a cover-GUI for Windows for the local library, etc..). Once we complete something like this, moving on to larger projects, like creating a functioning operating system that is both worthwhile to use and to build would seem a much more reasonable idea.
Not to mention zachogden's original concern of having people left out: for example, alot of us here may not have had much/any Linux experience. Just a general install of any (semi-)advanced Linux distro (Gentoo, Slackware), can be difficult to a new user. Even installing an easier distro (Mandrake, Fedora), and compiling your own custom kernel can be overwhelming for new comers, let alone compiling and using a kernel built from scratch. And here, we are talking about using bootstrappers and building custom bootloaders and kernel from scratch, while integrating a mountain of already created system drivers on top of creating some basic GUI. Seems like a big thing to me. Some people might not have had the more down to system experience either. A kernel requires this, along with some assembly, which will also cause headaches in the long run. Plus, it is going to be a while before any of the Windows/GUI-Linux C++/C#/Java programmers are going to have a chance to participate (in terms of coding anyway).
So, as I said before, I propose starting smaller. I think a program for charity might be a nice idea, whether it be helping your local library come up with a solution to prevent users from messing with their PCs, or a children's help foundation with a new database driven application for tracking whatever they may need.
Not to burst anyone's bubble, because don't get me wrong, an OS would be an awesome project. But based on threads that I have read here, I feel it would benefit CF to start on a smaller scale to learn what the coders here have to bring to the table and to see how we all work together before taking on such a large task.
bioteq
12-01-2004, 07:18 PM
I'm going to have to agree with you there, SirCodeAlot. It definitly seems like a more logical thing to do, especially since most of us really don't know each other or strengths.
The only problem now, is, well quite obviously, what do we code?
Perhaps something that can encompass many languages. Front ends written in C#/delphi/VB with backends written in C/C++/ASM. Something like that which could allow most CF coders help out. If not all.
All in all, i'm just a mindless drone code monkey, point me where I need to go, and I go.
zachogden
12-01-2004, 07:39 PM
I also concur with CodeAlot's position. I kind of have been all across the board with my position on this idea (Just look at my posts: "No CFLinux", then "Yes CFLinux", now "No CFLinux again"), but I am confident that waiting for a big undertaking is a good idea.
The only thing, though, is that we have no idea for how long and how much people are going to contribute to this. If we do make a commitment to a library or something, and then motiviation just kind of dissapates, then we've got ourselves some dissappointed librarians.
I think a better way of going about this would be to just keep proposing ideas, see what the community's reactions to them are, and once we decide, we make it a SF project and just hope the flame doesn't die.
As far as what bioteq said about having almost all CF users being able to help, that is a good idea, and should remain a primary goal to ensure this stays a community project. There's always a place for the HTML/XML/PHP/MySQL nerds (errr... people) in documentation and building a website for the project, but as far as including many languages that are so far apart from each other on the coding spectrum, such as C and Python (just an example), this could be tricky.
Primary idea is to just keep thinking of ideas, even if they sound like crap now, other people might be able to build off of those ideas in the future.
Whiteknight
12-02-2004, 10:14 AM
1) Howabout we do something that would draw in users from accross the divide? for instance we could write up a port of BASH (or another standard linux shell) to windows, either to run as an overlay in the dos prompt (which would cut out the GUI users), or we could make a nice little GUI wrapper application, with some simple functions, that would work like a command shell.
1b) or, as another idea, we could write up our own command shell from scratch. It would have it's own GUI-style window, it would have our own prompts and commands, etc... then, we would have to write a new API to handle text formatting and output to the screen, and an interface to the win32 API, so that our command shell could have all the same functionality of the DOS shell (or something better).
2) Or, we could start the process of writing up our own language, either a compiled language, or a scripting language. We could have built-in GUI functionality, so that we could have people making nice GUI functions with MFC or C#, and other people making lower-level functions in C/C++/ASM.
3) we could start working on a simple Web-based application, like a blog, or a community site to accompany coderforums. For instance we could all make profiles, and share pictures, invite friends, etc... We could have people working on Sockets and internet connectivity with C# or Perl or Python, people writing the requisite database code in PHP or something harder like C++. Then, we could have the page itself written in PHP.
4) We could try our hand at a Server application, like Apache, except that we could do something more interesting. We could make a "lightweight" server that can run in the background of a person's home computer, and serve simple pages or images. We could utilize high security, CGI and PHP interfacing (but remember, we want to keep things small scale).
zachogden
12-02-2004, 10:24 AM
Personally, I like ideas 3, and 4 the most.
3) The idea of making some sort of CF blog sounds like a great idea... it only makes sense that a blog and a forum would go hand in hand. I'm sure quite a few people would be interested in something like that.
4) I have always wanted to be able to turn this computer into a server of sorts, but without installing Apache and stuff. I do think that making "lightweight server software" is not only a good start, but it might be agreat building block for making P2P software.
I like idea #3 the best of the two. But, would like a append an idea onto that idea. What if we made software that allowed people to make blog entries without going to the blog site. Like some sort of .exe that allowed people with little or no HTML experience to quickly format their text and add pictures into their entries. Then, with some socket stuff, send it over the net to the server and "voila", blog entry.
Whiteknight
12-03-2004, 04:37 PM
well, a program that "allowed people with little or no HTML experience to quickly format their text and add pictures into their entries" is called FrontPage, and has already been done.
or, are you talking about a "small language" that basically works like a subset to html, for "non-coders"? or, are you talking about an HTML form, where you write in the blog entry, and then select a picture, and it formats the html directly?
personally, if we wanted to start with something small, I would say that we should work on the blog idea, except that we dont have server space on which to host it.
zachogden
12-03-2004, 05:03 PM
Originally posted by WhiteKnight:
...except that we dont have server space on which to host it.
Oh we don't?
Originally posted by bioteq:
If we do happen to do this, i've got all the servers/hosting we could ever need if need be. Perks of being the sysadmin for a large hosting company.
And even if that doesn't pull through, HostRocket might be able to give us some probono space, since this would be the project of their child company. But I think bioteq might be able to help us on that.
Originally Posted by WhiteKnight:
well, a program that "allowed people with little or no HTML experience to quickly format their text and add pictures into their entries" is called FrontPage, and has already been done.
Well, is FrontPage free? Or open-source for that matter? Wait, this is going to be open-source, right?
I am starting to think this blog idea might be a real winner.
zachogden
12-03-2004, 09:41 PM
Look, if we are going to do this, thing, we're going to have to get a clear idea on how much of the community will actually participate. Ergo, I've turned this into a poll.
(EDIT) Nevermind. It wouldn't let me edit the original post. SO I'm just going to leave it at this...
This idea has great potential; its just a matter of rallying support. Right now, we have only 4 people, out 4547 CF members, those people being bioteq, SirCodeAlot, WhitKnight, and myself. I'm surely not saying we couldn't start with 4 people, but doing so may start us off on the wrong foot, as that would show the loss of one of our original goals -- to make a community project.
But, what are our goals, indeed? We have yet to establish them, and therefore, I feel the need to ask what they are, what they should be. Should this be a community project, or has that word yet to become stale, trite in our own minds already? Should this be an Open-Source project, released under the GPL, or should it stay hidden, the sources only revealed to those working on it? And, even more important, what will this project be? What will the end result amount to? It seems the idea of blogware is taking hold, but is that what we truly want? Is it something that other people might want to have?
These questions and more I ask.
hamsterhuey
12-05-2004, 05:24 PM
I'll make the web site!
zachogden
12-05-2004, 06:32 PM
hamsterhuey Originally Wrote:
yipee
I'll make the web site!
Good job, Ryan. Your first post was a success. Oh. by the way, this is my buddy Ryan. I figure I'll just do his introduction for him:
"Hi, my name is Ryan. I do Java, HTML, and 3d modelling, but am a script kiddie at heart."
I'm thinking we'll get some more momentum once finals are over. Mine are in January... ugh... right after Christmas break too... why couldn't they make them next week?
bioteq
12-06-2004, 12:02 AM
Welcome, Ryan.
stuka
12-06-2004, 08:10 PM
My .02:
1) One person (or a VERY small group of people) needs to be the project leader(s). This person may not even be a good coder, but needs to be fairly dedicated, and willing to make decisions. Everyone that's going to participate needs to know who this person is, and be willing to work for them. Projects w/o strong leadership flounder.
2) This project should definitely be open source. The point of the project is for the CF members to learn, and I see no reason that future members should be excluded, or that other students of programming shouldn't learn from this - I for one think that learning should be open to everyone.
3) I think the server-type project would be an excellent choice. Network programming is and will continue to be a HUGE segment of practically all markets, on every OS, so it's worth learning. Also, depending on the NATURE of the programming, multiple languages could be used (to implement clients, for example), allowing everyone a chance to contribute. However, I'm not sure WHAT would be the best project, though at one point a couple of us who (used to) hang out here were kicking around the idea of a 'classroom' system, which combined IRC-like chat with a common 'whiteboard' and shared documents.
zachogden
12-06-2004, 09:44 PM
Hmm Stuka. You make me think. You make me think that maybe this might work. I completely agree with your first point... At least with strong leadership we will be able to divvy the coding jobs and responsibilities and give the project a direction.
Point 2: I do, and have, agree(d). As a further note, I would donate a section of my http://www.freepgs.com/zachogden webspace, which is not very full, to hosting the project's files.
Point 3: I like that classroom idea! That sounds really cool! Basically in my mind its down to blogware and classware. I just invented a techword. Another word I have just invented, techword, is now used to describe a word or phrase such as "malware", "spamware", etc. Hooray for inventivness and inginuity!
HOWEVER:
I propose we continue with the idea of a small project to set a precedent for future big ones. The classware might be too big of project to tackle at first.. if we make a great small first one, we'll feel confident enough and gather enough support within the community to try a bigger idea.
THEREFORE:
Blogware is in my mind. Its set there. You can't get it out.
THREE:
Number of posts declaring support for this idea before I begin putting time into making a project abstract and outline for display.
LEADERSHIP:
Will be nominated in the aforementioned posts. You will nominate no more than 2 people. The nominated persons will decide within themselves who will actually take big leadership positions. If they cannot, other means, such as a Poll Thread or other, will take place.
Thank you.
sicarius
12-07-2004, 08:58 AM
I would suggest something fairly generic. Stuka's point about networking is dead nuts so how about:
An open source message queueing system similar in functionality to MSMQ.
It is generic because it is good jump off for people that want to write simple web services. The message queue abstracts most of the networking involved and end users are able to just read (or submit) messages to the queue. Then someone could write a simple daemon that responds to certain requests that are placed in its designated queue.
There is also the possibility of follow up projects, for example some GUI admin tools that would allow for the creation and configuration of new queues.
Anyway. I am sure that there are already solutions out there, but I haven't really seen anything that rivals MSMQ.
sicarius
12-07-2004, 08:59 AM
And, as a follow up, we could use published details about MSMQ as a basic specification. Then we could try and make something better.
stuka
12-07-2004, 02:49 PM
Not sure if "dead nuts" is a compliment or not, so I'm gonna nod and smile.
zachogden: Perhaps we could start off the classroom app *as* a small project - maybe even use an existing protocol (jabber springs to mind) as the base, and add on extensions to it.
sicarius: That actually sounds like a VERY interesting concept. I've not used MSMQ, so I'll have to go read up on it.
zachogden
12-07-2004, 03:47 PM
In truth, Sicarus, I have no idea what this message queue thing would accomplish. What kind of practical thing would you make with a messaging system. I'm not patronizing you, if thats the correct word to use, I just honestly wouldn't know what to do with it.
stuka Originally Wrote:
zachogden: Perhaps we could start off the classroom app *as* a small project - maybe even use an existing protocol (jabber springs to mind) as the base, and add on extensions to it.
I like the cut of your jib, the sound of your town. I was thinking about this last night, as I showered (which is when I do most of my important thinking), and I thought this would be a cool thing to have. I think something like this would have great practicality. If I spelled that right, gamers would be able to use it for teambased strategy, and it would just be a cool thing to have.
I'm just so proud... one of my own posts made it to 3 pages...
sicarius
12-07-2004, 03:51 PM
Yes, "dead nuts" is a compliment :)
It means "right on", "spot on", etc.
It got thrown around a lot in the Mechanical Engineering department of the University I went to. I don't know if it is the same at every ME department, but as an old program they have quite the crib system (i.e. collection of old tests).
Some kids would study from the cribs and then you'd hear 'em say something like: "Man, that crib was dead nuts! And it was from like 1974!"
SirCodeAlot
12-07-2004, 10:08 PM
Being a HostRocket employee, I have my own dedicated server there. I would be more than happy to host the files at no charge and basically no restriction. Not to mention that it might be nice that HostRocket dedicate our own server to a project such as this ;-) .
I too agree that the classroom idea would be a great little app. Just today I was wishing there were some easy way to show what I had on my desktop to someone I was helping out. Using existing protocals might also be the way to go. We could even develop plugins for the popular modular IM programs (ala: Gaim, Trillian Pro) so that it is as simple as clicking a button to a person that is also "Classroom-Enabled".
I feel that promoting network programming is also a good move. It is something that people don't often get to fool around with on a large scale.
DEFINATELY open-source. No question about it. Allows for flexible teams, and outside help should the project begin to faulter.
bioteq
12-08-2004, 01:06 AM
Network programming is a definite. Alot of people who do know how to code don't necessarily understand, or know how, to implement network coding into their applications -- It used to not be important; now it is.
Classroom app does sound interesting. I'll have to read up on them a bit since i've never really seen one or have the slightest clue of how it would work.
All in all, great ideas.
sicarius
12-08-2004, 09:10 AM
Zach: Message queues are simple ways to implement a network service that doesn't rely on a stream based (TCPish) protocol.
In general:
The message queueing daemon would sit there waiting and clients would basically say, "Hey, deliver this message to the XYZ queue mister postman!".
The daemon would place the message in the specified queue and then whatever is listening for messages in the XYZ queue could read the message and perform some action. Responses could be place in another queue and the client could read them.
The above is a very simplistic view of thing since it doesn't mention permissions for accessing queues, or how a client would know which queue to look for responses in. Or even how a client would know which response was meant for them. All of these things I just mentioned are of course possible.
The implication is that both the client and the server wouldn't have to do any socket programming. The socket stuff would be abstracted into some type of library with calls like:
Queue someQueue = connectToQueue("whatever");
someQueue.deliverMessage("Foo you too");
You won't have to worry about buffering, error conditions, etc.
zachogden
12-08-2004, 06:51 PM
This messaging queue thing osunds like something that could turn into a IM system.
sicarius
12-09-2004, 08:21 AM
Well, you could use it for a lot of things. You wouldn't want to tie the message queue project directly to an IM project.
Also, there is not point in making more IM applications aside from a basic one just to learn. There a lots of people working on lots of them.
stuka
12-09-2004, 05:00 PM
Heck, the message queue could be used to implement the classroom project...though I think extending Jabber might be more pragmatic - of course, this isn't a purely pragmatic task.
zachogden
12-09-2004, 06:45 PM
I was doing somethinking... yes, I know, "Wow Zach, you can think too?", and got the impression that using C++ to make this ClassWare would be the best idea. The encapsulation it offers could make isolating the different parts of the project much easier. Any thoughts?
zachogden
12-09-2004, 06:46 PM
This thread will be 4 pages long really soon.
Whiteknight
12-09-2004, 07:45 PM
The classware application does sound like a nice idea, but as a group, I think we need to start really small. If the classware app encompasses both an IRC-esq client and a whiteboard file server system, I propose we start with one or the other. For instance, I think it would be relatively easy to make a socket-based chat client, especially if we had a dedicated server.
I say we start with the pseudo-MIRC chat client. it would be central server based (a la SirCodeAlot), and we could write up our own protocall for messages. We would need people to start working on a sockets-based message sender/receiver. We would need people working out a specific data protocall, and defining our primary data structures for information sending/receiving. We would need people working on a GUI interface (or a simple console interface, if we want to start small). We could also have some Java people working on an applet so we could connect from a webpage.
anyway, I'm trying to think of things are are small projects to start with, but will enable a large amount of our forum members to participate.
sicarius
12-10-2004, 08:24 AM
I don't know why I didn't do it earlier, but I'm moving this thread the the appropriate forum. Sorry for the hassle.
darelf
12-10-2004, 01:59 PM
Wasn't there a classroom project on sourceforge that started from here? I thought I was part of it, but nothing ever happened.
Somebody is gonna have to admin a project to push it forward if it's going to happen at all.
Just saying.....
bioteq
12-10-2004, 02:06 PM
Originally posted by darelf
Wasn't there a classroom project on sourceforge that started from here? I thought I was part of it, but nothing ever happened.
Somebody is gonna have to admin a project to push it forward if it's going to happen at all.
Just saying.....
You stepping up to the plate? Hehe.
I'm up for anything, as said earlier. Just point and I code. Such is the life of a code monkey.
darelf
12-10-2004, 02:51 PM
If admin a project, it would be dead before it got registered.
I'll code. Tell me what you want. C++/C/Java/Python/Tcl/Lua/PHP
Just let me know.
bioteq
12-10-2004, 02:59 PM
Sounds about like me.
Put me in charge and it'll crash.
Put me pushing the paper (so to speak) and i'll atleast get SOMETHING done.
Strike
12-10-2004, 04:30 PM
Originally posted by darelf
Wasn't there a classroom project on sourceforge that started from here? I thought I was part of it, but nothing ever happened.
Somebody is gonna have to admin a project to push it forward if it's going to happen at all.
Just saying.....
It's here:
http://sourceforge.net/projects/classroom
zachogden
12-10-2004, 06:40 PM
That's funny. No files released, 0% activity level. They had 14 hits 3 days ago, but that is about it. Kind of funny.... no files released, yet they've been around since 2002? That's worse than my ZData project!
iDxMan
12-11-2004, 09:56 AM
Originally posted by zachogden
no files released, yet they've been around since 2002? That's worse than my ZData project!
I find that quite frequently on SF. I've found a number of projects that sounded exactly what I was looking for................... then they have no files, no CVS, no forums, etc..
-r
Strike
12-11-2004, 10:11 AM
Originally posted by zachogden
That's funny. No files released, 0% activity level. They had 14 hits 3 days ago, but that is about it. Kind of funny.... no files released, yet they've been around since 2002? That's worse than my ZData project!
Yeah, I don't know if you noticed, but there hasn't been a flurry of activity here about it either (and it was here that it got started). A few of us put our heads together for some ideas, but we never got off the ground, really.
zachogden
12-11-2004, 10:27 AM
WhiteKnight Originally Wrote:
I say we start with the pseudo-MIRC chat client.
I'm down. In regards to what you said later in the post, I would say command shell to start, and then later on just integrate the code with the classware native GUI. Or, we could just make a simple GUI for it later... it really doesn't matter.
Originally posted by darelf:
Wasn't there a classroom project on sourceforge that started from here? I thought I was part of it, but nothing ever happened.
Somebody is gonna have to admin a project to push it forward if it's going to happen at all.
Just saying.....
I'd be willing to volunteer my time to help do more than just code this project. I mean, I'm not just trying to present a slick way of saying "I want total control over this because I started this thread oh man I'm so cool", I'm just saying that I would like to help admin it.
Like I possible said before, this project has potential, we just need to get it moving, or -- like darelf said -- it's just going to die and not happen. That would be such a shame.
So! I suppose we need to get a head count so to speak. If you want to help get the nuts and bolts of this project going (which at this point is this IRC side of things), post it or email me at zach dot ogden at gmail dot com....
I'm assuming most of this is going to be done in C/C++, if not all, but I do also like the idea of a Java web-plugin.
This is the part of the movie where Zach goes off to google to try and find stuff on socket programming.
Tell me what you think.
zachogden
12-11-2004, 10:31 AM
Alright, so after some quick google-ing, I kind of realized that there really isn't a C or C++ standard socket library! How are we going to make this program work without rewriting it for every platform we want it to be available on? Sometimes I realize Java has it's perks.
stuka
12-11-2004, 10:42 AM
Options:
1) Code the whole thing in Python (which was the original intent)
2) Have the C++ nuts code the daemon side in C++, let others code up clients in their own favorite languages. (and for sockets, Socket++)
3) Some other division similar to #2.
Strike
12-11-2004, 11:05 AM
You could always use supybot's irclib for the IRC client if you want :) Though with the amount of additional stuff we've added to the bot I'm not sure just how clean it separates from everything else (like, I think you almost necessarily inherit the conf system we've implemented).
bioteq
12-11-2004, 11:29 AM
Socket's aren't really that big of a problem.
You can have multiple 'wrappers' for each OS that can easily be determined through the code and set upon execution.
An IRC client does sound fun. I've never really tried to write one, although I have thought about it at a few times in my short lifespan. I'm in.
Note: All my code will/would be in C. Straight, raw, hard-core C.
zachogden
12-11-2004, 11:30 AM
Stuka:
1) How many people actually know enough Python to help make a IRC chat mini-program?
2) I looked up Sockets++, and really liked what I saw. This could be what we'll end up using.
Do we really want to do this in Python? I mean, I'm sure it could do it, it's just a matter of... who knows it, or would be willing to learn it?
I'm going to play with Socket++ when I get home.
bioteq
12-11-2004, 11:34 AM
I'd rather not touch Python, thank you.
And I truly do not believe you'll need a socket library. If done in C, libc has enough socket coding as it is. Just detect OS and have it use that code correctly. Alot of programs actually emply this; especially those meant for cross-platform sites.
It was stated earlier that you wanted -everything- in this project to be done from the ground up - why not do sockets programming, as well, from the ground up?
Honestly, I see sockets being the lower-end of things to worry about. Yea, retreaving the data and sending it is important, but you've got to be more worried about your algorithms/parsing engines to handle the data correctly as well as error detection/traps. Perhaps even GUIs for later down the road (Writing a GUI to handle the calls using apis is really not hard at all. Infact, I just finished some work on a GUI for something I wrote that takes mirc-like text (ansi, actually) and displays it.).
zachogden
12-11-2004, 08:23 PM
Originally Written by bioteq:
I'd rather not touch Python, thank you.
Neither would I.
Originally Written by bioteq:
And I truly do not believe you'll need a socket library...why not do sockets programming, as well, from the ground up?
Well, what I was thinking we could do was use the Socket++ classes for now, and then write our own later down the line if need be. I was reading through the GNU LibC manpages, and it's not like using that would be in any way easier than using these classes. I don't know.
WhiteKnight and I are going to try and lay some framework here in a bit... we're going to make a little program that uses sockets to connect to another client and receives/sends text messages. This should give fair warning of what difficulties lie ahead, as well as whether or not Socket++ is an option.
Thanks for all the support, guys.
bioteq
12-11-2004, 08:44 PM
Alrighty. I'd give a hand, but I was supposed to go out drinking with some friends tonight, but that just got shattered since I think my damn dog is dying.
He's my only friend. :(
zachogden
12-12-2004, 10:09 AM
Alright, scrap socket++ for now. I tried my hardest just to get a program to compile, and failed. I think the code was originally written for Unix/SunOS (Solaris I think), and I kept getting these compiler errors on my WinXP machine. Ugh.
bioteq
12-12-2004, 08:57 PM
Hmm.
You got a messenger of any type (msn/aim,) Zach?
zachogden
12-13-2004, 06:11 PM
AIM. elzacho13 is my handle. I'm not on too often, though. An email will get you quicker response. It's in my profile.
Whiteknight
12-14-2004, 11:37 AM
yeah, sockets have always been tricky. I dont have any time this week because of finals, but next week i am home free. maybe we could all set up a chat room or something later?
bioteq
12-14-2004, 11:51 AM
I can throw an IRC server up on nanobit if any of you want. Would only take a matter of minutes to do. Just let me know.
zachogden
12-14-2004, 05:44 PM
I think I'll get those server/client programs up in a few minutes and see what we can't do with those. Kind of weird.. one of them (the server one) was commented in like Greek or something. Once I get those to work on one machine, I'll post the programs and then we can edit them so you can connect to different IPs.
zachogden
01-22-2005, 02:56 PM
I've basically come to the conclustion that this project (IRC chat) would be much, much, much, easier with Java. Now, I am aware that there are less Java users here than C/C++ users, but this is a learning experience, right?
Beneifts:
Cross Platform Interoperability (Without changing any code)
Swing API can be used to easily create GUI
Java I/O system for networking is much easier than trying to use winsock.
Cons:
Can't think of any.
stuka
01-23-2005, 11:24 AM
1) NEVER use the winsock specific stuff if you can help it
2) there are decent C++ GUI frameworks
3) properly written standard C++ should compile most anywhere
4) Java programs CAN be a pain to get running on some peoples' systems.
zachogden
01-23-2005, 12:56 PM
About what stuka said regarding decent C++ GUI frameworks... I know what you're thinking, and I absolutley HATE Qt. Although that's probably not what you're thinking.
Can you give me an example of how a Java program can be a pain to run?
sicarius
01-23-2005, 04:44 PM
Well, in regards to linux there are multiple JRE implementations. Some aren't fully compliant with the JRE specification.
zachogden
01-23-2005, 04:50 PM
I'm just throwing ideas into the air here. It just seems like Java is more cross-platform, and that networking stuff would be so much easier with it....
darelf
01-24-2005, 09:10 AM
I agree that if you're serious about cross-platform, Java isn't the best way to go. There are numerous compatability issues between even the "big 3" (windows, linux, mac) when it comes to Java features.
-C++ is a good choice.
-Tcl is another good choice for pure cross-platform goodness.
-I don't think Python even has a Mac version....
These suggestions are from experience. Java is a fine language, but when you are trying to make something cross-platform on more than two systems, it's not a good choice.
On C++ GUIs, there are alternatives to QT, since it really isn't free on all platforms. wxWindows comes to mind. (I'm not sure how well it works on Mac, but it claims to work the same on Mac) The only downside with wxWindows is that it is very MFC-y (which may be a plus for some people)
However, I think you'll find that limiting your target systems list will help you pick the right language/toolkit.
sicarius
01-24-2005, 10:02 AM
I wasn't trying to discourage your choice of Java, I was just answering your question about why it wasn't perfect.
I've written network code in java and it is pretty easy, I don't really think it was that much easier than using BSD sockets though.
The trick to using BSD style sockets with languages like C++ is to encapsulate the objects representing data and messages so that all operations are reduced to simple socket I/O.
For instance, make a Packet class that contains a member function that serializes the packet into some easily transferable form (e.g. text). Derive your data and messages from this class and override the serialize member function. Then you are simply reading and writing characters from the socket's i/o streams.
You'd also like a base class descended from Packet called Message with member functions for parsing a basic message. The message may look like:
[message id][payload][terminator]
To which every Message must conform. Then all you would need is a handler to say, "Hey, this is message type 124, so I am going to call the DoSomeStuff function using payload as the argument". Or, you may have an object representing that message type in which case the constructor gets payload.
This is a pretty long winded response to say something very simple: I/O should be as simple as possible, the layer interpreting the I/O is where the complexity should be.
So, in summation, don't let low level I/O determine what language to develop your software in. The I/O code should be written once with a certain level of abstraction and then it should never be touched again...
FYI, if you where going to do pure C you could just make functions to call to do the I/O for each message.
Whiteknight
01-24-2005, 02:05 PM
to be fair, if compatability was our biggest concern, then maybe we should look at something more universal, like Perl. I know people dont like Perl here, so that probably isnt our best option anyway, but certainly Java isnt either.
if we stuck with C/C++, we could keep relatively inter-operable code, although it would probably be in our best interests to write the program itself as a system-independant library, and just make the most basic GUI nonsense a front-end, which can be system-specific.
or, we could just use some creative preprocessor action to have multiple front-ends built into the code, and they get selected between at runtime (since i think few people here are very good with cross-platform graphics packages).
sicarius
01-24-2005, 02:18 PM
Not only that, but where is it written that it has to be cross platform? If you want to write a program that only runs on windows (or linux, or mac) go right ahead. If it is a great program then people will use it.
The main reason I say this is that some features simply can't be done cross platform. Some of those features may make your application super sweet.
zachogden
01-24-2005, 05:58 PM
Wow, I'm glad I got this alive again :). To what WhiteKnight said about Perl and stuff, I didn't neccessarily mean Java was absolutley the best choice whatsoever no matter what period. What I did mean though, was that I thought networking would be easier, since I've tried countless times to get sockets to work with C, but with no avail. I've been trying to do research on "building your own IRC chat program", but google just doesn't want to give me what I want. I'll keep looking for solutions. Also, GUI frameworks aren't 10% of a big deal as the actual core socket code is. What we may end up doing is just maintaing multi-platform (or, like what WK said, multi-platform with the use of preprocessor trickery) core code, and then having Win32 guys write the Win32 GUI, Mac guys writing the Mac GUI, etc, and just having different packages available, i.e. Click Here for the Windows Version, Click here for the Linux version, etc.
Sorry for the terrible composition and grammar this reply contains. Its the first day of the semester, I'm tired.
stuka
01-24-2005, 10:34 PM
If we DO end up doing this in C++ (which I REALLY hope we do, 'cuz I love C++), there are some tricks and techniques for handling multi-platform implementations that make them relatively easy to maintain, with less dependence on the preprocessor. Also, socket++ is a GREAT library for C++ socket work, which SHOULD be relatively straightforward to port to Windows (it used to compile on it, but I don't know if the latest versions do).
zachogden
01-25-2005, 06:32 AM
Actually, a while back, I did download the socket++ libraray, but couldn't figure out how to use it for the life of me. Maybe I should go check that out again.
stuka
01-25-2005, 08:43 AM
Did you read the docs too? They're not extremely newbie-friendly, but they are right. If you need help with it, lemme know - I'm trying to learn it well m'self.
sicarius
01-25-2005, 08:46 AM
I've tried countless times to get sockets to work with C, but with no avail.
Sounds like problem exists between chair and keyboard :)
Seriously though, if you can't handle sockets in C why do you think writing an IRC program will be any easier? Even with a more streamlined networking API you are going to run into problems trying to implement a complicated protocol.
I'm not trying to put you down, I'm just suggesting that you start with something more basic. Write a time of day server and a time of day client using BSD style sockets and then go from there.
darelf
01-25-2005, 11:27 AM
If you are only interested in a program written for Linux and/or Windows, then use Python and TwistedMatrix. Twisted has a LOT of good networking functionality, and it will handle all the set up and tear down of sockets, etc.
I'm diving into it myself, and it's amazing how well put together this is.
It lets you concentrate on your logic, invent new protocols, etc. without worrying about the low-level socket i/o or how to handle asynchronous events.
zachogden
01-25-2005, 06:04 PM
sicarius: Yes, I know what you're saying there, and you're absolutley right. I learn by reading books. That's why I have such a big book collection. But you knew that, right? Anyway, going on, some people can learn by just doing a bunch of online tutorials, or reading the documentation or something. I have been looking at my local Metro-Detroit area Borders and Barnes and Noble book stores, and let me just say that there are no "Networking in C++" or "Networking in C" books to be found. And, I don't think that writing an IRC program would be easier, its just that, by after reading, I begin to actually know and gain confidence in what I've learned by putting my "skills" to use in a project. And what are BSD sockets. I'll Google it. Google is a verb and a noun now, apparently.
zachogden
01-25-2005, 06:07 PM
Kind of interesting: (/. article about a book about Java Application Dev on Linux) http://books.slashdot.org/article.pl?sid=05/01/25/1840259&tid=108&tid=156&tid=6&tid=106
sicarius
01-26-2005, 08:24 AM
Nowadays it is safe just to say "sockets". You used to have to say "BSD sockets" because there were multiple socket APIs fighting for domination. Eventually, in the Unix/POSIX world the Berkely Software Distribution (BSD) style socket API won out. Most *Nix programmers that do networking use BSD style sockets.
Best book I can recommend for socket programming is by Stevens:
http://www.amazon.com/exec/obidos/tg/detail/-/0131411551/qid=1106743037/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/103-7254475-9497414?v=glance&s=books&n=507846
Note that there are two volumes. Stevens was perhaps the best technical writer I've ever read. If you haven't already also check out his "Advanced Programming in the Unix Environment" and his series on TCP/IP. Everything he wrote is a classic.
sicarius
01-26-2005, 08:26 AM
FYI I think it is great you are reading, too many people do the online tutorial/hack it out thing. They rarely end up becomming decent programmers.
stuka
01-26-2005, 09:05 AM
zachogden: get "Unix Network Programming Volume I: TCP/IP" by W. Richard Stevens. Expensive, but can't be beat for quality.
Whiteknight
01-26-2005, 09:59 AM
haha, I dont suppose a similar book exists for a windows platform?
no, I know that winsock uses the same general functions, you just have to add more things to it. that book by stevens is definately going on my amazon.com wishlist anyway.
zachogden
01-26-2005, 06:22 PM
Great. I'll most definately (or mos def, depending on where you're from) check these out. As for the whole BSD sockets thing... Do BSD-style sockets only work for communicating with other Unix machines, or is it just a *nix -tailored way of communicating with TCP/IP, and you would use some other method on a windows machine to communicate back? Anyway, great advice guys.
sicarius
01-27-2005, 08:26 AM
Exactly right. The API is basically just a wrapper around the system calls and buffers that make up the TCP/IP stack. Each OS has its own TCP/IP stack implementation, but if they conform to the protocols, then there isn't ussually a communication issue.
So, users of a different system may use a different API, but the TCP/IP protocol (basically) doesn't change.
stuka
01-27-2005, 01:54 PM
Whiteknight: while you CAN program with a totally different set of functions in Windows, the basic socket functions still exist, and you only have to add a bit of boilerplate code to initialize the winsock library. After that point, the code is identical.
darelf
02-02-2005, 03:06 PM
If C++ sockets are desired, try out Sockets.... http://www.alhem.net/Sockets/
Very good. Very easy.
Are you actually wanting to implement the actual IRC protocol, or invent an IRC-like protocol? (As in, a line-oriented message protocol....)
If it's the latter, how about posting a sample of how you think the protocol should be laid out...?
It might be fun to have a protocol to write to and have different people implement the protocol in different languages... (C,python, java, etc)
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.