(Slightly more than) A month of Chicken

So, I’ve been learning (Chicken) Scheme for over a month now. Let’s look back.

  • I’m currently hacking on two projects in Chicken; one is a translation of an existing Python program, the other is something written from scratch. Neither will be very large. If they become somewhat useful/usable, I will probably make them available.
  • I’m using vim, but looking for an editor that gets along better with Scheme (in terms of autoindent etc… I don’t like scheme.vim too much). Of course Emacs would be an obvious candidate, but I’m reluctant because of several reasons. (Less than stellar OS X support, unwillingness to learn many new keybindings and/or beat the editor into doing what I want, unwillingness to learn elisp at this point.)
  • Even though succinctness is power, so far my Scheme code is almost twice as long as equivalent Python code. 1) I’m not yet drawing any conclusions based on this; there are many possible explanations, like the fact that I am still learning and therefore tend to use more verbose code (for clarity, or simply because I don’t know a shorter idiom), while my Python code does not suffer from the same problem. So, we’ll just have to see if this changes over time.
  • On the other hand, my Scheme code seems to be cleaner than the Python I had. Scheme really encourages rigorously splitting up code into smaller functions. (This is probably true for most, if not all, functional languages, by the way.)
  • Chicken has been a joy to program in. It has a lot of useful functions out of the box. I do find that you don’t get very far if you only have vague ideas about what your code should do. :-) Functional languages seem to have this feature (?) more than, for example, Python or Ruby.
  • I am impressed with the availability of Chicken libraries (eggs) so far. Granted, I haven’t needed very complex stuff so far (testing framework, command line argument parsing, etc), but what I did need was there, often in several flavors. Installation is stupid easy too.

When my initial projects are done, I plan to look at stuff that is a little more “real world”, like game development (using SDL?), OS X hacking, maybe web programming. (I also would like to contribute an egg at some point — but I need to write useful code first! :-)

1) I’m just looking at file sizes here. Maybe I’ll do a more meaningful comparison later, when I have more code to compare.

1 Comment

  1. creidiki said,

    February 6, 2008 @ 8:23 am

    I’m not particularly fond of emacs myself, but its is pretty peerless when it comes to scheme/lisp editing.

    Some suggestions:

    Eclipse + schemeway – i hate eclipse myself but there you go. not sure if it supports chicken.

    Emacs + VIper – you should be able to set to viper to have emacs keybindings close or equal to vim. You might wanna try quacl.el on top as well as scheme-complete.el (distributed with chicken). chicken’s hen.el is ok as well… not as good as quack imo.

    I use emacs myself, and I know nil elisp, apart from the (add-to-list ‘load-path “/blah/blah”) and (require ‘foo) needed to load 3rd-party elisp filed.

    Theres also SLIME, but it hasn’t got support for chicken (yet), thinking of adding to the CVS tree myself…

    I’ve tried using vim for scheme editing, and its pretty awful to be honest – gedit or the kde equivalent do a better job…

RSS feed for comments on this post