Muggles

Hey, I didn’t know that “muggle” was in the Jargon File… Apparently it has been there for quite a while too (since version 4.2.2, which came out in 2000). Never noticed it… maybe I should read up on it some more.

:: Comments off

Dependency hell, how I missed thee.

[semi-rant]

It’s one of those days again. I am trying to install fish on my iBook G3. The laptop is ancient, but it runs Tiger and MacPorts and has the latest XCode, so there really should be no problem. Yet there is. The MacPorts version of fish seems to think it needs all kinds of graphical libraries… cairo, libtiff, freetype, and much more, none of which I need for a command line shell. Needless to say, at some point installation chokes on one of these libraries or another. Is there a way to tell MacPorts that I just want the text mode version? Who knows? It’s easy to use when everything goes right, not so much when things go wrong.

So, I figured I’d download the fish source, and compile it “by hand”. That might have worked elsewhere, but not here. I don’t even get to the compilation stage, because ./configure complains that there is no libiconv present, and this is a requirement to build fish, so it stops unceremonially. Problem is, I have four different versions of libiconv sitting on the blasted machine. Four! Three via MacPorts, one I compiled and installed manually. And it somehow can’t find any of them?!

This kind of dependency hell happens all the time, and is the main reason why I am interested in trying GoboLinux. It’s just not fun anymore when you have to wait for hours while the system attempts to fetch, build and install a gazillion dependencies and then chokes somewhere, with no obvious reason as to why it did so, or what can be done about it. I’m not sure if Gobo fixes all these issues, but if it can alleviate them even just a bit, it’s worth it.

(To be fair, fish does install without problems, using MacPorts, on my MacBook Dual Core. But with other packages, I have just as many problems on that machine, if not more. Plus, you get the nice “oh, you have x86_64 libraries installed, but I only accept i386/universal/whatever” (or some variant thereof) error messages.)

I would love a system where these things “just work” and where you don’t have to dive into all the gory details of a library you’re not even remotely interested in, but that somehow indirectly is required to install the software you do want. I mean, this *is* a Mac right?!

:: Comments off

vi, again

I’m in the process of reorganizing a few things here. Development-related things. One of the changes I want to make is to make more use of vi for editing.

I’ve been using (several variants of) vi since the mid-90s (in addition to other editors), but by some definition you could say that I’ve never really used it. What I’ve been doing is trying to make it work like most mainstream editors, with a few commands thrown in. You know, moving through text using the cursor keys, selecting things by holding Shift, etc. Vim makes this particularly easy. But by doing so, I’ve never really experienced the real power of vi.

Some people argue that this is not optimal, to say the least:

Turns out, this is just a completely wrong way to use vi or vim. Using vi/vim properly, you don’t use it modally. You are always in normal mode, and only enter insert mode for short bursts of typing text, after which you press <Esc> to go to normal mode.

So it may be worth exploring that. Fortunately vi clones are available for pretty much every operating system, so if I want to I can use it on Windows, Mac OS X and Linux. The learning curve may be steep, but it’s probably worth it.

What I do wonder is, is there any reason to use a different version than vim? There are other clones; nvi, elvis, to name a few, but it seems like those haven’t been updated in years. Vim seems to be the 800-pound gorilla of vi implementations, and it’s not hard to see why, given its abundance of features, and the fact that it’s being actively developed.

:: Comments off

Building Io on Mac OS X

