30 Apr 2003 fscked   » (Journeyer)

I f*cked up the ADA test. Oh yes I did. Whatever. Let's talk about happier things.

Kept adding error checking and fixing bugs on the networking assignement. I was mistaking a buffer size and that took me ages to spot and fix, but now the mini-protocol I've created for the client and server to talk to each other seems to be reliable and efficient. I'm hoping it is ready for 'prime time' now. Only thing left to do is writing a little README file as the code is already extensively documented.

Slow but steady progress on the Operating Systems assignment. Most of it is done, left to do is basically interprocess communication and a few calculation-oriented functions. Matrix handling code is written (and well written thanks to vortex) and processing of entered values is working flawlessly as far as we can see. We hope to (and we better) have it done by tomorrow as it is due... yes, tomorrow, you guessed it. Oh and talking about Operating Systems, our first assignment grade came out today. A rather nice 19 out of 20. Hooray.

Spent some time getting eye candy in KDE3.1. Downloaded a few icon themes and decided to stick with the original Noia for KDE. Also fixed an annoying bug in my setup which was pretty much crippling my routing table here. Mandrake was detecting my wireless card and setting it up as eth1. Not only that, it was assuming any request to 192.168.x.x would go through it. Not good. To add insult to injury, I was not-so-wisely telling it to ifdown eth1, resulting in no routing whatsoever to that address space. *grumble* Fixed it for now by not setting up eth1 on boot and thus letting it assume eth0 for this kind of routing.

A few days ago, I was pointed to a rather nice article about a certain functional programming language called K. Here's an excerpt from it which clearly shows how powerful this kind of programming languages can be, K in this particular example:

>   isprime:{&/x!/:2_!x}  / min over x mod right-each 2 drop enumerate x
>   isprime 14
> 0
>
>   isprime 7
> 1
Analyzing from right to left. We create a list of all integers from 0 to x (exclusive), then we remove the first two elements (2_), so we are left with a list from 2 to x (exclusive). Next we determine the residue of x and each of the numers in the list. Finally, we calculate the minimum of the residues. If the number is prime, then the lowest residue will be 1 and be considered true. If the number was composite there will be a 0 residue for some value.
>   !14
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13
>
>   2_!14
> 2 3 4 5 6 7 8 9 10 11 12 13
>
>   14!/:2_!14
> 0 2 2 4 2 0 6 5 4 3 2 1
>
>   &/14!/:2_!14
> 0

Funky. I've also been reading a bit on Lisp, Common Lisp in particular, and finding beauty in it. Will try to get some time to read a bit more in the next week or so.

It's late again.

:wq!

Latest blog entries     Older blog entries

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!