Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Do it [SchemeBBS]

Name: Anonymous 2015-05-25 10:11

Can we fucking wake up here sheeple? We need a SchemeBBS. We need to restore all of prog.db in it. This regex crap the admin does is no good right now for the job.

Name: Anonymous 2015-05-25 10:23

,______ ___ ___ ____.,
/* ' ' ' \_
| \
- ~ ~lmbd
| \
- |
/ \
- ________________________ \
. _ _/ \_ \ __.,._
. \.., / \,. *__/ \
'* / *
/ | /
\_ ,._.#####.__. .___#####._,. /- -.-
*,==| <._# )> vvvv <. # )> |==#" \
/ | | | | \ *
^_ | .,-* / \ | / /
/_ /\__________/ \_________/ - |
/ (__ __ ) | / \__,
| ** \ / " /.
" / \ \_- / /
\ / / v |
- | /
\ ,-''"''--"''"'-.. / \
\ \.,.-,.,.--,.../ |
\_ |
\_ _____ /.
.-/ <>>>____,.,..,____/ ___ / \
,./ \ .
,.*/ \ |\
* * \ /\
,.___/ | \ / |

\
| -- G. J. Sussman

Name: Anonymous 2015-05-25 11:17

>>1
Scheme is not webscale. The recommended LISP to use for Web Apps is JavaScript nowadays.

Name: Anonymous 2015-05-25 13:48

lol...

U MENA HASKAL BBS?

Name: Anonymous 2015-05-25 14:00

That sounds great OP, how much have you written so far?

Name: Anonymous 2015-05-26 8:51

>>3
What is gaylisp

Name: Anonymous 2015-05-26 8:54

>>3
implying such a BBS will ever see large traffic.

Name: Anonymous 2015-05-26 9:14

Write a minimal BBS in C using and CGI.

Name: Anonymous 2015-05-26 12:14

Challenge: write a ``Minimal BBS'' program in Lambda Calculus.

Name: Anonymous 2015-05-26 12:51

>>7
Whom are you quoting?

Name: Anonymous 2015-05-26 14:45

Let's discuss BBS design for a bit here. Having plain text threads that posts get appended to is simply god-awful. Why not have each individual post get its own file?

Name: Anonymous 2015-05-26 15:01

>>11
Why is it god-awful and why would individual files be better?

Name: Anonymous 2015-05-26 15:54

I think we all can agree that web is shiet, but a convenient shiet at times. Therefore http should be only one of many interfaces. CL-BBS (/clēbs/) should be actually a NNTP server. NNTP is a simple decentralized protocol that was designed for this kind of things.

Name: Anonymous 2015-05-26 16:20

>>11
Isn't that how Shiichan does it?

Name: Anonymous 2015-05-26 16:21

>>12
Because we are constrained by the HTML/JS/CSS/BBCode, the layout of the website, et cetera. Consider this:

