*"It is also a HTTP 1.1 server"*You may have mostly implemented one of the thi...


Add Remove

excerpt "It is also a HTTP 1.1 server" You may have mostly implemented one of the things on my list of "ridiculous things I would like to see": a forth-based web server that accepts code URLs. For example GET foo.com/2/3/+/. would return a text file containing the number '5', and GET foo.com/:/square/dup/*/; would define a new function (technically, that should be a PUT, but who cares, for a ridiculous idea?) Of course, this should follow the forth philosophy, so URLs like GET foo.com/forget/forget would work 'fine'. Connecting such a contraption to the internet might not be the brightest idea, but I think it can be made (more or less) safe by executing every request from within a highly restricted vocabulary. I would guess that's how you implemented your http request handling, but likely only for one-word URLs. If so, the rest is just a REPL that uses slashes as word separators, so it is easy to write. on 1/24/2020, 12:00:53 AM