Live data from Hacker News

Moonbit: Fast, compact and user friendly language for WebAssembly

moonbitlang.com

51–60 of 162 posts

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

#51
post #14

No license. https://github.com/moonbitlang/moonbit-docs/

https://github.com/moonbitlang/moonbit-docs/blob/8be949ff902... > (* Copyright International Digital Economy Academy, all rights reserved *)

That's the copyright, but what's the license?

Is "all rights reserved" a license (or an absence thereof)?

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

#52

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

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 have ADT, generics, interface and ad-hoc polymorphism. We also plan to make the pattern match more expressive with first class pattern support.

The async story is constrained by the WASM runtime, we will evolve with the Wasm proposal.

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

#53
post #50

I'm excited to see a modern GCed language that is targetting WASM. Closest comparison is probably Grain ( https://grain-lang.org/ ).

Apparently the Grain compiler is written in ReasonML rather than plain OCaml. Isn't it a bit comedic how readily these niche things are stacked up?

Why? A language's implementation language doesn't affect me much. And isn't reason just a syntax layer on ocaml? The tooling can convert back and forth and the runtime semantics are the same. I can read reason code fine if I need to, but I don't.

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

#54
post #9

The site compares it to Rust and Go but to me the comparison is AssemblyScript. It’s also WASM-native and new with relatively little ecosystem around it. But compared to Moonbit it’s a familiar language to anyone that’s used TypeScript. So why use Moonbit over AssemblyScript?

Looks much closer to Grain [1] than AssemblyScript

1. https://grain-lang.org/

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

#55
post #18

So why bother with this, when compared against AssemblyScript and Grain, both more mature and existing communities?

Rust-like features and performance with Go-like usability are big selling points. Also we don't known how it will be licensed, but if it's proprietary that could also be a selling point with companies that won't touch Grain's LGPL license.

That's absolutely nuts. Would you risk building upon a stack that might be sold tomorrow to a competitor and killed instantly? Without software freedom and a community this is just a toy.

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

#56
post #49

That’s not how you’d implement fibonacci in Go

Yes, using WASM and Go in an contrived example and not mentioning tinyGo is not very honest.

Do you have reason to believe that tinyGo would do better on that particular benchmark?

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

#57
post #50

I'm excited to see a modern GCed language that is targetting WASM. Closest comparison is probably Grain ( https://grain-lang.org/ ).

Apparently the Grain compiler is written in ReasonML rather than plain OCaml. Isn't it a bit comedic how readily these niche things are stacked up?

OCaml syntax is quite annoying ... everything is backwards and it even uses double semicolons! :-)

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

#60

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

Is having a dedicated fn keyword necessary? I mean, what’s the fundamental difference between a func and a fn ?
Post reply on HN