Dev: November 2008 Archives

  • FINALLY a language (that I'm aware of) where True !== 1 and False !== 0. I'd have to take off YOUR shoes to count the number of times that's bitten me in the ass. For people who don't know me, I wear sandals so no shoe-taking-offing is ever needed.

  • The it primitive is pretty neat and has possibilities:

    True || False
    not it

  • I like the /= representation of !=

  • Hmmm...lists are interesting.
    let x = [1,2]

    So clearly the : primitive appends elements to the beginning of a list. I thought that perhaps [0,1]:x might produce [[0,1],[1,2]]. It turns out this is not the case, and instead throws an error that essentially amount to a data type mismatch. To achieve the desired result, one must type:


    ...such that both arguments are lists, I assume. Weird.

  • putStrLn "Hi"
    putStrLn 'Hi'

    lexical error in string/character literal at character 'i'

    D'oh. I prefer to use single quotes with my strings. Not a deal breaker though.

  • Well, as thrilling as I'm sure this has been for you, I'm going to stop and actually get to coding.

So after a full reinstall of Leopard, my Mac seems to be behaving a bit more like it should. I wonder what the odds are of getting a corrupt OS from the factory.

MacPorts seems like a nice idea, and the list of software is decent. My two complaints (what, you thought I wouldn't have any?):

  • 1) It's slow as hell. I've been installing Haskell for the last twenty minutes.
  • The .dmg-based installer forgets one minor detail, namely changing the $PATH variable. Looking through the instructions for compiling from source, it seems that adding

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

to .profile or .bashrc fixes the issue. I'm sure there's a more elegant approach, but this allowed me to get started on the lengthy process of installing something that would be a single command on Ubuntu.

About this Archive

This page is a archive of entries in the Dev category from November 2008.

Dev: June 2008 is the previous archive.

Dev: February 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.