Slop is code you dont read. And better models means more slop.
the solution? write sloppy tools to build stable systems.
but for the most committed people, go build new foundational systems. Rebuild github, rebuild tmux, rebuild database, and yes rebuild programming languages.
Big thanks to @swyx and the whole community for having us out at @aiDotEngineer
@samuellhuber@EffectTS_ I think OTEL is great but itβs has three problems: Itβs too big and too slow
But most importantly, Otel loses too much type information. So when you query the data, you canβt reply on structure
As a programming language nerd that's been working on a programming language for 2+ years, allow me to explain in my own words why "writing a programming language" is not fairly easy.
The first problem that you have to solve is turning the nice highlighted text that you see in the code editor into something that the CPU can actually run.
Programming languages here fall into 3 big categories:
1. Compiled languages.
2. Interpreted languages.
3. A mix of both.
Let's start with compiled languages, which may be the most obvious way of solving this problem for someone who doesn't understand much about how computers work.
The CPU runs something called "machine code", which is basically a sequence of very simple instructions, for example:
1. add two numbers
2. store the result in memory
3. subtract a new number from it
4. compare that number with 10
5. go back to step 1 if they're different
6. read a new number from memory
7. read a second number from memory
8. multiply those two numbers
...
It sounds hard to believe when you don't understand in depth how computers work but these are the instructions behind anything you could imagine: Twitter, GTA VI, Falcon 9, the doom scrolling algorithm on Instagram reels, and the neural network behind ChatgGPT.
These instructions are encoded in a binary format, CPUs only work with ones and zeros.
For example, in x86 machine code, which AMD and Intel use, "add two numbers" would be something like:
01001000 00000001 11011000
In ARM assembly, which smartphones and the new MacBooks from Apple use, it would be:
10001011 00000010 00000000 00100000
Writing binary code is so tedious and error-prone (a single wrong 0 or 1 makes the whole program wrong) that engineers invented "assembly" to make it easier, which is more similar to English. Instructions for adding and subtracting numbers, in ARM, are:
πππ ππ·, ππΈ, ππΉ
πππ ππΉ, [π‘πΉ]
πππ ππΉ, ππΊ, ππΉ
πππ ππΊ, π·0
These are "mnemonics" for add, store, subtract and compare. The "r1, r2, r3" are registers, that is where CPUs can store numbers and you have limited amount of them, for example 16 in AMD/Intel CPUs. And the x3 on the store instruction is a memory location, in memory you can store gigabytes of data but in the CPU you can only work with however many registers you have.
This is important because reading and writing to memory is slow.
Still, as a human, I don't want to be writing "compare this number with 10", I wanna be able to easily express something like "apply a discount if the cart has more than 10 items".
That is what a programming language does for you. You can write something like:
ππ ππππ.ππππ.πππππ.πππππ() > π·0 {
ππππ.ππππ.πππππ’_ππππππππ()
}
Which for any human is orders of magnitude easier to read and reason about than any machine code or assembly code.
Still, that nice if statement right there has to be converted into machine code to run on the CPU. And not only into one machine code, if you want your code to run everywhere, on a Windows PC, on a Mac, on a server... It has to be converted into multiple types of machine code, one for each target.
Now the question becomes "how". How do you go from something that kinda looks like English to ones and zeros?
First step is "parsing". You need to write a program that reads that text, which is a formal grammar with the "100 rules" that you are imagining, and turn it into something that you can later turn into machine code.
Usually it goes through multiple stages, imagine this as a factory where if you want a brick first you need to extract the raw materials, then process them to make a new material that later can be converted into bricks.
Or imagine it like crafting in Minecraft.
The "material" that the parser extracts is an "Abstract Syntax Tree". That is essentially a data structure stored in memory (it's basically organized data in memory instead of text), which makes your program easier to process. π§΅
dependencies are not going anywhere.
we don't want 8 billion browser implementations.
There are creative solutions in package managers that solve the security problems.
more to share soon!
Whatβs going to happen to open source?
A prediction:
Dependencies are over.
The same Brotli vulnerability impacted .NET, Node, Bun, Envoy and more. Dependencies are too big of a target.
When rewriting a dependency is one prompt away, why take the risk?