Progrider should serve only the raw content of the posts, on demand of the client, which may or may not be a web browser. I am talking about a programmable programming BBS (that makes sense for us, doesn't it?).

It's very troublesome to change the order the threads are shown, for example. Maybe someone wants to view threads per creation date instead of last post. It's also stupid that you have to scroll 100 screens in order to find the 5 latest posts that have been made to this website.

That's why I believe individual posts would be better. It would also get rid us of the "whom are you quoting" dude. Imagine, if >>4 meant literally a single post ID. Threads would literally be connected graphs.

What if someone wants to write an OpenGL client where you are a little spaceship travelling in space, and posts would be stars? Of course this is obviously not handy to use, but it is sure an impressive visualizaton of the bbs. Maybe someone wanted to write an emacs script so that he/she can read progrider from inside emacs. As it is, it's god-awful to do this. What if we want to get rid of BBCode? That's easy too. All you have to do is write a client where you parse & visualize posts differently.

Of course it all rests on the fact each post is a different file, which means you need some protocol for rapid GETs (i.e. to view a thread of 1000 posts would mean to download 1000 files). I'm not an expert but I guess nginx is not made for this.

Seriously, don't we need something more programmable than this old piece of shit?

Name: Anonymous 2015-05-26 16:36

>>15
I agree that raw data should be served somewhere so we don't have to use a crappy web interface. Ideally, you could query new posts since $DATE, so you could maintain a local copy and display it however you wish, /prog/ isn't that big after all.

The rest is complete nonsense and unrelated to whether posts are files or not. You are proposing some unholy hybrid abomination between Reddit and a mailing list.

It would also get rid us of the "whom are you quoting" dude.
Kill yourself.

Name: Anonymous 2015-05-26 16:38

>>16
Whom are you quoting?

Name: Anonymous 2015-05-26 17:44

>>15
lets code this in racket? we could meet on the progrider irc?

Name: Anonymous 2015-05-26 17:52

>>18
I'm game

Name: Anonymous 2015-05-26 18:21

Why not just make an API? It can be in JSON format or something similar which can then be parsed in your programming language of choice. After that, you can interpret or do whatever else you want with it. Also, the "who are you quoting" meme needs to die.

Name: Anonymous 2015-05-26 18:37

#### SchemeBBS: protocol version 1

## Introduction: The SchemeBBS server works as a regular TCP server. It is communicated to and responds with s-expressions.

## Errors
If a query fails the server well return (error <e>) where the form e contains some information about the problem.

## Posts: Posts are assoc lists of the following form:

((id . <int>)
(date . <date>)
(reply . <int or #f>)
(post . <string>))

all these fields must be present except reply, which is optional.
clients should ignore extra unknown fields.

## Commands:

(version) ;=> 1

(get <int>) ;=> returns the post of that id or (error "No such post") if there is no post of that id.

(post <assoc-list>) ;=> the assoc list should be a post without the date, if a client sends date it will be ignored. The server should return the post id on success.

(posts> <int>) ;=> return a list of all posts whose id is larger in ascending order of post id.

Name: Anonymous 2015-05-26 18:43

>>20
And making a script that interacts with said API would be the rite of passage for every potential /prog/lodite? Great! I've always wanted this place to be filled with appers and web devs!

Name: Anonymous 2015-05-26 18:55

>>22
/prog/lodyte

high-five

Name: Anonymous 2015-05-26 19:01

Here's a really trivial client repl type thing which might be useful for testing a server

#lang racket
(require racket/tcp)

(let-values (((in out) (tcp-connect "localhost" 7777)))
(let loop ()
(let ((command (read)))
(displayln command out)
(flush-output out)
(let ((form (read in)))
(displayln form)
(loop)))))

Name: Anonymous 2015-05-26 19:03

>>21
what should happen if someone replies to a post that doesn't exist (yet)?

Name: Anonymous 2015-05-26 19:07

>>25
Nothing. GETing that post would make the server respond with an error. Clients don't need to GET such posts since they can know the last post id.

Name: Anonymous 2015-05-26 19:21

#lang racket

(define (go)
'yep-it-works)

(define (error e)
e) ;; for now

(define (version)
1)

(define post-count 0)

(define (index)
post-count)

(define post-list null)

(define (get id)
(memf (lambda (post) (assoc post 'id))
post-list))

; ((id . <int>)
; (date . <date>)
; (reply . <int or #f>)
; (post . <string>))

;; make-post creates the server post from the client post
(define (make-post post)
(list
(cons 'id (index))
(cons 'date (current-seconds))
;; no (reply . <int>) yet
(assoc 'post post)))

;; post takes the server post and simply appends it to post-list
;; also incrementing post-count
(define (post alist)
(begin
(set! post-list
(cons (make-post alist)
post-list))
(set! post-count (+ 1 post-count))))

Name: Anonymous 2015-05-26 19:29

>>27
get fixed
(define (get id)
(car
(memf (lambda (post) (= id (cdr (assoc 'id post))))
post-list)))

Name: Anonymous 2015-05-26 19:36

>>27-28
define
define
define

Just use def, ya faggots.

Name: Anonymous 2015-05-26 19:43

>>29
but we are defining things, not deffing things

Name: Anonymous 2015-05-26 20:01

the easiest way to do this is to write a fastcgi wrapper around some embeddable scheme you're complicating things, just use SIG alert and fork to timeout and limit resources

Name: Anonymous 2015-05-26 20:09

>>31
Whom are you quoting?

Name: Anonymous 2015-05-26 20:14

>>13
CL-BBS (/clēbs/)
Do you also pronounce NNTP "neenootup"? Moron.

Name: Anonymous 2015-05-26 20:16

>>15
It would also get rid us of the "whom are you quoting" dude
There's a better solution: you could stop being an meme-spewing imageboarder. Hard to believe there was another solution, I know.

Name: Anonymous 2015-05-26 20:31

Here's some server code: http://pastie.org/10208782

now we just need a little interpreter to connect between this and >>27

Name: Anonymous 2015-05-26 22:29

Heres a rough explanation

a client connects to the server
then it just sends s-expression in plaintext (e.g. (version) to find server version, (post "blah blah") t opost a message)
and the server replies in plaintext
its essentialy a remote REPL, where your limited to very basic text board functions (listing posts, posting etc.) not general computation

Name: Anonymous 2015-05-26 22:33

>>36
no, your limited

Name: Anonymous 2015-05-26 23:04

>>37
what about my limited?

Name: Anonymous 2015-05-27 1:18

> (display '(ayy "goo tee"))
(ayy goo tee)
> (print '(ayy "goo tee"))
'(ayy "goo tee")
> (write '(ayy "goo tee"))
(ayy "goo tee")


lesson learned: we need to use WRITE.

client fixed up. Server should appear on the fossil repo soon.

Name: Anonymous 2015-05-27 2:14

I put everyone's code and the specification together with a few simple changes and made a working prototype. It's in the progrider fossil repo at https://progrider.org/fossil/tree?ci=tip&name=schemebbs .

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List