Better HN
topnewbestaskshowjobs
Log inSign up

smj-edison

885 karma · joined Feb 20, 2024 (2y ago) · 475 submissions

Email is: stephen dot mason dot jones at the big alphabet company.

Github is https://github.com/smj-edison/

Submissions

comment 3d ago · link · parent

Question regarding pixels: I got a pixel 9a with the idea of switching over to grapheneos, but the problem is how do I migrate to grapheneos if my phone has been running stock android for a couple months now? I can't self-migrate as far as I can tell, and I don't think I can restore from a Google backup.

comment 5d ago · link · parent

I read through the first half, but the graph operations are really confusing me. What's the difference between a principal port and auxiliary ports? A lot of the rewrites are swapping them around so I'm confused what their significance is.

comment 5d ago · link · parent

Reading through this it reminds me of all the exciting computer hardware research happening in the 80s, with the rise of VLSI and systematizing chip design. Then Intel ate everyone's lunch, lol.

I think for HPC there's still a lot of untapped potential for chips like these where you're doing primarily "computation" in the sense of crunching numbers. We're seeing that with GPUs, TPUs and with Tenstorrent. For general purpose applications though Amdahl's law strikes again, and the longest serial task is what ends up slowing everything down. It seems modern CPUs are mainly designed around this bottleneck, which is why imo out of order execution will almost always beat in order execution designs for most day-to-day needs.

One other thing I've been wondering about, what would realtime programming look like on Frostbite? Could you make guarantees in execution time? To be fair realtime is quite tricky on out of order cores, but I'd be curious what mental model you'd use for realtime on something like frostbite, or if serial logic still rules.

comment 1w ago · link · parent

> Agreed on all counts, but also I don't think you're actually refuting anything I said?

Fair enough. I guess when you said "progressively less wrong theories" I was thinking that the wrong theories are still quite useful in the right contexts, but I can see that you feel the same :)

> But the computational complexity of full QM is utterly absurd.

It's always a good sign when your naive algorithm scales 6^N /s. Not exactly simple in the sense of cellular automata like you mentioned, lol. But yeah, it's kind of insane. I'm hoping that we can train MLIP models for specific cases though, like could we fine-tune an MLIP to handle biochemical reactions at normal temperatures? It won't account for more exotic chemical reactions, but it would still open the door to model enzymes and receptors better. I'm hoping to go into research for QC methods because of all the cool opportunities it would open up (though man I have a long ways to go to even understand the math behind it).

comment 1w ago · link · parent

Reading this, it seems they're using the term "geometry" in a more abstract sense. Pretty much you can turn a reaction's state into an abstract point, and then you can plot that reaction point over time. It becomes concrete again when they plot the path of the reaction's "coordinates" and you can visually see what happened with the reaction. It's quite elegant! Like you can see a system oscillate if it circles forever, or you can see it converge if it spirals inwards.

comment 1w ago · link · parent

You may be surprised to find out that "distance" doesn't always capture the intricacies of an atom's electron configuration.

comment 1w ago · link · parent

I'd argue that the rules are needed though, because at some point we have to partition reality and say "x works this way, but y works more like this." So there's definitely less vs more accurate models, but the more accurate ones can have unnecessary mental overhead that makes it difficult to keep track of other details. I'm currently studying chemistry right now, and I've come to appreciate the layering of models happening (lewis dot diagrams for non-important details, pi bond delocalization for a planar molecule, band gap for light frequency, etc).

Also QM simulation is not completely hopeless! I'm actually doing computational chemistry research, and we're able to do reasonable approximations for around 70 atoms with a method called Density Functional Theory (DFT). And recent developments with machine learning have further given rise to Machine Learning Interatomic Potentials (MLIPs) (not to be confused with something like AlphaFold). Essentially it uses a GNN to predict the forces on all the atoms based on the current atomic arrangement, and then the simulation will advance through time by integrating (e.g. adding) the forces.

comment 1w ago · link · parent

How are you defining emergence? Because I've always thought of it as simple rules that compose creating completely counter-intuitive results, and man is there a lot of that in chemistry.

comment 2w ago · link · parent

