Chicken Scheme

Feathers
Login

Feathers

Building a dev version of Chicken Scheme to try out Feathers

Feathers is a simple debugger that was recently added to Chicken Scheme and I wanted to give it a try. However all attempts I made to build the chicken-5 branch failed. It didn't help that I find git confusing and annoying to navigate.

So I imported the Chicken Scheme git repo into a fossil repo and then went exploring. The fossil import is a mess (could be just an unavoidable loss in the translation or flaws in the fossil import) but it was browsable and it only took a few minutes to (manually) bisect to a buildable version where the debugger worked.

Here are the steps to build:

  1. Get the latest snapshot tar ball and build it
    export PREFIX=/some/path
    wget http://code.call-cc.org/dev-snapshots/2015/08/29/chicken-4.10.1.tar.gz
    tar xf chicken-4.10.1.tar.gz
    cd chicken-4.10.1
    make PLATFORM=linux PREFIX=$PREFIX install
  2. I retrieved the git repo and converted it to fossil. If you are a git aficionado you should get the git repo and check out the node directly. Else you might find the much simpler fossil repo easier to work with
    fossil clone https://www.kiatoa.com/fossils/chicken-core chicken-scheme.fossil
    mkdir chicken-scheme;cd chicken-scheme
    fossil open ../chicken-scheme.fossil
  3. Move to the node
    fossil up 337f5be
  4. Compile using the bootstrap chicken version created earlier
    LD_LIBRARY_PATH=$PREFIX make PLATFORM=linux CHICKEN=$PREFIX/chicken PREFIX=/path/to/where/you/want/to/install install

Now test Feathers

  1. Read the man page
    man feathers
  2. Compile a test program, don't forget the -d3
    cat test.scm
    
    (define (do-stuff)
      (let loop ((hed 1)
                 (tal '(2 3 4))
                 (res '()))
         (if (null? tal)
             (reverse (cons hed res))
             (loop (car tal)(cdr tal)(cons hed res)))))
    
    (print "Starting...")
    (print (do-stuff))
    (print "All done")
    
    csc -d3 test.scm
  3. Run feathers. I found that it didn't actually take the program to run on the command line in spite of what the man page says. Just run:
    feathers &
  4. Load your executable with F1 and start stepping with F6. Cool!!

Attachments: