Slashdot Mirror


User: alispguru

alispguru's activity in the archive.

Stories
0
Comments
953
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 953

  1. Re:Design patterns and Lisp on Bitter Java · · Score: 2

    As written above, myfile's scope is limited to the try block, so it is not valid within the finally block.

    Thank you. I originally wrote the code with myfile above the try block, but thought that the Java designers might have made it convenient for a catch/finally clause to get at local variables in the try block. They already made a "convenient" decision that the scope of exception object bindings goes beyond the catch statement:

    try {
    ...
    }
    catch (Exception e) {
    ...
    }
    ...

    try {
    ...
    }
    catch (Exception e) {
    ...
    }

    The compiler will spit at the second catch - the first declaration of Exception e is still in scope. Bleah!
  2. Re:Design pattern vs. implementation pattern on Bitter Java · · Score: 2

    ... the file is closed automatically when the file object becomes unreferenced = when the myFile variable drops out of scope = you exit the current function.

    Yes on options two and three, but I wouldn't rely on option #1 if I were you. Consider the following:

    //filesToMung is a String[] array
    for (int i = 0; i < filesToMung.length; i++)
    processFile(new FileInputStream(filesToMung[i]);

    A new FileInputStream is created every time around the loop, passed to processFile(), and then becomes unreferenced. The compiler cannot immediately reclaim the stream (processFile might spin a thread to hold onto it), so it has to let the GC do it. If the GC is a reference counter, like vanilla Python's GC, this loop will work reliably. If it's anything more reliable or modern (mark-sweep, stop-and-copy, generation scavenging), this will fail randomly if filesToMung gets big enough, as unclosed, uncollected streams pile up between GC sweeps.

    There is a difference between finalizatiion and storage reclamation, and it's a real bad idea to mix the two.
  3. Re:Design patterns and Lisp on Bitter Java · · Score: 4, Informative

    I think there seem to be fewer patterns in Lisp, because Lisp needs them less. Lispers tend to dismiss patterns because of presentations like this one by Peter Norvig, in which he shows that roughly two-thirds of the patterns in the Gang of Four book deal with techniques that are unnecessary in Common Lisp.

    Lisp does have patterns, but Lisp hackers tend to implement them as macros, automating their application rather than forcing everyone to know and re-enter them to use them. That's the difference between:

    // Please forgive any Java errors here
    // I don't use this pattern enough to get it right
    // without a compiler to check it...
    try {
    FileInputStream myfile = new FileInputStream(filename);
    // Mess with file...
    }
    finally {
    myfile.close();
    }

    and

    (with-open-file (myfile filename)
    ;; Mess with file...
    )

    They do the same thing - guarantee that myfile gets closed no matter what - but the Lisp way requires less typing and is less prone to errors.

  4. CLOS *isn't* OO? on Bitter Java · · Score: 3, Interesting

    I suspect you and I have different definitions of OO. The problem is that damn near everyone has a slightly different definition of OO. Go read this article by Johathan Rees, then come back and tell us what you mean by a "real OO system", and why you can't do it properly in CLOS.

  5. The more they tighten their grip... on Bootleg Star Wars AotC Debuts on Internet · · Score: 3, Funny

    ... the more bootlegs will slip through their fingers.

  6. The Government should do this, dammit! on The Story of "Nadine" · · Score: 2

    The FTC has an email address for people to report spam (uce@ftc.gov). Anybody see any reason why they shouldn't create virgin email addresses, wait for spam to them that says "this was sent to you because you opted in" , and then haul the bastards in for fraud?

    Private citizens can create spamtraps and use them to report the spammers to the authorities - why not cut out the middleman?

  7. One problem with the reasoning above on Slashback: Agenda, Reproduction, Aesthetics · · Score: 2
    What are they going to do, use my shopping habits to make my food more expensive? I don't think so.

    Actually, that's exactly what they might do. Don't forget, the ultimate reason for all this data gathering is for the gatherers to keep more of the customers' money. They could do it by tracking your purchases and showing you ads for similar stuff. They could also do it by noticing that you buy the same product at different stores for different prices, so it's safe to raise the price on that product.

    Safeway is a business; it's not your friend.
  8. Re:XML is LISP? on Is Programming a Dead End Job? · · Score: 3, Informative

    Go read this paper by Philip Wadler. Particularly look at pages 6 and 8.

    For the short form, take a look at my .sig below.

  9. NASA should have a PayPal account on Taxing Sci-Fi Products to Fund NASA? · · Score: 2

    Rather than a coercive tax levied by the Government, citizens should have an easy way to directly fund NASA. I'd throw a few bucks at such a thing if I knew doing so would definitely help NASA, rather than being diverted who knows where.

    There is already a way to give extra money to the Government as a whole (the additional payments line on for 1040), but that just goes to the general fund, and there are check-off boxes to redirect some of your taxes to funding the Presidential election. Why not a check-off for NASA? Hell, check-offs for everything!

  10. The article says it isn't new on Wireless, GPS-Loaded 'Bait Car' Traps Thieves · · Score: 2

    They even mention Minneapolis as the place where they got the idea. You do have to read past the first page to see that, though.

  11. Re:60,000 hours of DVD? Not likely. on The Past and Future of the Hard Drive · · Score: 2

    2 gig per hour seems like a minimum to me.

    Using iMovie and a digital camera, I've seen disk usage of about 12 GB per hour of imported raw video. This is presumably completely uncompressed, consumer-grade camera video. Uncompressed broadcast-quality video has got to be bigger.
  12. Yourdon's one good book: "Death March" on Byte Wars · · Score: 2

    The reason "Death March" is a good book is that he wrote it by asking a bunch of his hacker-manager buddies about the nature of impossible-to-complete projects, and wrapped some text of his own around the results. This polling-the masses approach added a reality check that he clearly needs (vis. any of his other books that make predictions about the future - the ones that are uniformly wrong).

  13. Ranque-Hilsch vortex tube on R.I.P for D.I.Y Or Long Live Open Source? · · Score: 2
    even use an interestingly shaped chamber (can't remember the name, dammit!) to turn a stream of pressurized air into two streams -- one very chilled and one very hot -- using nothing more than the shape of the cylinder.

    This is probably what you vaguely remember. They are unspeakably cool, aren't they?
  14. xemacs on Teaching Linux/Unix Basics to Microsoft Junkies? · · Score: 2

    ... or maybe a pure Java-based IDE. This would at least look similar to the IDEs they're used to.

  15. Geekhood is fine by me... on GeekPAC · · Score: 2

    I do think taking 'geekpac' as a contact name will be negative PR, even though "reclaiming geekhood" is trendy now.

    It could be worse, PR-wise. They could have called it "hackerPAC".
  16. You're missing two premises on A Unified Theory of Software Evolution · · Score: 5, Interesting
    IBM missing premise:
    Some of our applications must have 99.999% uptime. Therefore, the whole system must be designed with this in mind.
    Microsoft missing premise:
    If our applications crash, it's no big deal. Feature lists generate revenue, so that's what we do.
    Just making explicit what you said implicitly...
  17. Re:Wow.... on Microsoft To Start Running Anti-Unix Ads · · Score: 2
    Look, buddy, for real, proprietary Unix is indeed dead.
    I guess Mac OS X is the exception that proves the rule, then. It's not Linux, it's not GPL, and it will soon be running on more machines than all other Un*x variants combined.
  18. OO means different things to different people on Most Outrageous Vendor Lie Ever Told? · · Score: 2

    The best article I've seen on this subject is by Jonathan Rees - go look at it on Paul Graham's web site here.

    People who say "Java isn't OO" really mean "Java doesn't have the features I like in other OO languages". Please say what you mean.

    For the record, I'm a Lisp/CLOS hacker and I don't like the style of OO Java promotes.

  19. Content control must be time-limited! on SSSCA Introduced in Senate · · Score: 3, Insightful

    The biggest problem with a mandated content control regime is that we all know the mandated scheme won't follow ALL the rules of copyright.

    The content owners are all over the requirements regarding limiting of copying. They make noises about respecting fair use (we know they're lying, but let that go for the moment).

    But, I haven't heard ANY proposal that deals with the Constitutional requirement that copyright is for a LIMITED time, and therefore any scheme for automatic digital rights enforcement MUST have an automatic expiration - there must be a way to disable the protection when the copyright expires.

    This expiration mechanism must be built in at the same level as the copy-protection mechanism, because BOTH of them are required by the Constitution.

    What do you think the chances are that a mandated content control scheme will simultaneously prevent copying, allow fair-use copying, allow unlimited copying when the copyright expires, and be uncrackable? And if it can't do all those things at once, guess which ones will be dropped as infeasible.

  20. Typical CEO business-school thinking... on HP/Compaq Merger Apparently Approved · · Score: 4, Interesting

    The whole HP-Compaq merger thing is a typical example of how high-level executives who understand "business" think:

    - They have to "do something" to justify their compensation.

    - They don't understand the technology, so they don't have a clue as to how to make use of the innovations their employees generate (Xerox comes to mind immediately, but they're just the most obvious example).

    - They do understand high-level finance, and how to fire people to create short-term gains.

    So, they do what they understand - move big pieces around on the board, construct complex financial objects that obscure the connection between their actions and company performance, and fire people whose functions are superficially redundant.

  21. Re:Manual length and Macs vs. PC on Macintosh Clustering · · Score: 3
    In fact, my first inclination is to try to use the Beowulf stuff rather than Pooch simply because such a detailed work exists and is available for Beowulf clusters, but I don't know if any such information exists for Pooch.

    My first inclination (if I was just getting started in cluster computing) would be to try Pooch and see if it meets my needs. If it doesn't, I've wasted an afternoon. If I try the Beowulf option first, I may do more work than necessary to get the results I want. If I try Pooch, and it works, but I need more horsepower, that's the time to dive into the Beowulf option.

    Remember, "Linux is free (as in beer) if your time has no value".
  22. Re:Moore's Law and bioinformatics on The Amazing $5k Terabyte Array · · Score: 2

    Very impressive!

    But, will it continue to grow at that rate? Which will peter out first, computer power or bio data accumulation? Moore's Law has worked for 35 years so far, and Moore himself thinks we've got at least another 15 years from now.

    My money is still on the computers.

  23. Moore's Law and bioinformatics on The Amazing $5k Terabyte Array · · Score: 2

    Remember, most of the breathless prose about the huge, enormous, gigantic, [favorite-bigness-adjective] amount of information in DNA was written years ago, by biologists. Moore's law has been in effect for some time since then, and the human genome hasn't gotten any bigger in the meantime.

  24. I'm surprised nobody has mentioned Netscape on Document Retention - How Long is Too Long? · · Score: 2

    For an example of what can happen to you even if you haven't done anything wrong, go look here at what happened to Jamie Zawinski. During their monopoly trial, Microsoft subpoenaed the contents of the bad-attitude and really-bad-attitude internal blow-off-steam newsgroups at Netscape. I never heard of anything that came up in court as a result of it, but the privacy of the users of that list was violated, big-time.

  25. One more letter - nothing less than a breakup on Respond To The Tunney Act · · Score: 3, Insightful

    I would like to register my objection to the proposed settlement in the United States vs. Microsoft case.

    The biggest problem I see is that the settlement is not a structural remedy. Oversight remedies have been tried against Microsoft in the past, and they have coded arounded them, lobbied over them, and legally maneuvered past them every time. The only thing that hasn't been tried yet, and that has a hope of working, is to break them up.

    Breaking Microsoft up into OS/Applications/Other divisions wouldn't break their monopoly, but it would make it more difficult for them to use their OS monopoly to create new monopolies in other areas, which they are doing with Windows XP even as I type this.