Slashdot Mirror


User: Tom7

Tom7's activity in the archive.

Stories
0
Comments
2,199
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2,199

  1. Re:I agree! on Kent M. Pitman Answers On Lisp And Much More · · Score: 2

    > Yes it spots some errors, but at a great cost -
    > greater difficulty in code modification. Most Lisp
    > programmers don't hit that many type errors and
    > when they do, they have the option of fixing the
    > error or extending the interface to accept the new
    > type.

    Well, it is harder to have type errors in a language that has so few types!
    The idea is that more types in a language allow you to express more things (say, invariants of your code, or interfaces to your modules) more precisely. I guess most lispers have a different idea of what 'static typing' means than MLers. ML types are a lot different from CL types.

    > How do I specify a type "must be prime" for use
    > constructing hash tables, for instance? In Lisp,
    > you just declare a variable as being of type
    > (satisfies primep) and let the function primep do
    > the checking. You can't do that in a statically
    > typed language.

    Well, at least for this example that's easy. Your signature might be:

    type prime
    type hashtable

    val hashtable : prime -> hashtable

    val makeprime : int -> prime option
    ...

    Most of the time you want to avoid runtime checks (like you'd incur in lisp), so we are working on something called 'refinement types' which will help that.

    > Datatypes I covered above. I'll only add that both
    > structures and objects are available. As for pattern
    > matching on said items, Lisp has that in CLOS.

    Above? I don't think you know what I mean by datatypes then. 'datatype' is a keyword in SML which introduces a named sum / recursive type and constructors/destructors for it. Think of it like a BNF description. Perhaps:

    datatype exp =
    App of exp * exp
    | Lambda of var * exp
    | Var of var

    (or parametric types)

    datatype ('a, 'b) tree =
    Leaf of 'b
    | Node of ('a, 'b) tree * 'a * ('a, 'b tree)

    > (defmethod factorial ((i (eql 0))) 1)
    > (defmethod factorial ((i integer)) (* i (factorial (1- i))))

    That is the equivalent of a C "case", not pattern matching the way I mean.

    Here's a function which counts the number of nodes with exactly two children:

    fun twoc (Leaf _) = 0
    | twoc (Node (Leaf _, _, Leaf _)) = 1
    | twoc (Node (l, _, r)) = twoc l + twoc r

    I sorta think that is pretty nice. Admittedly, not all structures can be described so beautifully, but it is an awfully useful feature and I haven't seen it outside the static functional languages family.

    > I can't say if it is valuable for "big things" either,
    > but it is very valuable for "important
    > things" - things that can't go down.

    I suppose it is kind of nice to edit a running system (I've never been in that situation, but I could imagine it). Personally, I'd prefer a stronger certificate of correctness *before* I run my program rather than the ability to fix my mistakes conveniently afterwards.

    > You can't even define a static type (as defined by most
    > strong typing systems today) for this. I'd find it very
    > hard for it to be put consistently into a
    > statically-typed language.

    Well, this isn't really true. But the simple answer is that we know how to do it right (modal types are one way), there just isn't enough demand to add it (with its complications for implementors) into anything but experimental languages. You can go a long way with closures!

    There might be, if people made a case for it. What do people use this for, anyway?

  2. pre-runtime error detection on Kent M. Pitman Answers On Lisp And Much More · · Score: 2

    "...The Lisp way is 'anti-bugging,' finding errors as they occur. Having an editor that enforces indentation helps enormously in finding all sorts of typos (missing quotes, etc.) before you run your code."

    hehe.
    I think this sentiment is great. Essentially you are saying that lisp's syntax (along with the help of an editor) is conducive to syntax-error-free programming, since it has checks (in a way) that occur while you program, not while you run.

    The reason why I chuckle is that I often use this same argument to explain why I find ML's static type system so useful. Rather than catch syntax errors, it catches semantic errors in your program before it is run. I find this to be an incredible boon; I very infrequently have to debug a program that's type correct. Yet the "dynamic" camp doesn't buy into this -- they say that their dynamic typing lets through *more* programs, and therefore is somehow more powerful.

    What's the deal here, do you believe the first and not the second, or am I merely making an unfair stereotype?

  3. I agree! on Kent M. Pitman Answers On Lisp And Much More · · Score: 2


    I had a +5 question about this in the asking phase, and I was disappointed to not see it answered.

    I too first learned lisp, but (after the initial shock) found SML to be much, much easier to use.
    In my mind, we win on:

    - static typing: makes debugging so much easier,
    module interfaces more expressive, and programs faster. Note that ML and OCaml both have
    type inference, so this business about writing
    down types all the time doesn't apply!
    - datatypes and pattern matching: A very natural
    way to represent recursive data structures.
    Often saves you lots of typing over objects
    and subtyping, while being more "safe" in
    the sense of avoiding casts.
    - Syntax. This is subjective, I guess, but
    I don't need practically any punctuation
    to program in SML, which makes it easier to
    read (for me) than lisp or C.

    From his response, it seems we're missing:

    - "dynamic stuff". It's not clear to me that
    this is actually useful for working on
    large problems, but I suppose this is
    not reconcilable with ML's static type
    and scope rules.
    - self-interpretation. This sounds fun, and
    I had hoped to hear about how this is useful.
    Any suggestions, anyone? It would seem that
    this could be added to ML, though at a
    cost of efficiency.

  4. Re:Think About This on CEO of RIAA Speaks at P2P Conference · · Score: 2


    This is stupid. Not all musicians/artists do things to get paid. Check out mp3.com. I'll bet that amateur bands outnumber "professional" bands in the world at least 2:1.

    Myself, I've recorded over 10 albums, and created over 65 fonts (among other things) and given them away for free. The fact that people can have access to them and share them is what makes it worthwhile -- if I was trying to sell them, it would cheapen the art form and also make it a whole lot less fun.

    I contend, that even forgetting about the issues of copyright, etc., that the world would be *more* artistic if artists typically were not paid for their work.

  5. Interpret it as I will! on Businesses Slow to Adopt Linux · · Score: 2


    I, of course, interpret it as "Linux Rulez!"
    HA!@

  6. Is it still called... on Star Wars II (Attack of the clones) Trailer · · Score: 2


    Is this movie still called "Attack of the Killer Clones" or something stupid like that?

  7. Happens all the time on Road Runner Doesn't Do XP · · Score: 2


    When I used to work in the "real" world, this would happen all the time. Brand new OSes are almost never supported directly. They'll eventually support it.

    By the way, there's an awesome driver called RASPPPOE which allows you to use PPPOE on Win2k/XP/etc. as if it were a regular network interface. No clutter, no dialing manager, nothing. I highly recommend it, and it probably works with rr on XP.

  8. Re:Not base3 again on Ternary Computing · · Score: 3, Insightful


    The reason that the computer industry grows exponentially is exactly these kinds of paradigm-changing technologies.Most of these have happened in manufacturing processes, but I think as we exhaust that field we will be pushing the changes higher up the architecture. (x86, your days are numbered!)

    That said, base 3 is probably pretty stupid. Asynchronous circuits, however, might really make a difference some day...

  9. secret research? on MIT To Release Next-Generation OS "Cesium" · · Score: 2


    OK, what kind of academic research institute does research in *secret*? I think I have to go with others here in thinking that this is a hoax...

  10. Always looked to me like the heatsink compound... on The Report of My Thermal Death Have Been... · · Score: 5, Interesting

    When I watched that TH video, it struck me as odd that the intel chip had no heatsink compound and the athlon did. Personally, I think it was that compound burning, not the silicon or housing...

  11. Re:Just plain wrong. on Sony Uses DMCA To Shut Down Aibo Hack Site · · Score: 2, Troll


    What will it take?
    Massive civil disobedience, a la Napster...

    I don't think that the IP holders can win this war the way they're trying to. Until they provide the same materials more conveniently, there will be always be Napsters and Morpheuses and Aibohacks. As one is shut down, others will pop up.

    The DMCA might be a bad law, but effectively I'm able to take all the rights I'd wish to have under a perfect system. So do most people. So who is winning?

  12. Re:the real meaning of XP on Windows XP Has Arrived · · Score: 2

    heh heh, cute.

    I dunno about XPloit, though. It comes with a built-in firewall, and I'm positive it's more secure in the default installation than Redhat is.

    Also, 98 and NT have always had the ability to spoof IPs and bind to raw sockets. (see http://www.grcsucks.com/)

  13. Easier path to DIY synths/effects on Tech Toys Become Modern Instruments · · Score: 3, Interesting

    Circuit bending is fun. My bandmate and I used to do this back in high school.. we didn't know what were were doing really, but we got plenty of wacked out sounds.

    Nowadays we're a little more deliberate, so we make VST Plugins . The VST architecture is totally simple and pretty portable, so it's easy to crank out plugins if you have crazy effects in mind. This might be a good place to start if you know a little C programming and have some ideas.

  14. Fraud?? on ATI Drivers Geared For Quake 3? · · Score: 2


    Fraud?? I guarantee that there is no claim about image quality, nor even one about frame rates. Furthermore, I'll bet the EULA for the drivers makes it clear that they are not making any particular claims and are not liable if it doesn't somehow live up to your expectations.

    Personally, I'm glad to see application-specific enhancements. This whole thing is wildly overblown.

  15. No way on ATI Drivers Geared For Quake 3? · · Score: 1, Flamebait

    They are optimizing the drivers for one of the most popular 3D applications, not some artifical benchmark. Personally, if there was a checkbox which allowed me to disable "cheating" optimizations for specific applications, I would sure as hell leave the optimizations enabled!

  16. One of the features of FMD: IP on Slashback: Retail, Preparedness, Games · · Score: 2

    From the features list for FMD:

    "Intellectual Property"

    "The FMD/C technology is presently protected by over 120 Japanese, European, and US patents, approved and/or pending, dozens of priority establishing disclosures, and the exceptional know-how of an unprecedented group of physicists cooperating across the world."

    Why is being proprietary a feature?

  17. FMD and HDTV on Slashback: Retail, Preparedness, Games · · Score: 2


    First off, I'd like to say that this technology looks great; I hope they can deliver.

    All over their site I see propaganda about how current DVD technology could not deliver HDTV quality video. I don't think this is true. By using a better compression algorithm (ie, MPEG-4), it would seem to me that we'd get incredible quality at reasonable bitrates. We'd just need to upgrade the software standard and our DVD players/firmware (software on the computer); not develop new reading and manufacturing technology.

    So it seems that there is a software solution to this "problem" as well. Is this just their popaganda, or is there something I'm missing?

  18. A Good Cure for Slashdot Addiction on Slashdot Updates · · Score: 2


    Hopefully this will cure my slashdot addiction and I can get some work done. =)

    (PS: Slow connection mode rules! No ugly green, no navbar!)

  19. Re:GNU Emacs 21? I've been using xemacs for 5 year on GNU Emacs 21 · · Score: 2


    Really? A few years ago when I arrived at university I started using Xemacs, but then I rediscovered vanilla GNU emacs and I thought it was way better (mainly, more stable and cleaner). What is supposedly better about Xemacs?

    This variable-sized font business in 21 sounds intriguing...

  20. Dear Slashdot, on Coder or Architect? · · Score: 1, Troll

    Dear Slashdot,

    I think I am super hot shit. All these old programmer nerds are looking up to me. I'm like, not even thirty, and I'm obviously successful as hell. Sexy too. My question is, how can I inflate my ego more?

  21. Re:Need more Mice Buttons on Listen To Woz, And Perhaps Type Madly · · Score: 1


    Sounds like I'd need two hands to browse the web... yech!

    There's something to be said for a clean UI, but I think this single-button stuff was just a mistake. Modifier keys are not simpler than different buttons.

  22. Re:Need more Mice Buttons on Listen To Woz, And Perhaps Type Madly · · Score: 2


    Yeah, I was just kidding, but actually, the lack of two buttons on the iBook is one of the things that's keeping me from buying one. It is not very convenient to carry around a mouse as well.

  23. Need more Mice Buttons on Listen To Woz, And Perhaps Type Madly · · Score: -1, Troll


    OK, OK, but when is the mac going to get more mouse buttons??

  24. Game Boy Color / Advance on Hackable Christmas Presents? · · Score: 2


    The Game Boy Advance and Color (especially) are inexpensive and very well documented. The GBA has an ARM processor which is pretty reasonable, and the GBC has a Z80-like chip which is more "retro". Both are fun. (Expect to pay another $100 or so for a kit to read/write cartridges.)

  25. It'll be just like... on Neighborhood Area Networks? · · Score: 2


    Remember when telephone technology was finally cheap and easy, and each neighborhood set up its own telephone network for talking to each other?