Older blog entries for graydon (starting at number 27)

too much coffee man

I've been doing galois theory all week, and while I now have a shadow of understanding how it works, it's completely boring so I'll relate this amusing anecdote instead:

I listen to midi files a lot, almost as much as MP3s. they are much smaller, they take no CPU time, you can get lots of them without violating copyright law, and if you have a good sound card they can be good background music while coding. there's a nearly limitless supply of classical, nursery rhymes, and nintendo music, which is pretty good, but to make it even better I've cooked up a markov chain generator which can process midi thru abcmidi and crap out new stuff. it really only works well with music that has repetitive structure, but that's OK because most classical, nursery rhymes and video game music does.

so tonight, we're listening to some otaku's disassembly of the final fantasy 3 cave music fed through the trusty markov script, and lo and behold, we hear the unmistakable dramatic strainings of the final fantasy 6 opera sequence, before you fight ultros. "oh my hero!" we listen to the source material, and it's nowhere to be found. it must be in a different key, hidden in the bass line or something. we never would have guessed.

so now you know. the corndogs who write the music for these games reuse the same themes between games. perhaps they too use a markov chain generator to make new soundtracks from old. nothing but your average "sneaking around in caves" music, and there's a beautiful opera hidden in it.


yes mathieu, we would do very well to have an IR-constructed fake vtable in a free ORB. this would make corba about a billion trillion times more pleasant to use. hm. a new, wonderful project to waste time on?

considered further the concept of a medium level language constructed from code blocks (with no entry/exit code) and separate, composable frames. has anyone seen such a language in the past, one which typechecks slightly better than a mere hygenic macro? this reminds me a bit of waldemar's medium-strength MOP in js2. sigh, languages need so much more work.

this is the last time I'm going to do this

I miss getting profoundly lost in techno parties. always thinking you know who, where and what you are is really stupid. we all need to have ourselves torn apart into little bits now and then. doing it all the time is tedious as well, but never doing it is pointlessly unpleasant; you wind up caring about furniture, status and investments. like any of this stuff really exists anyway... pfffft

officially giving up on trying to convey any semblance of an understanding of coding theory to the literal creationists of the world. there's another followup in the campus newspaper, this time claiming that information content (shannon-like) is equivalent to "meaning content".. they just don't get it. welcome to the post-dark-ages lifestyle! take a philosophy course or something.

school is finished again. locking myself in the basement of the library for a week with 20 AA batteries, 6 hours of minimal tech-house, 5 algebra texts, and a coffee vending machine. this is the last time I'm going to do this. how many times have I said that before?

may the stock market crash, and crash well. so long, cigar-chomping, swing-dancing, condo-owning weenies in SUVs

fiddled around some more with coq and agda, managed to prove some rudimentary facts about polymorphic binary trees before I got balled up with defining equality sorts, and gave up. still a little uncertain with these beasts, but damn are they powerful. why didn't anyone even mention proof assistants, in 3 years of university? we should have been using these from the get-go.

I sort of feel stupid because I had this serious inferiority complex going on while reading type theory papers, where they spill out 20 pages of proof trees at the end of the chapter explaining how their type system is sound. now granted, such things need to be arrived at through good reasoning and critical thinking, but it sure as hell doesn't hurt to have an automatic checker/typesetter do all the grunt work for you. somehow it never occured to me until today that all this stuff is probably assisted.

read more mark linton papers stefan sent me, read way too much algebra for one sitting, visited a bunch of friends going away to their various jobs. sniff..

further considered hosing my linux machine and setting up openBSD, for the intrinsic obscurity/bitterness value, the integrated crypto and code review, the fact that it actually has up to date man pages, and the fact that it's small. small things can be good. I'm pretty sure it'll run on the hardware I use, since I tend to go for the ninth-generation fell-off-a-truck we-never-met-you-before surplus/stolen/clone stuff which conservatively and cheaply tracks an established standard because it doesn't have any other virtues to speak of.

I'm a little concerned that it doesn't have netgraph, and thus may not have PPPoE. any openBSD'ers kicking around here want to set me straight?

what is it with official specs and capital letters? do you somehow get an irrepressable urge to press caps lock when you're writing a standards document?

reorganized interpersonal links within the advogato /person/ directory. now it actually says how I know other people here. roughly. hesitant to put down all the gruesome details, since it's a public forum.

I'd encourage other people to put a similar link-list in their self description, since it makes finding and reading related diary entries in this morass of people much easier.

worried about the number of comparisons advogato is getting with slashdot. however, since we all have slashdot as a reference point, a sort of sore-spot reminder of what can happen, I think this place still has a chance. the diaries are imho much more important than anyone suspected, since they give you a place to vent off-topic stuff, boost signal-to-noise with technical material if you wish, and generally control some sub-section of the material on the site without having to filter it thru a selective and slow editorial group. what we need now is a way to hyperlink between other peoples' individual diary entries, and it'll effectively have become a wiki/weblog hybrid; that is, a wiki with scrolling, time-ordered entries, and some sort of control over content (nobody else can edit your diary).

