On Wednesday 21 July 2004 09:57, Paolo Alexis Falcone wrote: > Maybe you'd get better luck if you'd code it in C rather than the shell? > > :D > > Shell scripts are not the end to everything, just as most unix tools > are. Cron was made specifically for the purpose it currently serves, and > only for that purpose. The shell is supposedly used as a mechanism for > passing commands to the operating system (whether interactively or > automated).
yeah, but he's a newbie. or i think he said he was a newbie (otoh, that might have been someone else, too lazy to look in the archives :). i tend to suggest php or perl instead of C these days. they're simpler than java and it's harder to create memory leaks (still possible, just quite a bit harder, and i can't quite think of how to make buffer overruns possible in them). java is good too. the shell is good if it's a simple thing that needs to be developed quickly. for more complex jobs, the shell can probably do it, but the complexity of getting it all working, and the shell's inherent efficiency disadvantage compared to other languages begins to tell. perl or php are better there. for anything that really needs to be as fast as possible, maybe C is better. but maybe not, it depends. if it's going to be a long running process maybe java is better since HotSpot will optimize the, ahh, hotspots, and there are some things that java can optimize that C can't (because of the aliasing problem, C pointers make aliasing optimizations difficult to detect, so the compiler can't optimize). for anything that'll go in the kernel (device drivers, kernel modules, etc), C is really the only choice. for a lot of programs though, it would probably be for the greater good if we started to move away from C/C++. this is not to, ahh, bash those languages. I love working in C/C++, i just see their warts and weaknesses and I'm getting lazier, so i prefer to work in languages that don't force me to work so hard to get the small details right (pointers, references, memory allocation, memory freeing, protection against buffer overflows, native string type, easy aggregate data types (vectors, arrays, other data structures). unfortunately, we probably won't see any such language shakeout for a while, at least not until some other language pops up as the preferred systems programming language. there are too many languages to choose from, and too much language chauvinism (natural, after all, i'll be loyal to the languages i know, and i'll distrust the languages i don't know :), so the systems programming language shakeout will take a while yet. tiger -- Gerald Timothy Quimpo [EMAIL PROTECTED] [EMAIL PROTECTED] http://bopolissimus.sni.ph Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78" malapit na ang september Lack of money is the root of all evil. George Bernard Shaw -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
