Live data from Hacker News

Moonbit: Fast, compact and user friendly language for WebAssembly

moonbitlang.com

81–90 of 162 posts

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#81
post #8

Earlier quoted context omitted.

With a bit more patience you would have seen that it loads up VSCode for web, which takes a while.

Wow a full 60 seconds though? Loads in a few seconds on github.dev Loads immediately on mobile though

hug of death?

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#82

Earlier quoted context omitted.

These are the usual questions I seek answers to first when seeing a new programming language: - What does writing asynchronous code look like - Will it have any novel or less mainstream features, e.g. - Algebraic effects [1] - Contexts/Capabilities [2] - Linear types [3] - Is the type system sound and does it support/need type casts - Does the language support interfaces/traits/protocols - How rich are generics, e.g.…

Thanks for your interest. Note Moonbit is a language/platform for industrial usage(not an academic language), I contributed to OCaml so that I am familiar with the good/bad parts of a type system. Its aim is to build fast and run fast, and generate the tiny Wasm output. Type system is sound, you can take it as Rust(- some features hinder fast compilation) with GC and an emphasis on data oriented programming, so we ha…

I thought the raison d’être for Rust was not having a GC. If this is a garbage collected language, and requires a runtime for such, isn’t this more like Go or any JVM language?

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#83

Hi, I am the lead of this project, you can try it now with our online IDE, https://try.moonbitlang.com (F5 to run) The docs are available https://github.com/moonbitlang/moonbit-docs , the compiler would be publicly available when we reach the beta status (expected to be the end of Q2 in 2024). Feel free to ask me any question

I loaded the IDE but don't see examples of doing graphics or UI. The docs are also silent on this topic, as far as I can tell. Is graphics or UI programming possible in MoonBit?

It clearly states: it targets web assembly. So, this should answer your question I think

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#85
post #83

Earlier quoted context omitted.

I loaded the IDE but don't see examples of doing graphics or UI. The docs are also silent on this topic, as far as I can tell. Is graphics or UI programming possible in MoonBit?

It clearly states: it targets web assembly. So, this should answer your question I think

> It clearly states: it targets web assembly. So, this should answer your question I think

Not sure what you're implying.

Here's an example of doing graphics using Rust and WASM - http://cliffle.com/blog/bare-metal-wasm/#making-some-pixels

And another: https://blog.logrocket.com/implement-webassembly-webgl-viewe...

Given that MoonBit is developing their own IDE and it is hosted on the web, I would think one could provide an elegant pipeline to do graphics programming, no?

If this were open source, I would contribute in this realm becase I'm a graphics and UI person and also enjoy working with new programming languages.

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#86
post #83

Earlier quoted context omitted.

I loaded the IDE but don't see examples of doing graphics or UI. The docs are also silent on this topic, as far as I can tell. Is graphics or UI programming possible in MoonBit?

It clearly states: it targets web assembly. So, this should answer your question I think

Well, you can do graphics programming in c++ or using a game engine and compile it to Webassembly.. So this language could definitely have a graphics library.

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#87
I see from comments here that Moonbit has a GC. However, the resulting binary for Fibonacci is 253 bytes, which presumably does not include a GC. Is that using the proposed WASM-native GC, or is the build system smart enough to omit the GC since it’s not needed here?

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#88

I like it a lot tbh b/c it looks a lot like Go. Unfortunately Go is unusuable as wasm target for browsers due its huge binary. The browser needs a lot of time to download and parse it. Not to mention it starts to crash if your app is large enough(i.e a complete SPA in Go only).

Yeah, Go has to embed the whole runtime and that amkes for huge payloads.

I'm interested in your experience as I've been working on wasm SPA with Go.

How does it crash? Seems to me that there are examples of stable webapps (for instance using go-app).

Were you using a framework or raw syscall/js call?

Have you tried compiling with tinyGo?

Re: Moonbit: Fast, compact and user friendly language for WebAssembly

#89
post #82

Earlier quoted context omitted.

Thanks for your interest. Note Moonbit is a language/platform for industrial usage(not an academic language), I contributed to OCaml so that I am familiar with the good/bad parts of a type system. Its aim is to build fast and run fast, and generate the tiny Wasm output. Type system is sound, you can take it as Rust(- some features hinder fast compilation) with GC and an emphasis on data oriented programming, so we ha…

I thought the raison d’être for Rust was not having a GC. If this is a garbage collected language, and requires a runtime for such, isn’t this more like Go or any JVM language?

They're just talking about the type system. Yes the type system in Rust serves it's GC-free goals but you could copy paste the type system and build other languages with different goals.
Post reply on HN