GithubHelp home page GithubHelp logo

Run Common Lisp in Browser? about paip-lisp HOT 20 OPEN

norvig avatar norvig commented on August 17, 2024 6
Run Common Lisp in Browser?

from paip-lisp.

Comments (20)

ailisp avatar ailisp commented on August 17, 2024 5

Don't like the idea of JSCL, I'd expect Common Lisp compiles to WebAssembly rather than interpreted in js. I think it's possible to compile embedded common lisp or clasp with emscripten. The https://repl.it use emscripten to create client side REPL for many languages (unfortunately no CL). I'll give a try this weekend. If it doesn't work well I'll try cl-Jupyter.

from paip-lisp.

davazp avatar davazp commented on August 17, 2024 3

I am jscl author. I could give it a try to run examples in it. If some fragment doesn't work it is actually a good reason to activate the development a bit :-)

from paip-lisp.

shi-yan avatar shi-yan commented on August 17, 2024 3

I'm making a programmable blog (thinking Medium.com + Jupyter Notebook ), aiming to become a platform for interactive e-textbooks. I recently added support for Clojure Script

https://epiphany.pub/@shi-yan/Test-ClojureScript

(purely browser based, no backend)

Intro: https://epiphany.pub/@shi-yan/introduction

from paip-lisp.

pronoiac avatar pronoiac commented on August 17, 2024 3

Hello there, Hacker News!

from paip-lisp.

mishoo avatar mishoo commented on August 17, 2024 2

Slip: missing &key etc.

@norvig support for &key arguments could be achieved by redefining DEFUN and LAMBDA as macros on top of DESTRUCTURING-BIND, for which there is a fairly complete implementation. The reason I didn't do it is that (as I mentioned) it was really slow — but it could still be okay for didactical usage. More notably, however, SLip is missing LOOP, VALUES and CLOS (there's a TinyCLOS-based object system, but I wouldn't expect any real CLOS examples to work with it).

BTW I meant to say that SLip started out as a playground based on chapter 23 "Compiling Lisp" from this very book. While it remained just a playground, it was still a mind-blowing experience for me to work on it. Thank you for that chapter, and for the whole book!

from paip-lisp.

darius avatar darius commented on August 17, 2024 1

I wonder how practical it'd be to compile an interpreted Common Lisp to WebAssembly. As a preliminary, I just built CLISP for x86/Linux, and it looks like the stripped native binary and the memory image add up to a bit over 6MB:

$ ls -l lisp.run lispinit.mem 
-rw-r--r-- 1 parallels parallels 3140504 Apr  5 16:33 lispinit.mem
-rwxr-xr-x 1 parallels parallels 3195288 Apr  5 16:44 lisp.run

I tried to look up typical relative sizes for x86 binaries vs. WebAssembly, but didn't find it online.

from paip-lisp.

binarycrayon avatar binarycrayon commented on August 17, 2024

This is not exactly what you were asking: https://github.com/next-browser/next but related.

from paip-lisp.

aarvid avatar aarvid commented on August 17, 2024

JSCL is a start and still under development.

from paip-lisp.

norvig avatar norvig commented on August 17, 2024

JSCL looks promising! But not currently very active.

from paip-lisp.

DwordPtr avatar DwordPtr commented on August 17, 2024

Looks like there's at least one common lisp jupyter kernel for common lisp.

It'd still probably be a good idea to dockerize it though.

from paip-lisp.

norvig avatar norvig commented on August 17, 2024

Does anybody have experience with cl-Jupyter? https://github.com/fredokun/cl-jupyter/blob/master/about-cl-jupyter.ipynb

from paip-lisp.

arademaker avatar arademaker commented on August 17, 2024

No comments about the notebook idea ? It maybe worth to try ...

from paip-lisp.

arademaker avatar arademaker commented on August 17, 2024

@davazp it would nice to compare the jscl approach with jupyter notebooks . The Lean Theorem Prover is using a nice tool for produzing all their documentations too

https://leanprover.github.io/theorem_proving_in_lean/

Can we adapt it to run CL?

from paip-lisp.

norvig avatar norvig commented on August 17, 2024

@davazp, that would be great -- I'm looking forward to seeing what you can do.

from paip-lisp.

norvig avatar norvig commented on August 17, 2024

That seems like too much to download over a slow connection.

from paip-lisp.

inaimathi avatar inaimathi commented on August 17, 2024

Could cl-notebook be useful in this context? It's not fully browser-based, but I think it'd be possible to deploy a sandboxed instance somewhere (or even a set of on-demand instances).

from paip-lisp.

leed25d avatar leed25d commented on August 17, 2024

I have long held that Javascript is an abomination. I think that browsers should have en embedded lisp interpreter, not necessarily Common LIsp.

from paip-lisp.

mark-watson avatar mark-watson commented on August 17, 2024

I have used cl-jupyter and it worked fine for me.

from paip-lisp.

delaray avatar delaray commented on August 17, 2024

from paip-lisp.

arademaker avatar arademaker commented on August 17, 2024

Maybe https://github.com/viebel/klipse?

from paip-lisp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.