Merge branch 'next'
[lw2-viewer.git] / README.md
blob042eb8d2afdd41ee335167b5d79851347aaf61c1
1 # lw2-viewer
2 An alternative frontend for [LessWrong 2.0](https://www.lesserwrong.com/), with a focus on speed and usability.
4 * [Issue tracker](https://saturn.obormot.net/LW2Reader/Issues)
6 ## Installation
7 ### Linux/Unix
9 *This is the bare minimum to get the server running. To set up a full Common Lisp development environment, see [here](http://lisp-lang.org/learn/getting-started/)*
11 * Install `sbcl` and `lmdb` from apt or using your favorite method.  
12 e.g. `sudo apt install sbcl liblmdb0`
14 * Install [quicklisp](https://beta.quicklisp.org/)  
15 `curl -O https://beta.quicklisp.org/quicklisp.lisp`  
16 `sbcl --load quicklisp.lisp --eval '(quicklisp-quickstart:install)' --eval '(ql:add-to-init-file)' --eval '(exit)'`  
18 * Clone required git repositories to the quicklisp `local-projects` directory. (You can also use symlinks if you want to put them elsewhere.)  
19 `cd ~/quicklisp/local-projects`  
20 `git clone https://github.com/kronusaturn/liblmdb.git`  
21 `git clone https://github.com/kronusaturn/lmdb.git`  
22 `git clone https://github.com/kronusaturn/plump.git`  
23 `git clone https://github.com/kronusaturn/lw2-viewer.git`
25 * Start the server  
26 `cd ~/quicklisp/local-projects/lw2-viewer`  
27 `sbcl --eval '(ql:quickload :lw2-viewer)' --eval '(hunchentoot:start (make-instance (quote hunchentoot:easy-acceptor) :port 4242 :document-root "./www/"))'`  
29 * Open `http://localhost:4242` in your browser
31 ### Mac
32 Similar to above, but:
33 * `sbcl` and `lmdb` are available from MacPorts.
35 * Make sure to run system updates, using an outdated OS version can cause installation errors.
37 * As Mac OS does not support sparse files, the system will create an empty 16 GB file on startup.
38 If you want to reduce disk space usage, before starting the server, copy config-example.lisp to config.lisp and change the line `(defparameter *lmdb-mapsize* (expt 2 34))` to, for example, `(defparameter *lmdb-mapsize* (expt 2 28))`
40 * You will need to set the `DYLD_LIBRARY_PATH` environment variable to the location where `liblmdb.dylib` is installed, for example `export DYLD_LIBRARY_PATH=/opt/local/lib/`