jscl-project / jscl

A Lisp-to-JavaScript compiler bootstrapped from Common Lisp

Home Page:https://jscl-project.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to use SWANK and work with JSCL running in the browser from the Emacs?

svetlyak40wt opened this issue · comments

Is it possible to use SWANK and work with JSCL running in the browser from the Emacs?

Not right now. I don't know if anyone has tried this. It would be pretty neat though.

I am not very familiar with swank, but I assume slime expects it to listen in a tcp port. So we would need some tcp <-> websocket proxy.

Looking at swank, it seems they have one file per implementation and backend.lisp. The smallest implementation-specific file is about 700 lines, I'm not sure how much is the minimal that it can be provided to use slime with it.

For the generic backend.lisp, I think jscl is probably pretty close to be able to run it. I saw for example deftype, which we don't support yet. But we probably can add a very small subset of it to make it work.

It would be a fun project :-) I can try to give it a quick try to see how much work it would be.

This would be great!

commented

It would be a fun project :-) I can try to give it a quick try to see how much work it would be.

Approximately 6-10 full time days.
It's worth it ?
It is cheaper to screw the CodeMirror to the WEB-REPL and immediately compile from it.

I think it is :-) but that is up to the person who would have the time to spend on it.

A backend for the Node target would probably be more similar to the existing ones. And it is something pretty useful to have (support for tcp sockets). That would make the web version closer, just a the websocket proxy away.

commented

Generally agree.
There are two ways - web browser and electron.
I'm lean towards to electron.
Question - where to find the two Last Boyscout to implement these versions?

I'm doing some work here: #441