Tagged as lisp, webassembly Written on 2025-08-21 by Daniel Kochmański Table of Contents Scripting a website with Common Lisp JS-FFI – low level interface LIME/SLUG – interacting from Emacs Injecting CL runtime in arbitrary websites Current Caveats Funding Web Embeddable Common Lisp is a project that brings Common Lisp and the Web Browser environments together. In this post I'll outline the current progress of the project and provide some technical details, including current caveats and future plans. It is important to note that this is not a release and none of the described APIs and functionalities is considered to be stable. Things are still changing and I'm not accepting bug reports for the time being. The source code of the project is available: https://fossil.turtleware.eu/wecl/. Scripting a website with Common Lisp The easiest way to use Common Lisp on a website is to include WECL and insert script tags with a type "text/common-lisp". When the attribute src is present, then first the runtime loads the script from that url, and then it executes the node body. For example create and run this HTML document from localhost: <!doctype html> <html> <head> <title>Web Embeddable Common Lisp</title> <link rel="stylesheet" href="https://turtleware.eu/static/misc/wecl-20250821/easy.css" /> <script type="text/javascript" src="https://turtleware.eu/static/misc/wecl-20250821/boot.js"></script> <script type="text/javascript" src="https://turtleware.eu/static/misc/wecl-20250821/wecl.js"></script> </head> <body> <script type="text/common-lisp" src="https://turtleware.eu/static/misc/wecl-20250821/easy.lisp" id='easy-script'> (defvar *div* (make-element "div" :id "my-ticker")) (append-child [body] *div*) (dotimes (v 4) (push-counter v)) (loop for tic from 6 above 0 do (replace-children *div* (make-paragraph "~a" tic)) (js-sleep 1000) finally (replace-children *div* (make-paragraph "BOOM!"))) (show-script-text "easy-script") </script> </body> </html> We may use Common Lisp that c...
First seen: 2025-08-21 12:59
Last seen: 2025-08-21 16:17