Minikotlin

minikotlin.run

94 points by frizlab 3 hours ago


wavemode - an hour ago

> One pass, all the way down to bytecode

> hands off to two of its own IRs before writing WASM-GC by hand

So it's not "one pass" lol. Do you know what a pass is?

Not that it matters - this AI is claiming "one pass" as though that's a good thing, but it's usually not. One-pass compilers can't typecheck forward references.

davidjfelix - 3 hours ago

Visibly claude produced website. No link to code.

Is the expectation that people write kotlin in their browser? How do people work this into their development workflow? Is this just a neat demo?

montroser - 3 hours ago

This is very cool! Slightly off-topic though, I miss technical people writing in their own voice about the awesome things they've built.

ptx - 23 minutes ago

The example program they give as a "specimen" doesn't compile unless you specify the generic type of the "lanes" variable explicitly. And the compiler doesn't tell you where the error is. But it does build and run once you change it to "listOf<Lane>".

(The program builds as-is in the Kotlin Playground, at least for the JVM platform; the other platforms don't seem to have kotlinx.coroutines available.)

gavinray - 2 hours ago

Seems to be missing the "why" over Kotlins native WASM support (which is very mature)

The official Kotlin playground uses WASM, for example (JVM drop down-> choose "WASM")

https://play.kotlinlang.org

Jtarii - an hour ago

Really looking forward to when we advance past the "Design — by Claude" phase.

modulovalue - 2 hours ago

I built something similar, but I managed to compile the Dart VM, its compiler and the static analyzer to wasm using emscripten:

- repo: https://github.com/modulovalue/dart-live

- demo: https://modulovalue.com/dart-live/

It's on my todo list to support compiling dart code through the wasm bundle to wasm directly. Right now it's running the dart arm simulator on the web because it supports hot reload.

I'm wondering if there are any cool use-cases that motivate having the compiler itself run in wasm. I did it mostly for fun and besides building tooling for compiler developers themselves or IDEs, I can't come up with much.

There was one guy that wanted a sandboxed environment for agents as he couldn't find anything else. A few other people used the dart live project to build playgrounds for their own packages.

Who's the target audience for minikotlin? I'm just curious.

In any case, cool project, thanks for sharing!

rf15 - 36 minutes ago

This is so clearly all LLM-generated, it hurts. That coverage page in particular is seemingly nonsense.

also check out his similar work, https://miniswift.run/ which has the same issues.

- an hour ago
[deleted]
thibaut_barrere - 42 minutes ago

It feels like we have reached the Turbo Pascal era, but only compiled to the browser.

mavamaarten - 3 hours ago

That's cool. I often write tiny blurbs of kotlin just to test out a simple algorithm. I often do this on kotlin playground because doing so inside a scratch file or test is somehow more cumbersome and slow. This ran and compiled something in 98ms on my smartphone, cool stuff.

sermah - 2 hours ago

Cool idea. I like the UI and that it compiles locally. But I don't really get what this is for. I use Kotlin Playground sometimes, but it allows me to switch Kotlin versions and compile targets, which is useful to try out new features.

bmiekre - an hour ago

Why do this?

dionian - an hour ago

would be cool if it worked with a more powerful language like scala