Comment by 🚀 stack

Re: "@stack it seems CL is the one to learn but I don't want to "..."
In: u/gritty

Slime on Emacs or Lem needs the CL to run a Swank server, which should be available for gcl, but who knows. And yeah, I understand you don't like Emacs, but I am not sure Lem is the way to go to get started.

Like I said, if you download Portacle you will have everything running in seconds (I just did out of curiosity), with a slightly old SBCL but good enough for Australia, as they say.

BTW, if you are running your own server, I am pretty sure there is a CL gemini server, and you don't need 'cgi' -- you run all kinds of in-process stuff! You can even ssh into a running server and recompile functions or alter variables!

🚀 stack

Jan 21 · 11 months ago

5 Later Comments ↓

🚀 stack · 2025-01-21 at 04:34:

The problem with scripting SBCL is that you will have something like 100MB reserved (a lot less used), and even compressed the app is going to be like 15MB. I suppose these days it may be ok, since JS backends routinely take 50MB for a 'hello world'...

Another way to do it if you don't control the server is to spin up SBCL with a server process that listens on a socket or something and stays up permanently, and your cgi is a simple connector that reads data and writes it to the lisp server (and reads from it). Your logic will be in Lisp, and CGI tiny.

🍀 gritty [OP] · 2025-01-21 at 11:55:

ohh interesring! that may be an option. yeah slime wouldn't run with .emacs set to gcl. not sure why. sbcl worked fine.

🚀 stack · 2025-01-21 at 13:57:

you have to run a few magic lines on the lisp side to install and start-up the swank server, even for SBCL... You can't just 'set' a chosen CL without it. However. you can manually start it on a socket from CL and connect Slime to it, I can help you with that if you can't find examples

But yeah, running a Lisp Gemini server is by far the best option, and a Lisp daemon with CGI requestors is second best if you have no permission to open outside sockets.

🍀 gritty [OP] · 2025-01-21 at 20:14:

This blog post was very helpful and was in line with what you've been saying below. I'd recommend to others starting out.

— A Road to Common Lisp
🍀 gritty [OP] · 2025-03-07 at 02:30:

I'm getting ahead of myself but I want to make an scgi application since CL isn't good for scripting. there's CL-SCGI but what I really want is what it depends on, a unix socket library. I've tried a few and get both the gemini server(molly brown) and the cl scgi app to connect to a socket but I can't read or send data over that stream. I have a few more things to try, but that's where I'm at: molly sending a formatted scgi client request and literally printing the request stream to the console in cl.

Original Post

🍀 gritty

@stack it seems CL is the one to learn but I don't want to "waste" time learning that when I can't use it here for CGI. been reading up on Janet unsure it's a good intro to Lisp. what do you think?

💬 20 comments · Jan 20 · 11 months ago