diff --git a/Makefile b/Makefile
index 766793c..f2ec9a6 100644
--- a/Makefile
+++ b/Makefile
@@ -2,32 +2,30 @@ THEME = Warsaw
FONTSIZE = 8pt
MD = \
- bsd.md \
- pandoc.md \
- railsonlisp.md \
- test.md
+ bsd \
+ pandoc \
+ railsonlisp \
+ test
-all: pdf
+TEX =
-.SUFFIXES: .md .pdf .tex
+all: pdf
clean:
rm -f ${PDF}
find . -name '*.aux' -or -name '*.log' -or -name '*.nav' -or -name '*.out' -or -name '*.snm' -or -name '*.toc' -or -name '*.vrb' -print0 | xargs -0 rm -f
-.md.pdf:
- mkdir -p "${.IMPSRC:%.md=%}"
- cd "${.IMPSRC:%.md=%}" && pandoc -st beamer -V theme:${THEME} -V fontsize:${FONTSIZE} -o ../$@ -f gfm ../${.IMPSRC}
+%.pdf: %/index.md
+ cd "${@:%.pdf=%}" && pandoc -st beamer -V theme:${THEME} -V fontsize:${FONTSIZE} -o ../$@ -f gfm index.md
PDF = \
- ${MD:%.md=%.pdf} \
- ${TEX:%.tex=%.pdf}
+ ${MD:%=%.pdf} \
+ ${TEX:%=%.tex.pdf}
pdf: ${PDF}
.PHONY: all clean pdf
-.tex.pdf:
- mkdir -p "${.IMPSRC:%.tex=%}"
- cd "${.IMPSRC:%.tex=%}" && pdflatex ../${.IMPSRC} && pdflatex ../${.IMPSRC}
- mv "${.IMPSRC:%.tex=%}/${.IMPSRC:%.tex=%.pdf}" .
+%.tex.pdf: %/index.tex
+ cd "${@:%.tex.pdf=%}" && pdflatex $< && pdflatex $<
+ mv "${@:%.tex.pdf=%}/index.pdf" $@
diff --git a/bsd.md b/bsd.md
deleted file mode 100644
index 133e6d3..0000000
--- a/bsd.md
+++ /dev/null
@@ -1,153 +0,0 @@
-UNIX
-
-Thomas de Grivel <thoxdg@gmail.com>
-
-https://kmx.io/
-
-2020-03-11
-
-# UNIX
-
-## History
-
-### Diagram
-
-![UNIX](unix-history.png)
-
-### Multics
-
-1960
-
-Companies
-
- - MIT
-
- - AT\&T Bell labs
-
- - General Electric
-
-### UNIX
-
-AT\&T Bell Labs 1970
-
-Developers
-
- - Ken Thompson
-
- - Dennis Ritchie
-
-### Berkeley Unix
-
-1974
-
-Licensed by AT\&T
-
-### Berkeley Software Distribution
-
-1979
-
- - `vi`
-
- - `csh`
-
-Licensed by AT\&T
-
-### BSD License
-
- Copyright (c) <year> <copyright holder>.
- All rights reserved.
-
- Redistribution and use in source and binary forms are permitted
- provided that the above copyright notice and this paragraph are
- duplicated in all such forms and that any documentation,
- advertising materials, and other materials related to such
- distribution and use acknowledge that the software was developed
- by the <organization>. The name of the <organization> may not be
- used to endorse or promote products derived from this software
- without specific prior written permission.
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-### Net/1
-
-June 1989
-
-Basis for
-
- - NetBSD
-
- - FreeBSD
-
-Under BSD License
-
-### Minix
-
-Andrew S. Tannenbaum
-
- - For teaching
-
- - Not BSD
-
- - GPL
-
-### Linux
-
-Linus Torvalds
-
- - Inspired by Minix
-
- - Not BSD
-
- - GPL
-
-### NetBSD
-
-Computer Systems Research Group of the University of California,
-Berkeley
-
- - Started in 1993 from Net/2 and 386BSD
-
- - BSD License (two, three, and four-clause variants)
-
- - **Portable**
-
-Founders :
-
- - Chris Demetriou
-
- - Theo de Raadt
-
- - Adam Glass
-
- - Charles Hannum
-
-### FreeBSD
-
- - Started in 1993 also from 386BSD
-
- - FreeBSD 2.0 in 1994, without code from AT\&T
-
- - **Fast** `jemalloc` in base
-
-### OpenBSD
-
-Theo de Raadt
-
- - forked from NetBSD in 1995
-
- - **Secure by default**</span>
-
- - Home of CARP, cwm, httpd, LibreSSL, OpenBGPD, OpenIKED,
- **OpenNTPD**, OpenOSPFD, OpenRsync, OpenSMTPD,
- **OpenSSH**, PF, pfsync, sndio, spamd, Xenocara
-
-### Darwin
-
- - Forked from FreeBSD by Apple Inc. in 2000
-
- - Includes code from NeXTSTEP and Mach
-
- - Basis for MacOS X, iOS, iPadOS
-
- - Apple Public Source License (APSL), with closed-source drivers
diff --git a/bsd.pdf b/bsd.pdf
index 14ba27d..a5c8922 100644
Binary files a/bsd.pdf and b/bsd.pdf differ
diff --git a/bsd/index.md b/bsd/index.md
new file mode 100644
index 0000000..133e6d3
--- /dev/null
+++ b/bsd/index.md
@@ -0,0 +1,153 @@
+UNIX
+
+Thomas de Grivel <thoxdg@gmail.com>
+
+https://kmx.io/
+
+2020-03-11
+
+# UNIX
+
+## History
+
+### Diagram
+
+![UNIX](unix-history.png)
+
+### Multics
+
+1960
+
+Companies
+
+ - MIT
+
+ - AT\&T Bell labs
+
+ - General Electric
+
+### UNIX
+
+AT\&T Bell Labs 1970
+
+Developers
+
+ - Ken Thompson
+
+ - Dennis Ritchie
+
+### Berkeley Unix
+
+1974
+
+Licensed by AT\&T
+
+### Berkeley Software Distribution
+
+1979
+
+ - `vi`
+
+ - `csh`
+
+Licensed by AT\&T
+
+### BSD License
+
+ Copyright (c) <year> <copyright holder>.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms are permitted
+ provided that the above copyright notice and this paragraph are
+ duplicated in all such forms and that any documentation,
+ advertising materials, and other materials related to such
+ distribution and use acknowledge that the software was developed
+ by the <organization>. The name of the <organization> may not be
+ used to endorse or promote products derived from this software
+ without specific prior written permission.
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+### Net/1
+
+June 1989
+
+Basis for
+
+ - NetBSD
+
+ - FreeBSD
+
+Under BSD License
+
+### Minix
+
+Andrew S. Tannenbaum
+
+ - For teaching
+
+ - Not BSD
+
+ - GPL
+
+### Linux
+
+Linus Torvalds
+
+ - Inspired by Minix
+
+ - Not BSD
+
+ - GPL
+
+### NetBSD
+
+Computer Systems Research Group of the University of California,
+Berkeley
+
+ - Started in 1993 from Net/2 and 386BSD
+
+ - BSD License (two, three, and four-clause variants)
+
+ - **Portable**
+
+Founders :
+
+ - Chris Demetriou
+
+ - Theo de Raadt
+
+ - Adam Glass
+
+ - Charles Hannum
+
+### FreeBSD
+
+ - Started in 1993 also from 386BSD
+
+ - FreeBSD 2.0 in 1994, without code from AT\&T
+
+ - **Fast** `jemalloc` in base
+
+### OpenBSD
+
+Theo de Raadt
+
+ - forked from NetBSD in 1995
+
+ - **Secure by default**</span>
+
+ - Home of CARP, cwm, httpd, LibreSSL, OpenBGPD, OpenIKED,
+ **OpenNTPD**, OpenOSPFD, OpenRsync, OpenSMTPD,
+ **OpenSSH**, PF, pfsync, sndio, spamd, Xenocara
+
+### Darwin
+
+ - Forked from FreeBSD by Apple Inc. in 2000
+
+ - Includes code from NeXTSTEP and Mach
+
+ - Basis for MacOS X, iOS, iPadOS
+
+ - Apple Public Source License (APSL), with closed-source drivers
diff --git a/pandoc.md b/pandoc.md
deleted file mode 100644
index 9322b7b..0000000
--- a/pandoc.md
+++ /dev/null
@@ -1,172 +0,0 @@
-Pandoc
-
-Thomas de Grivel <thoxdg@gmail.com>
-
-https://kmx.io/
-
-2020-03-11
-
-# Pandoc
-
-## Introduction
-
-### Pandoc
-
-<https://pandoc.org>
-
-Conversion between documentation formats
-
-e.g.
-
-`pandoc -st beamer -V theme:Warsaw -V fontsize:8pt -o test.pdf test.md`
-
-
-### Supported formats (1/4)
-
-Lightweight markup formats
- - Markdown (including CommonMark and GitHub-flavored Markdown)
- - reStructuredText
- - AsciiDoc
- - Emacs Org-Mode
- - Emacs Muse
- - Textile
- - txt2tags
-
-HTML formats
- - (X)HTML 4
- - HTML5
-
-Ebooks
- - EPUB version 2 or 3
- - FictionBook2
-
-Documentation formats
- - GNU TexInfo
- - Haddock markup
-
-
-### Supported formats (2/4)
-
-Roff formats
- - roff man
- - roff ms
-
-TeX formats
- - LaTeX
- - ConTeXt
-
-XML formats
- - DocBook version 4 or 5
- - JATS
- - TEI Simple
-
-Outline formats
- - OPML
-
-Data formats
- - CSV tables
-
-
-### Supported formats (3/4)
-
-Word processor formats
- - Microsoft Word docx
- - OpenOffice/LibreOffice ODT
- - OpenDocument XML
- - Microsoft PowerPoint
-
-Interactive notebook formats
- - Jupyter notebook (ipynb)
-
-Page layout formats
- - InDesign ICML
-
-Wiki markup formats
- - MediaWiki markup
- - DokuWiki markup
- - TikiWiki markup
- - TWiki markup
- - Vimwiki markup
- - XWiki markup
- - ZimWiki markup
- - Jira wiki markup
-
-
-### Supported formats (4/4)
-
-Slide show formats
- - LaTeX Beamer
- - Slidy
- - reveal.js
- - Slideous
- - S5
- - DZSlides
-
-Custom formats
- - custom writers can be written in lua.
-
-PDF
- - via pdflatex, xelatex, lualatex, pdfroff, wkhtml2pdf, prince, or weasyprint.
-
-## Beamer presentation
-
-### Standalone beamer presentation
-
-`pandoc -st beamer -o test.pdf -f gfm test.md`
-
-`-st beamer` : produce a standalone beamer document
-
-`-o test.pdf` : output file
-
-`-f gfm` : input format in Github flavoured Markdown syntax
-
-`test.md` : input file
-
-### Sample markdown for beamer
-
-```
-Pandoc
-
-Thomas de Grivel <thoxdg@gmail.com>
-
-https://kmx.io/
-
-2020-03-11
-
-# Pandoc
-
-## Introduction
-
-### Pandoc
-
-<https://pandoc.org>
-
-Conversion between documentation formats
-
-### Supported formats (1/4)
-
-Lightweight markup formats
- - Markdown
- - reStructuredText
-```
-
-### Latex output
-
-`pandoc -st beamer -o test.tex -f gfm test.md`
-
-Produces test.tex in LaTeX format.
-
-
-### PDF output from LaTeX
-
-`pdflatex test.tex; pdflatex test.tex`
-
-Produces test.pdf from test.tex
-
-### Conversion from LaTeX to Markdown
-
-Convert LaTeX beamer slides to Markdown source format :
-
-`pandoc -st gfm test.tex > test.md`
-
-Warning : tweaking of generated Markdown files is needed.
diff --git a/pandoc.pdf b/pandoc.pdf
index 0d490ef..aa102f9 100644
Binary files a/pandoc.pdf and b/pandoc.pdf differ
diff --git a/pandoc/index.md b/pandoc/index.md
new file mode 100644
index 0000000..9322b7b
--- /dev/null
+++ b/pandoc/index.md
@@ -0,0 +1,172 @@
+Pandoc
+
+Thomas de Grivel <thoxdg@gmail.com>
+
+https://kmx.io/
+
+2020-03-11
+
+# Pandoc
+
+## Introduction
+
+### Pandoc
+
+<https://pandoc.org>
+
+Conversion between documentation formats
+
+e.g.
+
+`pandoc -st beamer -V theme:Warsaw -V fontsize:8pt -o test.pdf test.md`
+
+
+### Supported formats (1/4)
+
+Lightweight markup formats
+ - Markdown (including CommonMark and GitHub-flavored Markdown)
+ - reStructuredText
+ - AsciiDoc
+ - Emacs Org-Mode
+ - Emacs Muse
+ - Textile
+ - txt2tags
+
+HTML formats
+ - (X)HTML 4
+ - HTML5
+
+Ebooks
+ - EPUB version 2 or 3
+ - FictionBook2
+
+Documentation formats
+ - GNU TexInfo
+ - Haddock markup
+
+
+### Supported formats (2/4)
+
+Roff formats
+ - roff man
+ - roff ms
+
+TeX formats
+ - LaTeX
+ - ConTeXt
+
+XML formats
+ - DocBook version 4 or 5
+ - JATS
+ - TEI Simple
+
+Outline formats
+ - OPML
+
+Data formats
+ - CSV tables
+
+
+### Supported formats (3/4)
+
+Word processor formats
+ - Microsoft Word docx
+ - OpenOffice/LibreOffice ODT
+ - OpenDocument XML
+ - Microsoft PowerPoint
+
+Interactive notebook formats
+ - Jupyter notebook (ipynb)
+
+Page layout formats
+ - InDesign ICML
+
+Wiki markup formats
+ - MediaWiki markup
+ - DokuWiki markup
+ - TikiWiki markup
+ - TWiki markup
+ - Vimwiki markup
+ - XWiki markup
+ - ZimWiki markup
+ - Jira wiki markup
+
+
+### Supported formats (4/4)
+
+Slide show formats
+ - LaTeX Beamer
+ - Slidy
+ - reveal.js
+ - Slideous
+ - S5
+ - DZSlides
+
+Custom formats
+ - custom writers can be written in lua.
+
+PDF
+ - via pdflatex, xelatex, lualatex, pdfroff, wkhtml2pdf, prince, or weasyprint.
+
+## Beamer presentation
+
+### Standalone beamer presentation
+
+`pandoc -st beamer -o test.pdf -f gfm test.md`
+
+`-st beamer` : produce a standalone beamer document
+
+`-o test.pdf` : output file
+
+`-f gfm` : input format in Github flavoured Markdown syntax
+
+`test.md` : input file
+
+### Sample markdown for beamer
+
+```
+Pandoc
+
+Thomas de Grivel <thoxdg@gmail.com>
+
+https://kmx.io/
+
+2020-03-11
+
+# Pandoc
+
+## Introduction
+
+### Pandoc
+
+<https://pandoc.org>
+
+Conversion between documentation formats
+
+### Supported formats (1/4)
+
+Lightweight markup formats
+ - Markdown
+ - reStructuredText
+```
+
+### Latex output
+
+`pandoc -st beamer -o test.tex -f gfm test.md`
+
+Produces test.tex in LaTeX format.
+
+
+### PDF output from LaTeX
+
+`pdflatex test.tex; pdflatex test.tex`
+
+Produces test.pdf from test.tex
+
+### Conversion from LaTeX to Markdown
+
+Convert LaTeX beamer slides to Markdown source format :
+
+`pandoc -st gfm test.tex > test.md`
+
+Warning : tweaking of generated Markdown files is needed.
diff --git a/railsonlisp.md b/railsonlisp.md
deleted file mode 100644
index f179e12..0000000
--- a/railsonlisp.md
+++ /dev/null
@@ -1,398 +0,0 @@
-Rails On Lisp
-
-Thomas de Grivel <thoxdg@gmail.com>
-
-https://kmx.io/
-
-2020-03-11
-
-# Common Lisp
-
-## Introduction
-
-### Common Lisp
-
-Common Lisp is the programmable programming language.
-
-Lisp essays by Paul Graham
-<http://www.paulgraham.com/lisp.html>
-
-Standardised in 1994 by ANSI
-
-Common Lisp the Language, 2nd Edition
-<https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html>
-
-Common Lisp Hyperspec
-<http://www.lispworks.com/documentation/HyperSpec/Front/>
-
-<http://cliki.net>
-
-### Common Lisp
-
-Several compilers implement the ANSI standard :
-
- - SBCL (open-source, x86, amd64, Windows, Linux, OSX, \*BSD)
- <http://sbcl.org>
-
- - ABCL (open-source, jvm)
- <https://abcl.org>
-
- - Clozure CL (open-source, x86, amd64, Windows, Linux, OSX, FreeBSD)
- <https://ccl.clozure.com>
-
- - ECL (open-source, compiles to C)
- <https://common-lisp.net/project/ecl/main.html>
-
- - LispWorks (proprietary, x86, amd64, Windows, Linux, OSX, FreeBSD)
- <http://www.lispworks.com/products/lispworks.html#personal>
-
- - Allegro CL (proprietary, x86, amd64, sparc, Windows, Linux, OSX,
- FreeBSD)
- <https://franz.com/products/allegrocl>
-
-## Installation
-
-### Install SBCL
-
-Ubuntu :
-
-```
- sudo apt-get install sbcl
-```
-
-MacOS X :
-
-```
- brew install sbcl
-```
-
-### Install repo
-
-```
-mkdir -p ~/common-lisp/thodg
-cd ~/common-lisp/thodg
-git clone https://github.com/thodg/repo.git
-cd ~/common-lisp
-ln -s thodg/repo/repo.manifest
-```
-
-### Configure SBCL
-
-Edit `~/.sbclrc`
-
-```
- ;; ASDF
- (require :asdf)
-
- ;; repo
- (load "~/common-lisp/thodg/repo/repo")
- (repo:boot)
-```
-
-### Launch SBCL
-
- $ sbcl
- This is SBCL 1.5.3, an implementation of ANSI Common Lisp.
- More information about SBCL is available at <http://www.sbcl.org/>.
-
- SBCL is free software, provided as is, with absolutely no warranty.
- It is mostly in the public domain; some portions are provided under
- BSD-style licenses. See the CREDITS and COPYING files in the
- distribution for more information.
-
- * _
-
-### Install Slime
-
- * (repo:install :slime)
-
- $ /usr/bin/git -C /home/dx/common-lisp/slime clone https://github.com/slime/slime.git
- Cloning into 'slime'...
-
-### Configure emacs
-
-Edit ` ~/.emacs `
-
-```
- ;; Common Lisp
- (add-to-list 'load-path "~/common-lisp/slime/slime/")
- (require 'slime-autoloads)
- (add-to-list 'slime-contribs 'slime-fancy)
- (setq inferior-lisp-program
- "sbcl")
- (setq slime-net-coding-system
- 'utf-8-unix)
-```
-
-## Demo
-
-### Launch emacs and slime
-
- $ emacs
-
- M-x slime
-
- CL-USER> _
-
-### The REPL
-
-REPL : `read`, `eval`, `print
-loop`
-
-```
- (loop
- ;; setup REPL vars
- ;; handle errors, interactive debugger
- (print
- (eval
- (read)))
- (force-output)) ;; flush output buffers
-```
-
-### Symbols
-
-A symbol compares faster than a string (pointers comparison).
-
-To get a symbol through `eval` we have to quote it, with a single
-quote prefix.
-
-```
- ;; SLIME
- CL-USER> 'hello-world
-
- HELLO WORLD
- CL-USER> (quote hello-world) ; equivalent sans syntaxe
-
- HELLO WORLD
-```
-
-<http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html>
-
-### Symbols
-
-If the symbol is not quoted then we end up in the interactive debugger :
-
-```
- ;; SLIME
- CL-USER> hello-world
-
- The variable HELLO-WORLD is unbound.
- [Condition of type UNBOUND-VARIABLE]
-
- Restarts:
- 0: [CONTINUE] Retry using HELLO-WORLD.
- 1: [USE-VALUE] Use specified value.
- 2: [STORE-VALUE] Set specified value and use it.
- 3: [RETRY] Retry SLIME REPL evaluation request.
- 4: [*ABORT] Return to SLIME's top level.
-
- Backtrace:
- 0: (SB-INT:SIMPLE-EVAL-IN-LEXENV HELLO-WORLD #<NULL-LEXENV>)
- 1: (EVAL HELLO-WORLD)
- --more--
-
- 4
- ; Evaluation aborted on #<UNBOUND-VARIABLE HELLO-WORLD {1004AF3523}>.
- CL-USER> _
-```
-
-### Functions
-
-`defun` defines a function.
-
-If the first element of a list
-(between parentheses) is a function or a symbol naming a function then
-the list is treated as a function call.
-
-```
- ;; SLIME
- CL-USER> (defun hello-world ()
- (format t "Hello world !"))
- HELLO-WORLD
- CL-USER> (hello-world)
- Hello world !
- NIL
- CL-USER> _
-```
-
-### Lambda
-
-`lambda` introduces an anonymous function. We can affect an
-anonymous function to a symbol, not unlike `defun`.
-
-```
- ;; SLIME
- CL-USER> (setf (symbol-function 'hello-world)
- (lambda ()
- (format t "Hello world !")))
-
- CL-USER> (hello-world)
- Hello world !
- NIL
- CL-USER> _
-```
-
-### Higher order functions
-
-A function is a value like others and can be passed to another function.
-
-We call these functions higher order.
-
-```
- ;; SLIME
- CL-USER> (mapcar (lambda (x) (* x x)) '(1 2 3 4 5))
- (1 4 9 16 25)
- CL-USER> (reduce #'+ '(1 2 3 4 5))
- 15
- CL-USER> (reduce (function +) '(1 2 3 4 5)) ; equivalent to above
- 15
- CL-USER> (reduce '+ '(1 2 3 4 5)) ; not equivalent will resolve
- ; function at run-time
- 15
- CL-USER> _
-```
-
-### Macros
-
- - parameters are not evaluated -> DSL and
- meta-programming
-
- - generate code which is in turn evaluated
-
- - backquote and comma to quote only parts
-
-
-```
- ;; SLIME
- CL-USER> (defmacro hello (arg)
- `(format nil "Hello ~A !"
- (string-capitalize ',arg)))
- HELLO
- CL-USER> (hello world)
- "Hello World !"
- CL-USER> (hello pony)
- "Hello Pony !"
- CL-USER> _
-```
-
-On Lisp, Paul Graham
-<http://lib.store.yahoo.net/lib/paulgraham/onlisp.pdf>
-
-### Quasiquotation
-
-To quote entirely :
- `'(a b c)`
-or
- `(quote (a b c))`
-->
- `(a b c)`
-
-To quote partially :
- `` `(a b ,c)``
-or
- `(list 'a 'b c)`
-->
- `(a b 123)` if `c = 123`
-
-Backquote stops evaluation and comma reactivates it locally.
-
-```
- ;; SLIME
- CL-USER> (let ((c 123))
- `(a b ,c))
- (A B 123)
-```
-
-# RailsOnLisp
-
-## Installation
-
-### Clone RailsOnLisp/rol.git
-
- $ mkdir ~/common-lisp/RailsOnLisp
- $ cd ~/common-lisp/RailsOnLisp
- $ git clone https://github.com/RailsOnLisp/rol.git
- Cloning into 'rol' ...
-
- $ _
-
-### Configure PATH
-
-Edit ` ~/.profile `
-
-```
- if [ -d "$HOME/common-lisp/RailsOnLisp/rol/bin" ]; then
- PATH="$HOME/common-lisp/RailsOnLisp/rol/bin:$PATH"
- fi
-```
-
-### Install RailsOnLisp
-
- $ . ~/.profile # source ~/.profile ou launch a new shell
- $ rol install
- Cloning into 'rol-assets' ...
- Cloning into 'rol-files' ...
- Cloning into 'rol-log' ...
- Cloning into 'rol-server' ...
- Cloning into 'rol-skel' ...
- Cloning into 'rol-template' ...
- Cloning into 'rol-uri' ...
-
- $ ls -l ~/common-lisp/RailsOnLisp/rol
-
- $ _
-
-## Demo
-
-### rol new
-
- $ rol new test
- Creating test
- D .
- D ./config
- F ./config/app.lisp
- F ./config/routes.lisp
- F ./config/assets.lisp
- D ./data
- D ./lib
- L ./lib/rol -> /home/dx/common-lisp/RailsOnLisp/rol
- F ./Makefile
- D ./app
- D ./app/assets
- D ./app/assets/css
- F ./app/assets/css/app.css
- D ./app/assets/js
- F ./app/assets/js/app.js
- D ./app/views
- D ./app/views/_layouts
- [...]
-
- $ _
-
-### make load
-
- $ cd test
- $ make load
- env LC_ALL=en_US.UTF-8 sbcl --disable-ldb --lose-on-corruption \
- --dynamic-space-size 512 --noinform --end-runtime-options \
- --eval '(declaim (optimize (debug 2) (safety 2) (speed 3) (space 1)))' \
- --disable-debugger \
- --load load.lisp \
- --eval '(run)' \
- --quit
-
- [...]
-
- INFO setup environment development
- DEBUG tags: ASSETS APP REPLY MIME FILE DIRECTORY THOT
- INFO saving facts into "data/test.facts"
- INFO starting thot at 0.0.0.0:4000
-
- INFO Thot start 0.0.0.0:4000
- INFO loading mime types from /etc/mime.types
- INFO #<FUNCTION THOT::MAIN-LOOP-THREADED>
- INFO #<FUNCTION THOT::ACCEPTOR-LOOP-EPOLL>
-
-### localhost:4000
-
-![localhost:4000](test.jpg)
diff --git a/railsonlisp.pdf b/railsonlisp.pdf
index 4203584..abea54e 100644
Binary files a/railsonlisp.pdf and b/railsonlisp.pdf differ
diff --git a/railsonlisp.tex b/railsonlisp.tex
deleted file mode 100644
index 981f25d..0000000
--- a/railsonlisp.tex
+++ /dev/null
@@ -1,440 +0,0 @@
-\documentclass[8pt]{beamer}
-
-\usepackage[utf8]{inputenc}
-\usepackage{upquote}
-\usepackage{graphicx}
-
-\usetheme{Warsaw}
-
-\AtBeginSection[]{
- \begin{frame}
- \vfill
- \centering
- \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
- \usebeamerfont{title}
- \insertsectionhead\par%
- \vspace{2em}
- \end{beamercolorbox}
- \vfill
- \end{frame}
-}
-
-\AtBeginSubsection[]{
- \begin{frame}
- \vfill
- \centering
- \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
- \usebeamerfont{title}
- \insertsectionhead\par%
- \vspace{1em}
- \insertsubsectionhead\par%
- \end{beamercolorbox}
- \vfill
- \end{frame}
-}
-
-\title{RailsOnLisp}
-\author{Thomas de Grivel {\tt thoxdg@gmail.com}}
-\institute{http://kmx.io}
-\date{\today}
-
-\begin{document}
-
-\begin{frame}
-\titlepage
-\end{frame}
-
-\section{Common Lisp}
-\subsection{Introduction}
-
-\begin{frame}
- \frametitle{Common Lisp}
- Common Lisp is the programmable programming language. \\
- \vspace{1em}
- Lisp essays by Paul Graham \\
- \url{http://www.paulgraham.com/lisp.html} \\
- \vspace{1em}
- Standardised in 1994 by ANSI \\
- \vspace{1em}
- Common Lisp the Language, 2nd Edition \\
- \url{https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html} \\
- \vspace{1em}
- Common Lisp Hyperspec \\
- \url{http://www.lispworks.com/documentation/HyperSpec/Front/} \\
- \vspace{1em}
- Cliki \\
- \url{http://cliki.net}
-\end{frame}
-
-\begin{frame}
- \frametitle{Common Lisp}
- Several compilers implement the ANSI standard :
- \begin{itemize}
- \item SBCL (open-source, x86, amd64, Windows, Linux, OSX, *BSD) \\
- \url{http://sbcl.org}
- \item ABCL (open-source, jvm) \\
- \url{https://abcl.org}
- \item Clozure CL (open-source, x86, amd64, Windows, Linux, OSX, FreeBSD) \\
- \url{https://ccl.clozure.com}
- \item ECL (open-source, compiles to C) \\
- \url{https://common-lisp.net/project/ecl/main.html}
- \item LispWorks (proprietary, x86, amd64, Windows, Linux, OSX, FreeBSD) \\
- \url{http://www.lispworks.com/products/lispworks.html\#personal}
- \item Allegro CL (proprietary, x86, amd64, sparc, Windows, Linux, OSX, FreeBSD) \\
- \url{https://franz.com/products/allegrocl}
- \end{itemize}
-\end{frame}
-
-\subsection{Installation}
-
-\begin{frame}[fragile]
- \frametitle{Install SBCL}
- Ubuntu :
-\begin{verbatim}
- sudo apt-get install sbcl
-\end{verbatim}
- MacOS X :
-\begin{verbatim}
- brew install sbcl
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Install repo}
-\begin{verbatim}
-mkdir -p ~/common-lisp/thodg
-cd ~/common-lisp/thodg
-git clone https://github.com/thodg/repo.git
-cd ~/common-lisp
-ln -s thodg/repo/repo.manifest
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Configure SBCL}
- Edit \tt{\textasciitilde/.sbclrc}
-\begin{verbatim}
- ;; ASDF
- (require :asdf)
-
- ;; repo
- (load "~/common-lisp/thodg/repo/repo")
- (repo:boot)
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Launch SBCL}
-\begin{verbatim}
-$ sbcl
-This is SBCL 1.5.3, an implementation of ANSI Common Lisp.
-More information about SBCL is available at <http://www.sbcl.org/>.
-
-SBCL is free software, provided as is, with absolutely no warranty.
-It is mostly in the public domain; some portions are provided under
-BSD-style licenses. See the CREDITS and COPYING files in the
-distribution for more information.
-
-* _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Install Slime}
-\begin{verbatim}
-* (repo:install :slime)
-
-$ /usr/bin/git -C /home/dx/common-lisp/slime clone https://github.com/slime/slime.git
-Cloning into 'slime'...
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Configure emacs}
- Edit \tt{\textasciitilde/.emacs}
-\begin{verbatim}
- ;; Common Lisp
- (add-to-list 'load-path "~/common-lisp/slime/slime/")
- (require 'slime-autoloads)
- (add-to-list 'slime-contribs 'slime-fancy)
- (setq inferior-lisp-program
- "sbcl")
- (setq slime-net-coding-system
- 'utf-8-unix)
-\end{verbatim}
-\end{frame}
-
-\subsection{Demo}
-
-\begin{frame}[fragile]
- \frametitle{Launch emacs and slime}
-\begin{verbatim}
-$ emacs
-
-M-x slime
-
-CL-USER> _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{The REPL}
- REPL : {\tt read}, {\tt eval}, {\tt print loop}
-\begin{verbatim}
- (loop
- ;; setup REPL vars
- ;; handle errors, interactive debugger
- (print
- (eval
- (read)))
- (force-output)) ;; flush output buffers
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Symbols}
- A symbol compares faster than a string
- (pointers comparison).
- To get a symbol through {\tt eval} we have to quote it, with a single quote prefix.
-\begin{verbatim}
- ;; SLIME
- CL-USER> 'hello-world
-
- HELLO WORLD
- CL-USER> (quote hello-world) ; equivalent sans syntaxe
-
- HELLO WORLD
-\end{verbatim}
- \vspace{1em}
- \url{http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Symbols}
- If the symbol is not quoted then we end up in the interactive debugger :
-\begin{verbatim}
- ;; SLIME
- CL-USER> hello-world
-
- The variable HELLO-WORLD is unbound.
- [Condition of type UNBOUND-VARIABLE]
-
- Restarts:
- 0: [CONTINUE] Retry using HELLO-WORLD.
- 1: [USE-VALUE] Use specified value.
- 2: [STORE-VALUE] Set specified value and use it.
- 3: [RETRY] Retry SLIME REPL evaluation request.
- 4: [*ABORT] Return to SLIME's top level.
-
- Backtrace:
- 0: (SB-INT:SIMPLE-EVAL-IN-LEXENV HELLO-WORLD #<NULL-LEXENV>)
- 1: (EVAL HELLO-WORLD)
- --more--
-
- 4
- ; Evaluation aborted on #<UNBOUND-VARIABLE HELLO-WORLD {1004AF3523}>.
- CL-USER> _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Functions}
- {\tt defun} defines a function.
- If the first element of a list (between parentheses) is a function or a symbol naming a function then the list is treated as a function call.
-\begin{verbatim}
- ;; SLIME
- CL-USER> (defun hello-world ()
- (format t "Hello world !"))
- HELLO-WORLD
- CL-USER> (hello-world)
- Hello world !
- NIL
- CL-USER> _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Lambda}
- {\tt lambda} introduces an anonymous function. We can affect an anonymous function to a symbol, not unlike {\tt defun}.
-\begin{verbatim}
- ;; SLIME
- CL-USER> (setf (symbol-function 'hello-world)
- (lambda ()
- (format t "Hello world !")))
-
- CL-USER> (hello-world)
- Hello world !
- NIL
- CL-USER> _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Higher order functions}
- A function is a value like others and can be passed to another function. We call these functions higher order.
-\begin{verbatim}
- ;; SLIME
- CL-USER> (mapcar (lambda (x) (* x x)) '(1 2 3 4 5))
- (1 4 9 16 25)
- CL-USER> (reduce #'+ '(1 2 3 4 5))
- 15
- CL-USER> (reduce (function +) '(1 2 3 4 5)) ; equivalent to above
- 15
- CL-USER> (reduce '+ '(1 2 3 4 5)) ; not equivalent will resolve function at run-time
- 15
- CL-USER> _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Macros}
- \begin{itemize}
- \item parameters are not evaluated $\Rightarrow$ DSL and meta-programming
- \item generate code which is in turn evaluated
- \item backquote and comma to quote only parts
- \end{itemize}
-\begin{verbatim}
- ;; SLIME
- CL-USER> (defmacro hello (arg)
- `(format nil "Hello ~A !"
- (string-capitalize ',arg)))
- HELLO
- CL-USER> (hello world)
- "Hello World !"
- CL-USER> (hello pony)
- "Hello Pony !"
- CL-USER> _
-\end{verbatim}
- \vspace{1em}
- On Lisp, Paul Graham \\
- \url{http://lib.store.yahoo.net/lib/paulgraham/onlisp.pdf}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Quasiquotation}
- \begin{itemize}
- \item To quote entirely : {\tt '(a b c)} or {\tt (quote (a b c))} \\
- $\Rightarrow$ {\tt (a b c)}
- \item To quote partially : {\tt `(a b ,c)} or {\tt (list 'a 'b c)} \\
- $\Rightarrow$ {\tt (a b 123)} if {\tt c = 123}
- \end{itemize}
- Backquote stops evaluation and comma reactivates it locally.
-\begin{verbatim}
- ;; SLIME
- CL-USER> (let ((c 123))
- `(a b ,c))
- (A B 123)
-\end{verbatim}
-\end{frame}
-
-\section{RailsOnLisp}
-\subsection{Installation}
-
-\begin{frame}[fragile]
- \frametitle{Clone RailsOnLisp/rol.git}
-\begin{verbatim}
-$ mkdir ~/common-lisp/RailsOnLisp
-$ cd ~/common-lisp/RailsOnLisp
-$ git clone https://github.com/RailsOnLisp/rol.git
-Cloning into 'rol' ...
-
-$ _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Configure PATH}
- Edit \tt{\textasciitilde/.profile}
-\begin{verbatim}
- if [ -d "$HOME/common-lisp/RailsOnLisp/rol/bin" ]; then
- PATH="$HOME/common-lisp/RailsOnLisp/rol/bin:$PATH"
- fi
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{Install RailsOnLisp}
-\begin{verbatim}
-$ . ~/.profile # source ~/.profile ou launch a new shell
-$ rol install
-Cloning into 'rol-assets' ...
-Cloning into 'rol-files' ...
-Cloning into 'rol-log' ...
-Cloning into 'rol-server' ...
-Cloning into 'rol-skel' ...
-Cloning into 'rol-template' ...
-Cloning into 'rol-uri' ...
-
-$ ls -l ~/common-lisp/RailsOnLisp/rol
-
-$ _
-\end{verbatim}
-\end{frame}
-
-\subsection{Demo}
-
-\begin{frame}[fragile]
- \frametitle{rol new}
-\begin{verbatim}
-$ rol new test
-Creating test
-D .
-D ./config
-F ./config/app.lisp
-F ./config/routes.lisp
-F ./config/assets.lisp
-D ./data
-D ./lib
-L ./lib/rol -> /home/dx/common-lisp/RailsOnLisp/rol
-F ./Makefile
-D ./app
-D ./app/assets
-D ./app/assets/css
-F ./app/assets/css/app.css
-D ./app/assets/js
-F ./app/assets/js/app.js
-D ./app/views
-D ./app/views/_layouts
-[...]
-
-$ _
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{make load}
-\begin{verbatim}
-$ cd test
-$ make load
-env LC_ALL=en_US.UTF-8 sbcl --disable-ldb --lose-on-corruption \
- --dynamic-space-size 512 --noinform --end-runtime-options \
- --eval '(declaim (optimize (debug 2) (safety 2) (speed 3) (space 1)))' \
- --disable-debugger \
- --load load.lisp \
- --eval '(run)' \
- --quit
-
-[...]
-
-INFO setup environment development
-DEBUG tags: ASSETS APP REPLY MIME FILE DIRECTORY THOT
-INFO saving facts into "data/test.facts"
-INFO starting thot at 0.0.0.0:4000
-
-INFO Thot start 0.0.0.0:4000
-INFO loading mime types from /etc/mime.types
-INFO #<FUNCTION THOT::MAIN-LOOP-THREADED>
-INFO #<FUNCTION THOT::ACCEPTOR-LOOP-EPOLL>
-\end{verbatim}
-\end{frame}
-
-\begin{frame}[fragile]
- \frametitle{localhost:4000}
- \begin{figure}[h!]
- \centering
- \includegraphics[width = 6cm]{test.jpg}
- \label{localhost:4000}
- \end{figure}
-\end{frame}
-
-\end{document}
diff --git a/railsonlisp/index.md b/railsonlisp/index.md
new file mode 100644
index 0000000..f179e12
--- /dev/null
+++ b/railsonlisp/index.md
@@ -0,0 +1,398 @@
+Rails On Lisp
+
+Thomas de Grivel <thoxdg@gmail.com>
+
+https://kmx.io/
+
+2020-03-11
+
+# Common Lisp
+
+## Introduction
+
+### Common Lisp
+
+Common Lisp is the programmable programming language.
+
+Lisp essays by Paul Graham
+<http://www.paulgraham.com/lisp.html>
+
+Standardised in 1994 by ANSI
+
+Common Lisp the Language, 2nd Edition
+<https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html>
+
+Common Lisp Hyperspec
+<http://www.lispworks.com/documentation/HyperSpec/Front/>
+
+<http://cliki.net>
+
+### Common Lisp
+
+Several compilers implement the ANSI standard :
+
+ - SBCL (open-source, x86, amd64, Windows, Linux, OSX, \*BSD)
+ <http://sbcl.org>
+
+ - ABCL (open-source, jvm)
+ <https://abcl.org>
+
+ - Clozure CL (open-source, x86, amd64, Windows, Linux, OSX, FreeBSD)
+ <https://ccl.clozure.com>
+
+ - ECL (open-source, compiles to C)
+ <https://common-lisp.net/project/ecl/main.html>
+
+ - LispWorks (proprietary, x86, amd64, Windows, Linux, OSX, FreeBSD)
+ <http://www.lispworks.com/products/lispworks.html#personal>
+
+ - Allegro CL (proprietary, x86, amd64, sparc, Windows, Linux, OSX,
+ FreeBSD)
+ <https://franz.com/products/allegrocl>
+
+## Installation
+
+### Install SBCL
+
+Ubuntu :
+
+```
+ sudo apt-get install sbcl
+```
+
+MacOS X :
+
+```
+ brew install sbcl
+```
+
+### Install repo
+
+```
+mkdir -p ~/common-lisp/thodg
+cd ~/common-lisp/thodg
+git clone https://github.com/thodg/repo.git
+cd ~/common-lisp
+ln -s thodg/repo/repo.manifest
+```
+
+### Configure SBCL
+
+Edit `~/.sbclrc`
+
+```
+ ;; ASDF
+ (require :asdf)
+
+ ;; repo
+ (load "~/common-lisp/thodg/repo/repo")
+ (repo:boot)
+```
+
+### Launch SBCL
+
+ $ sbcl
+ This is SBCL 1.5.3, an implementation of ANSI Common Lisp.
+ More information about SBCL is available at <http://www.sbcl.org/>.
+
+ SBCL is free software, provided as is, with absolutely no warranty.
+ It is mostly in the public domain; some portions are provided under
+ BSD-style licenses. See the CREDITS and COPYING files in the
+ distribution for more information.
+
+ * _
+
+### Install Slime
+
+ * (repo:install :slime)
+
+ $ /usr/bin/git -C /home/dx/common-lisp/slime clone https://github.com/slime/slime.git
+ Cloning into 'slime'...
+
+### Configure emacs
+
+Edit ` ~/.emacs `
+
+```
+ ;; Common Lisp
+ (add-to-list 'load-path "~/common-lisp/slime/slime/")
+ (require 'slime-autoloads)
+ (add-to-list 'slime-contribs 'slime-fancy)
+ (setq inferior-lisp-program
+ "sbcl")
+ (setq slime-net-coding-system
+ 'utf-8-unix)
+```
+
+## Demo
+
+### Launch emacs and slime
+
+ $ emacs
+
+ M-x slime
+
+ CL-USER> _
+
+### The REPL
+
+REPL : `read`, `eval`, `print
+loop`
+
+```
+ (loop
+ ;; setup REPL vars
+ ;; handle errors, interactive debugger
+ (print
+ (eval
+ (read)))
+ (force-output)) ;; flush output buffers
+```
+
+### Symbols
+
+A symbol compares faster than a string (pointers comparison).
+
+To get a symbol through `eval` we have to quote it, with a single
+quote prefix.
+
+```
+ ;; SLIME
+ CL-USER> 'hello-world
+
+ HELLO WORLD
+ CL-USER> (quote hello-world) ; equivalent sans syntaxe
+
+ HELLO WORLD
+```
+
+<http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html>
+
+### Symbols
+
+If the symbol is not quoted then we end up in the interactive debugger :
+
+```
+ ;; SLIME
+ CL-USER> hello-world
+
+ The variable HELLO-WORLD is unbound.
+ [Condition of type UNBOUND-VARIABLE]
+
+ Restarts:
+ 0: [CONTINUE] Retry using HELLO-WORLD.
+ 1: [USE-VALUE] Use specified value.
+ 2: [STORE-VALUE] Set specified value and use it.
+ 3: [RETRY] Retry SLIME REPL evaluation request.
+ 4: [*ABORT] Return to SLIME's top level.
+
+ Backtrace:
+ 0: (SB-INT:SIMPLE-EVAL-IN-LEXENV HELLO-WORLD #<NULL-LEXENV>)
+ 1: (EVAL HELLO-WORLD)
+ --more--
+
+ 4
+ ; Evaluation aborted on #<UNBOUND-VARIABLE HELLO-WORLD {1004AF3523}>.
+ CL-USER> _
+```
+
+### Functions
+
+`defun` defines a function.
+
+If the first element of a list
+(between parentheses) is a function or a symbol naming a function then
+the list is treated as a function call.
+
+```
+ ;; SLIME
+ CL-USER> (defun hello-world ()
+ (format t "Hello world !"))
+ HELLO-WORLD
+ CL-USER> (hello-world)
+ Hello world !
+ NIL
+ CL-USER> _
+```
+
+### Lambda
+
+`lambda` introduces an anonymous function. We can affect an
+anonymous function to a symbol, not unlike `defun`.
+
+```
+ ;; SLIME
+ CL-USER> (setf (symbol-function 'hello-world)
+ (lambda ()
+ (format t "Hello world !")))
+
+ CL-USER> (hello-world)
+ Hello world !
+ NIL
+ CL-USER> _
+```
+
+### Higher order functions
+
+A function is a value like others and can be passed to another function.
+
+We call these functions higher order.
+
+```
+ ;; SLIME
+ CL-USER> (mapcar (lambda (x) (* x x)) '(1 2 3 4 5))
+ (1 4 9 16 25)
+ CL-USER> (reduce #'+ '(1 2 3 4 5))
+ 15
+ CL-USER> (reduce (function +) '(1 2 3 4 5)) ; equivalent to above
+ 15
+ CL-USER> (reduce '+ '(1 2 3 4 5)) ; not equivalent will resolve
+ ; function at run-time
+ 15
+ CL-USER> _
+```
+
+### Macros
+
+ - parameters are not evaluated -> DSL and
+ meta-programming
+
+ - generate code which is in turn evaluated
+
+ - backquote and comma to quote only parts
+
+
+```
+ ;; SLIME
+ CL-USER> (defmacro hello (arg)
+ `(format nil "Hello ~A !"
+ (string-capitalize ',arg)))
+ HELLO
+ CL-USER> (hello world)
+ "Hello World !"
+ CL-USER> (hello pony)
+ "Hello Pony !"
+ CL-USER> _
+```
+
+On Lisp, Paul Graham
+<http://lib.store.yahoo.net/lib/paulgraham/onlisp.pdf>
+
+### Quasiquotation
+
+To quote entirely :
+ `'(a b c)`
+or
+ `(quote (a b c))`
+->
+ `(a b c)`
+
+To quote partially :
+ `` `(a b ,c)``
+or
+ `(list 'a 'b c)`
+->
+ `(a b 123)` if `c = 123`
+
+Backquote stops evaluation and comma reactivates it locally.
+
+```
+ ;; SLIME
+ CL-USER> (let ((c 123))
+ `(a b ,c))
+ (A B 123)
+```
+
+# RailsOnLisp
+
+## Installation
+
+### Clone RailsOnLisp/rol.git
+
+ $ mkdir ~/common-lisp/RailsOnLisp
+ $ cd ~/common-lisp/RailsOnLisp
+ $ git clone https://github.com/RailsOnLisp/rol.git
+ Cloning into 'rol' ...
+
+ $ _
+
+### Configure PATH
+
+Edit ` ~/.profile `
+
+```
+ if [ -d "$HOME/common-lisp/RailsOnLisp/rol/bin" ]; then
+ PATH="$HOME/common-lisp/RailsOnLisp/rol/bin:$PATH"
+ fi
+```
+
+### Install RailsOnLisp
+
+ $ . ~/.profile # source ~/.profile ou launch a new shell
+ $ rol install
+ Cloning into 'rol-assets' ...
+ Cloning into 'rol-files' ...
+ Cloning into 'rol-log' ...
+ Cloning into 'rol-server' ...
+ Cloning into 'rol-skel' ...
+ Cloning into 'rol-template' ...
+ Cloning into 'rol-uri' ...
+
+ $ ls -l ~/common-lisp/RailsOnLisp/rol
+
+ $ _
+
+## Demo
+
+### rol new
+
+ $ rol new test
+ Creating test
+ D .
+ D ./config
+ F ./config/app.lisp
+ F ./config/routes.lisp
+ F ./config/assets.lisp
+ D ./data
+ D ./lib
+ L ./lib/rol -> /home/dx/common-lisp/RailsOnLisp/rol
+ F ./Makefile
+ D ./app
+ D ./app/assets
+ D ./app/assets/css
+ F ./app/assets/css/app.css
+ D ./app/assets/js
+ F ./app/assets/js/app.js
+ D ./app/views
+ D ./app/views/_layouts
+ [...]
+
+ $ _
+
+### make load
+
+ $ cd test
+ $ make load
+ env LC_ALL=en_US.UTF-8 sbcl --disable-ldb --lose-on-corruption \
+ --dynamic-space-size 512 --noinform --end-runtime-options \
+ --eval '(declaim (optimize (debug 2) (safety 2) (speed 3) (space 1)))' \
+ --disable-debugger \
+ --load load.lisp \
+ --eval '(run)' \
+ --quit
+
+ [...]
+
+ INFO setup environment development
+ DEBUG tags: ASSETS APP REPLY MIME FILE DIRECTORY THOT
+ INFO saving facts into "data/test.facts"
+ INFO starting thot at 0.0.0.0:4000
+
+ INFO Thot start 0.0.0.0:4000
+ INFO loading mime types from /etc/mime.types
+ INFO #<FUNCTION THOT::MAIN-LOOP-THREADED>
+ INFO #<FUNCTION THOT::ACCEPTOR-LOOP-EPOLL>
+
+### localhost:4000
+
+![localhost:4000](test.jpg)
diff --git a/railsonlisp/index.tex b/railsonlisp/index.tex
new file mode 100644
index 0000000..981f25d
--- /dev/null
+++ b/railsonlisp/index.tex
@@ -0,0 +1,440 @@
+\documentclass[8pt]{beamer}
+
+\usepackage[utf8]{inputenc}
+\usepackage{upquote}
+\usepackage{graphicx}
+
+\usetheme{Warsaw}
+
+\AtBeginSection[]{
+ \begin{frame}
+ \vfill
+ \centering
+ \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
+ \usebeamerfont{title}
+ \insertsectionhead\par%
+ \vspace{2em}
+ \end{beamercolorbox}
+ \vfill
+ \end{frame}
+}
+
+\AtBeginSubsection[]{
+ \begin{frame}
+ \vfill
+ \centering
+ \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
+ \usebeamerfont{title}
+ \insertsectionhead\par%
+ \vspace{1em}
+ \insertsubsectionhead\par%
+ \end{beamercolorbox}
+ \vfill
+ \end{frame}
+}
+
+\title{RailsOnLisp}
+\author{Thomas de Grivel {\tt thoxdg@gmail.com}}
+\institute{http://kmx.io}
+\date{\today}
+
+\begin{document}
+
+\begin{frame}
+\titlepage
+\end{frame}
+
+\section{Common Lisp}
+\subsection{Introduction}
+
+\begin{frame}
+ \frametitle{Common Lisp}
+ Common Lisp is the programmable programming language. \\
+ \vspace{1em}
+ Lisp essays by Paul Graham \\
+ \url{http://www.paulgraham.com/lisp.html} \\
+ \vspace{1em}
+ Standardised in 1994 by ANSI \\
+ \vspace{1em}
+ Common Lisp the Language, 2nd Edition \\
+ \url{https://www.cs.cmu.edu/Groups/AI/html/cltl/cltl2.html} \\
+ \vspace{1em}
+ Common Lisp Hyperspec \\
+ \url{http://www.lispworks.com/documentation/HyperSpec/Front/} \\
+ \vspace{1em}
+ Cliki \\
+ \url{http://cliki.net}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Common Lisp}
+ Several compilers implement the ANSI standard :
+ \begin{itemize}
+ \item SBCL (open-source, x86, amd64, Windows, Linux, OSX, *BSD) \\
+ \url{http://sbcl.org}
+ \item ABCL (open-source, jvm) \\
+ \url{https://abcl.org}
+ \item Clozure CL (open-source, x86, amd64, Windows, Linux, OSX, FreeBSD) \\
+ \url{https://ccl.clozure.com}
+ \item ECL (open-source, compiles to C) \\
+ \url{https://common-lisp.net/project/ecl/main.html}
+ \item LispWorks (proprietary, x86, amd64, Windows, Linux, OSX, FreeBSD) \\
+ \url{http://www.lispworks.com/products/lispworks.html\#personal}
+ \item Allegro CL (proprietary, x86, amd64, sparc, Windows, Linux, OSX, FreeBSD) \\
+ \url{https://franz.com/products/allegrocl}
+ \end{itemize}
+\end{frame}
+
+\subsection{Installation}
+
+\begin{frame}[fragile]
+ \frametitle{Install SBCL}
+ Ubuntu :
+\begin{verbatim}
+ sudo apt-get install sbcl
+\end{verbatim}
+ MacOS X :
+\begin{verbatim}
+ brew install sbcl
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Install repo}
+\begin{verbatim}
+mkdir -p ~/common-lisp/thodg
+cd ~/common-lisp/thodg
+git clone https://github.com/thodg/repo.git
+cd ~/common-lisp
+ln -s thodg/repo/repo.manifest
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Configure SBCL}
+ Edit \tt{\textasciitilde/.sbclrc}
+\begin{verbatim}
+ ;; ASDF
+ (require :asdf)
+
+ ;; repo
+ (load "~/common-lisp/thodg/repo/repo")
+ (repo:boot)
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Launch SBCL}
+\begin{verbatim}
+$ sbcl
+This is SBCL 1.5.3, an implementation of ANSI Common Lisp.
+More information about SBCL is available at <http://www.sbcl.org/>.
+
+SBCL is free software, provided as is, with absolutely no warranty.
+It is mostly in the public domain; some portions are provided under
+BSD-style licenses. See the CREDITS and COPYING files in the
+distribution for more information.
+
+* _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Install Slime}
+\begin{verbatim}
+* (repo:install :slime)
+
+$ /usr/bin/git -C /home/dx/common-lisp/slime clone https://github.com/slime/slime.git
+Cloning into 'slime'...
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Configure emacs}
+ Edit \tt{\textasciitilde/.emacs}
+\begin{verbatim}
+ ;; Common Lisp
+ (add-to-list 'load-path "~/common-lisp/slime/slime/")
+ (require 'slime-autoloads)
+ (add-to-list 'slime-contribs 'slime-fancy)
+ (setq inferior-lisp-program
+ "sbcl")
+ (setq slime-net-coding-system
+ 'utf-8-unix)
+\end{verbatim}
+\end{frame}
+
+\subsection{Demo}
+
+\begin{frame}[fragile]
+ \frametitle{Launch emacs and slime}
+\begin{verbatim}
+$ emacs
+
+M-x slime
+
+CL-USER> _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{The REPL}
+ REPL : {\tt read}, {\tt eval}, {\tt print loop}
+\begin{verbatim}
+ (loop
+ ;; setup REPL vars
+ ;; handle errors, interactive debugger
+ (print
+ (eval
+ (read)))
+ (force-output)) ;; flush output buffers
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Symbols}
+ A symbol compares faster than a string
+ (pointers comparison).
+ To get a symbol through {\tt eval} we have to quote it, with a single quote prefix.
+\begin{verbatim}
+ ;; SLIME
+ CL-USER> 'hello-world
+
+ HELLO WORLD
+ CL-USER> (quote hello-world) ; equivalent sans syntaxe
+
+ HELLO WORLD
+\end{verbatim}
+ \vspace{1em}
+ \url{http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Symbols}
+ If the symbol is not quoted then we end up in the interactive debugger :
+\begin{verbatim}
+ ;; SLIME
+ CL-USER> hello-world
+
+ The variable HELLO-WORLD is unbound.
+ [Condition of type UNBOUND-VARIABLE]
+
+ Restarts:
+ 0: [CONTINUE] Retry using HELLO-WORLD.
+ 1: [USE-VALUE] Use specified value.
+ 2: [STORE-VALUE] Set specified value and use it.
+ 3: [RETRY] Retry SLIME REPL evaluation request.
+ 4: [*ABORT] Return to SLIME's top level.
+
+ Backtrace:
+ 0: (SB-INT:SIMPLE-EVAL-IN-LEXENV HELLO-WORLD #<NULL-LEXENV>)
+ 1: (EVAL HELLO-WORLD)
+ --more--
+
+ 4
+ ; Evaluation aborted on #<UNBOUND-VARIABLE HELLO-WORLD {1004AF3523}>.
+ CL-USER> _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Functions}
+ {\tt defun} defines a function.
+ If the first element of a list (between parentheses) is a function or a symbol naming a function then the list is treated as a function call.
+\begin{verbatim}
+ ;; SLIME
+ CL-USER> (defun hello-world ()
+ (format t "Hello world !"))
+ HELLO-WORLD
+ CL-USER> (hello-world)
+ Hello world !
+ NIL
+ CL-USER> _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Lambda}
+ {\tt lambda} introduces an anonymous function. We can affect an anonymous function to a symbol, not unlike {\tt defun}.
+\begin{verbatim}
+ ;; SLIME
+ CL-USER> (setf (symbol-function 'hello-world)
+ (lambda ()
+ (format t "Hello world !")))
+
+ CL-USER> (hello-world)
+ Hello world !
+ NIL
+ CL-USER> _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Higher order functions}
+ A function is a value like others and can be passed to another function. We call these functions higher order.
+\begin{verbatim}
+ ;; SLIME
+ CL-USER> (mapcar (lambda (x) (* x x)) '(1 2 3 4 5))
+ (1 4 9 16 25)
+ CL-USER> (reduce #'+ '(1 2 3 4 5))
+ 15
+ CL-USER> (reduce (function +) '(1 2 3 4 5)) ; equivalent to above
+ 15
+ CL-USER> (reduce '+ '(1 2 3 4 5)) ; not equivalent will resolve function at run-time
+ 15
+ CL-USER> _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Macros}
+ \begin{itemize}
+ \item parameters are not evaluated $\Rightarrow$ DSL and meta-programming
+ \item generate code which is in turn evaluated
+ \item backquote and comma to quote only parts
+ \end{itemize}
+\begin{verbatim}
+ ;; SLIME
+ CL-USER> (defmacro hello (arg)
+ `(format nil "Hello ~A !"
+ (string-capitalize ',arg)))
+ HELLO
+ CL-USER> (hello world)
+ "Hello World !"
+ CL-USER> (hello pony)
+ "Hello Pony !"
+ CL-USER> _
+\end{verbatim}
+ \vspace{1em}
+ On Lisp, Paul Graham \\
+ \url{http://lib.store.yahoo.net/lib/paulgraham/onlisp.pdf}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Quasiquotation}
+ \begin{itemize}
+ \item To quote entirely : {\tt '(a b c)} or {\tt (quote (a b c))} \\
+ $\Rightarrow$ {\tt (a b c)}
+ \item To quote partially : {\tt `(a b ,c)} or {\tt (list 'a 'b c)} \\
+ $\Rightarrow$ {\tt (a b 123)} if {\tt c = 123}
+ \end{itemize}
+ Backquote stops evaluation and comma reactivates it locally.
+\begin{verbatim}
+ ;; SLIME
+ CL-USER> (let ((c 123))
+ `(a b ,c))
+ (A B 123)
+\end{verbatim}
+\end{frame}
+
+\section{RailsOnLisp}
+\subsection{Installation}
+
+\begin{frame}[fragile]
+ \frametitle{Clone RailsOnLisp/rol.git}
+\begin{verbatim}
+$ mkdir ~/common-lisp/RailsOnLisp
+$ cd ~/common-lisp/RailsOnLisp
+$ git clone https://github.com/RailsOnLisp/rol.git
+Cloning into 'rol' ...
+
+$ _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Configure PATH}
+ Edit \tt{\textasciitilde/.profile}
+\begin{verbatim}
+ if [ -d "$HOME/common-lisp/RailsOnLisp/rol/bin" ]; then
+ PATH="$HOME/common-lisp/RailsOnLisp/rol/bin:$PATH"
+ fi
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Install RailsOnLisp}
+\begin{verbatim}
+$ . ~/.profile # source ~/.profile ou launch a new shell
+$ rol install
+Cloning into 'rol-assets' ...
+Cloning into 'rol-files' ...
+Cloning into 'rol-log' ...
+Cloning into 'rol-server' ...
+Cloning into 'rol-skel' ...
+Cloning into 'rol-template' ...
+Cloning into 'rol-uri' ...
+
+$ ls -l ~/common-lisp/RailsOnLisp/rol
+
+$ _
+\end{verbatim}
+\end{frame}
+
+\subsection{Demo}
+
+\begin{frame}[fragile]
+ \frametitle{rol new}
+\begin{verbatim}
+$ rol new test
+Creating test
+D .
+D ./config
+F ./config/app.lisp
+F ./config/routes.lisp
+F ./config/assets.lisp
+D ./data
+D ./lib
+L ./lib/rol -> /home/dx/common-lisp/RailsOnLisp/rol
+F ./Makefile
+D ./app
+D ./app/assets
+D ./app/assets/css
+F ./app/assets/css/app.css
+D ./app/assets/js
+F ./app/assets/js/app.js
+D ./app/views
+D ./app/views/_layouts
+[...]
+
+$ _
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{make load}
+\begin{verbatim}
+$ cd test
+$ make load
+env LC_ALL=en_US.UTF-8 sbcl --disable-ldb --lose-on-corruption \
+ --dynamic-space-size 512 --noinform --end-runtime-options \
+ --eval '(declaim (optimize (debug 2) (safety 2) (speed 3) (space 1)))' \
+ --disable-debugger \
+ --load load.lisp \
+ --eval '(run)' \
+ --quit
+
+[...]
+
+INFO setup environment development
+DEBUG tags: ASSETS APP REPLY MIME FILE DIRECTORY THOT
+INFO saving facts into "data/test.facts"
+INFO starting thot at 0.0.0.0:4000
+
+INFO Thot start 0.0.0.0:4000
+INFO loading mime types from /etc/mime.types
+INFO #<FUNCTION THOT::MAIN-LOOP-THREADED>
+INFO #<FUNCTION THOT::ACCEPTOR-LOOP-EPOLL>
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{localhost:4000}
+ \begin{figure}[h!]
+ \centering
+ \includegraphics[width = 6cm]{test.jpg}
+ \label{localhost:4000}
+ \end{figure}
+\end{frame}
+
+\end{document}
diff --git a/test.md b/test.md
deleted file mode 100644
index 7b92e2d..0000000
--- a/test.md
+++ /dev/null
@@ -1,29 +0,0 @@
-
-Title
-
-2020-03-01
-
-Thomas de Grivel
-
-<thoxdg@gmail.com>
-
-https://kmx.io/
-
-
-# Section 1
-
-## Frame 1
-
- - List item 1
- - List item 2
-
-
-## Frame 2
-```
-(resource 'group "wifi"
- :gid 2300)
-(resource 'file "/etc/wifi/wifi.conf"
- :owner "root"
- :group "wifi"
- :content (read-file "/etc/wifi/wifi.conf"))
-```
diff --git a/test.pdf b/test.pdf
index b356056..18ea7c3 100644
Binary files a/test.pdf and b/test.pdf differ
diff --git a/test/index.md b/test/index.md
new file mode 100644
index 0000000..7b92e2d
--- /dev/null
+++ b/test/index.md
@@ -0,0 +1,29 @@
+
+Title
+
+2020-03-01
+
+Thomas de Grivel
+
+<thoxdg@gmail.com>
+
+https://kmx.io/
+
+
+# Section 1
+
+## Frame 1
+
+ - List item 1
+ - List item 2
+
+
+## Frame 2
+```
+(resource 'group "wifi"
+ :gid 2300)
+(resource 'file "/etc/wifi/wifi.conf"
+ :owner "root"
+ :group "wifi"
+ :content (read-file "/etc/wifi/wifi.conf"))
+```