878 karma · joined February 20, 2024
Github is https://github.com/smj-edison/
I'm lucky that for my side project (an interpreter) I've written all the code myself, so I've built up its design in my mind over the past year, and so as I mull over what I'm writing I start coming up with simpler designs.
Interestingly using Opus 5 (and LLMs in general) has made me worse at this, since I don't feel the pain of writing something over and over again. On the other hand, I don't really want to implement a whole stdlib, so I have it write more of the auxiliary code. The hardest thing is that I have to manually manage the context, which is painful when I personally remember every helper function and why. I have to remember to keep the list of helper functions updated, which is irritating.
Type theory, especially dependant types, are a pretty recent development, and aren't really used in practice in math. Even in Mathlib (what most people mean when they say they've used lean), they encode first order logic. The proofs are dependently typed, but the actual logic of the proof is all in ZFC.
Working with pointers in Zig is much nicer, since
1. They're not nullable. If you want a nullable pointer, you would use `?*Object` instead of `*Object`.
2. They distinguish between single item and multi-item pointers. `*u8` is a pointer to a single u8, so I couldn't add to it or index it. `[*]u8` is a multi-item u8, which you can index.
3. Pointers track their alignment. I could make a pointer with `*align(128) Object` if I wanted to tag the bottom bits for example. Zig will require casts when changing alignment, for example casting from `*Object`.
4. Everyone uses slices when possible, pretty much Rust's slices.
5. A smaller detail, but there are sentinel pointers/slices, where you guarantee that the last item is a certain things. For example, a C string would be `[*:0]u8`, because it ends with 0.
In general yes, but right now I'm contributing to folk.computer, which is a multithreaded task scheduler/central DB (among other things not relevant to the topic at hand). The biggest use of atomics is during statement insertion and removal, by using RCU operations in the central trie.
One of our current performance drags is the interpreter we use is not threadsafe, so we have to serialize and deserialize objects as they move between threads. This contributes to about 30% of Folk's CPU usage. So I'm currently working on making a threadsafe interpreter by porting the Tcl interpreter we use (Jimtcl), and I'm learning all the fun things around atomic ordering and threaded data structures. So I'm definitely the audience for these data structures.
EDIT: though I'm considering switching to a tag + 64 bit union, because of 54 bit addressing and pointer tagging. It makes it tricky to get my data layout right though, since it makes all of the structures larger.
Though in terms of practicality, Graydon Hoare has mentioned in the past that he isn't a big fan of complex systems, and so it's better to have a simple type system that covers 95% of the cases, and an escape hatch when it doesn't. I think that's still a fair assessment, but I've fallen down the proof rabbit hole so I am curious to see how far it could be pushed.
Does cordyceps have a derive macro? I can imagine that helps a lot with correct implemention, though when it comes to linked lists I can see people wanting to do it themselves.
Now to be fair, there's also examples of God (as portrayed by the writers) being vindictive and harsh. I don't have great answers for that, but I do wonder how much it is seeing through their perspective of the situation and how much it was God. (I obviously come at this as a believer).
As to being the only moral text... I certainly hope it's not, because we've learned a lot since then, and I hope what's considered truth can expand beyond one book.
EDIT: not to dismiss your points, just to say that some of us view it in a more nuanced way.
Now, maybe I'm only running into these algorithms because these are the problems I'm running into, but in the Rust community I consistently got the message that linked lists were a legacy data structure. In some cases they are, but when they do apply they do so brilliantly.
I know working in Zig leaves plenty of room for memory unsafety. Perhaps that's a bad thing. But I'm implementing an interpreter, and these algorithms are essential for it to run fast. I really do need to be aware of where every allocation happens, and what instructions the computer is running. So for now I stick with Zig, even though I know I'm opening myself up to memory exploits.
Perhaps, but what you can't clone is familiarity, polish, integration, and network effects. These companies desperately need a moat, and so for example all the new additions to Claude's web interface are becoming the products that the vast majority of people will use and be locked into (if it goes according to their plan).
But yes, nano and even femtosecond level second stuff is pretty mind bending.
I haven't seen that website before, but it sounds pretty accurate from what I've heard. It's insane how high of a mountain needs to be climbed just to catch up to the state-of-the-art, and how much work is needed to push through to figure out something truly new.
Here's to making the world a better place!
Right now the lab is having me get comfortable using software like Gaussian and ORCA by simulating a bifurcating reaction. This is a reaction that, depending on the catalyst's momentum, will change what site it bonds to (it makes either a 6-membered or 7-membered ring). I'm finding the intermediate states (where the molecule is most stable) and transition states (the tipping point), and then running trajectories to see which output is more likely.
Once I've finished simulating that, I should be comfortable enough with the process to jump on the bigger project, which is machine learning interatomic potential (MLIP) model distillation. There's a lot of exciting work around speeding up DFT methods by using machine learning (note this is not generative AI, it's merely predicting the molecule energy based on atomic positions). So my one year goal is to get on that project and start contributing.
My five year goal is to, well, graduate. But then I'll probably do a PhD in computational chemistry, since I'm really interested in ways to speed up and scale existing methods. My big dream is to simulate large biological systems while still having bond formation and breaking, to automatically elucidate biochemical pathways, but there's still a lot of steps in-between.