Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming IT Technology

ESR's Art of Unix Programming Updated 96

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.
This discussion has been archived. No new comments can be posted.

ESR's Art of Unix Programming Updated

Comments Filter:
  • by Anonymous Coward
    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!
  • by Parise ( 423 )
    From http://www.tuxedo.org/~esr/writings/taoup/chapter4 .html [tuxedo.org]:

    Emacs stands for `EDiting MAcroS' (pronounce it /ee'maks/)...

    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 [tuxedo.org]...

    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 :)

  • You have to check out Sluggy Freelance [sluggy.com]. It is just brilliant. Try the Viewer Guide [sluggy.com] if you are completely new to it, the Classic Theatre links contain some really great episodes.

    ************************************************ ** *

  • You expected a solid, well written, technically savvy programming essay from Eric "I know python!" Raymond? Well, I never.

    (jfb)
  • 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.
  • 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).

    Given that a skilled programmer can easily earn (note for idiots ... 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.

    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 [arstechnica.com].) 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 [tuxedo.org] ;-)
  • Or for the references to "art fags" [tuxedo.org]...
  • For instance, I doubt that "Red Dwarf" and "Family Circus" have much overlap.
    Red Dwarf and the Dysfunctional Family Circus [spinnoff.com], though...the mind boggles at the potential overlap. "Mommy, is this Soylent Green we're eating, or smeg? And when is Uncle Rimmer coming to visit Daddy again?"

    Tom Swiss | the infamous tms | http://www.infamous.net/

  • Why not use this slow Friday to review punctuation rules. And edit the submissions you post.

    It's = it is. Its = possessive of it. Mmmmkay?

    Alternately, do what true a penny arcade fan would and play Bejeweled [msn.com].

  • 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.

  • I've seen many types of bugs in my own code. Some of them include:

    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)); /* Two short, and a segfault if strlen() == 0 */

    malloc(strlen(foo)); /* Usually due to sleep deprivation */

    malloc(strlen(foo)-1); /* It actually happened once */

    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(); /* Added later, not realizing that more braces are needed */

    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.
  • I like the section of Chapter 4 [tuxedo.org] (about 1/4 the way down the page) that is titled Is Emacs an argument against the Unix philosophy? It seems to me that Emacs is most definately an argument against the simplicity of Unix.

    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.
  • what does its name stand for?

    Eight Megs Always Constantly Swapping

    now that doesn't sound to fast to me *s*

    IMHO, the intention of emacs wasn't to create the leanest meanest console editor, thats vi. Emacs is an environment.

    Emacs is awesome as an environment, for general usage you can almost never leave it, turn off X, run emacs, you may get a surprise. Doing that simple thing saves me a hefty amount of my wearables battery power, and it just flies along even on a slower CPU than what I'd normally use.

  • http://www.sinfest.net

    nuff said.

  • I doubt that "Red Dwarf" and "Family Circus" have much overlap

    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.

    --

  • 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
  • I've used both, and in every environment where RCS was used, we ended up wrapping the RCS commands with scripts to add functionality that I later learned was either included in CVS or easier to include with CVS.

    I agree that the difference in disk space is now irrelevant.

  • canada.naked.reut on cnn [cnn.com]

    nakednews [nakednews.com]

    naked news realmodem [nakednews.com]

    KCD Applet [kuleuven.ac.be]

    Oh wait, what's that last one doing there? Cursed klipper. Seriously, another suggestion would be to pour hot grits...

  • 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)?
  • 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.
  • 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.
  • I realize that from a monetary point of view it makes sense. But I take pride in the code that I write (or try to), and to say that doesn't matter, just doesn't set well with me.

  • The biggest problem with Java is not performance but memory use. A Hotline client [dhs.org] I have written uses anywhere from 19MB up to 40MB of memory -- too much. And what good is garbage collection if Swing leaks references like NNTP drops articles?

    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.
  • The point about execution speed being less important than efficiency of development and robustness of code is well made. In particular it's good to see a respected member of the community stand up and point out the advantages of automatic memory management (viz garbage collection), something that was never that costly in the first place, despite the recieved wisdom. (Cases in point: Severance has huge swathes of its control code written in Python; many other games do similar things with Lua - both are interpreted languages, modulo bytecode).

    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.

  • Just a couple of points.

    First, you really wouldn't want to write an app's core in C, you'd only write small, critical code sections where you couldn't coax adequate performance out of the host language compiler.

    Secondly, while several good graphical development environments exist for many "academic" languages, many programmers still prefer to use make, vi/emacs and command line tools. That said, Microsoft is very keen to have Visual Studio integration for these languages and there are several projects in the pipeline to do just this. That, coupled with the fact that many of the compilers in question are also being targetted at the .NET platform, will make it much easier for programmers and groups to experiment with these languages with, hopefully, a minimum of risk and effort.

    I think the two main obstacles to a wider uptake, other than the above, are (a) a widespread belief that these languages are slow, too weird, too strict, integrate poorly etc., and (b) the lack of decent introductory material that isn't aimed at reasonably theory-savvy postgrads. But we're working on that, too!

  • Do Mercury, ML, Scheme, etc have enough support to use seriously? E.g., libraries, toolkits, debuggers, IDEs?
  • good info, thx.

    If good support exists, and you can write an app's core in C for speed, why do you think it is that functional languages haven't caught on? Every programmer would rather program than debug, right? And certainly Microsoft wouldn't turn down an opportunity to make money (selling a Visual Scheme etc).

  • Why doesn't Microsoft develop its own products with functional languages? Does any large software publisher? Microsoft has been around long enough to get by both objection (a) (if invalid) and objection (b).

    But thx for the info. I will do more playing with those languages when i can.

  • "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
  • Processors == $total_dollars_spent--;
    Programmers == $total_dollars_spent++;

    iotw... It's -often- more cost-effective to have a developer create an application that takes 60% of the time to create and runs at only 80% of the speed. The lost 20% can be made up at less cost by faster processors, more memory, RAID hard drives, etc, especially in server-centric, web-related projects.

    The quality of software as it relates to stability is another issue all together -- It has only a little to do with the language and much more to do with the commitment, general experience, and familiarity of the developer(s).

  • I've recently found "Life on Forbez" - quirky and takes some getting into but worth it. The author is on a break at the mo, so it'll give you all a chance to read through thr strips.

    Life on Forbez [keenspace.com]

    -----

  • 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.
  • 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

    Nice, by stating that you consider UF to be the least funny comic you already invalidated yourself as a comic critic. You'd make a nice Troll though....
  • I.e. the average /.-reading AC?
  • 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.
  • what exactly does the www.tuxedo.org site do?

    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.
  • Dr. Eric S. Raymond is in a need of a serious clue. His dissection of languages forgets to discuss the most fundametal feature of computing languages: type safety. The reason why C++ is vastly superior to C is not OO but type safety. Yup my friends. The most common reason for bugs in C is frivolous implicit casts and the so forgiving compiler. C++ offers hugely increased type safety by adding RTTI and templates. Memory management CAN be automated in C++ with smart pointers. From what I've seen more and more people tend to do it in recent years. The only drawback is the legacy of code already written that doesn't use smart pointers. STL is incredibly powerful and is going to have a bright future not only as a container library but as a new programming technique once more and more programmers become familiar with generic programming.

    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.

  • Many of them do, although as always, it depends on what you want to do. For Scheme, consider something like DrScheme [rice.edu]. For Common Lisp, both Xanalys [xanalys.com] and Franz [franz.com] have good commercial environments. And these are just examples. Further, it's usually fairly easy to use at least C code from these languages, so the amount of code available is greater than it might look at first. I don't know as much about the statically-typed side of things, but from what digging around I have done there, I think that there is often a reasonable amount of stuff available there too.

    At any rate, I certainly find that my Xanalys Lispworks environment gives me everything that I need to do a lot of the programming that I need to do.

  • 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.
  • "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?

  • 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
  • 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?)
  • If you are interested in a different, but very well informed, view of the Unix development environment, check out Peter Deutsch's paper "UNIX Needs A True Integrated Environment: CASE Closed" [xerox.com].

    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.
  • While I certainly wish that Emacs were a little leaner, I am not about to give up any of it's features (well, at least any of the ones *I* use), nor am I willing to give up it's flexibility.

    Besides, it's not that bad. Heck, it's not half as bad as Mozilla (or Visual Studio for that matter). And the fact that I can use basically start it once and use it as a "daemon" for ages is sort of cool, it's not like it is prone to crashing.

    Every once in a while I dust off gvim and give it a whirl as a programming environment, and I find it an impressive piece of work, but once you have gotten used to running your whole life from inside of Emacs, even gvim is pretty spartan.

  • I think the point is that this should not be necessary, and that starting a new copy should be faster. I don't think it would be a good idea that there is a daemon running for every application we might want to run! And somehow saying Emacs is special is not a good solution either.

    Although tinier, I would also complain about the startup time of all shell scripts except perhaps /bin/sh -f. A lot of Unix design relies on executing these scripts fast, and the original systems did start up these interpreters relatively fast (ie it took less time to start than to run a typical command).

  • I disagree with this.

    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!

  • The missing pre-processor is a good thing. #ifdefs lead to horrible code. Furthermore, you can use third-party preprocessors if you really need them.

    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... :)

  • 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 [hp.com] has all the good information about it.

    C++ isn't perfect, but what language is?

  • Maybe the 1.3 JRE for Mac OS X will lead to more applications written with Swing.

    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 [sourceforge.net] (GPL'd Java ODMG) needs volunteers.

  • 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.

    --
  • 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.

  • 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.
  • 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.)
  • The only thing I can think of is that all of www.tuxedo.org is blocked, but I'm not sure why.

    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/

  • 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 [tuxedo.org]?

    You're also laboring under a mighty misapprehension about the word "socialist", for which I'd recommend some reading about libertarian socialism [blackened.net].

    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/

  • Pardon me, AC, but I believe you have just demonstrated that you have never worked on a real project of significant size that tried to use CASE tools for any real length of time.

    First, CASE is nothing like automatic routing, since the key element of programming is semantics, while the key element of routing is, well, routing.

    I have. 100,000 lines of automatically generated crap which bore little resemblance to my actual intent as stated in the CASE model has been a hindrance, not to mention now being saddled with a number of silly idioms which I will be months removing.

    You might like an IDE. I don't. I understand my tools. Most of the people I know who like IDE's like them because they don't understand the tools, or even some of the more important aspects of program construction.

    It's friday, so -- I'll flame. Advocating CASE and IDE's is a demonstration of your unmitigated ignorance.

  • 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.
  • 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.
  • Personally I'm resolving this by re-reading every Penny Arcade.

    And giving accordingly [amazon.com], I hope.
    If you enjoy reading PA [penny-arcade.com], why not show Tycho and Gabe you appreciate the laughs?

    -the wunderhorn

  • I have to grant that Penny Arcade gets a "hit" more often than User Friendly has for the past while. But back in the day User Friendly was *really* good and the good ones are very funny it is still taking a look at everyday just for that. I also like both.
  • Raymond deserves praise for making the fruits of his labor free as in beer. But it seems a bit odd that, although he's soliciting contributions from other people as co-authors, the book is apparently not free as in speech. At least, I couldn't find a GFDL or OPL license anywhere. So here's the guy who wrote The Cathedral and the Bazaar, and yet he doesn't think copylefting is the right basis for a free-information collaboration?? It's not as though copylefting is any obstacle to print publishing these days. O'Reilly has published a lot of copylefted stuff, as have other publishers.

    BTW, it would be cool if any Slashdotters wanted to review Raymond's books on The Assayer [theassayer.org].


    The Assayer [theassayer.org] - free-information book reviews

  • I think you missed his point. He says that obviously some things just can't be done by piping lots of small commands together. At least not with a screen interface.

    Sure, there are utilities that will do almost any emacs thing to a file, but after editing in vi or nano do you really want to have to type all those shell commands in when a couple of keystrokes in emacs will run make or let you check your tested source back into the CVS repository? Typing C-x C-s is certainly no more difficult than doing ESC :w, is it?

    Yes, emacs is large, and it has a lot of features (some of which are only useful as entertainment), but that's the point. Saying emacs is big and bloated if all you take advantage of are the text editing features is like saying a RDBMS is big and bloated if all you use it for is sorting and grouping lists. I mean, the OS itself takes forever to load compared to emacs, but no one complains about that because it does so much stuff.

    That said, if you don't take advantage of any of the features that emacs offers, then no, it's not the tool for you. I have the same opinion of most of the uses I see Word put to. Incredible waste of power (and in the case of Word, money and freedom).
  • 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 [yafla.com]. Note in particular the text on the link on "potential wealth disappear"

    Cheers!

  • Here's a more direct link for those who don't want to follow the yafla [yafla.com] link (which is a story on the ".COM stock collapse which is how that is relevant).

    http://linuxtoday.com/stories/13512.html [linuxtoday.com]

  • 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

  • It also offers Unicode support, something not widely offered elsewhere

    Yeah, unless you consider Perl and Java to be "widely offered." (I would.)


  • by darylb ( 10898 ) on Friday February 23, 2001 @09:06AM (#407739)

    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 [sourceforge.net] or Scriptics [scriptics.com].

  • by PhatKat ( 78180 ) on Friday February 23, 2001 @07:53AM (#407740) Homepage
    "This is actually fairly old, but its a nice slow friday. Personally I'm resolving this by re-reading every Penny Arcade."

    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.pen ny-arcade.com/img/link.gif"</IMG src>

    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/o nionlink1098.gif"</IMG src>
  • by swordgeek ( 112599 ) on Friday February 23, 2001 @08:35AM (#407741) Journal
    ...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. [cnet.com]
  • by joss ( 1346 ) on Friday February 23, 2001 @09:15AM (#407742) Homepage
    Yes, not only are students taught Java, but they hear a lot of Sun sponsored propoganda about how it's so much better than C++. This stuff is about as valid as MS's analysis of competing operating systems. You can't really argue against the assertion that C++ has lost a lot of mindshare to java over the last few years. Recently I've noticed that the backlash against this has become more pronounced, particuarly by those who have tried it in large projects and become disenchanted with it. These developers then become Java's mroe adamant critics.

    Although I definitely prefer to code in C++ myself, I agree with decision to teach Java as a first language rather than C++, which has too many complications to make sense as a teaching language. If you're trying to get to grips with the basics of programming, you've got enough to worry about already.

    However, if you *really* want to get to grips with the basics of programming, I really think its best to learn some simple assembly code. Nothing else can give you an adequate understanding of what goes on after the compiler has done it's job, even if you never use assembly commerically.
  • by DLPierson ( 8772 ) on Friday February 23, 2001 @08:15AM (#407743)
    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.
  • by powerlord ( 28156 ) on Friday February 23, 2001 @08:49AM (#407744) Journal
    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.

    The response when I try to get:

    http://www.tuxedo.org/~esr/writings/taoup/chapte r3 .html

    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?
  • by harmonica ( 29841 ) on Friday February 23, 2001 @08:18AM (#407745)
    Some things I noticed in the Java section.
    • Java has established itself as a language for server-side programming. Nobody cares about applets. Java applications (unfortunately) haven't arrived on the desktop yet. Maybe the 1.3 JRE for Mac OS X will lead to more applications written with Swing.
    • The missing pre-processor is a good thing. #ifdefs lead to horrible code. Furthermore, you can use third-party preprocessors if you really need them.
    • 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.
    • The biggest advantage of Java has been left out - its huge standard class library. You (as a programmer) will find a lot of good packages there. Moreover, Sun (and others) have defined a lot of additional non-core libraries for things like audio / video (JMF), email, 3D etc. Go to the Products and APIs section of java.sun.com for a list.
  • by GoNINzo ( 32266 ) <<moc.oohay> <ta> <ozNINoG>> on Friday February 23, 2001 @07:52AM (#407746) Journal
    Another web comic with a lot of history and a lot of humor is Player vs Player [pvponline.com] which is VERY funny. Highly suggested you start from the begining and read them all!

    Penny Aracade [penny-arcade.com] 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

  • by IvyMike ( 178408 ) on Friday February 23, 2001 @08:23AM (#407747)

    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.

Be sociable. Speak to the person next to you in the unemployment line tomorrow.

Working...