131 Followers
2 Following
114 Posts

This week on the newsletter: "How not to mandate device-based age assurance"

https://educatedguesswork.org/posts/device-based-age-assurance/

In this post, we examine a number of enacted or proposed requirements for device-based age assurance and some of the ways they can go wrong.

How not to mandate device-based age assurance

Software design by legal mandate

Now up on the newsletter: Let's build a tool-using agent

In this post, I walk through in some detail how AI agent tool calling works, including digging into the inputs and outputs of the LLM before they get translated into a coherent-looking JS API.

https://educatedguesswork.org/posts/tool-calling/

Let's build a tool-using agent

giving hands to the brain in a vat

Now up on the newsletter: Now up on the newsletter. "I automatically generated minutes for five years of IETF meetings (using AI)"

https://educatedguesswork.org/posts/ietf-minutes/

Now up on the newsletter, the final post in my series on memory management: Understanding Memory Management, Part 7: Advanced Garbage Collection

https://educatedguesswork.org/posts/memory-management-7/

Understanding Memory Management, Part 7: Advanced Garbage Collection

"The Technical Feasibility of Divesting Google Chrome" by EKR and Alissa Cooper – Knight-Georgetown Institute https://kgi.georgetown.edu/research-and-commentary/technical-feasibility-of-divesting-google-chrome/
The Technical Feasibility of Divesting Google Chrome – Knight-Georgetown Institute

Knight-Georgetown Institute

@hovav @pervognsen
Firefox on Linux x86-64 uses the gsbase for rlbox library sandboxing [1] because we got a pretty nice perf boost --- eliminates roughly 75% of wasm's overhead on some workloads [2] (but to be clear, it is not used by Firefox's Wasm JIT to run Wasm in websites)

Re your question about possible negative displacements --- given that Wasm's memory op supports an linear memory offset specified as the sum of 32-bit variable `offset` and 32-bit `constant`, the straightforward encoding `gs: constant(%reg_offset)` is possible only when the constant is <= INT32_MAX (which is true most of the time).

If we run into a larger constant than that, I expect that we just fall back to using two instructions

```
reg_tmp = offset + constant
val = gs:reg_tmp
```

The nice bit is that the wasm2c implementation doesn't really need to think about any of this, and can just defer to clang due to the `__seg_gs` syntax [3] i.e., named address space support :)

[1] https://hacks.mozilla.org/2021/12/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95/

[2] https://shravanrn.com/pubs/seguecg.pdf

[3] https://github.com/WebAssembly/wabt/blob/main/src/template/wasm2c.declarations.c#L55C48-L55C56

WebAssembly and Back Again: Fine-Grained Sandboxing in Firefox 95 – Mozilla Hacks - the Web developer blog

In Firefox 95, we're shipping a sandboxing technology called RLBox — developed with researchers at UC San Diego and the University of Texas

Mozilla Hacks – the Web developer blog
This post takes a slightly different approach from the previous ones. I've implemented the four fundamental GC algorithms (reference counting, mark-sweep, mark-compact, and copying) in JavaScript. You can run them live in your browser and step through the GC process one step at a time. I find that being able to visualize what's actually happening at each phase is really useful for understanding what each kind of GC is trying to do.

Now up on the newsletter, part 6 in my series on memory management, this time covering basic garbage collection techniques.

https://t.co/NwzlH5oOC2

Now up on the newsletter, the fifth post in my series on memory management: Fighting With Rust

https://educatedguesswork.org/posts/memory-management-5/

Understanding Memory Management, Part 5: Fighting with Rust

Now up, part 4 of my series on memory management: Rust Ownership and Borrowing

https://educatedguesswork.org/posts/memory-management-4/

Understanding Memory Management, Part 4: Rust Ownership and Borrowing