Older blog entries for kjw (starting at number 18)

3 Aug 2005 (updated 3 Aug 2005 at 19:31 UTC) »
The joys of C...

Working on a new release of ObjCI, and having lots of fun. Kind of.

I've managed to create code that works great on FreeBSD/x86, but breaks on Linux/x86 and Mac OS X/PPC. The odd part is that the only functions being used in that section of code are memmove and memset.

If you've got time on your hands and feel like having a peek, check out revision 64 at http://kjwcode.com/svn/objci and tell me where I'm going horribly wrong. :) The username is "anon", and it has a blank password.

Edit: The fun part is replaceAllObjects:with: in class OIArray. Sorry for not including that sooner.


The mysteries of C++ are beginning to make some sense to me now. There is a project that I am working on that makes the most sense to write in C or C++, and I chose the latter -- I don't feel like reimplementing most of the STL in C. I've been at it about an hour a day for a week now, and I'm making progress. The progress is mostly exploratory code at this point, though.

Though I've read a lot of C++ code and several C++ books over the years, I've never been one to write a lot of it. I have a feeling this is going to change, though. With some practice, I think I can be almost as productive in C++ as I can be in Ruby. Hopefully I'll be able to set aside a daily study time.

That was odd...

My account died. However, on re-creating it, I still have all of my diary entries and my project link. Weird.


kjwcode.com replaces squeakfan.com as my personal website. I'm using the same template as my other sites, so I will soon be getting a CGI put together to show ads for cool FS/OSS projects, rather than the Google ads that currently haunt it.


RST has been moved over to the new site, and with it comes read-only anonymous access to the Subversion repository. I haven't touched the project in days, but will again soon.

I will likely recombine FL and FIT into one utility -- file listing and file information really are too tightly bound to make sense as separate utilities. Oh well, you never know 'til you try.

gnutizen: regarding web hosting

I host my domains on Textdrive. I love it. It has all of the characteristics you mention, and it's run by people who are actually active in the open source world. Check them out.


Three hints in two days. Not bad, but I'm not sure it's sustainable. The most recent hint is about using OS X/Darwin's lookupd to run queries from the command line. Hopefully it will save someone some Googling.


With the above being said, RST will soon support proper user/group lookups from FIT. I had a bit of a rant on my blog about the whole NetInfo situation, and this at least quells most of the anger.

I may still move forward with a pure-Ruby NetInfo interface, but don't count on it. With the recent announcement of a move away from PPC, I am much more likely to invest the effort in RST or other projects.

That being said, if anyone knows of a pure-Ruby NetInfo interface, please let me know.

Back into the swing of things

I commented to my partner last night about how it's nice to get back into the swing of development. She is an aspiring developer -- she wants to learn how to program, but is contemplating how she'd like to do it.

I think that would be the thing to make it complete for me -- to be able to teach her. I have no doubt she would ask questions that would shake my understanding of quite a few things. I need to be shaken to keep learning, or I get complacent.


I joined the ruby-talk mailing list today, and am so far doing well under the heavier-than-normal load in my GMail mailbox. I have a minor nit about accidentally deleting entire threads when I have one message archived (and want to keep it, but not new messages in the thread), but I'll live.

Ruby and NetInfo

I can't seem to find a Ruby interface to NetInfo anywhere. At least nothing that's documented in English, and my Japanese sucks. This marks the start of another project, methinks -- RST needs such an interface for displaying information on file permissions.

10.3 is installing on the iBook as I write. Hopefully I'll be able to turn this into something worthy of RubyForge.


Got a few more things done in RST, and another release is shaping up. Right now it's not terribly object-oriented, but I'm not at all sure that it should be. I need to read more about Ruby's treatment of classes and modules, and do some profiling and benchmarking to figure out which is the win speed-wise.

After some thought, I decided to specialise RST for human use, and not to make it particularly shell-script friendly. So far I have no input from anyone saying that is a good or bad thing, so if you have something to say about it, e-mail me.

Personal domain change-over

squeakfan.com is expiring soon, and I have decided not to renew it. Though I admire the Squeak project and the people working on it, I haven't done a lot with it myself in the past while, and have been working in Ruby instead.

I also wanted a domain name that is relatively language-neutral, given that I prefer to work in a variety of languages.

As usual, the new domain will be a week or so in coming -- the wonders of e-cheque through PayPal for you.

