Alright, here is what I want both of us to do: * Prerequisites You must have openbsd-netcat and embeddable common lisp. Since I am on openbsd ```ksh pkg_add ecl ``` does it. If you are on a weird linux you might have to install openbsd-netcat (which yields nc). We're not actually using i2pd here (though it's a tiny step from here). Further we are going to use localhost for both local and foreign address, and leave both local and foreign ports as 54321. We can look at it locally. * Let's download i2pher.lisp. ```ksh printf "/users/screwtape/common-lisp/i2pher.lisp\n" | \ nc sdf.org 70 > i2pher.lisp ``` * Let's seed our new self-hosted phlog. a new (lisp) file: ```my-phlog.lisp (defvar *goma* (make-instance 'i2pher::gophermap :item-specifier '(:map :screwtape) :item-description "Self hosted gopher" :filename #p"my-gopher.lisp")) (i2pher::spawn *goma* 0 "Test post" '(:first :phlog :test) " Doing a simple application of my phlog's i2pher.lisp ") (if (probe-file (i2pher::filename *goma*)) (progn (in-package i2pher) (setq *goma* (with-open-file (in (i2pher::filename *goma*)) (eval (read in))))) (i2pher::save *goma*)) (i2pher::add-thread *goma*) ``` * Now let's compile that as C. It will be faster. A new file, make.lisp ```make.lisp (ext:install-c-compiler) (compile-file "i2pher.lisp" :system-p t) (compile-file "my-phlog.lisp" :system-p t) (c:build-program "serve" :lisp-files '("i2pher.o" "my-phlog.o")) (si:quit) ``` * Let's build ```ksh ecl --load make.lisp ``` * and run it ```ksh ./serve ``` * Make another test phlog then quit ```ecl (in the running ./serve) (in-package i2pher) (spawn cl-user::*goma* 0 "Another item description" '(:item :tags) " This is a test post") (save cl-user::*goma*) (si:quit) ``` * You could take a peek at my-gopher.lisp but let's just run ./serve again ```ksh ./serve ``` * Let's browse from lynx in another term. ```ksh lynx 'gopher://localhost:54321/1(:map)' ``` looky looky.