@GreyWolf: Check out Amazon EC2 rather than building an HPC cluster.
I will look into it, but one of the aspects I am interested in is the building and administering of a cluster.
I was thinking of building a Beowulf from some old PCs or maybe some inexpensive Intel Atom boards (not worrying about performance) http://en.wikipedia.org/wiki/Beowulf_(computing)
The other thing I am toying with is a "Personal Supercomputer System", i.e. load a workstation with GPUs and use OpenCL.
Anyway it will be fun when I get around to it. :0)
I'm making a simple command interpreter to run different commands; such as ls.
Could you please tell me, how you are handling background processes in your shell?
Edit: I am working on one too. Right now my shell can handle commands with arguments, multiple pipes, and IO redirection.
I am just not sure about background/daemon process :(
Could you please tell me, how you are handling background processes in your shell?
While I haven't got anywhere near that far (all I can do at the moment is run commands); I suppose if I want a background process I could create a child process and close stdin and stdout. Closing stderr would be a bad idea though.
Something interesting to work on will be wildcard expansion.
Anyway at the moment I'm working on a multi-file char/word/line counter. I think wc probably can handle multiple files but I realised a way of combining C/C++ to do the same job but make it easier -- I'm using fstream for words and lines, and stdio (for getchar()) for characters.
I currently have a limit of 512 files because I think more than that will be ridiculous. I could just make my array bigger though to have more files.
I'm actually writing it only so I know how many lines my source consists of in total, without having to do any addition in my head :P
I'm going to count characters (or words or lines) and then report the amount of characters/words/lines in each file and the total.
@chrisname
You should check out Essential C++. Lots of good exercises (and solutions) and very STL oriented. I can point you to a pdf if you would like.
Also, look into the interpreter design pattern, its complex, but will probably help your shell alot.
I was able to remove the limit by using an std::vector... It counts lines ok but doesn't handle characters and words very well; I'm not sure why. Anyway I've decided to rewrite pretty much all of the UNIX command line tools over the next year or so (it will probably take more than one year :P) and then write a hobbyist kernel.
I already have the basis of my kernel printing function:
Maybe what this website needs is for people to be able to upload their code so other people when they look at someones profile they can look at how others have done things to give them ideas for how to tackle a project they are working on. Of cause you would have to be careful not to post code that belonged to the company you work for if it belonged to them even if you had written part of it.
That would be good. There is a "source code" section that has some good stuff on it, but when I was writing a text editor (I haven't finished it yet) and reading the source of this "notepad2" program, I noticed numerous coding errors, such as void main(), etc. I really don't think that should be on there, to be honest. It also doesn't compile with GCC... there are about 15 compile-time errors :l
Anyway, yeah it would be a good idea; but then people could post malicious code or something.
Oh; so it is valid for DOS compilers? Is it pre-1998 or something?
The tanks program is pretty good. It could do with some updates and the graphics are a little buggy (the tanks flicker IIRC) but otherwise it's a pretty nice game. I played it for a little while.
It shouldn't be on there if it's pre standardisation; definitely not. GCC is standards compliant so if it doesn't compile with that then it isn't really valid C++ anymore... it's misleading. It probably doesn't compile with VC++; or any Intel or Borland compiler; so chances are it won't compile with any modern compilers. As such, it shouldn't be on there.
Well; I guess not -- it allows itoa and that isn't standard.
GCC has a lot of other extensions (as any other complier has), Bazzy meant that there some features that the C++ standard specify, but GCC dosen't allow (neither any other complier).
@Zaita&Greywolf: Threading on a multicore (shared memory) machine is not the same as using say MPI on a cluster (distributed).
Combining them is not a good idea either. I don't think Greywolf wants to thread anything, he said he wanted to build and manage a cluster.
MPI is what I want to learn (personal edification). I have met some people who are doing/have done PhDs in plasma physics, seeing some of the stuff they do has got me interested computational science and engineering. I have started to brush up the maths that I learnt at uni (but have forgotten due to under use) and refreshing my algorithm analysis and design skills (they have gone a bit soft with only doing Desktop apps). Then I'll hit the computational computing stuff, should keep me busy for a while.
I am finding MIT's iTunes U to be a valuable resource.
http://web.mit.edu/itunesu/
Something pretty interesting to try would be a program that modifies it's own source. I guess one way to do it would be to create a self-hosting compiler which changes it's source code and then recompiles itself, replacing the original executable, and then re-executing it.