one-more-minute

Joined 12 years ago

Karma
2,216
Submissions
266
Member since
Apr 17
View on Hacker News

Recent submissions

Comment · 10 months ago
http://mikeinnes.io/posts/advent-2025/

I've been working through advent of code using my own little compiler/language. It's in such an early state that some creative problem solving is required, not to mention the compiler bugs! But I'm very pleased to have it running interactively on my blog like this – I want to work towards some bigger notebooks in the style of explorable explanations.

Comment · 1 year ago
I'm working on a little hobby language that compiles to wasm: https://mikeinnes.io/posts/raven/

I've spent the last couple of months porting the compiler from Julia to TypeScript. That's nearly done, so I'm hoping I can post an interactive web demo next month!

Comment · 1 year ago
Comment · 2 years ago
Even within HTTP services, (a) your TLS will not be end to end, so you have to be happy for Cloudflare to see your data and (b) they don't like you to use up all their bandwidth with media streaming or other large files. Tunnel is a great service but there are certainly reasons not to use it.
Comment · 2 years ago
I'm not against a tasteful flourish or two, but in safari the header of this blog stuck over the content as I scroll: https://imgur.com/a/TyU2h3t

Something cool the web can do is static, reliable, easily readable documents – might be nice to show that off.

Comment · 3 years ago
You need (a little) JS to run Wasm in the same way you need (a little) HTML to run JS; it's a hosted platform. JS handles loading and invoking the wasm code, and because it's close to a pure instruction set there's very little you can do without calling JS APIs, which in turn requires support code to translate across the boundary.

The WASI project specifies wasm-native APIs (modelled on posix) for running locally without JS, so you could imagine something similar for the browser. But the complexity of the DOM is forbidding.

I've not tried Emscripten hello world for a while, but I imagine it depends on things like optimisation level, dead code elim etc. In general to compile C code you'll need a malloc, string support and so on as you say. You can make the wasm file tiny if you lean on JS strings, but that increases the amount of support code again. Languages other than C will have an easier time reusing parts of the JS runtime (like strings or GC).

Comment · 3 years ago
I mean, the article's logic is effectively that you can break code without the type system helping or warning you. I don't think Hickey would disagree with this – it's arguably a point in his favour.
Comment · 4 years ago
Comment · 4 years ago
Monotropism is compelling for all the reasons the author gives, but it isn't without any loose ends. For example, stimming is a characteristic feature of autism; the authors of the original paper briefly describe it as a focus on activity, but people often fidget to help them focus on something else (eg reading or listening), so it's unclear how that fits with the theory. The same goes for other common experiences like meltdowns, shutdowns and autistic burnout, as well as the higher incidence of alexithymia, queerness, and issues of anxiety and depression, which aren't obviously related to narrow focus.

Very possibly the "autistic"/"allistic" labels refer to a mix of different underlying cognitive variables, monotropism being just one. Either way, the theory seems an important step forward.

Comment · 4 years ago
I dislike referring to WASM as a "stack machine" for this reason. It is useful to remember that the text format started out as a low-level lisp-y expression tree with local variables and nested control flow. It still basically is that, but with the AST syntactically flattened in a way that looks a bit like a stack machine. (Admittedly, multi-value and block returns have since made it trickier to recover the AST.)

Things like Forth or the JVM byte code are true stack machines: all locals can be on the stack, and the stack shape can vary at runtime (which in turn makes validation harder). I seem to be in the minority, but I think wasm is quite different and the distinction is useful to maintain.

Comment · 4 years ago
Comment · 4 years ago
Must be because I learned some French as a kid, but I can't help reading the "oi" as a "wa" sound in this context. Probably not what the authors were going for.
Comment · 4 years ago
To expand on this, the switching argument is actually correct if you happen to know that the envelopes contain either {x, 2x} or {2x, 4x} dollars (where x = 50 or whatever), and you observe that A=100. These are effectively hidden assumptions of the argument.

If you wanted to, you could explicitly model all possible values of the envelopes, and all possible observations of A – and you'd get the right answer again, including in the case above. You just can't define A in a path-dependent way, and then treat it as having the same value in all paths.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton