Ask HN: Languages Designed for WASM?

5 points | by 90s_dev 5 days ago ago

12 comments

  • 90s_dev 5 days ago

    I am leaning towards curlywas strangely enough. It just feels like the right language somehow. Not too low level to be boring to write, not too high level to take the fun out of writing low level code, not too old to consider it abandoned, docs relatively thorough and thoughtful, just enough syntax to make it familiar to C programmers and become a good stepping stone into writing C (maybe).

    • 90s_dev 5 days ago

      One thing it's missing is arrays/structs as a way to access memory more conveniently, which I think is probably a must-have, though I bet I could add them on top of this language with how small it looks. Well, except that it's written in Rust and I don't understand Rust despite trying many times.

  • Lio 4 days ago

    I'd not heard of Virgil before but Ruby itself can run on WASM:

    https://github.com/ruby/ruby.wasm

    (That's not strictly "designed for" as in the question but I thought it might be interesting all the same).

  • jedisct1 5 days ago

    Zig.

    Zig produces extremely small, optimized WebAssembly modules. The language includes WebAssembly-specific built-ins like @wasmMemoryGrow, and its entire standard library offers first-class support for WebAssembly.

    Zig can also optimize code for specific WebAssembly runtimes, making it, in my opinion, the most efficient WebAssembly compiler available today.

    • 90s_dev 5 days ago

      I forgot to mention that I'd like it to be embeddable. I was in the zig subreddit and asked about that, they said basically no it's not possible to embed it, the best that can be done is bundle zig with my app and run it as a subproc to compile zig code, but then I have to do ipc and shared memory and it's a whole other bundle of worms.

  • Alex-Programs 5 days ago

    This looks fun. I don't have any specific suggestions - I've always used WASM with Rust - but I wish you luck with your project!

    P.S. You might have more success with replies on Reddit. HN is very all-or-nothing.

    • 90s_dev 4 days ago

      Tried the reddit thing, funny story. I tried to post to the wasm sub and it said it was restricted. I posted to webdev and they said maybe try posting it at the programminglanguages sub. So I tried there and they deleted it! I don't understand anyone anymore.

      • Alex-Programs 3 days ago

        Classic Reddit. IRC, perhaps? :)

        • 90s_dev 3 days ago

          Does anyone still use IRC? I thought freenode died?

          • Alex-Programs 2 days ago

            There's a successor, I can't remember the name. You could also try Matrix or Discord?

            • 90s_dev 2 days ago

              The internet is too big, it didn't used to be this way :(

    • 90s_dev 5 days ago

      Thanks I'll give it a try.