Io has a new build system. Questions aside whether it’s an improvement or not, I did find that it wasn’t completely obvious to use. Eventually I did get it to work; I’ll describe the process here.

  • Make sure you have a recent version of git installed. I had 1.5.x or so and it failed to clone the Io repository correctly, quitting halfway with vague errors. 1.7.1 works fine; older versions might too, but if you encounter problems during checkout, you should probably upgrade.
  • Also, should you be using Mac OS X 10.4 still (as I do on my G3s), then make sure you have the most recent XCode installed. For Tiger, this is XCode 2.5, which can be downloaded from the Apple site. (Login required, so no link.) (Of course, even if you’re using 10.5 or 10.6, it’s still a good idea to have the latest XCode.)
  • To use the new build system, you’re also going to need cmake (which can be fetched from MacPorts, for example).
  • Check out the latest version from the github repository. Just do a git clone; alternatively you could fetch the 2010.06.06 tag from the downloads page, but this contains the previous build system, for which most of these instructions don’t apply. (Note that this tag might still come in handy if the new build system doesn’t work for you…)
  • Once cloned, you should have a directory called io. Edit io/addons/CMakeLists.txt in your favorite editor. You’ll see a whole bunch of lines like this: add_subdirectory(Foo). These are the addons that will be (attempted to be) built. Comment all of them out.
  • Now run ./build.sh. Since all the addons are disabled, this should build the Io VM only. It *should* complete with no errors on OS X 10.5 and higher. On 10.4, there’s a good chance that gcc will choke since it doesn’t know what an “ulong” is. If that happens, edit io/libs/coroutine/source/power-ucontext.h and add a typedef near the top, like this. (There may be better ways to do this, but for now it will allow us to proceed.) Run ./build.sh again after the code change.
  • If all went well, now run sudo ./build.sh install, which should install the Io VM. Run io from the command line to see if it works. (The build date will still be listed as “20090105″, by the way.)
  • If everything works, you can now add and install addons, one by one (or multiple at once if you’re feeling adventurous). Some of them require third-party libraries to be installed (e.g. zlib, libevent, etc.) As far as I can tell, you’re pretty much on your own to figure out which libraries are needed, although there might be some clues in the source. If you use MacPorts, this is a good time to do a sudo port selfupdate, then install the required libraries before you try to install the addons. To try and install one, go to io/addons/CMakeLists.txt again, uncomment the addon of your choice, and rerun ./build.sh. If all goes well, there will be no error message and in the output you should see the addon mentioned (for example, when building the Python addon, you should see “IoPython” listed in the output). If things build properly, don’t forget to do a sudo ./build.sh install again.
  • If an addon doesn’t build correctly, you can take a look at the files in io/build/addons/name-of-addon, or io/addons/name-of-addon, which may provide some clues as to what is needed, in addition to the output of make.

That’s it! It’s a bit of work, admittedly… although I’ve seen worse. (As usual, I find that installing some of the addons is a pain, not because of Io or the build system, but because of dependency hell, version conflicts, MacPorts issues, etc. I guess it can’t be helped.)

Hope this will be of use to someone… anyone… Also, if you know more about the build system, and have tips or corrections, feel free to leave a comment below.

:: Comments off

Decisively flawed

This is pretty ridiculous:

To summarize, FIFA is no longer going to show repeats of “controversial decisions” during games. These would be goals that should have been flagged but weren’t, or vice versa, as we’ve seen quite a few times already this tournament. The “interesting” part here is that they are not striving to make better decisions, but rather to just let them stand (even in the face of overwhelming evidence) and cover things up.

I’m not sure there have been more bad decisions during this championship than usual; it may simply be the case that they are more obvious than they were before. Even so, FIFA’s staunch refusal to upgrade their decision-making methods is staggering. When you watch a game on TV, and someone scores or a card is given, a few seconds later the repeat is shown and it is usually immediately clear whether the referee’s decision was correct or not. How difficult would it be to have the referee (or an assistant) watch the repeat for a moment and then decide whether the original decision stands or not?

In fact, what the article suggests, is that FIFA officials *do* watch the repeat right away, and if the decision was “controversial” (i.e. wrong), they censor it (by refusing to show it again), rather than fixing it…!

This kind of stuff is no longer going to fly during the internet age… I suspect FIFA will have to change their ways real fast, or professional soccer as we know it will die out. What’s the point of watching games that are essentially made or broken by the referee?

~

Update (2010-06-29): This is more like it:

(FIFA big boss apologizes and says video technology will be be considered in future.)

:: Comments off

Another color blindness test…

http://www.archimedes-lab.org/colorblindnesstest.html

