So I aquired the CLOS book and CLtL2 and read a bit in these two and the UCI Lisp manual.
Apparently in old Lisps there were functions which were used purely for their sideeffects, such as MAP
which always returns nil regardless of it's parameters. When I saw PROG2
for the first time, I thought it was a optimized PROGN
for only two forms, little did I know that the 2 means the value of the 2nd form will be returned instead of the last form. in LOOP
AS
and FOR
are interchangeable, though I prefer the latter one.
Wednesday, March 31, 2004
Lisp Books
Time to blog
I didn't have it in the last few weeks, however quite a few things happened.
First of all o got a new PC, which is one of the reasons I didn't have time, and it is causing trouble. It's a new AMD 64 3000+ (really 2GHz), with 1GB of RAM, a shuttle AN50R mainboard and a HIS ATI Radeon 9600 XT (no VIVO). It's a bitch, it looks fine Warcraft 3 is running smoothly at 1280x1024, Divx movies aren't a problem anymore and with the new gfx card it's really quiet. But, and thats a big but, there are some issues like freezing, random segment violations, dirty IRQs, lost DMAs and 2.4 kernels not getting into the net. While the last problems have been resolved by kernel upgrades and fault-save BIOS settings, the others are still causing reboots, and I don't know what to do.
Wednesday, March 17, 2004
lisp books
Yesterday I browsed Amazon for lisp books and decided to buy Keenes CLOS book. Browsing a bit more I came along a unusual suspect, someone was trying to sell CLtL2 on Amazon marketplace, well he succeded and I'm now a proud owner of CLtL2, I can't wait till I hold it in my hands.
I have advanced to chapter 5 in PAIP, but it took me almost halve a day to solve exercise 4.2: Write a functions that generates a list of all permutations of a givn list. There were two problems for me: Bridging the gap between algorithm and code and figuring out that I didn't cover the simplest case: (PERMUTE '()) -> (())
while I thought (PERMUTE '(A)) -> ((A))
was the simplest case.
Sunday, March 14, 2004
keyboards, keybindings, keywords ...
I ordered a keyboard with a US layout to see if programming with is easier/faster because often used keys like ([{/ are easier to reach and some emacs keybindings should seem less painfull, because you don't have to stretch your hand over the whole keyboard. Depending on if I want to keep the windows key as meta/super or I like the old IBM keyboard click better I'll try to get a IBM keyboard with US layout.
While I'm at it, i learned some new and very useful keybindings if you are editing lisp or any other code with lots of parenthesis. In addition to those a also added the following code, which is not as good as insert-parethesis
, but does well enough for me.
(defun insert-doublequotes () "Like insert-parenthesis, but inserts doublequotes (\") instead of parenthesis " (interactive) (insert "\"\"") (backward-char)) (global-set-key "\M-\"" 'insert-doublequotes)
I always wondered why you need C-f
, C-b
etc. when you have arrow key which are there for just that specific purpose, but when you use parenthesis movement it's very nice to have them, because your hands can stay where they are and don't have to move to the arrow keys.
Saturday, March 13, 2004
books
So much for writing daily, maybe it will work later.
At the moment I'm reading “Paradigms of Artificial Intelligence Programming” by Peter Norvig. So far it's easy and thus fun, and this time I'm actually typing most of the code in the book & try to do most exercises. Before that I read “ANSI Common Lisp” by Paul Graham, having tried to read “On Lisp” first I must say OnLisp is not for the novice, despite the almost identical introductions saying otherwise.
Wednesday, March 03, 2004
xmms-remote 0.21
I have updated xmms-remote again and added /xmms-volume
to get & set the main volume, added /xmms pp
to toggle between play & pause and replaced COYPING with a file that actually contains a license, somehow it had become a gzipped tar.
Saturday, February 28, 2004
xmms-remote
I have updated xmms-remote to work with X-Chat 2.
xmms-remote was my first C program, I wanted a program to show the mp3 I'm currently playing, simply because it was “hip” at that time. The program itsself was easy to write, yet finding out how to make it a X-Chat plugin wasn't. There was hardly any documentation, a sample plugin was provided with the source, but it did not use the functions I needed, so I had search for them myself in the sourcecode. Luckily that changed, as the X-Chat 2.0 C API is properly documented.
do it yourself
Sometimes I think “Application X should have this feature” or “I wish there was a Application which could do Y”, and only a few days ago it dawned unto me that I could write these things myself. So I'm interested in fixing dfm (there are problems with the image which are loaded twice and/or have a different format than xpm), and writing a file based blogging tool for blogger. The language of choice for the blog tool will be either Smalltalk or Common Lisp, for dfm I'll have to stick to C.
Wednesday, February 25, 2004
nice guy
If you think you are a nice guy like this take some time and listen to some heartless bitches
Tuesday, February 24, 2004
printing in the RRZ
Today I had the joy of trying to print some slides in the RRZ. The first free terminal was a AIX one, so I downloaded the pdf and looked for some information on how to use the duplex option. It is either hidden very well or there is none because I couldn't find anything, but what was even worse that the queues weren't available as show on the printing websites. Using man lpr
and less /etc/qconfig
I found out they are given different names on the AIX server. After a successfull test run with five pages, I tried to print the rest but the only thing which cames was the cover sheet. Thinking windows would be the easier way, I logged out of the AIX terminal and logged into a Windows NT terminal, did a another test run with 10 pages, duplex, successfully, and tried to print the rest, but again just the cover sheet. Finally being frustrated I gave up, and will print the rest at home.
friends
We are just friends, that's why there has been no update for the last three days. But she enjoyed the roses i sent her for valentines.
Friday, February 20, 2004
Oh great
Browser or blogger ate my entry, I love it, shouldn't write directly in the browser, well that's it for today then.
Thursday, February 19, 2004
lisp
I hoped others would add comments to xachs lisp braindamage, as I'm just building up my own braindamage, and afaik learning from the mistake of others is a great source of knowledge, or so.
assembler
Last week I had the T3 Praktikum, which was mainly microcode (decoding instructions) and assembler for the c-core, which is basically a simplified version of the Motorola m-core. One of the programs we had to write was to simulate preemptive multitasking. Writing assembler made me realize that C is just a fancier way to mess around with registers & memory, what you actually access are memory locations, and not objects or pointers, but 16, 32, 64bits.
writing daily
I will try to write daily, just to write, and get better with time. Sometimes I have small things to write about but I'm to lazy to really do it, and after a while a blockade builds up because I didn't write when I could have, when I think about it it's really stupid.
At the moment I'm sitting in my livingroom/kitchen and it is a bit chilly because the window is open, but I can not remember opening it. A child outside is crying. When everything goes as planned, I'll write some more stuff, go shopping, have meal call her and attend the youth group leader meeting.
Saturday, January 31, 2004
streik
As you might know students at almost every germany are protesting against fees & budget cuts university, but at my university they started with really stupid things like blocking lectures, which which is like cutting your wrists in an empty room, it's hurting only yourself. But today the students of the IT “faculty” decided to go public (like others already do) and try to hold lectures in public buildings spaces, mostly sub- & railway stations.
Regarding other things of interest, I think I'm slowly making progress.
Friday, January 30, 2004
stücke
If somebody deservers a lobotomy it is this idiot guy
Trailer news: The Kill Bill Volume IItrailer if finally up on Apples site, and it seems like a another german movie is making it into american cinemas
Sunday, January 18, 2004
bits
The trailer for The Girl Next Door has been released, featuring sexy Elisha Cuthbert.
I didn't really do what I planned to do, but I hacked together a RSS 2.0 feed for Nackensteaks - Feedback
The thing that made my day was a SMS I received, lets just say I was happy.
Wednesday, January 14, 2004
bush, election, mac, love
Bush in 30 Seconds. While some are pretty funny, using a mac, others are scary. I don't really want to comment on him, except for his international activities which are imho best described as “imperialistic”, as I dont really know how he justified what his administration did, nor do I know the real situation of the people living in the USA. I just can´t critize without knowing.
A bit more local is this “Hamburger Wahlblog” which I found via the Schockwellenreiter. It provides a information about election in Hamburg, and only about, which is nice because you don´t have to buy & keep daily newspapers to get all the information, plus lesser events/information, are probably covered aswell.
I love Brent
I really had a good day yesterday, I´m still happy