User Editable retweeted
コンパイラを信頼することなく、アセンブリ・バイナリのレベルでRustのようなメモリ安全性を保証できないか?と思い、勢いで、NoCompiler(github.com/h5i-dev/NoCompile…)というOSSを作ってみました。
最近、AnthropicとTheoremが、AIを用いてRISC-Vバイナリの安全性を大規模に形式検証するという取り組みを発表したのを覚えている人も多いと思います。
彼らが検証した性質の一つに、バイナリのメモリ安全性があります。具体的には、AddressSanitizer(ASan)で計装したバイナリと元のバイナリの振る舞いの等価性、および計装済みバイナリがクラッシュしないことを形式的に証明するというアプローチです。
ASanは非常に有用なバグ検出ツールですが、あらゆるメモリ安全性違反を検出できるという理論的保証はありません。そのため、ASanが検出可能なメモリ安全性違反が存在しないことを形式的に証明しても、それだけではメモリ安全性そのものを厳密に証明したことにはなりません。
では、そもそもアセンブリ自体にRustのようなメモリ安全性を保証する型システムを導入できないのでしょうか?
実はこのアイデア自体は決して新しいものではなく、1990年代からProof-Carrying Code(Necula, POPL 1997)やTyped Assembly Language(Morrisett et al., POPL 1998)、実際のx86を対象としたTALx86(Morrisett et al., 1999)などの研究が行われてきました。
今回はこれらのアイデアを参考に、RISC-V向けのTyped Assembly Languageと、その健全性がLean 4で形式証明された型検査器を実装してみました。
具体的には、通常のRISC-Vアセンブリに関数の型やメモリ領域へのアクセス権限、ループ不変条件などを記述することで、各load/store命令がアクセスを許可されたメモリ領域の範囲内に収まることを静的に検査・検証できます。型検査器の健全性はRISC-Vの形式意味論に基づいて証明されており、所定の仮定の下で、型検査を通過したコードのメモリアクセスの安全性が保証されます。
プログラミング言語の歴史を考えると、最初期は人間が機械語やアセンブリを直接書いていましたが、人間の認知能力の限界ゆえに、より抽象化されたプログラミング言語が発明されました。しかし、人間よりもはるかに賢いAIがコードを書くのであれば、人間が理解しやすい高級言語を経由する必要性は薄れていくのかもしれません。
AIが直接アセンブリとその型注釈を生成し、形式証明された型検査器で安全性を保証する。30年近く前から研究されてきたTyped Assembly Languageというアイデアが、AI時代に改めて注目されるのではと思います。
GitHub レポ: github.com/h5i-dev/NoCompile…
User Editable retweeted
Playbit is a pursuit of personal-scale software. Today we’re launching a beta version of a brand-new Playbit. It’s macOS only for now (more platforms soon.) Playbit is infrastructure for a new era of personal-scale, local-first software.
Ever since I started working on Playbit in 2020, have I had this nagging feeling that making software is just too damn complicated. For anything practical, you end up having to do so much “grunt work” that isn’t about the essence of what you’re actually trying to build: maintain servers, week-long waits on Apple bureaucracy, writing your own data sync or just accept that your software will be unavailable when someone uses it on a train that goes through a tunnel.
Playbit is a cultural platform for doing things differently.
You own your data. A Playbit Volume is like a fancy Dropbox that can contain not only files, but also structured data that can be edited offline and syncs whenever you are online. The data is encrypted and uses public-key cryptography to allow sharing volumes with other people or service accounts.
Apps are written in any programming language you’d like. Playbit is like an operating system kernel, a syscall-style C ABI with forwards version compatibility. Apps store their state in Volumes, so when you use an app you have complete visibility into the data stored by the app.
Sessions are like “private spaces” where an app runs. You can invite someone to join a session with a single click — Playbit is fully multiplayer. Session data is of course fully encrypted; a session invitation link holds the encryption key to the session.
We’d love to hear what you think and what you make!
User Editable retweeted
9/UX apps are scriptable to the control level too. All just filesystem operations. Also, now rc has a pretty app version.
I have an intuition that CPUs designed like this may not be faster/cooler/more efficient, but they exhibit better abstractions that results in the whole software stack being better.
Back in the 80s, Symbolics built CPUs specifically to run Lisp. Hardware support for data types, garbage collection, and even list operations like CAR and CDR.
17-bit instructions, 36-bit tagged words, microcoded CPU.
A completely different approach to CPU design.
chai.uni-hamburg.de/~moeller…
bitsavers.org/pdf/symbolics/…
26
User Editable retweeted
Tony Hoare on corporate languages and the price of reliability:
"The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay."
User Editable retweeted
Suffering from markdown fatigue 😪 and trying something new to understand a complex plan: a graph of cards, organized around questions and answers, with just enough information at every level. Keyboard driven, highlight focused content, gives me something to do while I read
User Editable retweeted
Reload?
Native clients can load from the dev server: Contract and TS swap live and keep compatible state. Rust logic reloads too, running as Wasm on iOS via an interpreter.
User Editable retweeted
Exact implements its own renderer for drawing pixels on platforms like Linux and Windows called Ink. It's similar to GPUI or egui but works as a renderer under Exact's layout system and can include system native elements, etc. Ink, GPUI and egui perform about t he same for users. Ink starts a bit faster but uses more GPU and peak memory.
User Editable retweeted
There are two main things people care about with native performance: (1) smoothness/fps and (2) startup time. re: Smoothness. Here's Exact vs SwiftUI scrolling through the same rich content feed. You can see Exact holds 120fps and drops zero frames while SwiftUI drops down into the 30-50fps range and is extremely late on many frames.
User Editable retweeted
Exact also gives agents the ability to inspect the state of your app and complete the feedback loop in a variety of ways -- capturing screenshots and videos, inspecting the abstract state of the UI tree, asking for layout properties, etc.
User Editable retweeted
In Exact, your agent has control over the clock which makes testing and prodding faster and easier. Instead of sleeping and hoping an animation has finished, the agent advances the clock then reads the result, so its screenshots and state reads aren't racing tim ers or transitions. This reduces the possibility space of things an agent needs to check on as it tries to figure out why something is happening or isn't. There are a bunch of things like this that make it easier for agents to build and debug.
User Editable retweeted
Contract looks like Python -- indentation has meaning, fairly rigid about formatting, fairly sparse. And it is explicit and stron gly typed and pulls complexity forward into authoring like Rust. Your Contract code describes both your UI like you would in React an d also your state and data flow, the way you would with Redux or Zustand or TanStack Query.
User Editable retweeted
This is what my blog looks like as a Markdown blog.
I love the look. It makes me happy. :-)
And you can change the look with the click of a button. And of course anyone can create a stylesheet. But the key thing is, the look is up to the reader, not the site. That was a fundamental wrong turn that the web took. They put CSS in the wrong place, imho of course.
And btw it's not just for blogs either. You could do a Twitter this way too.
I’ve been thinking low level lately.
One idea is having separate bit width heaps. E.g. separate 8 bit, 32 bit, and 64 bit heaps.
The motivation is how we store and use 8 bit data is very different to 32/64 bit data.
A struct then is a slice of multiple heaps. It would be a kind of composite pointer, not very efficient, but you would only need one for an array of structs. The composite pointer becomes more or less like a type.
Ideally this would be implemented at the hardware level and have a dedicated instruction set.
4
249




