For fun and profit, a color blindness test… I only got Test A correct, and half of test H. :-( *blush* The rest is mostly a blurry mess where I can occasionally make out half a number of something.

Also see: http://critiquewall.com/2007/12/10/blindness

It’s interesting… on my MacBook, the images in the aforementioned blog post look almost the same to me… but on my netbook, which has tweaked color settings, they don’t look the same at all. (The effect is limited though… I still cannot pass the Ishihara test. :-)

:: Comments off

Chickadee

In other news, there is a new documentation server for Chicken Scheme online. It’s called Chickadee and it looks pretty damn useful. You can look up built-in functions, SRFIs and eggs. I’m currently working on a little project that uses Chicken, so I guess I’ll be using this a lot. ^_^

IMHO, Chicken and Gauche are the two most desirable Scheme implementations at the moment. They both have a pragmatic approach that isn’t always present in other implementations. (Although I haven’t tried every single one of them…)

:: Comments off

Gauche

I just discovered Gauche Scheme. I have been looking for a Lisp/Scheme dialect for my latest pet project, and it seems this is just what the doctor ordered.

  • It’s cross-platform (Unixoid systems and Windows)
  • Builds out of the box on Mac OS X, even on my old G3
  • Supports both hygienic and “dirty” macros
  • Comes with an object system
  • Comes with a bunch of libraries out of the box (like a HTTP library, which is one of the things I needed)
  • Works with SLIB; in fact, if SLIB is already installed, it will find it and integrate it
  • Supports a large number of SRFIs

Chicken has most of this too, except it lacks Windows binaries, and it recently got rid of unhygienic macros. Libraries can be installed as eggs, of course, so it might not need SLIB.

Anyway, said “pet project” involves making HTTP GET calls, and requires a powerful object system. (More about this later, if it ever becomes usable.) I wanted to use a Lisp/Scheme dialect for flexibility, and I wanted it to be cross-platform if at all possible, so users can run it on Windows as well. It turned out that it was remarkably hard to find a Scheme that matched all these requirements. I will not go into all the problems that I encountered, but suffice to say that Gambit, Scheme48, PLT and Petite Chez Scheme all had their own issues. (That is not to say that I won’t use them for other projects…)

That said, I might still change my mind and use Common Lisp instead… :-)

:: Comments (7)

Hmm…

When checking out recent Lisp books, I realized that one of the reasons that makes SICP palatable is the fact that it’s “old”. I mean that in a good way. It predates Java, Python, Ruby, etc, and as a result, it does not adopt a smug attitude like, “Lisp is so much better than all these imitators that stole features from it but lack the essence”. Modern Lisp texts often seem to have a hard time keeping this attitude at bay, which makes for unpleasant reading when you’re coming from a different language (which is almost always the case).

Then again, from what I have seen, this attitude is less prevalent in the Scheme community…

:: Comments (1)

Jolicloud on HP Mini 311

Jolicloud is an operating system based on Linux, optimized for netbooks. I was bored today, so I figured I’d try installing it on my HP Mini 311.

(Some of the notes below are specific to this netbook; maybe it will be useful to other 311 owners who want to try installing it as well.)

It appears that Jolicloud is basically Ubuntu with a friendly user interface. The “home screen” shows applications in various categories, and several locations (home directory, desktop, network, etc). It comes with a number of applications, many of them aimed at social networking, internet and “the cloud” in general.

Installing it is a breeze. I already had Windows XP on the netbook; I downloaded the installer and ran it (still from within Windows). Partitioning, installing etc happens automagically. (There’s also an ISO available, which, I assume, gives the user more control during the installation process.)

If you have a HP Mini 311 as well, note the following. Once Jolicloud has been installed, and the computer reboots, you’ll see a boot screen that lets you choose between Windows and Jolicloud. Counter-intuitively, you must choose “Windows” here; you will then see a similar screen, and there you select “Jolicloud”. (This may be because the 311 comes with a separate partition containing system restore data… I do hope that Jolicloud did not interfere with that.)

You will need to do some configuring to get the current version (which, as I write this, is pre-beta) to recognize the HP Mini’s Nvidia Ion. JC did use a widescreen resolution, but it didn’t offer much in the way of configuring the screen, and the home screen was REALLY slow. This turned out to be easy to fix; create a Jolicloud account, do a software update, and reboot. The software update will download proprietary software by Nvidia; RMS would frown upon that, but it made the home screen much more snappy, and offers a whole range of configuration options (much like on Windows).

The Jolicloud site offers a relatively small number of apps, although many of these are important and/or popular ones, like Firefox, Google Chrome, apps for Facebook and Twitter, etc. While you may choose to restrict yourself to these apps, you ALSO have access to other Linux software. Synaptic (Ubuntu’s package manager) is “hidden”, but it’s there, and it’s easy to add it to the main menu. I did so in order to install vim, Emacs and a few other things. A nice touch was that icons for these applications were added to the menu automatically.

(Oh, and Python 2.6 is already installed out of the box. How could it be otherwise? :-)

Anyway, so this is a nice little Linux… useful if you just want to browse the web and check your Facebook, but also if you want to use it for hacking. ^_^

:: Comments off

« Previous entries Next Page » Next Page »