ESR's Art of Unix Programming Updated
SRS Webby writes "Eric Raymond has updated his The Art of Unix Programming page with two new chapters - Chapter 3: Unix's Zoo of Languages and Chapter 4: A Developer-Friendly Operating System." This is actually fairly old, but its a nice slow friday. Personally I'm resolving this
by re-reading every Penny Arcade.
Here we have a perfect example of someone who has become locked into a paradigm and will not likely change in the forseable future. The methods of programming outlined here are outdated/outmoded. In todays world it is no longer appropriate to work without an IDE. With automation tools, CASE architectures, debugging, and profiling the programmer advances the art. Working with VI and make just doesn't cut it. This is not the 1970's. And if you think working with those methods is current, then you spend too much time at 70's bars. This same kind of thing happened in the chip development industry. Many people, in the beginning, refused to change to automation tools for routing circuits. These companies became behind and lost the race. You cannot develop a big chip project now without some auto-router. The Pentium 4 could not have been routed by hand. Looks like ESR's content to work on after market automobile mods more than developing purposeful architectures! Good luck ESR!
From http://www.tuxedo.org/~esr/writings/taoup/chapter4 .html:
/ee'maks/)...
Emacs stands for `EDiting MAcroS' (pronounce it
Wouldn't that make it 'EDMAS'?
I have never liked User Friendly because it just isn't funny and never was. It's a boring comic aimed at people who are predisposed to thinking that condescension is funny. Dilbert is an example of a very funny comic. User Friendly is just tripe.
Sorry for the "OT" question, but what exactly does the www.tuxedo.org site do?
The block's probably for the gun page...
Your Working Boy,
- Otis (LICQ: 85110864)
Actually, I did Perl first, hated the fact that I had to comment every damn line in order to figure out what I had done when I came back to it 3 months later, and went to PHP. At the time, those were my choices -- anybody using Python was doing so out of pure faith, since it was still basically "Guido's dream".
I have since been sufficiently prosthelytized by Python devotees to look at it. I like it well enough, and now install it on all my computers, even tho I don't use it (yet).
Dunno why you say PHP is a knee-jerk reaction to Perl. It's more like an effort to bring the nice parts of Perl (lots of modules and usability) with a Web focus (rather than systems administration) to Apache. I like PHP, but I'm not married to it.
I like Tcl, but for different reasons -- I mostly like its syntax and the fact that it's so easily embedded in other programs. Plus, I use AOLserver, so I *have* to like Tcl :)
Potato chips are a by-yourself food.
************************************************ ** *
Being bitter is drinking poison and hoping someone else will die
You expected a solid, well written, technically savvy programming essay from Eric "I know python!" Raymond? Well, I never.
(jfb)
To spur "enterprise Linux," Big Bang, the distributed two-phase commit.
I, for one, know that 50% or so of all _my_ bugs are related to implicit casts. I hate them. I rather do explicit casts allways than that mess. Memory management is much less of a problem.
--The knowledge that you are an idiot, is what distinguishes you from one.
tuxedo.org does house some of ESR's libertarian/anti-gun control stuff. It could be that they (being the censorware folks) consider such 'radical' pro-2nd amendment rights and anti-current-form-of-government opinions to be offensive.
Come on ... anyone who confuses paper wealth with *real* (tm) wealth deserves whatever sucker trap Wall Street is bound to come up with next. Wealth in its simplest form is the means to produce a future revenue stream and capital (in its broadest sense) a mechanism to shift it through time and space (and into their pockets if certain greedy indidivuals have half a chance). From an personal point of view, the best investment of your time/effort/talent is gaining education/experience. Now those who are less fortunate (ie can't tell the difference between gambling and investing), the financial wizards (for a generous 33% cut of the salami) has kindly offered their services to borrow (banks) or invest (mutual funds) on your behalf. Now after paying for their Lear Jet and CEO-hobbling exercise at Davos, they decide to chuck a few bob at pieces of paper which hypothetically represent ownership of a business system (and any profits/losses - epsecially losses as they capture all the real upside before it gets to the public - thereof) but just to hedge their bets, insist on laws/market mechanisms that prevent others from doing the same thing ie issuing paper (the Fed) or entering the same business (investment financial engineering aka anticompetitive mechanisms). So long as you pick something that privatise gains and socialise losses, you'll be fine (again also assuming that you are comfortable with amorality).
... earn does not mean save) more than a million over their career lifetime, I hope fortune smiles on you and if you are ever in a position to discover the opportunity, you gain the talent to know how to spend your wealth wisely, rather than becoming an economic slave to other people's desires.
Given that a skilled programmer can easily earn (note for idiots
Regards,
LL
Assembler really is good to know for some knowledge about what the computer can do. (Or rather how.)
Personally I've only done some rather brief studies of assembler, but I did that on MIPS and I think that was a good idea. It's properly constructed and not patched together like x86. My point being that most normal persons will get more benefit out of studying a sane architecture than jumping on x86 at once.
And while you're at studying assebler why not look at the actual internals as well? Patterson & Hennessy's Computer Architecture (Review at ArsTechnica.) books.
It is pretty clear that he should step out of the OSS world for a few minutes and see that Java is a huge language, particularly on the server side. The mere fact that he mostly talks about Java applets makes it very clear that he doesn't have a clue. The sad thing is that he can't see where his limits are, since that would refrain him from making a fool of himself.
Obviously, it's because of the Eric Conspirancy Secret Labs ;-)
Or for the references to "art fags"...
Tom Swiss | the infamous tms | http://www.infamous.net/
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
It's = it is. Its = possessive of it. Mmmmkay?
Alternately, do what true a penny arcade fan would and play Bejeweled.
On the other hand, it IS possible to devise an application programming language that rivals C++ and C in efficiency without much of the cruft. Check out Sather, whose semantics and efficiency are pretty good, but whose syntax leaves something to be desired (if only they would lose the pascally syntax...).
From the article: "Stock vi doesn't have mouse support, editing menus, macros, or assignable key bindings."
Hmmm. this is nitpicking, but, what about ":map"?
I seem to remember using ":map" with a fairly ancient SunOS stock vi, circa 1987 or so. I thought that was the "stock" vi, since Bill Joy wrote vi, and was at Sun from the beginning. And ":map" definitely does key bindings, and if you bind a key to something that
does a shell command, (e.g. ":r!somecommand"), that's pretty much a "macro" (whatever that is), right?
Well, I'm sure I'm not the only one to notice.
Bang the head that doesn't bang!
I've seen many types of bugs in my own code. Some of them include:
/* Two short, and a segfault if strlen() == 0 */
/* Usually due to sleep deprivation */
/* It actually happened once */
/* Added later, not realizing that more braces are needed */
Stupidly using variable++ instead of ++variable in array references, or vice versa.
Decreasing the reference count of an object temporarily, then increasing it again after performing some action. Usually when I'm "pretty sure" that it will have a reference count of >1, it's annoying to see it segfault when it tries to increase the reference count back to 1.
Ignoring structure padding
Off-by-one (fencepost) errors with sizes of dynamically allocated memory locations
A variaty of strlen()+malloc() problems, e.g., where I meant malloc(strlen(foo)+1), I could use
malloc(strlen(foo+1));
malloc(strlen(foo));
malloc(strlen(foo)-1);
I think off-by-one errors are the second main source of C program bugs. They can occur in programs which use no dynamic memory allocation at all, and are extremely difficult to detect. ALL HAIL ELECTRICFENCE!
Another common problem is using something like this:
if(foo) {
do_something();
do_something2();
}
else
do_elsething();
do_elsething2();
Of course, an editor with automatic, syntax-based indentation will help with the above problem and ones like it.
Macros that evaluate their arguments twice are also prime suspects. Imagine something like this, where trace evaluates its argument twice.
trace("unref return val: %d", object_unref(object));
Oops, you just destroyed your object if it had a reference count of 2.
Starting Emacs for every document is like starting apache anew for each web page view. A far better way is to use gnuclient or gnudoit to open a file in a new window instead --- treat it more as a daemon and less like vi, and you'll be much happier.
Things in Unix are meant to be fast; just ask any Linux user why they run Linux, and they'll tell you that they enjoy the power and speed compared to WinBlows. But the fact that Emacs takes a long time to load up (at least on my P75 machine), has a list of unnecessary features that could rival M$ Word, and simple things like saving a file require 2 commands (ctrl-x ctrl-s) all adds up to a lack of speed, a lack of elegance, and a lack of design.
------
That's just the way it is
I agree. Unfortunately, that opinion seems to be a controversial one. I guess nobody likes to hear criticism of something he values. UF has its heart in the right place, and the jokes can be quite accurate. And yet, for some reason I just don't find it funny.
Dilbert is good. Maybe it's as if different people are tuned to different frequencies, and each comic is a transmitter.
I was not of very hight opinion of ESR
as programmer and it became even less after
reading these articles. Take, for example, Java.
The guy is clueless! First of all Java is NOT alternative to C, maybe C++. If you look at current patterns of Java usage it becomes more
and more established enterprise server-size application language, not "Web-Language" for applet as he states.
nuff said.
Karma: Bored. (Thinking about resurrecting the "Anyone else is an imposter" joke.)
I'll give it a shot: "Red Dwarf" plots often deal with time warps, while reading "Family Circus" makes you think you've entered a time warp. Or that small square section of the newspaper in which "Family Circus" has appeared for the last, what, 40 years? has been in a time warp. Or its creator, Bil Keane, has spent that time in isolation in deep space with no real human contact, hence the rehashing of the same mind-sucking jokes.
Yeah, it's a slow friday alright.
--
Oh, yeah, it's not easy to pad these out to 120 characters.
read Mega Tokyo: http://www.megatokyo.com/
read Acid Reflux: http://acid.purrsia.com/
read Ever Crest: http://beta.evercrest.com/
read Flem: http://impure.org/flem/comic/new.htm
read Dr. Lobster: http://www.drlobster.com/
Mega Tokyo is about a pair of gamers who get stuck in Tokyo by accident.
Acid Reflux is a fantasy story about a goddess who has to reclaim her universe after her older sister neglected it.
Ever Crest is this awesome Everquest webcomic with actual art and a storyline, not words superimposed over screenshots of the game or nonstop pics of some blue female character's butt.
Flem is this goth-type strip, it's hard to characterize, but it's pretty damn cool.
Dr. Lobster is impossible to characterize, either you like it or you don't. It's awesome if you get into it, and the creators are cool.
This is all quality stuff people. You wouldn't see it in your local newspaper's funnies section, but that's because those old farts wouldn't know funny if it assaulted them with a clue-by-four. Even if you don't like all of them, I guarantee you'll at least bookmark one of them...
--
Peace,
Lord Omlette
ICQ# 77863057
[o]_O
I agree that the difference in disk space is now irrelevant.
nakednews
naked news realmodem
KCD Applet
Oh wait, what's that last one doing there? Cursed klipper. Seriously, another suggestion would be to pour hot grits...
(Please browse at -1 to read this comment.)
Him saying that C++ losing ground to Java statement doesn't mean _he_ implies Java to be better as a language, he's just stating a fact (or rather observation)?
I like paying taxes. With them I buy civilization -- Oliver Wendell Holmes
How unfortunate that ESR did not mention Scheme in his list of languages. GIMP and Guile have gone a long way to bringing this small, powerful, easy-to-use language to the casual hacker, and its usage is growing.
N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
C and C++ optimize for machine efficiency at the expense of increased implementation and (especially) debugging time
While the sentiment is probably correct, there is something about sacrificing the quality of a program because your(the coder's) time is so important.
George II -- Spreading Freedom and American values, one bomb at a time.
Also, the usefulness of Java as an application programming language (Java on the desktop) is severely hindered by the fact that Sun hasn't solved the packaging / delivery problem; that remains a matter of platform dependant conventions and idiosyncracies, only now you have the added burden of catering to the requirements of some abstract "Java platform" layer.
Guess it's back to C for me.
I don't care if she is a troll or not, but she/he uses the name of Larry Wall's daughter.
Considering the signature line, referring to the Camel, I would find it disgusting if someone else than the real Heidi Wall would use that name for trolling.
Why don't you take the post at face value and that's it and answer politely, be it troll or not.
"Maybe the 1.3 JRE for Mac OS X will lead to more applications written with Swing"
Swing is terrible to use. After using Qt for a while Swing seems unnecesary complex and hard to program with.
I would like to raise two other issues. The first is that languages with powerful typing schemes make it impossible to code a very large class of errors. In particular, if you ever find yourself using a cast (especially to/from void* or Object or whatever), which you have to for collection datatypes in C, Java, etc., then you're opening yourself up to a bugfarm. In C the compiler just assumes you know what you're doing whereas in Java it has to carry out a costly runtime check. The solution is polymorphic types (or "generics" to be vulgar) which do away with all this horridness while retaining type safety that is verifiable at compile time. [Please, nobody mention C++ templates...]
The other thing is that destructive assignment, upon which all imperative languages are based, makes life much harder for the optimizing compiler and harder still on the programmer who can never be quite sure whether a particular function call won't change the state of his program (believe me, this is a major source of bugs). The solution is not to use destructive assignment - that is, write in a purely functional style.
Modern functional languages such as Mercury and ML give you all this and are extremely efficient and have very good C and/or general foreign language interfaces. It is a myth that these languages are slow (they wipe the floor with Python and are strongly competitive with C++). The common experience amongst functional programmers is that (a) once the compiler accepts a program, nine times out of ten it does exactly what was intended and that (b) programs work, and work correctly, with something like 20-40% of the coding/debugging effort required in imperative languages. I strongly urge people to investigate these so-called academic languages for themselves, rather than jumping on whatever this year's flawed language bandwagon happens to be.
"Personally I'm resolving this by re-reading every Penny Arcade."
I will freely admit that senses of humor are individualistic. But there are still some fundamental laws of nature that must be maintained. For instance, I doubt that "Red Dwarf" and "Family Circus" have much overlap.
So how can it be that someone who reads Penny Arcade ALSO likes User Friendly (IMO, one of the least funny comics in the known universe and the publishing of which is one of the many signs that that Linux Journal has stopped being a technical journal and started being a VB Developers Journal clone)?
--
Non-meta-modded "Overrated" mods are killing Slashdot
Non-meta-modded "Overrated" mods are killing Slashdot
(Hey Ryan! Here's your proof!)
Good point's there. Java server programing it's fun!. For one reason MS ripped the concept of Java with C-sharp (the language) and .NET (JVM). The only problem left is JVM's memory footprint. If you Have less then 128 MB don't use java, would be a pain in the a**.
Java Rocks!!!
> Eric is a jack of all trades, [snip]
No. Eric is a jack-ass of all trades.
Amazing. Certainly, I'm aware of who Raymond is, but I had never paid much attention to him. What a sad, bitter man. Any esteem I ever held for him (not much, to be sure) is now firmly in negative territory.
Hi, I'm a pretentious cock who will make some gay comment about ignoring AC posts here.
It's just Eric Raymond's homepages. The text of the jargon file is there, various open source advocacy stuff (like The Cathedral and the Bazaar), stuff on fetchmail etc... There are a few pages of libertarianism/gun advocacy but nothing wildly offensive, I would have thought.
AND it's obvious it was written by a pythonazi while everyone has a favorite language, pythonazi's can't see anywhere beyond theirs. they can't even admit the possibility that there may be a better language than python. the 'zoo of language' piece would have been better off written with a 'right tool for the right job' theme even if it was written by a member of pythonology.
Java is a good idea in principle but not in practice. Java's problems stem mostly from its unusable runtime environment. I'm currently involved in rewriting a Java application in C++ because customers refuse to use that 40MB monster that runs like maple syrup on an 800MHz Pentium. JVM is just too big to be usable and Swing is just not usable for anything other than teaching windowing principles. Even simple dropdown lists will not scale beyond several hundred items before becoming unusable speedwise.
Garbage collection, often touted as Java's biggest advancement over C++ make Java completely unsuitable for a whole slew of applications. Even the "softest" realtime apps will get an unbearable penalty from the garbage collector spontaneously "kicking in" at more or less random intervals. Even a simple MPEG1 player app eperiences jitter and playback glitches due to garbage collection issues. The only place where java's performance is acceptable is server side apps because the memory footprint is less of an issue and because "the web is always slow" attitude that web users became used to.
Java does not have serious development tools. I've yet to find a reasonable Java debugger. The supposedly "excellent" Borland's JBuilder cannot hold a candle to Visual C++ especially when it comes to debugging features.
Last but not least problem with Java is its image. Because of its simpler syntax it quickly became attractive to all kinds of rookies and cowboy programmers and underachievers trying to make big money "hacking" Java after having only marginal exposure to any other programming languages. Hence java programs usually exhibit very low quality compared to C++ based software. This gives the language a bad name to such an extent that many software shops won't even hear about writing anything in Java purely on the grounds of prejudice. Java is was a neat idea executed very badly.
Am I the only one thinking that ESR writes about stuff that he doesn't have sufficient experience in? His "dissection" is controversial at best and plain wrong and misleading in all actuality as it skips over important aspects of programming languages concentrating mainly on whether braces are more important than indenation. Eric is a jack of all trades, master of none and it shows throughout his book very well.
Good night.
Your pizza just the way you ought to have it.
IMNSHO, Because:
A) The replies from this person are always the same: mechanical and kiss ass toward the subject. It's like someone who blindly agrees with everything from an idol. Atleast that's the way they appear to me, and I'm sure I'm not the only one who feels this way. Someone pointed out on a serious note that it's like she's someone in disguised posting for karma, then to go on a trolling spree; while this is probably not the case, you have to agree her replies are ALWAYS the same, always in agreement with the general purposed consensus we're supposed to all have here on the given article/topic.
B) While it tries to make a valid point, she is denouncing in the post a vast majority of Linux advocates as no-nothings in terms of programming... that certainly isn't positive or fair, and it's based on what, pray tell? Her fucking Slashdot reading? Furthermore, is a strong programming background required to atleast be knowledgable regarding the strengths, programming or non-programming, of a particular OS/environment?
In conclusion, I agree with modding her down to troll, and think they should continue to do so.
mwtr / THIS SIG HAS BEEN PRAYED OVER AND MAY BE USED AS A POINT OF CONTACT (ACTS 19:12)
"It is good to have a polymath representing us. Too many Linux advocates come from a narrow programming background ..."
What are you basing this statement on? Your perception of the open source community from the web sites you read?
mwtr / THIS SIG HAS BEEN PRAYED OVER AND MAY BE USED AS A POINT OF CONTACT (ACTS 19:12)
Did you all notice that the references given at the end of the chapters are all O'Reilly titles? This is conspiracy. Real Hackers should keep away from the book. There are lots of Free Documentation out there, which one can give as references. But ESR chose to support the major supporter of his Open Source Movement. Also I found ESR's Unix Book to be of low quality and not comprehensive. It's not for Hackers. Boycott the book!!!
I believe that java is good for smaller apps
because it is quick (relatively) to program.
of course the memory / speed constraints limit
its feasibility in larger projects. 2
"Blake is an idealist, Jenna. He cannot afford to think." - Kerr Avon, Star One, Blakes 7
I love Eric's writing style. "the vast invisible dark mass of COBOL financial applications," indeed!
I'd be interested to know what Larry Wall thinks of Eric's assertion that Perl was specifically designed to replace Awk. I don't know Larry myself, but I've sure gotten the impression that he designed Perl specifically to handle some tasks that Awk couldn't handle. I don't think he actually set out to design a language that all Awk users would switch to. Maybe I'm wrong...
The big question, though, is whether any SlashDotters can fill in Eric's first "fixme" note and point to any studies listing the breakdown of bug types in C code. As a longtime C coder, I'd agree that the majority of errors I've made and seen in other's code had to do with memory management, but is it really 90%? There are certainly a lot of OBO errors and misunderstanding of specifications and version control errors and algorithmic mistakes and just plain typos, too. Do those all aggregate to 10% or less of the total C bugs? Hard to believe.
"C++, on the other hand, has lost some ground to Java." I program in both languages, and my experience has been the opposite: I find C++ far better than Jave. I have no desire to start a flame war, but does anyone have any good ideas on why this may be/is true? This statement the author posits seems to be awful shaky at best. Ideas?
OmahGAWd, this is such an obvious troll! Why don't you post something useful instead of that meaningless drivel you try to pass off as "informative". Honey, you are as transparent as a see-through top on Academy Awards night! (But why don't you come up and see me sometime?)
Deutch proposes ways that UNIX could have some of the advantages of the Lisp and Smalltalk environments that he worked on at PARC while still remaining Unix.
CVS is quite suitable for tiny projects. RCS isn't suitable for anything, compared to CVS.
The comments about the disk space requirements of CVS versus RCS are strange and irrelevant in the days of 40GB drives being affordable to consumers.
I use CVS even for things that consist of a small handful of text files and are developed only by me. Even with one developer and a small project, it's useful, for instance, to be able to go back to a release and easily make a bugfix branch.
A very simple counter-example, where enforced policy is causing trouble. Since you mention some amazing command-line parsing interface, I think this is a good example of this! In this case I think Windows does things right and Unix does them wrong.
Unix does do some interface to enforce policy: the shell splits commands at the spaces and does glob expansion and quoting. Windows does not, it passes the typed line unchanged to the program.
Yes, this results in some inconsistency of Windows programs, but really very little. Most programs call some function when they encounter a word with '*' or '?' in it. Most of the inconsistency is people working around their stupid decision to use the directory seperator '/' to introduce switches. This is trivial to do beacuse Windows does not enforce such policy, but like you said it results in inconsistency. But I still feel the result is better than if we were forced to use '/' to introduce switches.
But one of the immediate questions people familiar with DOS asked about Unix is "where is the 'rename *.A *.B' command?" Unix people, being sometimes illogical in their defense, will go on about this being undesirable or bad computer science, but the real answer is that Unix's "policy" is preventing a very logical user interface design!
Another good counter-example is X. X admittedly sucks, but the suprising thing is that this primitive thing, designed in 1983 or so, is able to reproduce the GUI that MicroSoft and Apple are writing now. If Unix had done "policy" like you said, we would all be forced now to use the Athena toolkit. The fact that all the applications correctly respond to the "reverse video" configuration option might impress you, but I think most people would immediately dismiss Unix as crap!
Wow. That's not inflammatory at all.
Just kidding, really, but I've heard both sides of this argument, and I dunno which to believe. "#ifdefs rock!" "#ifdefs suck!"
Thus, I just write everything in PHP and Tcl... :)
Potato chips are a by-yourself food.
Memory management in C++
There are two things you can do if you're lazy and somewhat allergic to new and delete, like I am.
1) Use the Standard Template Library. This isn't empasized enough in C++ courses. If you learn it and use it properly, you will drastically cut down on the news and deletes that you need to use in your programs. The STL containers own their objects, so you can stick an object (not a pointer or reference to an object) into a container and forget about it. When the container disappears, the object will be destroyed. This doesn't negate the necessity for a programmer to think about memory management, but it eases the burden greatly. Be careful though, stupid implementations can result in a lot of time wasted in the copy constructor.
2) Use the truly excellent Boehm garbage collection library. This page has all the good information about it.
C++ isn't perfect, but what language is?
If tits were wings it'd be flying around.
I hope not. Swing produces the most ungainly and bloated GUIs I've ever had to work with. I'd rather see someone who knows JNI port Qt or xwWindows to Java. Until then, I'll stick with AWT if I have to use Java for GUI programming at all.
ObJectBridge (GPL'd Java ODMG) needs volunteers.
Finding God in a Dog
Come meet the boy who saw his $41,000,000 turn into $650,000! Are those tears of sadness running down his cheeks, or has he gone insane?!
Cheers,
Like most of us, ESR is a language bigot.
I hope that will be taken as "explanatory" rather than as "flamebait", but I have to say it regardless of how anyone takes it.
--
Sheesh, evil *and* a jerk. -- Jade
Yes, Java suffers in terms of performance when compared with C++. But then again, C++ takes a performance hit when compared with C, or assembler. Yet people still use Java, and other "slow" languages such as Perl and Python.
Ten years ago, the general rule was to use the tool that gave you the best performance possible, because CPU cycles and memory were expensive. Now CPU cycles and memory are very cheap. For many tasks, it is cheaper to spend a few thousand dollars to throw a faster computer at the problem, or let the computer crunch at a problem for more time, than it is to spend tens or hundreds of thousands of dollars of extra development time to pay experienced gurus to rewrite in C++, C or assembler, hand optimize the code and fix all the bugs that inevitably come from developing in that way.
But I'm not a language zealot. I believe in using the right tool for the job. Sometimes it's Python + Tk, other times it's Java, or Perl with CGI.pm, or C++ or assembler. For my current little project (a ray-tracer for a graphics class) I chose C++. The job is CPU intensive, so I rejected Java, Python, all the other interpreted languages. I also refused to do the job in straight C because the algorithms and data structures are so complex I found the extra tools (classes, encapsulation, the limited but still better than C tools for memory management, the STL) to be a necessity. But that's just for this little project. I'll choose something else for the next project.
Meldroc, Waster of Electrons
I hate to pull an AOL, but I can't emphasize enough the usefulness of the Standard Template Library and the rest of the ISO C++ Standard Library. It comes with a string class that already knows how to concatenate, search for substrings, resize itself and Do The Right Thing in most cases. Never write a linked list again, because the STL contains a list class template (in other works, a linked list of whatever you want.) It already handles all the ugly new/delete memory management for you. The vector class is an improved array. It can resize itself, it can easily be adapted to perform automatic range checking. The STL is a godsend for lazy programmers like me. Yes, C++ has its warts, but when you code wisely and use all of its capabilities, it is an incredibly powerful tool.
Meldroc, Waster of Electrons
I admit it's highly subjective ;-)
;-)
But Java avoids a lot of the problems older languages like C have to solve with #ifdefs by providing (1) standardized primitive types and (2) a standard library that behaves the same everywhere, be it under Irix, Tru64, Linux, Windows, OS/390 or EPOC.
Example: An int is always signed, always 32 bits. The Java Language Specifiication thus is a very important document for any Java programmer. Answers 20 percent of all questions in Java newsgroups
Java's a lot faster in the newer versions. I can't give a number comparing it to C / C++, but raw speed doesn't matter for many applications anyway. Swing also has become better but there still are some issues. Hardware-accelerated buffering etc. will hopefully solve these problems in 1.4.
Translation: Java is fast. By fast I mean adequate. By adequate I mean slow.
(credits to whomever I stole this from.)
ESR has some stuff on his personal pages that someone might take offense too, stuff about firearms, anarchy, paganism, polyamory, and so on.
Who makes your filtering software? Being an armed anrchist pagan hacker, I'm offended by someone labeling that content as offensive.
Tom Swiss | the infamous tms | http://www.infamous.net/
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
Um, you seem to be laboring under a mighty misapprehension about the word "pagan". (Or maybe you're a lame-ass troll, but for the sake of potentially being educational I'll assume not.) Might I suggest ESR's Neopagan FAQ?
You're also laboring under a mighty misapprehension about the word "socialist", for which I'd recommend some reading about libertarian socialism.
And if I were afraid of gun owners I'd be unable to look in the mirror without my knees quaking.
Tom Swiss | the infamous tms | http://www.infamous.net/
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood
You oversimply my viewpoint, and thus get it wrong. There is a difference between the system enforcing policy, and the system enforcing a *particular* policy. In my example of the command line, one could concievable create an add-on that would create different exception based on the user's preferences. Since apps never see the actual command line, but the processed version of it, all apps would automatically accept the new changes.
Yea I know that takes some clever system design. I never said it was easy, just that it was possible.
Second, who said you one would have to use Athena? I'm a big fan of binary interfaces. This is one thing OpenGL gets right. All OpenGL apps are compiled to for the OpenGL ABI. The actual code that gets called varies from implementation to implementation, and in the Windows world, is entirely different for different cards. Yet it still works... wow! Actually, it's not wow, just good design. In the X case, one could have a standard API that all apps would have to write to (maybe a version controlled one like DirectX, so the API could expand) and different implementations could be plugged in at will. Again, it takes good design, but the longevity of UNIX has shown that some well designed stuff does stand the test of time in good shape, so it's not impossible.
A deep unwavering belief is a sure sign you're missing something...
I have a huge problem with his statement "the cost of this approach is that when the user can set policy, the user must set policy"
It is simply untrue. It should read
"But the cost of this approach is that application developers get to set policy"
Because UNIX does not enforce policy, policy gets enforced in other places. Specifically, it gets enforced in end-user apps. The problem is, that in this way, the only thing that happens is that an inconsistant/hacked up policy is exposed to the user, instead of a consistant one.
Think about it. Who gets to decide what toolkit you use? Not you, the user, but the app-developer who decides to use GTK. Who decides what desktop you use? Not you, but the Rasterman, who decided to make Enlightenment the only accelerated window manager. Who decides what command-line switches you use? Yep, whoever wrote the program.
The whole, fundemental, problem is that by not enforcing policy at the system level you simply allow the app-developers to decide it. You do didly for the non-programming user.
Consider this, instead of simply providing a text-stream for command line arguements, you provide a strictly-defined messaging interface. The app is just passed a set of messages that describe the command line. Then, the user can choose whatever command line format they want, and can depend on a dynamically loaded system add-on to convert the data.
Take the whole paradigm of message passing. It is an extremely strict interface, yet it allows the user huge flexibility. Take a GUI app for example. Instead of enforcing hotkey policies like Windows, UNIX leaves the developer free to do what they want. Instead, if apps were required to responed to strict message sets to use hotkeys, then the user could send a message from a remote server in Australia to activate the features, or map hotkeys to whatever buttons they chose, IN ANY APPLICATION.
It is a paradox. The more policy you enforce at the API level, the more freedom you give to the user. Yes its hard. Yes it takes a lot of forethought. Yes, it *can* be done. Force developers to use a particular API. Then give the user the freedom to chose any implementation of that API they wish. Force developers to use a standard set of services. Then give the user the freedom to mix and match, replace and rebuild those services as they see fit.
A deep unwavering belief is a sure sign you're missing something...
And giving accordingly, I hope.
If you enjoy reading PA, why not show Tycho and Gabe you appreciate the laughs?
-the wunderhorn
Karma: Bored. (Thinking about resurrecting the "Anyone else is an imposter" joke.)
BTW, it would be cool if any Slashdotters wanted to review Raymond's books on The Assayer.
The Assayer - free-information book reviews
Find free books.
Does anyone remember a while back when ESR got some shares in VA Linux for his contribution to the company and the open source movement? Did he sell his shares at the allowed time (I believe June of last year?)? Insider trading info seems to indicate that he hasn't, and if not that $32 million has dropped to about $600,000.
More details of it can be found at yafla. Note in particular the text on the link on "potential wealth disappear"
Cheers!
Apparantly your censorware thought the site was about dissecting zoo animals... the page starts with:
"Unix's Zoo of Languages... We dissect nature along lines laid down by our native language..."
-thomas
"And like that
It also offers Unicode support, something not widely offered elsewhere
Yeah, unless you consider Perl and Java to be "widely offered." (I would.)
"And like that
This article has some glaring errors with respect to Tcl. Tcl has offered binary file I/O since release 8.0 (released in March '99; current release is 8.3). It also offers Unicode support, something not widely offered elsewhere, and a syntax that does not look like line noise.
Finally, Tcl is one of the few languages (on any platform) with a completely open source IDE, including a debugger: TclPro! See SourceForge or Scriptics.
"This is actually fairly old, but its a nice slow friday. Personally I'm resolving this by re-reading every Penny Arcade."
n ny-arcade.com/img/link.gif"</IMG src>
o nionlink1098.gif"</IMG src>
PennyArcade is great. here's the code to stick it in your slashbox:
<A href=http://penny-arcade.com/view.php3> <IMG src="http://a332.g.akamai.net/7/332/493/v1/www.pe
And in case you live in a box (albiet one with an internet connection), go check out the onion, at http://theonion.com. It's hilarious.
And if you want to stick it in your user defined slashbox:
<A href=http://theonion.com><IMG src="http://graphics.theonion.com/universal_pics/
...when you reject all of the submissions! Sorry, just a little bitter. In the meantime, here's an interesting article on Larry Ellison views on computing.
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
Eiffel: He describes this as one of the noble but failed attempts to oust C/C++ because they don't have automatic memory management. Garbage collection is one of the core features of Eiffel. Read Chapter 9 of Object-Oriented Software Construction by Myers to understand how absolutely vital he considers it.
Tcl: Has had a clean, well documented interface for adding new functionality in C longer than Python or Perl. It was one of the original features of the language. That's how Tk is implemented.
Sorry for the "OT" question, but what exactly does the www.tuxedo.org site do? It seems to be banned by the "Censor-ware" at the client I am at.
e r3 .html
The response when I try to get:
http://www.tuxedo.org/~esr/writings/taoup/chapt
Is:
RESTRICTED - You have attempted to access a restricted site. This restriction is to prevent you from inadvertently bringing offensive/non-business related material into the workplace.
The proxy's access control configuration denies access to the requested object through this proxy.
Seeing as how I'm working with Unix systems I find the idea that this is either Offensive or Non-Business related rather amusing.
The only thing I can think of is that all of www.tuxedo.org is blocked, but I'm not sure why.
So what is it?
This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
Penny Aracade has changed a lot over the past 6 months, and I'm not sure if it's for the best. But the last three have been a return to old values so we'll see what happens. Plus, the entire controversy around their sudden unplugging might make them return to the old good stuff. `8r) Now, if the stupid ads built into their comic didn't freak out firewall constantly... `8r/
Oh, and cause I can: Wang!
--
Gonzo Granzeau
Gonzo Granzeau
"Nothing the god of biomechanics wouldn't let you into heaven for.." -Roy Batty
While The Art of Unix Programming is a fun to read, I think that it's actually pretty devoid of useful content. With a name starting with "The Art Of...", I was hoping for something more technically oriented. Knuth set the standard with his classic The Art of Computer Programming; perhaps a discussion of standard Unix APIs, services, etc is what I wanted. (But I guess Richard Stevens covered this already in Advanced Programming in the UNIX Environment.)
Instead, we're getting a slightly gussied up advocacy piece, which really isn't much more than a retread of The Cathedral and the Bazaar, with a dash of superficial advice thrown in. As a UNIX programmer, I've found the existing chapters to be useless--I already believe in the UNIX way, and there's nothing concrete in there I don't already know. There are little hints of goodness, but so far, no topic has been covered simply enough to be useful to a novice, or in sufficient depth to be of value to an expert.
I guess I'm not in the intended audience--this really is a book for people relatively new to UNIX. But I wish Raymond had chosen a title which was more honest and less pretentious. I guess the "Who should read this book" is honest on what the book covers, but I was still disappointed. Perhaps the title "The Art of..." set my expectations too high.