Co

Common Lisp running natively over WebAssembly for the first time

Hacker News

Common Lisp running natively over WebAssembly for the first time

A month or so ago, I ported a Common Lisp implementation (npt) to WebAssembly to make a silly blog post, because I was bored and have a lot of time on my hands to waste with things like this (I don't have a job, and because I have next to no experience, these meaningless, silly projects tend to fill what time I do have). This is significant as it's the first time Common Lisp in particular has ever been hosted on it; wasm has a few poor decisions in its design that make it less-than-conducive to being a target for Common Lisp, and a lot of the more interesting implementations require an implementation to already be on the platform for bootstrapping purposes. My previous attempts using other implementations haven't gone so well, despite throwing a lot of time at it (as an example, I have a fork of Eclipse Common Lisp, a defunct implementation from the 1990s, sitting on my disk with a few hundred lines of changes that I finally got to successfully compile and run a handful of very basic expressions, but it blows up when you try and define anything). In comparison, I was pleasantly surprised by how little I had to do, even though I did end up scrapping loads of lines of my own changes to npt in the process as I got a handle on how to make it work acceptably. The Emscripten toolchain and I don't get along, partially because I don't like inlining ECMAScript into my C and vice-versa, so it's little more than a neat little demo right now. You can load slightly more complex programs into it by hijacking the "imp" ECMAScript function every few hundred milliseconds with strings containing complete forms (this is essentially a batch processor, so there's no interactivity that allows it to wait while you decide what the rest of a form should be). Only one at a time, though. It's not that fancy. If you mess up at all, even just a little error, it will crash. This is by design; I disabled the debugger. It's a giant hack, and the hack I eventually decided on left it impossible to have a debugging experience, with the benefit of getting to use a closer-to-unmodified npt. This could be more useful, if I spent more time on it, but it's more fun if it's just a demo. I hope you enjoy the toy I made for you. https://en.wikipedia.org/wiki/Batch_processing If you don't know what forms are in the context of Common Lisp: http://www.lispworks.com/documentation/HyperSpec/Body/03_aba... http://www.lispworks.com/documentation/HyperSpec/Body/26_glo...

Share card

Actual performance

97points
64comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
86%86% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
86%86% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Product HuntOn track for Day 1 leaderboard · Strong signals: context, activity, using · Missing: mac, agents, macos
64%64% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoStrong fit for a featured deal · Strong signals: platform, host · Missing: plus, intuitive, reviews
52%52% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: month · Missing: mobile apps, ios, personal
39%39% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

He
Heroku buildpack for Common Lisp53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Heroku buildpack for Common Lisp

Hacker News3
cl
cl-avro – A Common Lisp implementation of Avro58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

cl-avro – A Common Lisp implementation of Avro

Hacker News1
Cl
Clive/Tovero – Common Lisp Modeling63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Clive/Tovero – Common Lisp Modeling

Hacker News1
TorchTPU
TorchTPU79%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Running PyTorch Natively on TPUs at Google Scale

Product Hunt+105Open Source
Ph
PhoneCode: Local-First ADE Running Natively on Android38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PhoneCode: Local-First ADE Running Natively on Android

Hacker News1
Po
PoC running Docker containers on WSL, natively40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PoC running Docker containers on WSL, natively

Hacker News1
Th
This – standardized project tool for running common tasks53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

This – standardized project tool for running common tasks

Hacker News1
Co
Common code smells55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Common code smells

Hacker News6
Do
Docker registry running natively on iPhone (as part of RepoFlow)40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Docker registry running natively on iPhone (as part of RepoFlow)

Hacker News1
So
Some common web-attacks52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Some common web-attacks

Hacker News10