CGI in Ruby

One particular strength of Ruby for web work is its excellent CGI library. cgi.rb makes me very happy. I agree with the comments I've seen scattered about that argue that HTML generation should be decoupled from the library, but I love CGI#out -- it saves me from having to implement the simple templating engine I used to use for Perl CGIs.

I intend to make use of CGI in my new personal website. I have a few ideas that require it.

31 May 2005 (updated 1 Jun 2005 at 01:53 UTC) »

So far, so good. No negative comments received, and there are actually subscribers to the Freshmeat entry.

whytheluckystiff: Thank you for the pointer to the un lib, for checking out RST, and for the compliment. Fortunately, I hadn't thought about implementing the functionality that the un lib provides in RST just yet, so they complement each other perfectly.


devkb.com has a little bit of content on it now. It's been on hold due to being busy at work and dead at home, though.


On the other hand, I released a very early planning version of RST, what will be a collection of Ruby System Tools. They will cover approximately the same range of functionality as Unix tools, but will be different. See the homepage for more information.


unixkb.com is very quiet as of late. I'm beginning to question the sanity of the whole concept. Rather, I'm beginning to question the sanity of the current focus.

It's hard for me to know what's obvious and what's not -- I've been basically raised on Unix, and although I have knowledge to share, it is hard to know what other people know and what they don't.

At any rate, I'll wait for a while and figure out what I want to do there.


The last language I really did a lot of work in was Perl. After that, I flitted from language to language, never doing anything serious, and never really getting involved in the communities surrounding the languages.

Most of my Perl work was paid, proprietary work -- indeed, I never really released much in the OSS/FS world. What I did do, however, was make use of much information that world had to offer. Though I counselled quite a number of people I knew through e-mail, that's not really giving back what I took.

I sense a change coming on, though. I've talked with quite a few people whose opinions I respect (most recently, Omnifarious), and there does seem to be a consensus that Ruby is a pretty good language, but doesn't have a lot of resources for people new to programming who are learning the language.

As an experienced programmer who is learning the language, I am able to look at the various modules and classes that are available and learn by example. Someone new to programming doesn't really have that option, and it can be difficult to find code that does relatively easy-to-understand things to learn from.

To that end, I decided to release RST (mentioned above) long before I otherwise would have. I'm somewhat cringing, as the code is embarrassingly bad. It is easy to understand, though -- and it doesn't do anything that's terribly bad style. With some commenting, it may make for a good "how do I do foo with Ruby" reference for new programmers.

It's not much, but it's a start.


There are now Goooooogle ads on unixkb.com. The intent isn't to make a lot of money -- the intent is to cover the costs associated with running the site. The costs are not terribly high, but I don't make a lot of money either.

I registered a domain name for a companion site to unixkb.com. The companion site will focus on articles regarding software development on Unix systems. I will start writing articles for the dev site in a few months, once I have a good number of articles on unixkb.com.


When I was talking with my fiancee on IRC, she quoted a friend from another channel as saying "anything that's not nil or false is true". I immediately thought of Ruby, and it turns out that I was correct in guessing what her friend was talking about.

That in itself is trivia, but the fact is that her friend is just the type of person I love to see taking up Ruby. I'll skip the adjectives, but I will say that it gives me hope that the de facto standard of Perl won't stand for system administration and scripting tasks.


I know I've said it a million times, and no doubt a pile of other people have too, but I'm really beginning to wonder about Parrot and Perl 6. At one point I was a big cheerleader, but now I read the developers' lists with a more cynical eye.

I have no doubts about the people involved -- I consider them among the most skilled language implementors I am aware of.

I have few doubts about the languages. I think Parrot will make an excellent back end for many languages. I don't like Perl 6 so much, but that's only because it seems to be aiming for Java's level of bloat. As long as there is still Perl 5 compatibility, I will be reasonably happy.

What I am truly afraid of is that it will fall victim to the fate that almost befell Mozilla -- and be unable to pull out of it as Mozilla did.

I've got a bunch of stuff going through my head about it, but it's in no order to write about. I'll ponder it and see if I can say something useful on it later.


Posted an article on the traditional eight sections of the Unix manual. The article wound up being almost as much about the history and usage of man(1) and manpages as it is about what section is for what, so I may rewrite it as two articles (overview of man and manpages, Unix manual sections). For now, though, it's one.

9 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!