Older blog entries for jdybnis (starting at number 10)

22 Jun 2001 (updated 15 Sep 2002 at 20:43 UTC) »
xcyber: sort the tables then compare them.
15 May 2001 (updated 15 Sep 2002 at 20:45 UTC) »
ksandstr: what do you mean by an idempotent function?
8 Feb 2001 (updated 15 May 2001 at 02:57 UTC) »

Had a disappointing weekend, where I brought my new computer to an all night quake gathering, only to discover my computer would not run quake!

After hours of forcing other people to swap parts of my computer into their systems, I gave up hope of figuring out what was broken. I spent most of the night playing SSX on a playstation someone had thoughtfully brought with them.

The next day, during a second marathon troubleshooting session I discovered that my ASUS A7V motherboard + GeForce 2 + Win2k were not playing nice. The reason I didn't discover it earlier, was that everyone else had a GeForce 2 too. I should have installed Linux. :)

Anyway, I bought a new motherboard. Now everything is fine and dandy.

And I must say, Cygwin has a pretty slick install program put togeather.

27 Jan 2001 (updated 31 Jul 2003 at 00:48 UTC) »
Scheme

graydon:Yes, I think the right question is: "why isn't '() coerced to #f." More generally, why isn't the coerce-to-boolean form specialized for every type? The whole idea of everything being coerced to #t except for #f, in a way already violates the disjointness of types. If the system were totally pure, it would raise an error when anything other than a boolean constant is tested for truth. So, there is already a coerce-to-boolean form for each type; it just happens to be a constant function. I don't think it is any worse to define a more interesting coerceion function, different for each type.

Cognitive Illusions

I saw an interesting lecture yesterday on cognitive illusions in human/computer interaction; these are places where the mind incorrectly applys a hueristic to come up with a solution, instead of using logical thought.

One place this pops up is conditional probability. Write down the solution to the following problem before you check the answer.

Your friend has two rabbits. One of them is a girl. What is the probability the other one is a girl too?

For now, I've put the answer at the bottom of notes on my account page, because I can't figure out which of the allowed tags will make background black to do the hidden text trick.

Update: sarum is right, your friend wouldn't pick the rabbits randomly. So lets say, your friend has a rabbit that just had two children.

If you don't believe the answer, think about these other two problems, and how they are different.

There are two rabbits in a cage. The bigger one is a girl. What is the probability the other one is a girl too?

Update: and to clarify this one too, this question is not about rabbit physiology.

There are two rabbits in a hat. You pull one out, it is a girl. What is the probability the other one is a girl too?

Really tough to wrap your mind around, huh? If you still don't believe me, I'll make you a truth table.

26 Jan 2001 (updated 26 Jan 2001 at 05:39 UTC) »

Since Scheme seems to be a topic of discussion lately, maybe someone could answer a question for me.

Why is #f distinct from ()? For a language pushing minimalism, it seems unessesary.

Compare the following Scheme code to the same function in CL.

(define (breadth . trees)
  (if (null? trees) 
      () 
      (cons (map car trees) 
            (apply breadth 
                  (apply append (map cdr trees))))))
(defun breadth (&rest trees)
  (and trees
       (cons (mapcar 'car trees) 
             (apply 'breadth 
                    (apply 'append (mapcar 'cdr trees))))))

BTW, that person that was pestering me for a homework solution kept calling and emailing me, up to the day it was due, but I think someone else gave them help. Sheesh!

22 Jan 2001 (updated 19 Nov 2002 at 02:32 UTC) »

just venting

21 Jan 2001 (updated 21 Aug 2002 at 06:10 UTC) »

hehe

12 Jan 2001 (updated 26 Jan 2001 at 05:38 UTC) »

I'm going to buy a new computer in the very near future.

I'm will be doing some Java programming, and I want to try out some of the new free IDE's. The ones that are written in Java themselves, are painfully slow on my Pentium II 233 w/ 128MB RAM. So...

The system I'm planning on putting togeather is:

  • AMD Athlon 850Mhz
  • Asus A7V, VIA KT133 motherboard
  • 512MB PC-133 SDRAM memory
  • IBM Deskstar 75GXP 45GB HD
  • AOPEN GeForce 2 MX AGP vidio card (only $99!)
  • I'll salvage the NIC's, sound card, and CDR/W from other machines. And it will have no floppy. <Yes!>

    Including the case, tax and shipping it's going to cost just over $900. Which I think is pretty good.

    Update: I bought it all; spent $903 and change. Only I forgot to buy a fan, and you don't run an Athalon without a fan. Doh! So I've been using my same old computer, while I've had this kickass machine sitting on my floor for over a week. :)

  • 11 Jan 2001 (updated 11 Jan 2001 at 06:04 UTC) »

    Does anybody keep a collection of regexp code?

    I recently had to implement a regexp pattern matcher (but not for text strings) and I was looking for something simple, without the unecessary complications added by optimization. What I found was:

  • GNU grep (not very simple)
  • Henry Spencer's and derivitives (the original is ok, some of the later works are just scary e.g. the perl regexec.c)
  • a very readable DFA by Mark Hopkins posted on comp.compliers.

    Does anybody have any others?

  • 12 Jun 2000 (updated 12 Jan 2001 at 05:44 UTC) »

    deleted: incoherent dribble

    1 older entry...

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!