Sebastian\’s Coding Blog

  • Categories

  • Advertisements

Archive for April, 2007

Giving Sofud better error messages

Posted by randomz on April 28, 2007

I’m currently looking for a way to print the “path” of the relevant Sofu object with every Sofud error message. However, this is not quite as simple, because the hierarchy can be edited in memory, so I can’t simply create the paths at load time.

So I need a way to create those paths at any time. Since I save a map’s attributes inside an associative array, this means I have to do a linear search (yuck) over its keys. The same in the case of a list: it’s not sorted, so I can’t use any kind of smart search algorithms.

Still, this situation should mostly only occur in error situations, so it’s okay if it’s inefficient.


Posted in Sofu | Leave a Comment »

Sofud 1.0alpha1 Release preparations

Posted by randomz on April 25, 2007

I’ve decided to put together a first Alpha version of Sofud 1.0. The basic parts are all in place, so it should be usable without problems. Still missing are a couple of medium-level features listed below, and a lot of documentation. This is also the reason why I’m not planning to announce this release anywhere except the Sofu web site: It would be pretty hard for anyone new to get to know the library.

Missing features, pasted from the todo.txt:

  • FEATURE: Implement SofuString class to reduce Unicode conversions
  • FEATURE: Implement transparent GZIP compression

Neither of those should do much to the existing interface, though.
Before releasing 1.0alpha, though, I want to do two things:

  • Drastically improve the quality of the error messages. Sofud 0.2’s error messages were quite good if you were only dealing with Sofud objects created from files, but I stripped most of them out, so I have to redo them. And I want to come up with a better way to show error messages that refer to objects created in memory.
  • Get at least a little bit of documentation done.

The biggest reason for me to release this version possibly prematurely is so that I at least have an official version to use myself. The interface should not change much from now on, so I guess it’s OK to release soon.

Posted in Sofu | Leave a Comment »

Trying out GDC, but Bud does not agree

Posted by randomz on April 6, 2007

I spent too much time today trying to get Bud to work with GDC under windows. GDC works fine, and installing it was actually pretty straightforward: Installing MinGW, installing GDC via the installer, and then installing ActivePerl in order to be able to use the ‘gdmd.bat’ perl wrapper script for dmd command line compatibility.

What followed then was a bud error and reading through the (terribly unorganized) bud docs in order to find something. Having found nothing, I tried the bud forums, which promised to be at least of some help. I created a build.cfg file and spent about two hours trying various settings, finally managing to compile my source files. But I still haven’t moved bud to link the resulting objects to an exe file.

Actually, this isn’t my first time fighting with bud (formerly build). My recent attempts to use bud on linux (with DMD at that time) also have been only partly successful. However, there seem to be people who have accomplished using bud on linux.

I think build is a wonderful tool. But it’s a shame that development seems to have stalled (the SVN repository hasn’t been touched in almost half a year) at a phase where there still are many unresolved problems. I think the build tool is pretty central to the D community, so maybe it would be good to have a larger (non-one-man) team to make it a more mature, better-working tool (and to improve the documentation!!!).

In fact, I feel I would like to contribute to the project. Still, I’m afraid it will eat more of my time than I can bear, so I will give it some more thought.

Posted in D | Leave a Comment »

Sofu Web Site Redesign (1)

Posted by randomz on April 6, 2007

Hoping to make the Sofu web site easier to manage, I have installed a Joomla! content management system on the sourceforge server. Right now I’m just happy I managed to get through the installation process somehow, so the system is still filled with sample data, but you are invited to have a look. The next step will be adapting the design of the existing Sofu web site to Joomla, where some beautification might also be appropriate. Then I have to move the (few) existing content into the CMS, and that should be it. The redesign will probably take a bit of work, though, as I want to consider how I can present information in a more accessible way than the current web site does.

Posted in Sofu | Leave a Comment »