-
Notifications
You must be signed in to change notification settings - Fork 10
HACKING
If you'd like to start hacking with the code you may want to do the following painless method.
You need to have SBCL installed. In ArchLinux:
pacman -S sbcl
For library dependencies you need to install QuickLisp, a common lisp library that helps you with the burden of configuration:
Go to QuickLisp site and download its library. Here you may download it directly and when you're done with that, cd to the dir you download it and run
sbcl
(or if you'd like to have readline power there, you may use it with this workaround (and then make an alias for it))
rlwrap -c -- sbcl
And then type the following commands in this order:
(load "quicklisp.lisp")
(quicklisp-quickstart:install)
(ql:add-to-init-file)
(quit)
Like with many package or library managers, the primary activities will be searching for and installing libraries. Here is an example usage of finding and installing a JSON library:
* (ql:system-apropos "json")
#<SYSTEM cl-json / cl-json-20101006-darcs / quicklisp 2011-05-22>
#<SYSTEM cl-json.test / cl-json-20101006-darcs / quicklisp 2011-05-22>
#<SYSTEM json-template / cl-json-template-20110418-hg / quicklisp 2011-05-22>
#<SYSTEM st-json / st-json-20101207-git / quicklisp 2011-05-22>
NIL
* (ql:quickload 'st-json)
To load "st-json":
Install 1 Quicklisp release:
st-json
; Fetching #<URL "http://beta.quicklisp.org/archive/st-json/2010-12-07/st-json-20101207-git.tgz">
; 6.17KB
==================================================
6,317 bytes in 0.00 seconds (6168.95KB/sec)
; Loading "st-json"
[package st-json]...
(ST-JSON)
*
If you're feeling crazy you may want to just install every lisp library available through quicklisp! Here's how to do that but remember to be nice and Donate to Xach Beane who is AWESOMEhttp://www.quicklisp.org/donations.html:
(map nil 'ql-dist:ensure-installed (ql-dist:provided-releases (ql-dist:dist "quicklisp")))
Now that your SBCL is ready to start working on it, download this git repo somewhere and cd to it. There you will need to start sbcl and then type the following command:
(ql:quickload :paktahn)
Finally, you can start happily hacking around :)
Tip: You'll probably want to both enter the paktahn package with (in-package :pak) so that you don't have to prefix lots of the function calls with pak, i.e. (pak:my-function-call ...).
Protip: In many cases, you'll want to call (ensure-initial-cache) before doing anything else as many Paktahn function calls expect the cache to be present and this has tripped up beginners more than once. It may be okay to remove the cache entirely at this point based on improvements in more recent paktahn versions. This should be run by skypher however. A great way to make a contribution would be to create a condition with a more informative error messages to catch attempts to access the cache before it has been initialized and offer a restart.
Tip: You may want to start hacking with Paktahn anywhere despite of being upon its source code, so let's tell sbcl to load that location automatically. So you need to edit your ~/.sbclrc and then add the following lines at the top of all:
(require :asdf)
(push "/path/to/paktahn/src/" asdf:*central-registry*)
Protip: If you're hacking on a bunch of lisp systems you may also create a directory like ~/projects/systems/. If you symlink the .asd files of lisp systems you're hacking on with ln -s ../path/to/my.asd you can simply push the systems directory onto asdf:central-registry and not worry with a bunch of separate additions. You will have to maintain the symlinks by hand, of course. :)