I think the most interesting thing is that they loaded the compiled binary right into lean, if I'm understanding the technical paper correctly. Then they use ARM semantics as the base to prove other properties. That's really exciting that they went all the way to the binary level! It reminds me a bit of metamath-c, in that they verify every step of the process, all the way down to binary, so nothing in-between is missed.

comment 2w ago · link · parent

Ooh, will take a look at this, since it's directly applicable!

comment 2w ago · link · parent

I'm currently working on my own Zig project (an interpreter) and right now I'm working on designing a C interface for it. Seeing things mentioned like having objects as opaque handles, or enum-keyed getters and setters, made me think about how clunky my current API is, since I leak too many details to callers.

What really caught my attention was this: "So from the start, I took inspiration from C libraries I enjoyed working with and designed the API to have a strong, stable ABI that allows for future additions." What are good examples of this? I feel like I just don't have enough experience with well-designed C libraries to know what to look for.

comment 3w ago · link · parent

I think it's a bit unfair to mainly focus on the API surface while ignoring a lot of internal details. Linus has talked about how Linux will often have massive amounts of internal code change between releases, while the API surface stays the same. So yeah, the API might be old and crufty, but it's also been around for 30 years. And as long as the API is sufficient, it's the internals that are a lot more interesting. Radically redesigning the API every few years would just accelerate towards XKCD 927, because of backwards compatibility.

comment 3w ago · link · parent

“The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.” — Edsger Dijkstra

I've thought a lot about this quote, and the best abstractions I use are absolutely this. I love array indexing as an abstraction, but in the back of my head I have pointer + index * size. I like having the kernel do memory mapping, but I know there's a buddy allocator and TLB cache there.

comment 3w ago · link · parent

Agreed on the limits, they're quite frustrating. I've still been preferring Argon to Opus 5.5 though, because even though Argon gets details wrong, I find that it's much more creative and willing to explore ideas. In my experience Opus tends to be rather condescending and won't make room for less orthodox ideas to develop. For what I'm doing, I'd much rather have good ideas that I implement mostly by hand rather than regressing to the mean and have the LLM write the code.

comment 4w ago · link · parent

One other thought, I think another aspect of biological sciences is just how much effort it takes to do research. Hypotheses are a dime a dozen, but actually verifying these is quite difficult. It takes a lot of patience, time, attention to details, and even then it often fails to replicate.

I don't think LLMs will just magically be able to connect all the dots, because "garbage in, garbage out" still applies. And there's just too many invisible intermediate states, there is literally just not enough information to fully constrain a model. Hence my interest in scaling computational chemistry to get these intermediates :)

comment 4w ago · link · parent

Heh. Unfortunately computer science is really the weird one out where open source is the norm. A lot of computational chemistry knowledge is mainly transferred in research labs and through college classes, and you have to pay for a lot of the tools. But hopefully I can at least point you in some useful directions. Here's a bit of an overview of the CC workflow and free options (note I haven't tried all the free options):

1. The first thing you need to do is start with some atomic structure. You can often find pre-existing pieces (through websites like pubchem), but you need to cobble them together. I use chemcraft and gaussview for this, but those are paid options. I've heard good things about the FOSS program Avogadro though.

2. Once you've built the structure of interest, you want to calculate properties of it. Note that we only infrequently simulate the atom's movement, since that's quite expensive. There's a lot of techniques that let us get the most bang for buck, like calculating transition states, or states of lowest energy which we call intermediates, or running something called an IRC, which follows the molecule to its lowest energy point (note we pretty much always think about these things in terms of energy). The traditional programs I use for this are Gaussian and ORCA (ORCA is free but you do have to create an account on their forum). Newer methods include MACE and orbmol, which are pretty much only used for trajectories (e.g. running through time) as far as I know. This newer crop of programs are much more FOSS, but they aren't as rigorous so my lab uses them only as a "rough draft". I pulled in one of my current notebooks if you're curious to try it out: https://github.com/smj-edison/qc-tools/blob/main/examples/ml...

