Koleman Nix (@kolemannix) 's Twitter Profile
Koleman Nix

@kolemannix

Building a compiler for fun: github.com/kolemannix/k1
Building a business for the difficult. CTO @pattern_data
youtube.com/@kolemannix

ID: 61524108

linkhttps://youtube.com/@kolemannix calendar_today30-07-2009 16:05:07

352 Tweet

122 Takipçi

163 Takip Edilen

Koleman Nix (@kolemannix) 's Twitter Profile Photo

Here's a little vlog of a k1 program depending on raylib, and running the same game loop at compile-time and run-time. I promise I'll get off this "everything runs at compile-time" train soon and instead just show cool stuff enabled by it; just laying foundations

Koleman Nix (@kolemannix) 's Twitter Profile Photo

Shout it from the rooftops Valentin; all of us who've become such OOP detractors have actually done the work and seen the lack of merit. One day you wake up and realize you're spending all your time playing OOP mini games instead of working on your actual system.

Koleman Nix (@kolemannix) 's Twitter Profile Photo

Working on some syntactic simplifications this week as it requires a bit less focus; specifically around casting. Casting now looks like a function call that takes one type, and the value argument parens can be elided if a type is passed. This lets me cast with

Koleman Nix (@kolemannix) 's Twitter Profile Photo

I'm finding that the key to staying productive and 'in control' in my largest and most complex programming project is my willingness to perform routine, brutal, and boring refactorings. These surgeries always have a specific goal of say, collapsing 3 concepts into 1, or

Koleman Nix (@kolemannix) 's Twitter Profile Photo

I'm a bit in love with this chunk of k1 code; we're defining a rich sum type anonymously, retrieving its schema as a sum type, pattern matching on it, binding variables, and making assertions, and it feels extremely simple and intuitive to me.

I'm a bit in love with this chunk of k1 code; we're defining a rich sum type anonymously, retrieving its schema as a sum type, pattern matching on it, binding variables, and making assertions, and it feels extremely simple and intuitive to me.
Koleman Nix (@kolemannix) 's Twitter Profile Photo

0xcaml by Jane street looks really cool; adding layouts, stack data, unboxed values, SIMD etc; essentially unlocking the performance of the hardware while remaining functional, solves what I consider to be the biggest shortcoming of all FP incarnations I've ever used: They are

Koleman Nix (@kolemannix) 's Twitter Profile Photo

Can LLMs supplement traditional optimizing compiler's rulesets and logical reasoning? Neat ideas Just need to couple this with a model of the computation and also produce an equivalence proof, or at least a mountain of equivalence evidence in the form of passing test cases

Koleman Nix (@kolemannix) 's Twitter Profile Photo

That moment when you profile your Rust or C++ and literally 99% of your time is spent in d'tors and `Drop` fns, just recursively freeing stuff that you never need to free. The dark side of RAII for sure; batch/group de-allocation is so much better

Koleman Nix (@kolemannix) 's Twitter Profile Photo

Not once in 2 years has the fact that this file, `typer.rs`, is 16,000 lines long caused me a single issue or hiccup. I've even turned line numbers off on my editor. In fact, the only hiccups and time wasting sessions have come from the times I've tried to find

Not once in 2 years has the fact that this file, `typer.rs`, is 16,000 lines long caused me a single issue or hiccup. I've even turned line numbers off on my editor.

In fact, the only hiccups and time wasting sessions have come from the times I've tried to find
Koleman Nix (@kolemannix) 's Twitter Profile Photo

In my experimental language k1, I implemented bitfields with one regular function, called at compile-time. youtu.be/bSxzW6lGWlc

Koleman Nix (@kolemannix) 's Twitter Profile Photo

I had some opinion tweets get some attention last week, which was fun, but opinions are cheap (though good ones are hard-earned!), and I prefer to share work! Here's a work log of adding a new kind of pattern matching to my experimental language and compiler

I had some opinion tweets get some attention last week, which was fun, but opinions are cheap (though good ones are hard-earned!), and I prefer to share work!

Here's a work log of adding a new kind of pattern matching to my experimental language and compiler
Koleman Nix (@kolemannix) 's Twitter Profile Photo

Just completed adding 'real' ZST (zero-sized type) support to k1 and its IR. Previously k1 had a 1-byte 'unit' type, but this doesn't actually mirror C's void correctly, as you should never read the return value from a void-returning function, and also it cannot be embedded in

Koleman Nix (@kolemannix) 's Twitter Profile Photo

Just wish people wouldn't write with such heavy LLM help. So tiresome this paragraph structure "But here's what happening. ..." "Here's what happened overnight. ..." "I need to say this clearly. ..." And the real kicker is? It's like a bad movie speech no one talks or writes

Koleman Nix (@kolemannix) 's Twitter Profile Photo

And value types, for example the subtype of point that is (3,2) or the subtype of string that is inhabited by only "hello", are now completely erased during bytecode generation!

Koleman Nix (@kolemannix) 's Twitter Profile Photo

I opted to represent this as the empty struct, and write it {}, because the knowledge builds up naturally from non empty structs, and I don't have tuples. An empty tuple written as () also works, but the name unit is kinda terrible. Size 0 array, and u0 are the other things I