Pete's Log: legacy glob, triangles, klueEntry #606, (Coding, Hacking, & CS stuff)
(posted when I was 22 years old.)
So I'm pretty sure that if there's one part of the whole unix concept that seriously suffers from legacy, then it's terminal drivers. But there's really no way to replace the current system without completely breaking everything. And it seems to work well enough and it's proven to be really adaptable. You just need to keep in mind that the abstractions and interfaces you deal with when coding this stuff were first created when people were logging into unix machines from dumb terminals. So given a chance to redesign the whole system, I really wonder how I would do so. What's a good abstraction for that whole interface? I guess the tty approach works well enough.
So some time ago I wrote a simple recursive-descent parser dealy to match globs. The question is, is it worth my while to implement globbing in my shell? As best I can tell, I don't yet call opendir anywhere in my shell. What kinda shell don't do that? I'm really curious, though, as to how to efficiently do this. It'd have to be part of the parser. Ooooooohhhh.... man, that code would seriously enjoy the added obfuscation of a recursive-descent glob parser. heh. We'll add that to the ush wishlist.
So there was a while during my senior year that I was doing several programming contest problems a week, just for practice. I've decided that that's a habit I need to start up again, it certainly helps keep the brain warm. So to this effect I wrote up a quick recursive solution to this triangle game problem. Feels good to exercise the brain.
So during os today I had my ti-85, and I was running klue2, since paying attention wasn't proving to be all that fun. Basically, klue2 is a semi-obscene random sentence generator. And it turns out I've not matured at all since high school, since I'm just as amused now by the sentences this thing generates as I was then. I made the mistake of looking at the klue2 source, so the ti-85 had to recompile it. That took forever. So now I'm thinking of writing klue4: an online, php/mysql power, user-contributed random sentence generator. That could prove to be a fun web project if I need to waste some time. We'll see. I bet I could pull it off in a few hours. And the klue legacy would live on.