3. Interpreting results/debugging problems. This is currently done in my workflow using a python script to extract values from the job runfiles (oh yeah, did I mention the terrible DX? A lot of this stuff is done by hand-writing a job text file and then using regex to parse the logfile). We do a lot of analysis based on relative energies (this is something called transition state theory of reactions).

I definitely glossed over a lot of details, but this is long enough as is. Definitely let me know if you have questions! If you do want a "hello world" though, I'd definitely check out the notebook I linked to. You'll have to create a file called "start.xyz" with some sort of chemistry program (or use AI to pull one for you), and then you can run the system through time. I would use a system I'm researching right now, but I'm not sure what our lab's policy is on broadcasting things to the world.

comment 4w ago · link · parent

Computational biochemistry is what I'm currently pursuing, but I'm pretty new to the field so take everything I say with a grain of salt: Biochemistry is a really really really tricky problem, for a couple reasons:

1. Biology has a very nasty habit of not cleanly abstracting. It's not like we can treat every protein as a "diffuse mass" without losing a ton of important interactions. This is unlike something like CFD where you can treat a mass of water molecules with certain constants. Think of something like cancer: a small mutation to a DNA strand can cascade into a tumor. You have to deal with the mutation happening at an atomic level while scaling to a whole organism (yes I know there's models that can approximate this, but they can't capture all the interactions).

2. This brings us to modelling at the atomic level. To model a system of atoms with the Schrödinger equation, it naively scales O(6^n) per particle. Note that means every nucleus and electron, so if you have say 10 carbon atoms and 22 hydrogen you're already at 10^127 operations. We can cut corners a bit and end up with something like CCSD which scales O(n^7), or cut more corners and scale O(n^3) for DFT. DFT is pretty much the last method where bond forming and breaking is modelled, so after more corner cutting you lose losing reactions, which are important for understanding why something is happening. Most protein folding simulations (moreso prior to alphafold) run a very crude approximation that models atoms as balls on springs (things like AMBER and CHARMM), which obviously can't handle reactions.

3. If this wasn't bad enough, you also can only move through time at about 1 femtosecond (10^-15), so it takes a ton of simulation steps to get even a nanosecond in. Forget millisecond or second lengths where things start to happen.

So, while the math of the physics exists, computationally it's practically intractible. There's some exciting work with something called Machine Learning Interatomic Potentials (MLIP) which approximate DFT using a neural network which are about 1000x faster than DFT, and iirc scale much more linearly (look at things like MACE and orbmol if you're curious). So we're making progress, but we've gone from so ridiculously impossible to pretty much impossible for large systems.

I have a couple ideas about developing custom microchips to make this faster, which is why I'm pursuing this, but there's still a massive way to go!

comment 1mo ago · link · parent

The problem with lifetimes is they become a object tree, where Rc and co let you represent an object graph (well, a DAG at least). So when your problem resembles a tree, it's great, but some problems don't like being forced into that shape.

comment 1mo ago · link · parent

You don't have to deal with Rust's aliasing rules for &mut and &.

comment 1mo ago · link · parent

https://github.com/digama0/thinking-sand

comment 1mo ago · link · parent

Unless you use cgroups or turn off overcommit :) I'm also hoping to use the core interpreter on memory-limited devices like an ESP-32.

comment 1mo ago · link · parent

Oh that's exciting! I knew about the allocator work, but I hadn't heard about error reporting for failed allocations, or that it was about to be stabilized.

23.

An Ecomodernist Manifesto(thebreakthrough.org ↗)

2 points · by smj-edison · 1mo ago · discuss

comment 1mo ago · link · parent

I'm one of those people who's adopting Zig :) But I don't think it's best for every project. For context, I've used Rust before for probably two years writing a realtime audio synthesis engine, so I'm fairly familiar with Rust vs Zig for handling low level details.

The biggest reason I use Zig is it's a very explicit language. The creators made a very intentional decision to avoid too many "high level" designs. This doesn't mean there's no capabilities for abstraction (comptime is great for that), but when you see array indexing, you can think "ptr + index * size with bounds check". There's lots of other things like that where the language does exactly one thing, and that thing is a low level operation.

