Pinned Tweet
"Accelerated SQL for JSON with #AVX512 #golang" (github.com/SnellerInc/snelle…)
I'm happy to announce the commercial project I co-authored is open-sourced now. It's an SQL-compatible query engine built entirely around AVX512. A lot of neat and clever code inside. :)
WSL decided to upgrade itself at 9AM, killing my two long-running sessions. What a beautiful start of the day...
Enumerate all places where this code may possibly cause an exception.
Can this code be a source of program's termination?
Can this code allocate on a heap?
```
FooBar math_is_fun(Foo foo, Bar bar) {
return a + b * 2;
}
```
Replying to @pshufb
Actually you're thinking of C. C programming language has always been extremely memory unsafe; C++ is actually safer than C in that regard with the invention of smart pointers. And before C, Assembly was even more unsafe.
Says "AI generate bugs"
Creates language responsible for half of security issues in the world
The creator of the C++ programming language, Bjarne Stroustrup, says AI-generated code is not successful and calls the idea of using natural language as a programming language idiotic.
He says humans will still write code and use abstraction.
According to him, AI generates bloated code with more bugs and security holes, making it hard to validate.
He also says the senior developers needed to validate it are starting to retire because they don’t want to deal with validating something that changes every time you change your prompt.
He goes on to say that AI is not good at writing safety-critical or performance-critical code: “Now, let’s say that 70 or 80% of the world’s code doesn’t fit that pattern, but it’s that 10, 20% of the code that I’m interested in.”
Wojciech Muła retweeted
I do this little trick where I ask the model a basic question, let it give me a vaguely correct answer, then just say, "you're wrong." It quickly backtracks and completely nukes its previous position. Works every time.
We are thousands of light years from AGI. Some AI has just told my friend: "optimism is mostly harmless".
Wojciech Muła retweeted
Is this the simplest (and most surprising) sorting algorithm ever?
arxiv.org/abs/2110.01111
The more I think about the perfect ISA, the more I'm sure we need VLIW, where W = a cache line. A cache line should be a basic block, and a CPU would know if BB is executed once, is a tight loop or is unrolled n times. This is a good start, everything else is tiny detail.
Wojciech Muła retweeted
CPU3命令でうるう年を判定する最適化。
bool is_leap_year_fast(uint32_t y) {
return ((y * 1073750999) & 3221352463) <= 126976;
}
A leap year check in three instructions
hueffner.de/falk/blog/a-leap…
GCCの実装でも取り入れられた。
github.com/gcc-mirror/gcc/co…
I'm writing a tiny photos organizing software for myself and it's slowly reaching the point of "custom query language doesn't sound like stupid idea". Worse is that I'm considering LISP as a QL.
Wojciech Muła retweeted
We are living through a Gutenberg moment. Before the printing press, books were rare and expensive. Gutenberg showed how to make them far cheaper. It took decades, but books became widely available in Europe. Then came the scientific revolution.
Today it is fashionable to treat science as a closed institution run by an elite. The scientific revolution was not that. It let ordinary people raise ideas and objections. Newton’s father was an illiterate farmer. Galileo came from a modest family; his father was a musician.
Many lost out to the printing press. Kings, queens, and later wealthy publishers fought to control what could be printed. The Statute of Anne in 1710 introduced modern copyright. It took another two centuries to spread across the world.
Software followed a similar path. Early software was freely copied. People treated it more like mathematical techniques or fashion: if you saw something you liked, you could reproduce it. Bill Gates and others stopped that. Software became like books. You could still copy it for friends, but it was wrong. Businesses could not, because they could be sued.
People like to share and copy. “You can’t just copy this piece of code” is a legal construction, not human nature.
Open source was a hack on a relatively recent copyright system (1710 is not ancient). It took decades, but it became a massive success. Even Microsoft is deep into open source now.
AI changes the world again. It is another Gutenberg press: it makes copying cheap. I can take any book and have an AI rewrite it to sidestep copyright. This need not be done with bad intent. I still write books (two are in preparation), but anyone can now “write” a book with little effort. Mine will remain better, at least until the models improve further.
Anyone can also clone, port, or adapt the thousands of pieces of software I have published over the last two decades. The reputation economics shift. You can invest months in a beautiful library only to see it copied, emulated, and ported hundreds of times the minute it is released, often without credit.
At first glance this looks bad for the little guy. That is how copyright has always been sold: “it protects the little guy.” What is at stake is different. Power is shifting. Just as with the printing press, the technology may favour ordinary people more than is obvious.
A single person today can take software that a large corporation uses as a barrier and produce their own version with the engineering resources of one individual. This is not theory. It is happening now. If I were a powerful but stagnant organization, I would be worried about what the common man can now do.
I wanted to add drag-and-drop support for my in-house egui app. It was so cumbersome and complex that I downloaded Codex. After few prompts d&d works as I wanted -- and my brain is free of all d&d insanity.
Wojciech Muła retweeted
It just occurred to me that carry-less multiplication of an integer with -1 converts from Gray code back to ordinals. Maybe we do want to have carry-less multiplication in microcontrollers?





















