Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - gekkonier

#1
Hi,

I haven't found any reference to it before, and I thought some of you might like it too, if you use Windows:



https://github.com/daansystems/lispide">https://github.com/daansystems/lispide



It's a very, very small lisp editor, with a built in repl for different kinds of lisp like languages.

You can download an installer too from github if you do not want to build.
#2
Hi,

I'd like to tinker a bit with the inbuilt webserver.

I managed to fire one up that serves form a directory, and logs ervery request into a file.

For this i used (command-event (fn (s)) in a httpd-conf.lsp file.

This I use with newlisp httpd-conf.lsp -http -d 80 -w ./www

In this command-event i can append-file the requests into a txt file to look what a "user" is looking for.

That all works good.



Now I would like to implement something more.



Lets say: if my request looks like this:
GET /hubert HTTP/1.1

I know i can parse the request for lets say "hubert".



But how can I "route" to a custom definition which ansers to hubert?

Lets say i have this here:


(define (my-hubert)
   (print "hello world"))


How can I "answer" with (my-hubert) if someone does a GET /hubert. Instead of a file sitting in www?



Thank you so much for your input in advance,

Gregor