graalvm

2025-03-29T16:46:25.472509Z

That's nice. I might be missing something but what's the point? Is anything really using web assembly? I've seen it raved about but it doesn't seem it's actually used in practice?

Ingy döt Net 2025-03-29T20:47:55.187269Z

Well for one thing (as I understand it) ClojureScript needs the JVM to compile code. If the Clojure jar compiled to Wasm, Then it could be done in the browser. Or in Python. Or...

Ingy döt Net 2025-03-29T20:53:59.764719Z

I'm not pushing for or against wasm at this point. But I think newer technologies shouldn't be written off because they're not popular yet! 😄

Ingy döt Net 2025-03-29T21:01:30.769339Z

It might be a fun exercise to see how much of clojure you need to eliminate to get it to compile, and if it could possibly be done at all.

Ingy döt Net 2025-03-29T21:03:36.800449Z

from one pov, clojure is just a shell script that runs java on a jar file, right?

Ingy döt Net 2025-03-29T21:04:33.296409Z

and native-image is just a program that converts a jar to some executable form...

Ingy döt Net 2025-03-29T21:04:51.254069Z

maybe worth playing around

2025-03-29T21:09:38.985539Z

Oh ya, I'm totally excited that Clojure might also be able to target WASM. I think maybe I was realizing at the same time that, I've heard so much of WASM, and yet I've still not seen any use-case for it or real use of it.

Ingy döt Net 2025-03-29T21:10:44.326929Z

Right, it's a promising solution looking for real problems

2025-03-29T21:11:18.358679Z

But, the idea that the ClojureScript compiler could then run in the browser is really interesting.... Maybe we could get better REPL experience then.

2025-03-29T21:12:16.528399Z

My current take is that, yes it allows many programs to run in the browser, but the size of their bundle it really large, so in practice, you don't want a website shipping WASM. But maybe I'm wrong.

Ingy döt Net 2025-03-29T21:14:15.825779Z

I've been looking into wasm for past couple weeks, not at the browser runtime, but loading wasm modules is YS (sci).

Ingy döt Net 2025-03-29T21:14:46.561149Z

It's about the same as loading them from any other langauge.

Ingy döt Net 2025-03-29T21:15:20.431399Z

wasmtime has bundles for a bunch of languages.

Ingy döt Net 2025-03-29T21:16:31.040429Z

also I just arrived to kubecon in london, and I think most of the fermyon team will be here. (server side wasm company)

Ingy döt Net 2025-03-29T21:17:36.744349Z

but to your point, there's no existing registry of useful wasm modules or package managers

Ingy döt Net 2025-03-29T21:18:22.174499Z

I'm thinking about starting something up in that regard...

2025-03-29T21:19:05.104489Z

I've only heard of it used for like, I need a bare-metal performance algorithm in my web app, so that part I will write in C++/Rust and compile to WASM, and then use it from JS. But if you try to replace JS with another garbage collected or scripted runtime compiled to WASM, you'll get a huge bundle size, and probably worse performance than JS itself. Since you'll be bundling a whole language runtime in WASM alongside it.

Ingy döt Net 2025-03-29T21:19:17.419519Z

what if clojure libs could be compiled to wasm and used in any language

Ingy döt Net 2025-03-29T21:19:53.643849Z

nod

2025-03-29T21:20:18.712509Z

Hum... ya I have heard of WASM as like a universal VM. But it lacks Garbage Collection no? Which is the main blocker? And then, is it better than JVM? Graal already support Python, Ruby, and so on.

Ingy döt Net 2025-03-29T21:21:02.266159Z

I think wasmgc is fully specced and implemented in places

Ingy döt Net 2025-03-29T21:22:30.851059Z

Yeah it's prolly not gonna beat the JVM out of the gate, right?

Ingy döt Net 2025-03-29T21:22:45.583499Z

But the JVM has a 30 year head start!

Ingy döt Net 2025-03-29T21:23:47.170339Z

The JVM wasn't always good, iirc...

Ingy döt Net 2025-03-29T21:24:23.001399Z

It was basically a wasm. A solution looking for problems

Ingy döt Net 2025-03-29T21:26:29.289159Z

> Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time. — Wikipedia (TIL)

Ingy döt Net 2025-03-29T21:28:27.210659Z

More on point... > At the start of the Java platform's lifetime, the JVM was marketed as a web technology for creating https://en.wikipedia.org/wiki/Rich_web_application.

Ingy döt Net 2025-03-29T21:30:26.466129Z

@didibus thanks for helping me stay awake until the time I wanted to fight this jetlag.

Ingy döt Net 2025-03-29T21:30:34.260569Z

night night

2025-03-29T21:31:53.215639Z

GN