dark. night. dark and night. pitch black, even.

apparently you get a free oreilly book for entering software carpentry. the horrifying thing I found out today after spending a couple hours browsing their catalog is that I no longer actually want any of their books. I got all the ones I wanted, and the rest are all like sysadmin books and books on java class libraries and stuff.

frances and I wandered over to love and scandal for more tapioca and tea, and ran into jason, an old friend from highschool. this rounds out my surge of running into highschool people -- at least 3 others during the week. no real surprise given the proximity, but man, everyone's really starting to look like adults. eerily so.

slepnir is getting much more adventuresome. she'll no longer perch on my scalp precariously -- now she hooks a paw over the top of my ear and dangles herself far enough down to get to the shoulder, then down the arm and freedom! we put her up in the ceiling tapestry last night, which was really fun. you could only see these 4 paw-prints meandingering around, climbing over the ridges and sneaking up to the edge, then she'd realize she was really 10 feet up and shy away towards the center again. there's just about nothing cuter than a baby mammal.

spent enough time farting around with zenirc extensions that I've given x-chat the heave-ho and have folded yet another thing inside xemacs. also picked up MP3 minor-mode, and configured ps2ascii to view postscript in xemacs; so now it's only netscape's prettier layout, javascript engine, SSL support etc. which requires me to use any non-xemacs programs. ah, bliss.

otherwise did nothing but homework today. a sad day. didn't even think of anything clever. just mind-numbing banging out C for this FTP server. bleargh.

I do hope the women (ts/tg or otherwise) on this forum consider themselves welcome; it's pretty immature to treat them any differently. and, just to clarify for those who have missed some lessons in common courtesy: you don't get to decide whether your behaviour or language is disrespectful to someone else, they do. Think about it for a moment.

the temperature plummets

spent a little while in number theory class thinking about the discussion we had here regarding exceptions the other day. got to thinking that there's a powerful generalization lurking here. I've recently been stupendously impressed with the flexibility and clarity of sather's iterator abstraction, which neatly handles all repetitive control flow mechanisms in a single, clean form; so I got to wondering if there's a similarly lucid way of describing things which stack-local-objects are used for (in good C++). Especially when considering jwz's salient comment about general purpose macros for transforming control, I think there is:

what I'm thinking of is a way to subsume the try, catch, throw, finally, return and synchronized statements in Java; as well as the concept of auto_ptr and the resource-aquisition-is-initialization pattern in C++. The way to do this is to introduce a language-supported parametric type akin to this:

