SchemeBBS continuation thread

1 Name: Anonymous 2017-03-24 13:24
;; torsocks guile this.scm

(use-modules (web client)
(web response)
(ice-9 receive))

(define (print p) (write p) (newline))

(define schemebbs-endpoint "http://hz27w5o3zlhptx7v.onion/schemebbs")

(define (schemebbs query)
(let ((query-string (with-output-to-string (lambda () (write query)))))
(receive (response body)
(http-post schemebbs-endpoint #:body query-string)
(unless (= 200 (response-code response))
(error "bad http response code" (response-code response)))
(with-input-from-string body read))))

(let ((v (schemebbs '(version))))
(unless (>= v 2)
(error "I only work with version 2 or higher" v)))

(print (schemebbs '(version)))
(print (schemebbs '(get 0)))
;;(print (schemebbs '(posts> 0)))

(define db-max 0)
(define db #f)

(when (access? "db.scm" F_OK)
(with-input-from-file "db.scm"
(lambda ()
(set! db-max (read))
(set! db '())
(let loop ((thing (read)))
(if (eof-object? thing)
(begin (set! db (cons thing db))
(loop (read))))))))

(print `(reading in the new posts since ,db-max))

(define newest-posts (schemebbs `(posts>= ,(+ 1 db-max))))

(print newest-posts)

(for-each (lambda (new)
(let ((new-id (cdr (assoc 'id new))))
(when (> new-id db-max)
(set! db-max new-id))))

(print `(got new posts up to ,db-max saving...))

(with-output-to-file "db.scm"
(lambda ()
(print db-max)
(when db
(for-each print db))
(for-each print newest-posts)))

(print 'done)
2 Name: Anonymous 2017-03-24 13:25
so this is a tool that 'sync's the new posts on the BBS (new since last run) into a SQL (scheme query language) file. Next up we need a nice client - there was a GUI one in racket somebody was doing but we couldn't get tor working with racket. Seems silly to have to have 2 different scheme compilers going to just view a bbs..
3 Name: Anonymous 2017-03-24 14:22
uses tor
virus warning!!
4 Name: Anonymous 2017-03-24 15:11
haha the guy whom'st'thou put it up didn't want to use clearnet incase we backtraced his ip.

let's see these goatfinger guys implement a GUI client!
5 Name: (●),   、(●) 2017-03-24 17:43
SpongeBob: A stove is a stove, no matter where you go.
Mr. Krabs: A patty is a patty, that's what I say.
SpongeBob: A grill is a grill, this is surely so...
Mr. Krabs: And fries should be fries either way!
SpongeBob: But this grill is not a home, this is not the stove I know...
Mr. Krabs: I would trade it all away if you'd come back to stay...
Mr. Krabs and SpongeBob: This kitchen's not the same without you!
Mr. Krabs: It's just a greasy spoon,
SpongeBob: Just a greasy spoon,
Mr. Krabs and SpongeBob: Without you...
6 Name: Mr. Likes To Sage Threads 2017-03-24 18:56
7 Name: Anonymous 2017-06-25 06:18
8 Name: Anonymous 2018-03-20 01:18
Interesting project. Are there any more source files I'm not aware of? For the client this could be used
9 Name: Anonymous 2018-03-20 16:03
10 Name: Anonymous 2018-03-22 16:42
a few years ago? i was working on a gui client for schemebbs
i forgot to finish it though, here is what i wrote if anyone wants to work on it

Leave this field blank: