Skip to content
ijp edited this page Aug 27, 2012 · 5 revisions

Getting Started with Guildhall

Guildhall (also known as Dorodango) is the package manager for guile 2. Currently it is not in widespread use; I hope we can change that.

First, you will need to download it. There is no tarball yet, so you will need to get it from git

git clone git://github.com/ijp/guildhall.git

then it’s the usual autotools dance

./autogen.sh
./configure -C
make
sudo make install

Once you have successfully installed it. You will need to create the file ~/.config/guildhall/config.scm and add the line

(repository shift-reset "http://shift-reset.com/doro/")

to the file. This will enable access to my guildhall repository. Then

guild update

to update your guildhall installation to be able to access all the packages from that repository. You can view the packages available to you with

guild list-packages --all

(without –all it just shows installed packages)

and you can install a package (e.g my bloom-filter package) with

guild install bloom-filter

To be able to use packages you will need to be add ~/.local/share/guile/site/2.0 to your GUILE_LOAD_PATH.

then you can try it out

scheme@(guile−user)> ,use (bloom-filter)
;;; note: auto−compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the −−no−auto−compile argument to disable.
;;; compiling /home/ian/.local/share/guile/site/2.0/bloom−filter.scm
;;; compiled /home/ian/.cache/guile/ccache/2.0−LE−4−2.0/home/ian/.local/share/guile/site/2.0/bloom−filter.scm.go
scheme@(guile−user)> (define bf (make-bloom-filter 1000000))
scheme@(guile−user)> ,use (ice-9 rdelim)
scheme@(guile−user)> (call-with-input-file "/usr/share/dict/words"
(lambda (in)
(let loop ((line (read-line in)))
  (unless (eof-object? line)
    (bloom-filter-add! bf line)
   (loop (read-line in))))))
scheme@(guile−user)> (let ((l '("wonderful" "ball" "stereo" "jester"
           "flag" "shshshshsh" "nooooooo" "newyorkcity"
           "people" "kwyjibo")))
  (let loop ((l l))
    (unless (null? l)
      (format #t "~s: ~s~%" (car l) (bloom-filter-contains? bf (car l)))
      (loop (cdr l)))))
"wonderful": #t
"ball": #t
"stereo": #t
"jester": #t
"flag": #t
"shshshshsh": #f
"nooooooo": #t
"newyorkcity": #t
"people": #t
"kwyjibo": #f
scheme@(guile−user)> 

There are lots of other commands available to you, see the guildhall documentation for this.

Clone this wiki locally