Older blog entries for kwoo (starting at number 7)

GNUstep googling

I did a little bit of work with GNUstep to try to figure out the real differences between it and Cocoa. So far I haven't run into anything that couldn't be conditionally compiled. I know the last time I tried it on OS X (admittedly, from PB) it didn't like ifdefs for portability (such as switching between IBOutlet and id), but I'm sure that's something people would have complained about enough for them to fix.

My best friend so far has been Google (go figure). So far I haven't run into anything that couldn't be solved with Google, but then I haven't played with NSDistantObject yet.

Uncommon Lisp

I just compiled CLisp 2.30 and everything went just fine. I didn't compile libsigsegv to go with it, largely because I have traditionally had problems building it on PPC boxes. Besides, if I run into segfaults, I know I'm doing something wrong -- most of the time, at least.

I did a search for "Lisp DNS" and it turned up a couple of reasonable hits, but not enough to stop me from thinking about coding up a DNS server of my own. If I do any work in Common Lisp, it will likely target CLisp in the areas where it has to, as I don't know of another CLtL1+ Lisp that bootstraps from C. (Unless SBCL does now?)

Job front

Got some more work done on the Perl sample code for the possible job. They wanted to see a couple of examples, but I'm going to hand in about half a dozen small-to-medium files. I've purposely chosen things that are easy to test and the behaviours of which are well-known, but that does make it difficult to keep on task sometimes.

Fortunately, I don't have to send it in until early tomorrow morning, so I've got some time to play with it. I don't know whether to write more sample code or to write a test suite for what I've got already. The latter is probably better, so that's likely what I'll do next.


