Advertisement · 728 × 90

Posts by Cyrus Omar

In London for the next couple of weeks.

1 day ago 4 0 1 0

I think js to wasm is a great choice, I'm eager to see it future models or harnesses fair better. Seems like a really good benchmark!

3 days ago 1 0 0 0
Preview
Wasm_of_ocaml: What Changed Since 6.1 Wasm_of_ocaml compiles OCaml bytecode to WebAssembly, targeting WasmGC so that OCaml values are managed by the host garbage collector. This post covers the most relevant Wasm changes in versions 6.1 through 6.3, and three PRs that add WASI support, native effects via Stack Switching, and dynlink/toplevel support. The Background section at the end has a short recap of where the project fits alongside js_of_ocaml. What changed in 6.1-6.3 The full changelog covers all three releases in detail. Below are the changes most relevant to the Wasm backend. The compiler writes Wasm binaries directly now (6.1) Before 6.1, the compiler emitted WAT (WebAssembly text format) and then converted it to binary via Binaryen. Since 6.1, it writes .wasm binary modules directly, removing that conversion step. Binaryen is still a required system dependency. WAT output is still available for debugging and is also faster to generate now. Better Wasm code generation (6.1-6.3) Several changes across 6.1-6.3 improve the quality of the generated Wasm code: * Direct calls for known functions (6.1). When the compiler can determine the target of a function call at compile time, it emits a call_ref instruction. Having context on which functions are called where enables the Binaryen toolchain to better optimize the generated Wasm code. * Precise closure environment types (6.1). Closures carry refined WasmGC struct types for their captured variables instead of generic arrays. This gives the Wasm engine exact layout information. * Closure code pointer omission (6.2). When a closure is never called indirectly through a generic apply, the code pointer field is omitted from the closure struct entirely. * Number unboxing (6.3). The compiler tracks unboxed int/float values through chains of arithmetic operations and keeps them in Wasm locals instead of allocating heap boxes. This is the kind of optimization that makes tight numerical loops actually fast. * Reference unboxing (6.3). ref cells that don't escape a function become Wasm locals instead of heap-allocated mutable GC structs. * Specialized comparisons and bigarray ops (6.3). Instead of dispatching through caml_compare or generic bigarray accessors, the compiler emits type-specific Wasm instructions when it can resolve types statically. There are also shared compiler improvements (benefiting both js_of_ocaml and wasm_of_ocaml): the inlining pass was rewritten in 6.1 (#1935, #2018, #2027) with better tailcall optimization, deadcode elimination, and arity propagation between compilation units. Runtime additions (6.1-6.3) * Marshal now handles zstd-compressed values in the Wasm runtime (6.1, fix in 6.3). * Bigarray element access uses DataView get/set, which is faster than the typed array primitives that we used before (6.1). * Effect handler continuation resumption is more efficient (6.1). * Unix.times works in the Wasm runtime (6.3). * Dom_html.onload added for Wasm-compatible load event handling -- the JS window.onload pattern doesn't work when Wasm modules load asynchronously (6.3). Compatibility 6.1 dropped OCaml 4.12 and earlier, requires Dune 3.19, and added preliminary OCaml 5.4 support. The compiler runs on Node.js 22+ (which has WasmGC support), CloudFlare Workers (V8 12.0+), and WasmEdge 0.14.0+. Three Features in Flight The three PRs below address the three biggest limitations of wasm_of_ocaml relative to js_of_ocaml: no standalone execution outside the browser, CPS overhead for effects, and no dynlink/toplevel. Dynlink/toplevel (#2187) was merged on 2026-04-08; the other two are still open. WASI support (PR #1831) Until now, wasm_of_ocaml has been browser-oriented: the generated Wasm module expects a JavaScript host to provide I/O, filesystem access, and so on. WASI (WebAssembly System Interface) is a standard set of system-call-like imports that lets Wasm modules run on standalone runtimes without a JS host. This PR by Jerome Vouillon adds a --enable wasi flag: wasm_of_ocaml --enable wasi foo.byte -o foo.js The output still follows the existing convention (a .js file and a .assets/ directory with the .wasm code), but the Wasm file can now also be run directly on standalone runtimes. On the Wizard engine (which supports legacy exception handling): wizeng.x86-64-linux -ext:stack-switching -ext:legacy-eh foo.assets/code.wasm For wasmtime and other runtimes using the newer exnref-based exception handling, compile with --enable exnref: wasm_of_ocaml --enable wasi --enable exnref foo.byte -o foo.js wasmtime -W=all-proposals=y foo.assets/code.wasm The --enable exnref flag selects the newer exnref-based exception handling spec rather than the legacy proposal used by V8/Chrome and the Wizard engine. The implementation is substantial: a WASI-compatible filesystem (fs.wat), Unix API bindings covering file operations, process info, time, and permissions (unix.wat), a minimal libc (libc.c/libc.wasm), WASI memory management and errno mapping, and a Node.js wrapper for running WASI binaries under Node. Native effects via Stack Switching (PR #2189) OCaml 5 effect handlers need the ability to suspend a computation, run a handler, and resume. In the native OCaml compiler, this is implemented using stack segments. In wasm_of_ocaml, we rely on JSPI by default, which does not cost much when effects are not used, but is comparatively slow when effects are used as core control flow. However, there's also the option of using CPS-transformation: every function that might perform an effect gets a continuation parameter, and perform/continue/discontinue manipulate these closures explicitly. This works but has overhead -- extra closure allocations, indirect calls, and the CPS transform obscures the control flow, which inhibits other optimizations. The WebAssembly Stack Switching proposal (currently Phase 3 in the Wasm standardization process) adds a third implementation: native primitives for creating, suspending, and resuming stacks. This maps directly onto what OCaml's effect handlers need. This PR by Jerome Vouillon adds a --effects native flag: wasm_of_ocaml --effects native foo.byte -o foo.js When enabled, the CPS transformation is skipped entirely. Instead, perform suspends the current Wasm stack, the handler runs on the parent stack, and continue resumes the suspended stack -- using the primitives from the Stack Switching explainer. The implementation is in a new effect-native.wat runtime module. This should remove the CPS overhead for code using Eio, Domain.DLS, or Lwt with its effects backend. Stack Switching is not yet in stable browser releases (Chrome/V8 has it behind a flag), so the CPS path remains the default. Dynlink and toplevel support (PR #2187, merged 2026-04-08) One of the most visible limitations of wasm_of_ocaml compared to js_of_ocaml was the lack of Dynlink support, which also meant no OCaml toplevel (REPL) in the browser. The OCaml Playground currently uses js_of_ocaml for exactly this reason. This PR by Jerome Vouillon adds both. Concretely, it provides: * A wasm_of_ocaml_compiler_dynlink library that can compile .cmo files to Wasm and load them at runtime -- the Wasm equivalent of what JsooTop does for js_of_ocaml. * A toplevel.wat runtime module implementing the low-level primitives for registering dynamically loaded code with the Wasm module system. * A graphics.wat module implementing the OCaml Graphics library in WAT. * Virtual filesystem improvements so the toplevel can access .cmi files at runtime. * The Lwt toplevel example updated to build with both js_of_ocaml and wasm_of_ocaml. * A new test suite (compiler/tests-dynlink-wasm/) covering loadfile, loadfile_private, compile-and-load, effects flags, and plugin dependencies. As noted in the PR discussion, the virtual filesystem work also allows compiler/tests-toplevel to run under Wasm. This opens a path to running the OCaml.org Playground on wasm_of_ocaml instead of js_of_ocaml. Background: Wasm_of_ocaml and OCaml-to-Wasm compilation Wasm_of_ocaml started as a fork of js_of_ocaml by Jerome Vouillon (with major contributions from Hugo Heuzard), became a new backend in the js_of_ocaml project, and is now developed alongside it: since version 6.0.1 (the first public release, February 2025), wasm_of_ocaml and js_of_ocaml share a single repository and are released together. It targets WasmGC (supported in Chrome 119+, Firefox 120+, and Safari 18.2+), the tail-call extension, and the exception handling extension. Using WasmGC means OCaml values are managed by the host GC directly; no custom collector is shipped, and JS interop works through shared GC'd references. The project was presented at the ML Workshop at ICFP 2024. A separate project, Wasocaml by OCamlPro, also targets WasmGC but compiles from the Flambda IR of the native-code compiler rather than from bytecode. Jane Street has reported 2x-8x speedups from wasm_of_ocaml over js_of_ocaml on their workloads. The OCaml.org WebAssembly page has an overview of all OCaml-to-Wasm compilation options. Getting involved If you want to try wasm_of_ocaml, the manual covers setup with Dune. If you're already using js_of_ocaml, it's mostly a matter of adding a wasm_of_ocaml stanza: opam install wasm_of_ocaml-compiler js_of_ocaml js_of_ocaml-ppx js_of_ocaml-lwt wasm_of_ocaml-compiler depends on a system installation of Binaryen 119 or later. Bug reports and contributions go to the js_of_ocaml repository. Discussion happens on the OCaml Discuss forum.
4 days ago 6 2 0 0

I'm curious if giving the agents the ability to look at CompCert or CakeML might help. Also curious if using Lean for this might have hurt because prior such efforts were in other provers.

4 days ago 1 0 1 0
Video

It's multiplayer chats, plus agents, and everyone working in sandboxed vms so you're all sharing the same code and context.

Prompt and code together, in real time. You're all connected to the same computer. You can all see the same outputs. No one is stashing work and switching git branches.

6 days ago 10 1 3 0

Interesting and surprising, given all the hype at the moment. I'm surprised that the agents made such trivial progress!

4 days ago 1 0 2 0
Basis Blog post, Building an Unverified Compiler with Agents

Four agents spent 14 days and 93,000 lines of Lean building a verified JS-to-WASM compiler from scratch. The compiler ran; the proofs didn't close.

Paris metro line 14 has run driverless since 1998. It's control software was built with the B method and formally verified before the first train ran.

Basis Blog post, Building an Unverified Compiler with Agents Four agents spent 14 days and 93,000 lines of Lean building a verified JS-to-WASM compiler from scratch. The compiler ran; the proofs didn't close. Paris metro line 14 has run driverless since 1998. It's control software was built with the B method and formally verified before the first train ran.

New blog post, CompCert is (NOT) obsolete. Software verification remains out of reach for frontier models.

www.basis.ai/blog/verifie...

5 days ago 25 5 2 0
2026/04/28
From Social Networks to Sensemaking Networks
Presenter: Ronen Tamari, Cosmik Network
What would social media look like if it were designed for sensemaking rather than engagement? We're exploring this question with Semble, a platform where researchers curate shareable collections, create knowledge trails that others can build on, and discover relevant work through their network's collective attention. Built on the AT Protocol, the open social networking protocol behind Bluesky, Semble offers researchers data portability and an open API designed for extension. We'll discuss how Semble enables new kinds of research tooling, from living semantic citation graphs to collaborative review and annotation. We'll also share how ATProto's open data layer creates unique opportunities for studying and designing epistemic infrastructure — from observing how knowledge trails form across a network to experimenting with platform affordances that support collective sensemaking.

2026/04/28 From Social Networks to Sensemaking Networks Presenter: Ronen Tamari, Cosmik Network What would social media look like if it were designed for sensemaking rather than engagement? We're exploring this question with Semble, a platform where researchers curate shareable collections, create knowledge trails that others can build on, and discover relevant work through their network's collective attention. Built on the AT Protocol, the open social networking protocol behind Bluesky, Semble offers researchers data portability and an open API designed for extension. We'll discuss how Semble enables new kinds of research tooling, from living semantic citation graphs to collaborative review and annotation. We'll also share how ATProto's open data layer creates unique opportunities for studying and designing epistemic infrastructure — from observing how knowledge trails form across a network to experimenting with platform affordances that support collective sensemaking.

What would social media look like if it were designed for sensemaking rather than just engagement?

Excited to be presenting @semble.so & @cosmik.network at @stamina-workgroup.bsky.social on April 28 @ 11am ET! The seminar is open to the public so feel free to join at
www.complexdatalab.com/stamina/

5 days ago 50 11 1 0
Advertisement

This is NOT a formal job posting, just testing waters. I have a year of post-doc money. Esp. int'd in formal methods + applied cogsci + diagramming. If you do work tied to my research, reach out (see my page). Must have US work auth, sorry. Please feel free to share/boost!

6 days ago 19 16 1 2
Preview
Virginia joins a national effort to ensure only popular vote winners become president With Virginia on board, the National Popular Vote Compact is now enacted in states worth 222 electoral votes. Here's what that means.

With Virginia on board, the National Popular Vote Compact is now enacted in states worth 222 electoral votes. Here's what that means. n.pr/41xl7iy

1 week ago 596 142 19 18

On that note, always remember that Bolsonaro was voted out, tried to do a coup, failed, was tried and convicted, and is now under house arrest. And Duterte was constitutionally banned from running again, arrested by the ICC, and is currently awaiting trial in the Hague.

1 week ago 336 133 3 1
Post image

algebrica.org

1 week ago 7 1 0 0
Preview
Donald Trump's Plan To Steal Or Destroy Everything We should assume it's underway, starting with the Epstein files.

Legal eagles noticed, and there’s been SOME mainstream coverage. But overall the political class has underreacted to this month’s OLC opinion, ordered up by Trump or on his behalf, declaring the Presidential Records Act unconstitutional. Things are likely being stolen and/or destroyed *right now*.

1 week ago 1670 837 35 40
Preview
The Internet needs an antibotty immune system, stat Anthropic's Mythos makes autonomous vulnerability chaining across devices a sudden reality, so I've been thinking about how digital 'antibotty' inoculation networks may be needed far sooner than I expected.

https://anil.recoil.org/notes/internet-immune-system

1 week ago 0 1 1 0
Preview
Thomas Gazagnaire :: Predicting Satellite Collisions in OCaml Open test data for predicting satellite collisions. I built the full screening pipeline in OCaml, validated it against the answer key, and put a 3D globe in the browser.

[OCaml Planet] Building a satellite collision screening pipeline from scratch in OCaml - complete with validation against reference data and browser-based 3D visualization.

https://gazagnaire.org/blog/2026-04-07-ssa.html

1 week ago 8 3 0 0
three mugs, depicting the logos of Agda, OCaml, and Hazel, sitting on office desk

three mugs, depicting the logos of Agda, OCaml, and Hazel, sitting on office desk

Ordered Agda and OCaml mugs from the @ttforall.bsky.social merch store and Pedro threw in a little bonus! 💚

1 week ago 27 4 2 0

Democrat leadership in Congress, and every potential Democratic nominee for the 2028 election, should put out this statement that……
“If any military officer, or personnel who carries out this illegal order. They will be prosecuted to the full extent of the law, by a democratic administration”.

2 weeks ago 32 10 4 0
Post image

“Acts or threats of violence the primary purpose of which is to spread terror among the civilian population are prohibited.”

Geneva Convention Additional Protocol I
and
Department of Defense Law of War Manual, § 5.2.2

2 weeks ago 3823 1357 124 98
Advertisement

This is embarrassing and horrifying rhetoric. He needs to be impeached, for so many reasons.

2 weeks ago 4 0 0 0

There is no future for humanity in which the basic conditions for life for millions of people can be destroyed on one person’s whim.

2 weeks ago 868 221 7 9
LATTE ’26

☕️ LATTE, our little workshop on hardware design languages/compilers/etc., has 24 (!) rad-looking position papers this year. It’s on Monday, and you can attend on Zoom or in Pittsburgh: https://capra.cs.cornell.edu/latte26/

1 month ago 1 4 1 0

At ~$1 billion/day, the US has spent as much on the war in Iran in ten days as the entire FY25 budget for the National Science Foundation ($10 billion).

Trump's FY26 budget request for the agency declined to $3.9 billion, due to a "realignment of resources in a constrained fiscal environment."

1 month ago 521 202 5 8
Video

Which Network Operating System Does Oxide Use? FAQ Friday #38

1 month ago 52 5 4 1
Post image Post image Post image Post image

Some people drink coffee.
Others drink coffee and reason about it formally ☕

FP & proof assistant mugs →
https://twp.ai/9PatXs

1 month ago 1 2 0 0

I'm unsure how people really think people were downplaying a virus that can kill you, make you go blind, wipe out your immune system for years, and oh yeah come back and kill you a decade after you thought you'd shaken it.

1 month ago 2053 643 71 20
Advertisement
Preview
Call for abstracts: Rewilding the Web: diversity and resilience in digital infrastructure This workshop will bring together ecologists, philosophers, cultural theorists, and technologists to discuss how contemporary insights from theoretical biology and ecology can provide a richer understanding of what makes for a thriving biosphere, and how this might provide inspiration for cultivating sociotechnical infrastructure that is more resilient against co-option by monopolising tendencies.

@kathrynnave.bsky.social and Dave Ward are organising a workshop in Edinburgh on rewilding the web at the end of May! I'll be speaking about https://anil.recoil.org/papers/2025-internet-ecology there, and I hope to see some of you there too!

1 month ago 22 5 0 4

cant stop thinking about this , wondering how weird we can make code editors if we completely abandon their current structure

1 month ago 34 1 1 0

the templeOS of ides

1 month ago 27 3 0 3
Post image

making a GUI IDE in 2026 is an increasingly meditative act

1 month ago 121 13 8 4

When someone says „Scientists do not want you to know“ you can dismiss everything from there on. Scientists want you to know. They are desperate that you know. They can’t shut up about what they found out and want you to know.

1 month ago 9596 4126 76 162