1.3K Followers
363 Following
2.3K Posts

Queer leftie anticapitalist sort currently in the netherlands; computers fear it.

I tend to infodump about the stuff I'm working on, which at the minute is mostly somewhere between a database engine and a web-based diagram editor.

I really like a language you've probably never heard of called idris that's quite different from most. I'm currently trying to teach it to people and use it to learn type and category theory. I also write a lot of rust and i used to write fedi software.

#nobot #noindex

more gayhttps://catcatnya.com/@bananas
pronounshe/they
locationnetherlands
support mehttps://ko-fi.com/dysfun

i have just had an absolutely amazing[1] idea.

instead of storing nodes of data for your datastructure, store nodes of code! do a quick specialisation of the branch function that reduces overhead - e.g. inline that small iteration loop and JIT-generate a new copy. branching over a node is thus just a call!

[1] hilarious, probably impractical

so i have been writing a small vm. i started off with wingo's garbage collector and started laying everything out.

one thing that i figured would make a big difference to performance is to cut allocations by having immediates - values that aren't hidden behind a pointer. so to support these, i do clever things to steal bits and let you get away with it. you save the allocation cost and you save the gc tracing cost.

it probably should have dawned on me earlier that in order to make this fast, you still need a certain amount of compiler infrastructure, otherwise you'll be repeatedly checking tags everywhere. so of course i need to integrate a JIT of some kind. and this is where things get tedious.

llvm is arguably the natural answer, except it's huge. but perhaps the clincher is that you basically need to understand the ABI for every platform you support, because it doesn't handle this stuff for you.

i've looked at a few things now, but none of them are quite right. most of them aren't really embeddable in c and the ones that are seem to not be great for my purposes (e.g. i will need to teach them about simd intrinsics they're missing and it's not obvious they're even built to support more than a common subset).

so i'm actually considering the thing i've been avoiding for years, building a JIT. 😬

an octopus is a collection of 8 great works.
one thing that would make something like c nicer is instructions for unrolling loops, like "the dynamic section of this should go 4 at a time" without having to unroll manually.

what is a photon actually made of?

you're not gonna believe this, but it's light.

The man who broke physics with his mind

yeah there's quite a few of them, they're called "theoretical physicists"

no comment

dead accurate
...
0.01mm

what is an electron actually made of?

oh right, it's made of an electron.

sharing the grand secret of my success, my custom agent:

#!/bin/sh
echo Task complete