diff --git a/Makefile b/Makefile index 0c4665d..5061364 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,13 @@ clean: rm -f *.pdf *.out *.aux *.log *.fls *.fdb_latexmk loop loop.tex build: loop.lisp loop.asd scripts/build-exe.lisp - # mkdir -p ~/quicklisp/local-projects/loop - # cmp loop.asd ~/quicklisp/local-projects/loop/loop.asd || \ - # cp loop.asd ~/quicklisp/local-projects/loop - # cmp loop.lisp ~/quicklisp/local-projects/loop/loop.lisp || \ - # cp loop.lisp ~/quicklisp/local-projects/loop - # cp loop.asd ~/quicklisp/local-projects/loop - # cp loop.lisp ~/quicklisp/local-projects/loop + mkdir -p ~/quicklisp/local-projects/loop + cmp loop.asd ~/quicklisp/local-projects/loop/loop.asd || \ + cp loop.asd ~/quicklisp/local-projects/loop + cmp loop.lisp ~/quicklisp/local-projects/loop/loop.lisp || \ + cp loop.lisp ~/quicklisp/local-projects/loop + cp loop.asd ~/quicklisp/local-projects/loop + cp loop.lisp ~/quicklisp/local-projects/loop sbcl --script scripts/build-exe.lisp install: loop diff --git a/README b/README index 8d0dc73..f7439e0 100644 --- a/README +++ b/README @@ -29,11 +29,13 @@ install it as a local project. Go to and say - git clone https://git.antartida.xyz/loop/srv - cd srv - make build + $ git clone https://git.antartida.xyz/loop/srv loop + $ cd loop + $ make build -Now you have the executable loop. Try it out: +If you just installed SBCL and quicklisp, the build might take a +little while to download some dependencies. Now you have the +executable loop. Try it out: --8<-------------------------------------------------------->8--- $ ./loop --help @@ -69,9 +71,38 @@ quit 205 Good-bye. --8<-------------------------------------------------------->8--- -So now have your system run your TCP server of choice. For instance, -if you're using djb's tcpserver and would like LOOP to listen on port -1024, say +It's time to choose a directory from which LOOP will run. Say you +choose ~/loop. Then say + + $ echo ~/loop > conf-home + $ make install + +Whenever you run loop, make sure you're in its home directory because +it will look for the file accounts.lisp always relatively to the +current working directory of the process. (So, if you set up a cron +job, make sure the job, too, sets LOOP's home directory as its current +working directory.) + +(*) Create your account + +LOOP requires authentication for most things, so you should create an +account for you right away. Accounts are kept in accounts.lisp in +your installation directory. Every time you create an account, you +must specify who is inviting this new account into the LOOP---because +we keep a tree of accounts. The root account is called anonymous, so +your first account must be invited by the anonymous account. So you +can say + + ./loop --create-account you anonymous + +The anonymous account has no special power. It exists solely because +the graph of accounts needs a root. + +(*) How to expose it to your friends + +Just have your system run your TCP server of choice. For instance, if +you're using djb's tcpserver and would like LOOP to listen on port +1024, tell your shell --8<-------------------------------------------------------->8--- $ tcpserver -v -HR 0.0.0.0 1024 ./loop -s @@ -91,13 +122,29 @@ quit Connection closed by foreign host. --8<-------------------------------------------------------->8--- -Directory daemon/ in LOOP's source code has sample scripts to use with -djb's tcpserver and daemontools. If you never done this, it will be -better education if you learn to use daemontools and ucspi-tcp before -going live with LOOP community. It's easy and fun. +Directores daemon/ and daemon-tls/ in LOOP's source code has sample +scripts to use with djb's tcpserver and daemontools. If you never +done this, it will be better education if you learn to use daemontools +and ucspi-tcp before going live with a LOOP community. It's easy and +fun. -(*) Create your account +(*) Systems with no installation issues -Accounts are kept in accounts.lisp. Create a first account with +We installed LOOP on FreeBSD 14.1, 14.2 with SBCL 2.4.9. - ./loop --create-account you +(*) Systems with installation issues + +We installed LOOP on Ubuntu 24.04 (24.01.1 LTS) codename noble with +SBCL 2.2.9.debian. We found that CLSQL could not load the shared +object libsqlite3.so because ``apt install libsqlite3'' installs the +library at + + /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 + +with a symbolic link to libsqlite3.so.0, but not to libsqlite3.so. +SBCL is trying to load libsqlite3.so, so a solution is to just tell +your system to + + ln -s libsqlite3.so.0 libsqlite3.so + +at /usr/lib/x86_64-linux-gnu. diff --git a/accounts.lisp b/accounts.lisp index 4f8ea66..cadd35b 100644 --- a/accounts.lisp +++ b/accounts.lisp @@ -1,36 +1,9 @@ (#S(LOOP::ACCOUNT - :USERNAME "TOIS" - :SEEN NIL - :LAST-POST NIL - :FRIENDS NIL - :PASS 2668758003445446799 - :PASS-LOCKED NIL - :PASS-LOCKED-WHY NIL - :CREATION 3942774377) - #S(LOOP::ACCOUNT - :USERNAME "ME" - :SEEN NIL - :LAST-POST NIL - :FRIENDS NIL - :PASS 4516159621457714044 - :PASS-LOCKED NIL - :PASS-LOCKED-WHY NIL - :CREATION 3942774136) - #S(LOOP::ACCOUNT - :USERNAME "YOU" - :SEEN NIL - :LAST-POST NIL - :FRIENDS NIL - :PASS 619654876836234945 - :PASS-LOCKED NIL - :PASS-LOCKED-WHY NIL - :CREATION 3942774072) - #S(LOOP::ACCOUNT :USERNAME "ANONYMOUS" :SEEN 3935609919 :LAST-POST NIL - :FRIENDS ("TOIS" "ME" "YOU") + :FRIENDS NIL :PASS 2335603191554807875 :PASS-LOCKED NIL :PASS-LOCKED-WHY NIL - :CREATION 3913066800)) \ No newline at end of file + :CREATION 3913066800)) diff --git a/loop.lisp b/loop.lisp index 74ed88c..d99c7e7 100644 --- a/loop.lisp +++ b/loop.lisp @@ -10,7 +10,8 @@ (defpackage #:loop (:use :common-lisp :local-time) (:import-from :lisp-unit define-test) - (:import-from :org.shirakumo.filesystem-utils directory-p list-directories) + (:import-from :org.shirakumo.filesystem-utils + directory-p list-directories list-files) (:export :main)) (in-package #:loop) @@ -777,7 +778,7 @@ ;; though, we'll not be using directories. That's a ;; problem to be studied. (let ((as (articles->integers - (remove-if #'temporary-article? (list-directories (truename g)))))) + (remove-if #'temporary-article? (list-files (truename g)))))) (sort (remove-if-not #'(lambda (x) (between? x (or from x) (or to x))) as) diff --git a/loop.nw b/loop.nw index ff1cd5c..459e7c0 100644 --- a/loop.nw +++ b/loop.nw @@ -1230,7 +1230,7 @@ even cache the overview of the group.) %% TODO ;; though, we'll not be using directories. That's a ;; problem to be studied. (let ((as (articles->integers - (remove-if #'temporary-article? (list-directories (truename g)))))) + (remove-if #'temporary-article? (list-files (truename g)))))) (sort (remove-if-not #'(lambda (x) (between? x (or from x) (or to x))) as) @@ -2605,7 +2605,8 @@ about. (defpackage #:loop (:use :common-lisp :local-time) (:import-from :lisp-unit define-test) - (:import-from :org.shirakumo.filesystem-utils directory-p list-directories) + (:import-from :org.shirakumo.filesystem-utils + directory-p list-directories list-files) (:export :main)) (in-package #:loop)