I've been quietly keeping up on the Parrot CVS tree, but I'm winding up with four test failures. It seems odd that Darwin would test clean, but Linux wouldn't. I'm pretty sure it's the GC that's messing things up (in this case, collecting something early, I'm pretty sure). I'll have a deeper look at it after I've got the sample code done.


Still no action on the Arc front. It's not that I doubt Paul Graham and company's ability to pull it off -- it's more that I doubt that it'll happen any time soon. If I had to put money on it, I would say it will likely become publically available in September 2003, though this is one time I'd love to be proven wrong.

I may still start work on an Arc-like language of my own, if for no other reason than to provide a loyal opposition on simple matters such as syntax. I definitely couldn't challenge Paul et al. in any significant way.

Pining, fjords, and all that

I've been through several "I'll hack up something like Arc/no I won't, 'cause I've got X" cycles, and it's only been recently that I've really figured out that I'm after. Or some approximation of that, at least.

What I'm after is a syntax-free (in the same way as Lisp) language that has a reasonable (as in not too big (Common Lisp) and not too small (Scheme)) standard library that includes sockets, as much interaction with the OS as the OS can support (system calls, environment, etc.), a decent garbage collector (even pure reference count would do -- I can break circular dependencies on my own), decent session scripting abilities, incremental compilation, a half-decent debugger and trace facilities, and can easily be built from sources (even if it takes an aeon).

My other big complaint with current implementations of Lisp and Scheme are the function and special form names. Don't get me wrong -- cons, car, cdr, let -- these are all great. call-with-current-continuation and concatenate are far too long, especially with how often the latter is used.

I have played around with a number of naming conventions, and I have to admit a preference towards an abbreviated version of the modern Scheme syntax -- call/cc is a good example, and substr/sh (instead of substring/shared) would be another good one. cat/sh is fine for a shared-string concatenation operation, with cat/cp as the copied string name would work, with plain old cat defaulting to one of the above.

I know that Lisp and Scheme evolved such long function and special form names under the assumption that LispMs and editors would automatically complete them. However, even with (G|X)Emacs, Jabberwocky and other projects out there that specialize in Lisp, we still don't have that.

Rather than trying to redefine computing to suit Common Lisp and friends (as much as I love most of them), I think it's more realistic to define a variant that works well with today's tools, rather than vice versa.

Memory leaks replaced with new memory leaks

I tried to recompile the Darwin kernel (mostly because ktrace is so useful, and not supported by default in X.1.5) and wound up with a kernel that wouldn't boot. The worst part is that the backup kernel I saved wouldn't boot, either.

That being said, I'm now running Debian, where I have strace and many other tools at my disposal that don't work so well on OS X.

Bug reports

I'm watching the back-and-froth (typo intentional) between MichaelCrawford and movement with a bit of interest. Though I am by no means a contributor to Mozilla (up 'til recently it wouldn't work on my platform), if I were, I would be somewhat offended to get a bug report that did more complaining than anything constructive. That being said, I would follow the issue up though personal mail after closing the bug report in Bugzilla, rather than posting publically. Different strokes for different folks, I guess.

I find myself in agreement with moshez, though -- well said, sir.


Re-restarted the sample code for the new job opportunity last night. I'm somewhat annoyed that I hadn't backed up before trying something dangerous, but I guess if you don't screw up for a while, you get cocky and wind up borking something or another.

The good news is that I managed to somewhat tighten up the code on the rewrite, and a structural change or two got made that I was planning to make anyway. I intend to turn in the sample code on Monday, so with any luck I'll have time to get some good testing in. I'm trying for a couple thousand lines of code, and if I can't get that from the main project (a Wiki-like system in Perl, with a few rather non-Wiki concepts worked in), I'm sure I can figure out something else to hack together to take up the slack.

Another item on the code front is getting used to the difference between Cocoa and GNUstep. I'll miss Interface Builder, but to be honest, I spent more time hacking in PB and doing "Read files..." in IB than the other way around. I still haven't done much of a search for UI building tools for GNUstep, so hopefully one will turn up.

Memory leaks somewhat solved

On a whim I decided to login via console and start X11 from there. What a difference, not running in rootless mode (over OS X)! I think that's where I'll likely spend most of my active development time. It's not as pretty as Aqua, but that seems to help me keep my focus -- a few xterms, a copy of XEmacs running, and no distractions.

Upon restarting Aqua, I noticed that the memory consumption (both physical and vm) had fallen way down. Methinks I'll have to make a habit of that.

Text editors, Eastern Orthodox style

I grabbed a copy of THE (The Hessling Editor) and installed it. Now we're talking nostalgia! I used to own an IBM System/36, so it felt just like home. However, I must admit that I really am quite rusty, and find XEmacs much nicer to use for day-to-day coding. Besides, I'd sooner use elisp than Rexx anyday.


Put in a bit more work on pfft today. The user auth and admin stuff is partly done, and I've got a few handy HTML functions blocked out and ready to fill in. I'm still trying to decide on a good scheme for indexing the data directory. I think simplicity is the way to go, so I'll probably hack together a few simple schemes and benchmark them to figure out which one is most friendly.

I tore out the last vestiges of DB_File and replaced it with much nicer code. I still need to have a boo through the sources for the BSDs and Linux and see where flock() and close() can fail. I know the conventional wisdom is to check everything, but I seem to remember someone wise saying not to check for an error condition you don't have a plan to handle...

For all of my railing against people using DBMSs for trivial applications, I guess I understand one part of it now -- the DBMS takes care of these things for you. Part of the point of pfft is to avoid such things, though. Not to mention that it's good to get a refresher in concurrency issues and race conditions every now and then.

Memory leak madness

Okay, I just might switch to OS X.2 after all -- if for no other reason than the hopes that its libs don't have the kind of memory leaks X.1 seems to. Under X.1 a process (in this case, XDarwin) will take 18 meg at start-up, and slowly balloon to 80 meg. No telling if it stops there, as I only have 384 meg of RAM on my regular machine, and don't let it get that far.

I'm going to try logging in on the console and starting X from there, and see if it's just Aqua and associated stuff leaking. I trust Apple not to have leaks in libc, libSystem, and libobjc, but what information I've been able to find on Aqua suggests that the problem may lay there.

Text editors, yet again

I got my hands on the XEmacs 21.5 sources, and while they compiled okay, it barfed on the floor when I went to use it. No problem -- I grabbed the 21.4 sources (and the sumo package), and everything was fine. Things are looking a lot better since 21.1, especially in the configuration menus.

I also spent a sickening amount of time looking for info on what controls syntax highlighting in Project Builder. If I could just get it to syntax highlight Ruby, Perl, Lisp and Smalltalk nicely, I would happily use it as my primary editor.

If anyone has any insight on syntax highlighting in PB, please let me know -- though I fear it is non-hackable (embedded in a NIB file, or somesuch).


A little more done on pfft (a Wiki-like system written in Perl), mostly realizing that with the overhead of using DB_File and trying to figure out locking issues, I may as well just use flat files and flock(). I pounded on my calculator a bit, and figured out I could handle logins and session IDs for 100k accounts pretty smoothly with flat text files, and ten million accounts if I abstracted the login and session functionality out to a daemon and queried from the CGI to get the info from the daemon. I may do a combination of the two (if the daemon can't be contacted, auth through flat files), but that will be in the "showing off" category, rather than the "working for 1.0" category.


Read through the Parrot Design Docs (PDDs). I'm pretty impressed -- I've worked on commercial projects that didn't have nearly the same scope and nature of documentation. I'm really looking forward to some of the later-numbered ones being filled in, though.

That being said, there's a few questions I have that are going to have to find answers either in the mailing list archives, or on the Usenet. Ideally, I'd like to make a trivial module contribution at first -- getting, setting, and listing environment variables, for example. Once I've integrated a trivial module, I'd have more confidence in trying something a little more in-depth.

A quick grep in the sources shows that there is a bignum implementation, with some unintegrated tests. That might be another place I can help out, as I have a little bit of experience debugging Lisp and Scheme implementations.

Text editors, encore

It seems that there actually is a version of gemacs for Cocoa. It seems to use even less memory than BBEdit, and because BBEdit is less extensible (and its emacs keybindings emulation sucks), I have switched back to emacs.

The down-side is that it's gemacs 20.7, but the up-side is that it's less bloated than gemacs 21.

The job front

Things are looking pretty nice in the job world right now. I just returned home from an interview with the company I applied to last week. It's a bit early to say, but I think my chances are pretty good -- I seemed to impress them on several levels. I was also recommended by a friend of the VP Ops and CEO who spoke very highly of me. It also seems I did an en passant with their lead tech when I was working at SFU.

I made a sideways inquiry as to whether or not I'd made the first cut, and was assured that I had indeed. I've got my fingers crossed. I was told I'd hear from them next Friday.


I was warned that their technical guy might want to see some sample code. No problem -- I just restarted some other work I was doing (originally in Ruby) in Perl. It's not much of an inconvenience, as I was beginning to dislike the class and module structure I had in place, anyway.

One thing I really miss from Smalltalk and O'Caml is named arguments. I'm pretty sure they're coming in Perl 6, which will make me happy (or make me submit a patch to implement them, if they're not).

Before I headed out to the interview I noticed a flurry on perl.cvs.parrot, which means more fun and will give me a better idea of how it all goes together.

Text Editors

I checked out a few new editors for Mac OS X. The results can be found on my other diary page, above.

In addition to jEdit and BBEdit, I also checked out irEdit. Sadly, irEdit wasn't to my personal taste, jEdit's memory profile was too large (admittedly, being implemented in Java leads to that fairly easily), and BBEdit's was bigger than I thought it was.

The result is that for now I'll start using BBEdit. I bought BBEdit 6.0 when it was first released, and qualified for free upgrades to 6.1. I found a Ruby language syntax module in the support section at BareBones, so it effectively does everything I need it to do.

After several years of using vi (and several before that using gemacs), it's taking me a while to get used to a pretty (visually) text editor. In the end, though, I hope it will be easier for me to switch between Project Builder and BBEdit than between PB and vi -- just a little bit of a shock.

If anyone has any opinions on good (preferably Cocoa) text editors for OS X.1, please let me know.

Diary divisions

My plan is to chronicle technical and code-related stuff here, and personal stuff on my other diary, listed above.


Four people (including myself) rate me as Apprentice, but for some reason, that doesn't seem to certify me as one. The closest explanation I can find without reading raph's thesis is that the trust metric works on an "at least" basis -- so I take it that it would take someone certifying me as more than Apprentice to get an Apprentice cert.

This is definitely not a request for certification -- just linked to a strange observation I had that there seem to be more Masters than Apprentices (at least that I see in the recentlog).


I've been hacking about in Ruby for the past couple of days. I intend to use it for a project exploring efficient ways of storing and displaying semi-structured data. I know XML with XPath/XPointer and XSL is a good way to go, but to be honest, I find it overcomplicated for my needs.

I've also been keeping up to date on the Parrot CVS tree. So far I haven't done much aside from correct the manifest file, give build results, and ask questions, but I'm beginning to understand how it's put together, and I hope to make a real contribution to it sometime soon. Until then, I'll just keep watching for breakage on the platforms I have access to (Darwin/PPC, Linux/x86, FreeBSD/x86, OpenBSD/x86).

Other stuff

In other news, I'm back on codeine again. The good news is that I'm finally covered under insurance, so I have an appointment with the dentist on Monday.

Another piece of good news is that I have a job interview with a local company on Friday. I'm really looking forward to it -- I just fear I may hear the "over-qualified" label come out to haunt me. I'm trying to keep positive about it, though.

The company I'm interviewing with runs exclusively on Unix, so if I get the job, I'll be right at home. They seem to use Solaris, but I've got a good amount of experience with that. If I get the job and it seems stable, I may even save up for a Sun Blade of my own.

Karma puppy is being a brat these days -- we almost can't leave her alone in the house. She's been spoiled by me being here every day. It will suck to have to crate her when I start working, but hopefully we can get her back to sanity (and out of the crate during the day) soon enough.

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!