>>200
Unfortunately, 90% of MIT/GNU Scheme's users are MIT professors, CS students and MIT/GNU Scheme developers. Most bug reports are filed by the former group.
Also, I'm having a bit of trouble getting SchemeBBS to work. HTML files don't seem to get successfully generated from sexp files.
schemebbs % ls data
ls: cannot access 'data': No such file or directory
schemebbs % ./create-boards.sh foo
schemebbs % tree data
data
├── html/
│ └── foo/
│ └── index
└── sexp/
└── foo/
└── index
schemebbs % curl localhost:8080/foo
<!DOCTYPE HTML PUBLIC "ISO/IEC 15445:2000//DTD HyperText Markup Language//EN">
[truncated]
<P class="footer">bbs.scm + <A href="https://www.gnu.org/software/mit-scheme/">MIT Scheme</A> + <A href="https://mitpress.mit.edu/sites/default/files/sicp/index.html">SICP</A> + Satori Mode</P></BODY></HTML>
schemebbs % curl -X POST localhost:8080/foo/post -d 'titulus=test&epistula=test'
curl: (52) Empty reply from server
schemebbs % tree data
data
├── html/
│ └── foo/
└── sexp/
└── foo/
├── 1
├── index
└── list
schemebbs % curl localhost:8080/foo
curl: (52) Empty reply from server
The last curl
call causes SchemeBBS to log the following a bunch of times:
-> evaluating handler: #[compound-procedure 17]
Error code 0x4 (system-call).
Procedure was: [PRIMITIVE NEW-FILE-OPEN-INPUT-CHANNEL]
# of arguments: 2
Return code: internal-apply
>>201
You need to patch the file http-syntax.scm
(and recompile mit-scheme). To quote the repo:
The file runtime/http-syntax.scm follows the RFC 2616 which requires that the value of the Location header be an absolute URI. The standard has been replaced (see RFC 7231 section 7.1.2.) and a relative URI is now allowed.
Recoding the redirection after posting would mean SchemeBBS not being domain agnostic. I know patching makes the install cumbersome, I'll try to get both patches incorporated in MIT Scheme 10, http-syntax and httpio (now http-io) because those two libraries have bugs and haven't changed (I just checked).
If you don't want to recompile MIT Scheme, there's a pre-compiled binary for x86_64 here: https://textboard.org/static/mit-scheme-9.2/
>>201-202
Assuming you have already installed MIT Scheme 9.2
curl -O http://ftp.gnu.org/gnu/mit-scheme/stable.pkg/9.2/mit-scheme-9.2.tar.gz # <- you need to fetch the MIT Scheme source, not the Unix binaries
curl -O ttps://gitlab.com/naughtybits/schemebbs/-/raw/master/mit-scheme-9.2_patches/patch-runtime_http-syntax.scm
tar xzvf mit-scheme-9.2.tar.gz
patch -p0 < patch-runtime_http-syntax.scm
cd mit-scheme-9.2/src
./configure
make
sudo make install
>>202-203
I see now! My mistake was fetching the binary tarball instead of the sources. Thanks for the heads up.
I'm afraid the problem persists even after properly rebuilding from patched source. Now instead of an empty response, a successful POST returns That was SICP quality!
, but index
and 1== are still empty (
list== works). SchemeBBS no longer logs errors, however.
>>205
HTML is not generated after a post. It's generated when a first client requests it.
>>206
Yes but there's the problem: requesting it does nothing.
>>207
Please checkout the latest commit from https://gitlab.com/naughtybits/schemebbs
I've just tested it and everything is fine. It was strange because I couldn't get it to work either and I installed SchemeBBS without a problem a few days ago.
There were two issues (depending on which version you were using)
At one point httpio.scm was intended to be patched just like http-syntax.scm
= but this change was reversed. You need the file deps/httpio.scm
and the line that loads the correct file. It fixes a bug in the dist httpio.scm
where GET requests can't have an empty body (?) Be careful to load it before deps/server.scm
(load "deps/httpio")
(load "deps/server")
(or you can use the patched binaries provided in >>202 which doesn't need httpio.scm as a dependency)
The second error baffled me. There's a stub for an antispam system that was never implemented because I had problems with mit-scheme cryptographic functions. It's just a dummy function that loads the file hash
but if that hash isn't there, SchemeBBS refuse to serve requests. This one was hard to guess and I'm sorry for making you losing time.