template <class Inner,Class Outer> Frame {
	void enter(Thread me);
	Outer leave(Thread me, Inner retval);
Then you introduce a new language keyword frame and construct of the following form:
frame (<Frame-Expr>) {
The enter method is called when a thread enters the frame, and the leave method is called when a thread leaves the frame, implicitly transforming the Inner return value of the block contained in the frame into the Outer return value of the frame. then augment the return keyword to take an argument specifying which containing frame the return should return to. Omission of the parameter implicitly means "current method", otherwise a named Frame is expected.

This approach accomodates a lot of strategies.

You can, for instance, have a virtual method which produces a Frame which handles "appropriate synchronization" of an object, and let subclasses decide if that means a local mutex, a static mutex, a semaphore, or nothing at all. You can do exception handling by constructing a frame of type Frame<union<ExceptionType,ReturnType>,ReturnType>, or you can do exception propagation by constructing a frame of type Frame<union<ExceptionType,ReturnType>,union<ExceptionType,ReturnType>> You can (as Ankh suggested) pass an error reporting object into a method, and have it used as a Frame around a sensitive block of code.You can factor out a whole class of exception handling code into a Frame produced from a common method implemented in a mixin class. You can make a finalizer which cleans up objects when it exits, like an auto_ptr.

There are at least 3 advantages to this approach over stack objects in C++:

  • it works with a references-only language like java
  • it requires that programmers be aware of it, and eases them into the task of writing their own Frames, since they already use it for synchronization and exception handling. many C++ people don't actually know any methodology involving stack-local objects
  • it's possible to parameterize behaviour more easily. stack-local objects must have concrete type (must be named by their constructor), but a frame block must simply typecheck. the Frame object it uses can be a subtype of the checked type.

Comments? I'm curious if anyone either (a) has seen this before, or (b) thinks it would work.

fatjim: go see a chiropractor. it's probably your neck. my arms were killing me, I got a chiro to adjust my neck, a pinched nerve became unpinched -- now my arms don't hurt anymore.

dria: I rank someone a master if either (a) I have already learned something really significant from them, or else (b) their work leads me to believe that if/when I sit down and get to know them, I'll learn something really significant from them.

practising the black art of wandering around campus wasting time

fiddled around some more with webstack (link forthcoming), a cute little program I did a couple months ago, then promptly forgot about. it's a tiny little CGI in C++ which interprets executable URLs; that is, a URL is parsed as a slightly mangled FORTH program, with the path-separating slashes considered as the FORTH word separators.

I picked FORTH for a few reasons: it's easy to implement an interpreter, the syntax is minimal so you can realistically fit programs inside the URL length limit, the code is easy to read and write without having to URL-encode a bunch of metacharacters, and most interestingly the explicit stack notation combines well with the concept of relative URLs, and "programming by clicking".

here's the idea: after evaluating its stack, it will print out an HTML page with base attribute set to the contents of the remaining stack, then it will print the textual output (if any) of the computation, a separator, and then a copy of ~/public_html/webstack.html, which contains relative URLs for all the phrases and words you know). clicking on any of these links will re-submit the base stack plus the word(s) in the link; so you get a really simple REPL built up out of this dialogue. so for example if you're an admin, you can put relative links to the names of all your hosts, plus a bunch of handy admin functions, plus a table of a half dozen useful parameters for the admin functions; 3 or 4 clicks, and you can compose commands for your network from remote. put the whole thing on an SSL link or behind a suitably authenticated access control system (say, pushing OTP values on the stack :) and you're in business.

anyway, it's not totally done, but it's cute; I can't quite decide if unleashing it on the world is wise, or if it's a satanic security nightmare. I think it might be easier to rewrite it as a script which just massages its input and sends it to a free FORTH, rather than bother implementing the whole thing.

I broke out your windshield!

I took 2 years off before heading to university, and it was really good: I got to skip the first year and a half of CS because I had work experience, I got to know why I was in school (unlike many here who simply have nothing ele to do with their time) and I got to know what was waiting for me when I was done.

I cannot agree with the comments I've seen here that one should graciously accept the behaviour of professors, and consider your education a privilidge given to your from an ivory tower. University is supposed to be a place of higher learning, yet the very process of conveying information (teaching) is not practised. Professors frequently just do not know how to teach. They do not know any technique short of transcribing a textbook on a blackboard and making side remarks as they do so. This is not teaching. A professor who has mastered a topic needs to understand that they are then the torch-bearers of that topic, and it is their responsibility to inspire intrest, illuminate the concepts and convey the material to others. This responsibility is embodied in their contract, which pays them money both from public coffers and from my own pocket to both research the topic and teach students.

The difference between my best professor here and my worst is the difference between night and day.

On the one hand (the good prof), we had people meeting afterwards to discuss the material out of intrest, recommending the course to people in different programs, bringing up things we learned at dinner with our families, subscribing to mailing lists for announcements of additional symposia, etc.

On the other hand (the bad one), the professor told us how to get away with cheating, which classes to skip and which parts of the material were not going to be on the final. The course was treated as not being worthy of study, even by the instructor, and there was the implicit understanding that everyone was an unfortunate victim to be subjected to the course, and was clearly only taking it as a program requirement. Questions were discouraged and occasionally mocked, and the lectures were given by overhead projection in a room with hundreds of people transcribing.

other shavings

we lost, then found, slepnir. she was hiding under a clock radio, and was apparantly pinned there for about 5 hours while we tore apart the apartment looking for her. eventually reduced to going out and eating a pound of raw garlic to cheer ourselves up.

stefan has finished a preliminary (translucent) terminal emulator widget for berlin, and njs has coded a jabber client (in perl -- corba rawks) using it. check out the juicy screenshots.

watched romeo must die and was annoyed with the omnipresent racism. every black character is a potty-mouthed, gun-toting gangsta wannabe with a gold chain, every chinese character is a cunning yet mystical martial arts master with a bloody shakuachi playing in the background, and every caucasian character is a horrible 80s-hair golf-playing weasel named "todd". It was just universally insulting. sigh

ratty rat rat

so we have a new person living with us: a rat named slepnir (the eight legged horse of odin). she's a 6 week old dumbo female, who is right now sleeping in the warm confines of a shredded old sweater, high atop mount her 6 story bedroom/balcony. she's extremely cute. I don't like the pet industry, but if she's alive, I may as well take care of her.

made my first monthly post to paleorhabdology, which still doesn't have enough readership to elicit much of a response. oh well, it'll grow. go sign up, geeks!

stefan completed the "spring milestone" of a berlin terminal emulator widget. the display server still needs a lot of fine tuning, but I hope to hell he's out celebrating now because he's been sweating blood over this for over a year now. congradulations are in order. in a way I feel guilty for not keeping up my end of the codebase, but I've known for some time he's better at this than I am, and seems to care more deeply about it than I do.

angrily fought autoconf for a few hours tonight, trying to get it to play nice with mingw32. ah well, it's free software. if it were all nice and easy, it wouldn't be any fun.

18 older 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!