squash
This commit is contained in:
parent
7b73c02636
commit
ec035d8af9
5 changed files with 76 additions and 54 deletions
14
Makefile
14
Makefile
|
@ -11,13 +11,13 @@ clean:
|
||||||
rm -f *.pdf *.out *.aux *.log *.fls *.fdb_latexmk loop loop.tex
|
rm -f *.pdf *.out *.aux *.log *.fls *.fdb_latexmk loop loop.tex
|
||||||
|
|
||||||
build: loop.lisp loop.asd scripts/build-exe.lisp
|
build: loop.lisp loop.asd scripts/build-exe.lisp
|
||||||
# mkdir -p ~/quicklisp/local-projects/loop
|
mkdir -p ~/quicklisp/local-projects/loop
|
||||||
# cmp loop.asd ~/quicklisp/local-projects/loop/loop.asd || \
|
cmp loop.asd ~/quicklisp/local-projects/loop/loop.asd || \
|
||||||
# cp loop.asd ~/quicklisp/local-projects/loop
|
cp loop.asd ~/quicklisp/local-projects/loop
|
||||||
# cmp loop.lisp ~/quicklisp/local-projects/loop/loop.lisp || \
|
cmp loop.lisp ~/quicklisp/local-projects/loop/loop.lisp || \
|
||||||
# cp loop.lisp ~/quicklisp/local-projects/loop
|
cp loop.lisp ~/quicklisp/local-projects/loop
|
||||||
# cp loop.asd ~/quicklisp/local-projects/loop
|
cp loop.asd ~/quicklisp/local-projects/loop
|
||||||
# cp loop.lisp ~/quicklisp/local-projects/loop
|
cp loop.lisp ~/quicklisp/local-projects/loop
|
||||||
sbcl --script scripts/build-exe.lisp
|
sbcl --script scripts/build-exe.lisp
|
||||||
|
|
||||||
install: loop
|
install: loop
|
||||||
|
|
75
README
75
README
|
@ -29,11 +29,13 @@ install it as a local project. Go to
|
||||||
|
|
||||||
and say
|
and say
|
||||||
|
|
||||||
git clone https://git.antartida.xyz/loop/srv
|
$ git clone https://git.antartida.xyz/loop/srv loop
|
||||||
cd srv
|
$ cd loop
|
||||||
make build
|
$ 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---
|
--8<-------------------------------------------------------->8---
|
||||||
$ ./loop --help
|
$ ./loop --help
|
||||||
|
@ -69,9 +71,38 @@ quit
|
||||||
205 Good-bye.
|
205 Good-bye.
|
||||||
--8<-------------------------------------------------------->8---
|
--8<-------------------------------------------------------->8---
|
||||||
|
|
||||||
So now have your system run your TCP server of choice. For instance,
|
It's time to choose a directory from which LOOP will run. Say you
|
||||||
if you're using djb's tcpserver and would like LOOP to listen on port
|
choose ~/loop. Then say
|
||||||
1024, 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---
|
--8<-------------------------------------------------------->8---
|
||||||
$ tcpserver -v -HR 0.0.0.0 1024 ./loop -s
|
$ tcpserver -v -HR 0.0.0.0 1024 ./loop -s
|
||||||
|
@ -91,13 +122,29 @@ quit
|
||||||
Connection closed by foreign host.
|
Connection closed by foreign host.
|
||||||
--8<-------------------------------------------------------->8---
|
--8<-------------------------------------------------------->8---
|
||||||
|
|
||||||
Directory daemon/ in LOOP's source code has sample scripts to use with
|
Directores daemon/ and daemon-tls/ in LOOP's source code has sample
|
||||||
djb's tcpserver and daemontools. If you never done this, it will be
|
scripts to use with djb's tcpserver and daemontools. If you never
|
||||||
better education if you learn to use daemontools and ucspi-tcp before
|
done this, it will be better education if you learn to use daemontools
|
||||||
going live with LOOP community. It's easy and fun.
|
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.
|
||||||
|
|
|
@ -1,36 +1,9 @@
|
||||||
(#S(LOOP::ACCOUNT
|
(#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"
|
:USERNAME "ANONYMOUS"
|
||||||
:SEEN 3935609919
|
:SEEN 3935609919
|
||||||
:LAST-POST NIL
|
:LAST-POST NIL
|
||||||
:FRIENDS ("TOIS" "ME" "YOU")
|
:FRIENDS NIL
|
||||||
:PASS 2335603191554807875
|
:PASS 2335603191554807875
|
||||||
:PASS-LOCKED NIL
|
:PASS-LOCKED NIL
|
||||||
:PASS-LOCKED-WHY NIL
|
:PASS-LOCKED-WHY NIL
|
||||||
:CREATION 3913066800))
|
:CREATION 3913066800))
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
(defpackage #:loop
|
(defpackage #:loop
|
||||||
(:use :common-lisp :local-time)
|
(:use :common-lisp :local-time)
|
||||||
(:import-from :lisp-unit define-test)
|
(: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))
|
(:export :main))
|
||||||
|
|
||||||
(in-package #:loop)
|
(in-package #:loop)
|
||||||
|
@ -777,7 +778,7 @@
|
||||||
;; though, we'll not be using directories. That's a
|
;; though, we'll not be using directories. That's a
|
||||||
;; problem to be studied.
|
;; problem to be studied.
|
||||||
(let ((as (articles->integers
|
(let ((as (articles->integers
|
||||||
(remove-if #'temporary-article? (list-directories (truename g))))))
|
(remove-if #'temporary-article? (list-files (truename g))))))
|
||||||
(sort (remove-if-not
|
(sort (remove-if-not
|
||||||
#'(lambda (x) (between? x (or from x) (or to x)))
|
#'(lambda (x) (between? x (or from x) (or to x)))
|
||||||
as)
|
as)
|
||||||
|
|
5
loop.nw
5
loop.nw
|
@ -1230,7 +1230,7 @@ even cache the overview of the group.) %% TODO
|
||||||
;; though, we'll not be using directories. That's a
|
;; though, we'll not be using directories. That's a
|
||||||
;; problem to be studied.
|
;; problem to be studied.
|
||||||
(let ((as (articles->integers
|
(let ((as (articles->integers
|
||||||
(remove-if #'temporary-article? (list-directories (truename g))))))
|
(remove-if #'temporary-article? (list-files (truename g))))))
|
||||||
(sort (remove-if-not
|
(sort (remove-if-not
|
||||||
#'(lambda (x) (between? x (or from x) (or to x)))
|
#'(lambda (x) (between? x (or from x) (or to x)))
|
||||||
as)
|
as)
|
||||||
|
@ -2605,7 +2605,8 @@ about.
|
||||||
(defpackage #:loop
|
(defpackage #:loop
|
||||||
(:use :common-lisp :local-time)
|
(:use :common-lisp :local-time)
|
||||||
(:import-from :lisp-unit define-test)
|
(: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))
|
(:export :main))
|
||||||
|
|
||||||
(in-package #:loop)
|
(in-package #:loop)
|
||||||
|
|
Loading…
Reference in a new issue