TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Moonbit: Fast, compact and user friendly language for WebAssembly

313 pointsby dlibalmost 2 years ago

29 comments

hongbo_zhangalmost 2 years ago
Hi, I am the lead of this project, you can try it now with our online IDE, <a href="https:&#x2F;&#x2F;try.moonbitlang.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;try.moonbitlang.com</a> (F5 to run)<p>The docs are available <a href="https:&#x2F;&#x2F;github.com&#x2F;moonbitlang&#x2F;moonbit-docs">https:&#x2F;&#x2F;github.com&#x2F;moonbitlang&#x2F;moonbit-docs</a>, the compiler would be publicly available when we reach the beta status (expected to be the end of Q2 in 2024).<p>Feel free to ask me any question
评论 #37186869 未加载
评论 #37186737 未加载
评论 #37186616 未加载
评论 #37187179 未加载
评论 #37188254 未加载
评论 #37186705 未加载
评论 #37192270 未加载
评论 #37187203 未加载
评论 #37191538 未加载
评论 #37190750 未加载
评论 #37188345 未加载
评论 #37187538 未加载
评论 #37187367 未加载
评论 #37190837 未加载
评论 #37187426 未加载
评论 #37197727 未加载
评论 #37187456 未加载
afavouralmost 2 years ago
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?
评论 #37185758 未加载
评论 #37187018 未加载
评论 #37185554 未加载
garganzolalmost 2 years ago
Having `func` keyword for a top function definition, but `fn` keyword for a nested function definition is evil. It should be either `func` or `fn` independently of a particular context.
评论 #37192298 未加载
评论 #37194323 未加载
评论 #37191497 未加载
noelwelshalmost 2 years ago
I&#x27;m excited to see a modern GCed language that is targetting WASM. Closest comparison is probably Grain (<a href="https:&#x2F;&#x2F;grain-lang.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;grain-lang.org&#x2F;</a>).
评论 #37186922 未加载
评论 #37186611 未加载
homarpalmost 2 years ago
&quot;The development of an entire language toolchain, previously spanning years or even a decade, has been streamlined through our accrued experience and the establishment of a dedicated talented team from Moonbit&#x27;s inception. We expect Moonbit to reach beta status by the end of Q2 of 2024, indicating a phase of relative stability, minimal bugs, and a robust Foreign Function Interface (FFI) for interactions with the Wasm host. We will make the source code publicly available once we reach beta quality. Our strategic plans involve Wasm GC integration for Wasm 2.0 and our homebrewed GC for Wasm 1.0, in line with Wasm proposals.&quot;<p>so <a href="https:&#x2F;&#x2F;github.com&#x2F;moonbitlang&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;moonbitlang&#x2F;</a> is empty for now
评论 #37186771 未加载
评论 #37178643 未加载
fovcalmost 2 years ago
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?
评论 #37188013 未加载
评论 #37187863 未加载
conaclosalmost 2 years ago
This makes me think about Grain [0] - another Wasm-first programming language. This could be nice to add Grain to the comparison.<p>[0] <a href="https:&#x2F;&#x2F;grain-lang.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;grain-lang.org&#x2F;</a>
pmontraalmost 2 years ago
About Team links to a edu.cn page in Chinese. It seems a university project but I can&#x27;t confirm. The Join Us page is another Chinese one. The examples on the home page seem to require JavaScript from baidu.com.
评论 #37186141 未加载
taklimakanalmost 2 years ago
That’s not how you’d implement fibonacci in Go
评论 #37188462 未加载
评论 #37186897 未加载
评论 #37186696 未加载
MikeTheRockeralmost 2 years ago
Is this project associated with Meta? The creator Hongbo Zhang worked at Meta on some of their open source programming language projects (ReasonML and Flow). According to LinkedIn, he&#x27;s still employed there.
depralmost 2 years ago
Who funds the development? Will there be paid features?
iFirealmost 2 years ago
No license.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;moonbitlang&#x2F;moonbit-docs&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;moonbitlang&#x2F;moonbit-docs&#x2F;</a>
评论 #37186127 未加载
评论 #37187872 未加载
pxeger1almost 2 years ago
Interesting how this is written like a corporate press release.
jacquesmalmost 2 years ago
What is your long term plan?<p>Do you intend to support this language indefinitely?
评论 #37187363 未加载
lemperalmost 2 years ago
in an era where there are too many choices for writing things, if you don&#x27;t show how your language is different and&#x2F;or better compared to other languages which almost definitely more popular, then you&#x27;ll lost before you start. I mean, show some example and I&#x27;ll decide if it&#x27;s worth to try. for this language? sorry, I&#x27;m not sold in the slightest.
评论 #37189698 未加载
phosphorcoalmost 2 years ago
Well. I am very excited by this. We&#x27;ve built our front end in F# with Fable and our backend&#x2F;engine is in Rust which compiles to WASM.<p>The WASM story came second, and it&#x27;d be really cool to eventually lean into something like this, particularly given the much faster compilation time.<p>Have followed your work on Rescript, and excited to see that this is where you&#x27;ve taken things.
thefounderalmost 2 years ago
I like it a lot tbh b&#x2F;c it looks a lot like Go.<p>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).
评论 #37187814 未加载
bbkanealmost 2 years ago
Looks quite nice, but you should add a banner to the load screen for <a href="https:&#x2F;&#x2F;try.moonbitlang.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;try.moonbitlang.com</a> that it will take quite a while to load and the page is not broken.
评论 #37189352 未加载
neoneye2almost 2 years ago
Suggestion. Rename from `func` to `fn` so it&#x27;s more aligned with Rust.
评论 #37194450 未加载
csjhalmost 2 years ago
I’ve been considering trying my hand at a C-like WASM language, with most features mapping directly to WASM instructions. Surprised no one’s done something like that yet. Very cool tech
评论 #37188132 未加载
评论 #37190513 未加载
keithalewisalmost 2 years ago
Looking forward to a &quot;container-free Cloud IDE with offline capabilities, accessible from any location with a browser&quot;.
mmastracalmost 2 years ago
The module-level init seems like a great idea. I have been pondering how to get something like this right.
simon_voidalmost 2 years ago
how do you intend to handle nulls? allow nulls, nullable types or Option&#x2F;Maybe type?
DoesntMatter22almost 2 years ago
There are now more programming languages coming out than JD frameworks! Hard to keep up
评论 #37187508 未加载
revskillalmost 2 years ago
Can i SSR a WASM module ?
mijoharasalmost 2 years ago
I tried clicking through to find some syntax and got to this page[0] which seems to show things but the text is illegible on a dark background (something to do with picking up a dark mode setting on my device maybe?)<p>[0] <a href="https:&#x2F;&#x2F;moonbitlang.com&#x2F;docs&#x2F;syntax&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;moonbitlang.com&#x2F;docs&#x2F;syntax&#x2F;</a>
评论 #37186837 未加载
评论 #37186234 未加载
pjmlpalmost 2 years ago
So why bother with this, when compared against AssemblyScript and Grain, both more mature and existing communities?
评论 #37186799 未加载
评论 #37186160 未加载
评论 #37186497 未加载
评论 #37186586 未加载
评论 #37186230 未加载
IshKebabalmost 2 years ago
Do you really avoid pointers by making everything a pointer?
评论 #37188417 未加载
评论 #37186535 未加载
xmonkeealmost 2 years ago
Absolutely nothing about memory management?
评论 #37185348 未加载