This is terrible when you want to create high level abstractions that hide details from the programmer, but it's what I need when doing realtime audio synthesis or what I'm doing now which is writing an interpreter. I know exactly what allocates, I know what calls IO and can block (both operations explicitly take in an allocator or IO parameter), no data structures have private fields so I can always poke around at the insides. I know what types of errors a function returns, and creating errors is cheap with Zig's error union design.

So I don't use Zig because I think it's the safer language, I know it has sharp edges because of the number of times I've caused a panic on a poisoned pointer or use-after-free. But because it gives me such a transparent view into what is happening I find it liberating.

comment 1mo ago · link · parent

I think this is fair the majority of time, but I'd like to mention Zig, since Zig has a convention of all allocations being fallible and handled. It's a pain at first to handle error.OutOfMemory at each allocating site, but I feel like I'm much more conscious of where allocation can fail and how to gracefully handle it. I've also gotten a lot better at transactions since pretty much every operation has failure points now.

In fact I've written a whole interpreter that can recover from OOM by raising a recoverable exception to the user. It's really only because Zig made recovering idiomatic, and I'm not sure I could've done it in another language (maybe Rust but I'd have to rewrite large parts of stdlib to both return an error and take a custom allocator).

comment 1mo ago · link · parent

> Despite the uncertainty, there are some clear messages we can send to the next generation of mathematicians. The first is that we stand with you. ...Second, mathematics is as important today as it ever was, and we need you. AI must not replace our collective ability to reason and deliberate, and mathematics remains a core capacity for doing so. We cannot imagine a world in which mathematics does not play an important part in our lives.

This is a really uplifting message. I'm currently in school pursuing a degree in applied math, and I've definitely felt unsettled with the recent advancements with automated proving. So it's nice to know that there's still a place for learning mathematics, and that we can find a new way forward.

comment 1mo ago · link · parent

I remember reading about their setup and it blew my mind. They have MEMS mirrors that can rotate to redirect one of thousands of fiber lines into any other fiber line by using other optics. That way you can take in like 1000 lines and optically connect it to any of the other 1000 lines.

comment 1mo ago · link · parent

Economic viability is how we support human civilization, no? Economics is literally observing how humans interact and prioritize scarce resources like time and materials. So being not economically viable means it not happening.

Is your goal to reduce global temperatures? If so, it needs to be a sustainable effort. You don't get sustainable effort without economic viability.

If your goal is to dramatically reduce temperatures in the next 5 years, why not dump SiO2 in the atmosphere? That would bring the temperature down pretty fast by reflecting out sunlight in the upper atmosphere.

But if your goal is long-term change, we need an approach that works long-term.

Edit: sorry I forgot to mention your point on coal vs natural gas efficiency, I didn't realize it was not that much gain. I still think it's worth it though, since it's still making progress.

comment 1mo ago · link · parent

Honestly burning natural gas is much better than producing electricity with coal, and we can retrofit existing coal generation plants with natural gas and be like 85% cleaner. I'm kind of fed up with the absolutist takes of "don't use any fossil fuels," since that's just completely unreasonable in the next 10-20 years. Setting up power plants takes massive investment, and excluding AI-driven demand, there's not much money in power generation.

Solar has been making incredible progress, and works in sunny locations, but it's not a general purpose solution. Nuclear is getting there, but it's still too expensive and over regulated. I can't say much about wind as I haven't looked into it enough to say. Both thermal and hydro are location dependent, so good when it works but not a general purpose solution.

So that leaves coal and natural gas. We have a lot of both, but switching over to natural gas to coal by retrofitting existing power generation would make a massive difference imo.

At the end of the day, we want diversity in the power grid, not just one thing for every place, since every place is different/has its own history.

comment 1mo ago · link · parent

Not sure if this is relevant, but I was in a discussion about heap layout a while ago, and one of the commenters was talking about how they were able to have classic lisp-style linked lists with decent performance by using a copying garbage collector: https://ziggit.dev/t/memory-layout-suggestions-for-tcl-inter...

Or were you referring more to all the intermediate allocations that aren't the object heap? V8's zones are interesting in this area, because they're like an arena, except that they're only partially reset when a zone ends, so zones can nest inside each other.

12345
16