Friday, February 29, 2008

Physicists Successfully Store and Retrieve Nothing

I have to look up a copy of the actual article from Phys Rev Lett, but this is incredibly cool: Physicists Successfully Store and Retrieve Nothing

Basially, it seems to me the researchers managed to create a stationary excited vaccum state. The article describes it about as well as I can (especially since I haven't read the paper yet, and my quantum electrodynamics kung-fu isn't all that strong), so you should probably read that, but... Wow.

Thursday, February 28, 2008

Hygienic Macros, Embedded Languages, and Lisps

So I've been writing (common) lisp code the last couple weeks in my spare time (or some of my spare time), and was thinking about the language, and realized why I never really liked Scheme's hygienic macros. The macro system is basically it's own little embedded (turing complete, as it turns out) language. So when you decide "hey, I need a macro" you need to mentally switch to a new language. You've been writing various list-manipulation code with first, rest, do, whatever tools you like, and all of a sudden... you're using a new, different language to .... manipulate lists. And it's not a trivial/easy language. Loop is a special little language embedded in Lisp, but pretty straightforward. Who really can't guess what (loop for i from 1 to 10 summing i) does? (Actually, it's a fairly cobol-like language, on reflection, funny given how much I like loop, and mock cobol ;)

Wednesday, February 27, 2008

Kenny, McCarthy, Lisp, and the Future

Kenny Tilton has a cool bit on his blog about why Lisp is so cool: smuglispweeny: Ooh! Ooh! My turn! Why Lisp? Personally, I liked the story at the end:
At ILC 2002 former Lisp giant now Python advocate Peter Norvig was for some reason allowed to give the keynote address like Martin Luther leading Easter Sunday mass at the Vatican and pitching Protestantism because in his talk Peter bravely repeated his claim that Python is a Lisp.

When he finished Peter took questions and to my surprise called first on the rumpled old guy who had wandered in just before the talk began and eased himself into a chair just across the aisle from me and a few rows up.

This guy had wild white hair and a scraggly white beard and looked hopelessly lost as if he had gotten separated from the tour group and wandered in mostly to rest his feet and just a little to see what we were all up to. My first thought was that he would be terribly disappointed by our bizarre topic and my second thought was that he would be about the right age, Stanford is just down the road, I think he is still at Stanford -- could it be?

"Yes, John?" Peter said.

I won't pretend to remember Lisp inventor John McCarthy's exact words which is odd because there were only about ten but he simply asked if Python could gracefully manipulate Python code as data.

"No, John, it can't," said Peter and nothing more, graciously assenting to the professor's critique, and McCarthy said no more though Peter waited a moment to see if he would and in the silence a thousand words were said.

John McCarthy is a really smart man. Personally, I'm also a big fan of his web pages on the sustainability of human progress. Every time some enviro-weenie talks about "sustainability" I want to smack them. Back to Kenny for a moment, at the last Lisp NYC meeting, Kenny was complaining (mentioned, perhaps, lest anyone think Kenny is a whiner) about his shoulder, that he hurt playing Tennis. The enviro-weenie would leap in, say "Tennis is unsustainable, you need to stop playing". Kenny wisely just corrected his form, stopped doing stupid things, and the pain got better. He said something to the effect of "Pain moves you towards correct form". Environmental troubles may suggest better ways of doing things, but there's rarely a need to stop.

Monday, February 25, 2008

Linux Rant

Figured since I just got added to Planet Nylug, I'd make a Linux related post. This is going to start out as a Gnome rant, but is much more generally applicable.

I switched from gnome a few months ago when the latest gnome release started running Nautilus on my desktop every time I logged in with no way to turn it off (the left edge of my screen is where the terminal windows go, running some huge bloated file manager just to put some $#%@@$%% icons where I'll never see them is a pain). Finally, I did a web search and found that you had to use gconf to enter an undocumented (as far as I could tell) option to not run it automatically. I'd already gotten sick of having to learn a new undocumented sooper-sekrit gconf option every release to just get gnome-terminal to use the ancient 6x12 bitmapped font (-misc-fixed-medium-r-semicondensed--12-110-75-75-c-60-iso8859-1), and I'd had it. (I have, incidentally finally figured out a solution to getting 6x12 to work easily in KDE (and probably Gnome as well), I copied the font files, changed them from "semicondensed" to "normal", and changed the foundry to "fyndo", and the KDE font picker finds them now that it doesn't need to understand "semicondensed").

Sure, they're trying to make it more user friendly, but "Google the mailing list" is not user-friendly. Control panels can be user friendly, if they're complete. But even if you have an "intuitive" user interface, You need good docs. And Linux docs these days suck. I can almost live with the gnome people taking options off the control panel and making me set them directly with gconf, except they aren't documented. gnome-help has a nice friendly thing about "The Desktop", the nautilus man page documents the --no-desktop option:

--no-desktop
Do not manage the desktop — ignore the preference set in the preferences dialog.
, but since it's being started automatically, that does me no good, and the preference is no longer in the preference dialog. Wrong docs are not good docs. If I have to use gconf to configure something, there should be some reference that lists the gconf options, or they should be self-documenting like emacs. (In emacs functions have doc strings right in the function, and variables have doc strings, so that when you search for the variable to set with "apropos" you can get the docs. Also, since the docs are in the source, if you change a function's behavior, it's obvious where to document it). When I started using Unix back in 1988, I fell in love, because almost everything was configurable. Looking back, the key point was that how to do it was also well documented. I'm still fuzzy on how it is that KDE manages to launch xine when I put in a DVD. Or how to get it to do the right thing. Ok, it used to be the case (yesterday) that I'd put in a DVD, it'd start xine, which would complain it doesn't know what to to do with system:/media/hdc, and I'd have to click on "ok" and then the "DVD" button, and the DVD played. I decided I'd fix that while writing this post, so I went to the control center, and "KDE Components" and "File Associations", and.... it wasn't there. I knew I'd set it to use xine somewhere so I kept looking, and under "Peripherals" and "Storage Media", I found the option for "DVD Video Disk", and changed the command "xine %u" to "xine dvd:/", and now when I put in a DVD, I get a breaking glass sound, a dialog pops up with "/media/cdrom0 is a folder, but a file was expected". Now, the command "xine dvd:/" typed at a command line works ok. There's a little ? icon on the upper right that I take to be some kind of a help icon. Pressing it brings up the incredibly informative "FIXME: Write me" message. There's also a "Help" button on the bottom. It does, as best I can tell, nothing, and I can't find docs for the "peripherals" module. What does that %u do? Beats me! But it's important. If I leave it off, KDE doesn't even try to run the command I have there. I've tried replacing xine with a shellscript running in an xterm, and without the %u it doesn't run. Why? I don't know, the fact that if it DID use that command, it'd work seems irrelevant. And I have no idea how the "a DVD has been inserted" notification gets from the kernel (well, ok, it uses dbus, I think) to KDE. Sure, getting these things to "just work" is complicated, but that's no excuse for not explaining how they work. Neal Stephenson, in his "History of the Command Line" say that when linux fails, it does so transparently. That is no longer true, and I miss it.

Playing Games With Kosovo

Wes Clark has a discussion of the current Soviet^H^H^H^H^H^HRussian opposition to the independence of Kosovo. Playing Games With Kosovo | Newsweek International Edition | Newsweek.com. The more tings change, the more they stay the same. Russia really needs to get over it's imperial pretensions so that it can get around to being a great country.