Sign in

elucent

@elucent.website
267 followers 215 following 431 posts

i can live forever in formaldehyde

PostsRepliesMedia
elucent @elucent.website · 19/09/2026
columbo was so ahead of its time
real frame from a 1975 episode of columbo where as a result of misspelling their own fake country name a student protestor is holding up a sign saying "freedom for saurians". alternatively, peter falk confirmed way ahead of his time on issues in the scalie community
010
elucent @elucent.website · 07/09/2026
stupid idea buzzing around my head for like a year
its the multifandom enjoyer image but it says multifood enjoyer instead and instead of fandoms theyre enjoying different foods
110
elucent @elucent.website · 30/08/2026
function calls, monomorphization, and return type inference. pretty close to being able to lower this to the mid-level IR :)
120
elucent @elucent.website · 29/08/2026
a little more progress, on interval types and arithmetic after partial evaluation finishes
110
elucent @elucent.website · 26/08/2026
mostly been working on figuring out the compiler backend but i fixed a few bugs and now mergesort works :)
150
elucent @elucent.website · 25/08/2026
just a measly 17 times slower than python... my goal is to get this to the point of taking a futamura projection so raw interpreter performance is not that critical. if anything i'm a little surprised i'm not further behind from mit scheme
020
elucent @elucent.website · 25/08/2026
getting distracted working on a self-indulgent little lisp
130
elucent @elucent.website · 30/07/2026
do u see the vision
0205
elucent @elucent.website · 27/07/2026
haven't posted anything about compilers here in a while. here's the mandelbrot set in clover
040
elucent @elucent.website · 06/07/2026
beware the deadly sting of the mighty monarch (if you are a milkweed)
010
elucent @elucent.website · 27/06/2026
implemented a glad generator for clover, now i can spin up opengl contexts and do some rendering :)
010
elucent @elucent.website · 09/06/2026
never surpassing this moment. this is the zenith of my life
010
elucent @elucent.website · 31/05/2026
today i implemented codegen for default destructors + enough support for aggregates in my borrow checker that i can correctly check this little linked list example :)
000
elucent @elucent.website · 30/05/2026
window hello world in clover (peep that awful business forging a null in a language otherwise without nullability)
100
elucent @elucent.website · 30/05/2026
implemented move semantics
020
elucent @elucent.website · 28/05/2026
boring but important PL work today: meticulously going through every type of definition and making it so definitions that are exactly the same don't trigger duplicate variable errors. makes it so diamond imports can work, like so:
a couple small programs in the Clover programming language. there is a file a.cl that defines a constant Foo, a file b.cl that imports a.cl and defines a constant Bar, and a file c.cl that imports both a.cl and b.cl and adds Foo and Bar. this used to throw an error, since on the path to c.cl, Foo is imported twice. but now the definition of Foo from a.cl safely overlaps itself
000
elucent @elucent.website · 23/05/2026
mfw oignon
010
elucent @elucent.website · 22/05/2026
the very first automatically inserted free() call in a clover program. but oh so much work still to do
120
elucent @elucent.website · 17/05/2026
managed to come full circle enough that i fixed a longstanding troublesome generics bug (infinite instantiation depth with mutually-recursive generic functions). the typechecker is now smart enough to figure out arbitrary type parameters from the methods you use, without any typed initializer
110
elucent @elucent.website · 06/05/2026
gamedev is funny sometimes
a duckduckgo search for "overswing easing", like easing between two numbers with a bit of overshoot, but the top result is about getting better at golf
050
elucent @elucent.website · 25/03/2026
i always liked that the potion from symphony of the night is like a full-on pitcher. do you think alucard carries around little glasses or does he just chug directly from the spout
the healing potion sprite from castlevania, symphony of the night. it looks like a glass pitcher with a gold handle and contains some blue liquid
000
elucent @elucent.website · 07/03/2026
metroidbrainia alignment chart came to me in a vision
061
elucent @elucent.website · 28/01/2026
fixed enough generics bugs to write a generic userspace hashtable implementation in Clover :)
a terminal screenshot displaying code defining a hash and equals method for a type called Duck, making a set of them, adding some elements to it, and checking whether values are in the set. following this, some commands to compile and run the code, with output showing the set implementation works
100
elucent @elucent.website · 24/01/2026
ive been really relishing writing aggressively generic code lately and seeing it work first try* *accidentally pass the test despite doing at least one illegal downcast from i64 to i32
110
elucent @elucent.website · 22/01/2026
a nice consequence of UFCS is that since methods don't belong to types, the traits required by methods aren't tacitly required to instantiate the type. like how Foo here lacks a write() implementation, but we can still define both a Vec of Foo, and implement write() for other Vecs
120
elucent @elucent.website · 22/01/2026
okay sweet now ADL is working!!! one of the goals of clover is that generics should really act like compile-time multimethods, so method lookup is even more permissive than C++, to the extent that multiple instantiations can be required if a function is used in multiple compile-time contexts
200
elucent @elucent.website · 18/01/2026
here's some more examples. i feel like being able to just write "var first, second" to define a pair is very slick, but not that useful. being able to just define a List or Vec field and implicitly make the parent type generic, however, i think feels very natural and i can see it coming up a lot
000
elucent @elucent.website · 18/01/2026
despite my ADL-related woes i am reasonably proud of this new language feature in Clover: maximalist type inference for templates. you can freely omit type parameters in type annotations, constructors, and even the type definition itself!
120
elucent @elucent.website · 05/10/2025
mischievous finding from a conversation in plcord today: zig's fancy new compiler backend - the entire point of which is to compile faster than the existing LLVM one - takes more than *twice as long* as clang -O0 in total user time 🙃 benchmark is 10k quicksort functions clover ofc trashes both 😎
040
elucent @elucent.website · 29/07/2025
an underground explorer and her vehicle come face to face with a ne'er do well
010
elucent @elucent.website · 15/07/2025
was compelled to draw tenna
pixel art of tenna from deltarune chapter 3. one of the mikes is also there and just dropped the pipis
063
elucent @elucent.website · 30/06/2025
it's so funny to me how intense the scala community is. imagine making a reality show about clang libstdc++ maintainers and buying twitter ads for it, and that the reason you would do this is to fight your personal culture war against the gcc libstdc++ maintainers. that's how scala is in real life
141
elucent @elucent.website · 15/06/2025
and now clover has full support for array/slice patterns too! these even support multiple splat parameters (i.e. rest..., body...) per pattern, which i used to implement this cute BF interpreter :)
010
elucent @elucent.website · 15/06/2025
added codegen support for swizzling and tuple patterns
110
elucent @elucent.website · 08/06/2025
whew. had to make a surprising number of backend changes for this, but Clover has sum types and pattern matching now :)
140
elucent @elucent.website · 31/05/2025
post wpm
000
elucent @elucent.website · 31/05/2025
wait a fucking minute V DCE's every function even if they're public lmao??? i have to compile a shared library to get them to stick in which case it takes about 50% longer. the TinyCC component would still beat everything else but not by as huge of margins, it's about the same as codegen in clover
000
elucent @elucent.website · 31/05/2025
V doing as badly as it did was also pretty surprising since my understanding is TinyCC is actually very well optimized. a quick look at its flamegraph though shows almost all the time is in the V compiler itself, in parsing of all things lol. if i tested TinyCC on its own it would beat clover by 10x
100
elucent @elucent.website · 31/05/2025
here's the memory usage over time of each process too. clang apparently also has the lowest overall memory usage?? clover is pretty close, V is off by a factor of 2, hare is in the stratosphere (this is probably why it takes so much system time)
100
elucent @elucent.website · 31/05/2025
one last indulgent perf comparison for today: tried this same benchmark (10k quicksort functions) in a couple other systems languages. clover wins by a lot, but honestly clang did a lot better than i thought it would
110
elucent @elucent.website · 31/05/2025
aaaaaand this was in fact pretty easy to optimize, it's now about 5x faster >:)
010
elucent @elucent.website · 31/05/2025
did a pretty simple change and nuked the entire SCC resolution part of this lol. the compiler is now 30% more faster
020
elucent @elucent.website · 31/05/2025
finally, the biggest shock: 24.25% of the compile time is just formatting the ELF object! and of that, 16.93% is just putting symbol definitions into a hash table! i haven't tried to optimize this at all so it's not surprising, probably a lot can be done to improve here [10/12]
100
elucent @elucent.website · 31/05/2025
next up is IR lowering. i collected these numbers without opts, so the bulk of the time is spent simply lowering IR instructions (8.09%) and generating assembly (6.10%). i suspect doing basic register allocation would actually improve this by reducing the instruction count [9/12]
100
elucent @elucent.website · 31/05/2025
next step after typechecking (for now) is IR generation, which takes up 7.88% of total runtime. about 0.72% comes from the initial allocation of each IR function, with defining IR variables and generating conditional branches seemingly taking up a fair amount of time throughout the tree [8/12]
100
elucent @elucent.website · 31/05/2025
now for the big stuff: 33.29% of runtime in type inference. 10.83% of this is in the initial discovery pass, 3.64% in the later refinement pass, and a shocking 14.78% just to resolve SCCs in the constraint graph! i bet this can be optimized, my data structures aren't tailored for large input [6/12]
110
elucent @elucent.website · 31/05/2025
next we have scope resolution, which takes up 3.02% of total runtime. i'm a little surprised we spend about 1.82% of this just traversing the tree! we do another tree traversal to late-resolve access chains which accounts for another 0.44%, and i left validation on which is another 0.55% [5/12]
100
elucent @elucent.website · 31/05/2025
next we create the scope tree, which takes 1.16% of total compilation. interestingly a lot of what we spend time doing in this function is just handling page faults. i think this is actually a sign the pass is so cheap, most of the cost is just paging in memory to store the results [4/12]
100
elucent @elucent.website · 31/05/2025
next is parsing, which occupies 2.08% of total runtime. again i think nothing too surprising, we mostly parse statements, and the call stacks just follow the recursive structure of the source program [3/12]
100
elucent @elucent.website · 31/05/2025
first is lexing, which takes up 2.97% of total compiler runtime. honestly not too much to see here! we spend most of our time (1.24%) lexing identifiers, 0.22% lexing numbers, 0.64% allocating storage for the token vector, and 0.15% handling indents and dedents [2/12]
110