HNHacker News
TopNewBestAskShowJobs

hongbo_zhang

292 karma · joined August 31, 2016

author of bucklescript (https://github.com/bloomberg/bucklescript)
submissionscomments
hongbo_zhang··on DeepSeek v4
congrats
hongbo_zhang··on A local GitHub Actions runner built with MoonBit
Run and debug GitHub Actions workflows locally with a gh-compatible CLI.
hongbo_zhang··on Realworld benchmark between Codex 5.3 and Opus 4.6
Another thing I like about codex 5.3 is that its CLI support queueing the message directly without using third party plugins. And it can run weeks without any issues, the CC used to have memory issues and stackoverflows.
hongbo_zhang··on Realworld benchmark between Codex 5.3 and Opus 4.6
This is the benchmark between the latest models on a new programming language to avoid overfitting. Latest models are quite good over generalization to new languages, they can write tens of thousands of lines of code in one prompt that just works.
hongbo_zhang··on Building a battle tested C compiler in a new language using Codex
It's around 10 days work,and the battle tested compiler can compile SQLite,TCC and itself. The budget is less than 200 dollars.
hongbo_zhang··on Implementing CRDT Algorithms with MoonBit
It is like Rust - Borrow checker + Fast compile time/Better toolings. It is a general purpose language like golang/Java, it supports native backend, wasm and JS
hongbo_zhang··on Designing a Language (2017)
https://forum.rescript-lang.org/t/introducing-moonbit-and-a-... I happend to write a post sharing experience in building Rescript and MoonBit language
hongbo_zhang··on Writing a compiler(tiny moonbit) in MoonBit
The compiler compiles tinymoonbit to llvm in moonbit
hongbo_zhang··on Literate programming tool for any language
Yes, I think this is the missing part. You may have a look at MoonBit(https://www.moonbitlang.com/blog/moonbit-markdown) which has the full IDE support in the markdown editing
hongbo_zhang··on Type-constrained code generation with language models
We published a similar paper for MoonBit: Explore the Design of an AI-Friendly Programming Language https://conf.researchr.org/details/icse-2024/llm4code-2024-p...
hongbo_zhang··on LLVM Back End for MoonBit
it is not the optimial, for fast native mode, we rely on tcc for fast interpretion
hongbo_zhang··on LLVM Back End for MoonBit
we used to output C for native backend support
hongbo_zhang··on LLVM Back End for MoonBit
The LLVM mode currently is not good as C backend, but we are working on it to bring it comparable to C backend
hongbo_zhang··on LLVM Back End for MoonBit
we have a interpreter mode which takes advantage of tcc for fast interpretion
hongbo_zhang··on LLVM Back End for MoonBit
MoonBit supports the LLVM backend. With this, it achieved 8× Java’s performance in FFT and introduced out-of-the-box debugging with DWARF symbol injection, enabling precise source mapping directly to compiled outputs.

MoonBit will soon compile directly to native binary files without relying on a C compiler. This eliminates various compatibility issues associated with C compilers.

hongbo_zhang··on The MoonBit language beta preview
MoonBit is a wasm first language that generates tiny Wasm output, it also supports the wasm component model. It is inspired by Rust and GO, where language features are close to Rust and toolchain are more inspired by Golang
hongbo_zhang··on [dead]
It's cool to see a minimal implementation of the lazy evaluation semantics
hongbo_zhang··on TCC RISC-V Compiler Runs in the Web Browser (Thanks to Zig Compiler)
Not only we have a compiler but we have a full blown IDE in the browser: try.moonbitlang.com
hongbo_zhang··on Live coding Tetris game with WebAssembly language Moonbit
https://twitter.com/moonbitlang/status/1704103046849110225 There is a video demo here, editing, compilation, reloading is instant
hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
The source code will be publicly available when we reach beta status(things are moving too fast right now).
hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
> Will things change as WebAssembly evolves?

Yes, but we also plan to support old Wasm versions, like 1.0 etc.

Note Moonbit is designed in a modular way that it should be easy to target different backends (JS, Native). Currently we are focused on make the Wasm experience optimal(including the debugger)

hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
`default parameters` and some local features will be elaborated later on. We make the big(non local) features first and add various nice sugars step by step.
hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
Yes, it will be my last project before retirement, we have a very ambitious goal and long term vision.
hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
Yes, it is supposed to be supported, you are welcome to file an issue on github to add arabic letters https://github.com/moonbitlang/moonbit-docs
hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
Not strictly necessary, we are not decided on it.

For func the annotation is required, while fn does not need any type annotation

hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
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.

hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
It is in an very early stage, but I expect it will be free to use as normal users. To be honest, we are also thinking about how to make the project more sustainable in the long term, the project is maintained by a team of professionals who also need be paid. We will figure this out when we reach the beta (in the end of Q2/2024)
hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
It depends on how you are measuring maturity.

Moonbit is indeed only developed for less than a year(very fast moving), but it already has a full working IDE, optimizing compiler, fast build system and experimental package manager. We have a dedicated team working on this with professional experience for over a decade, we expect we will reach the maturity on par with Rust in terms of Wasm experience in a couple of years.

hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
Sorry, we are fixing that, should be better later
hongbo_zhang··on Moonbit: Fast, compact and user friendly language for WebAssembly
The docs are available here: https://github.com/moonbitlang/moonbit-docs

You can also try our online IDE https://try.moonbitlang.com

Page 1 of 2Next →