Implementing a GUI File Explorer from Scratch in C with minimal Dependen... youtu.be/0WTLtyVMAFs?si=OoOM… via @YouTube
25
λlain.bit retweeted
`git worktree` is eating your disk (especially with agents).
`git coworktree` is a drop-in replacement that uses copy-on-write on APFS/btrfs/XFS.
linux: 1.65 GB → 39 MB (98%)
rust: 459 MB → 31 MB (93%)
next.js: 298 MB → 21 MB (93%)
paste this to your agent:
```
Do these in order:
1. Install git-coworktree, a copy-on-write drop-in for git worktree: github.com/dwisiswant0/git-c…
2. Set up its hooks, so that the worktrees you create share disk blocks with the repo.
3. Add global instructions about it so it's used across all repos.
```
λlain.bit retweeted
minha mãe tá com suspeita de cancer no útero foi no médico e ele perguntou se ela tinha casa carro filhos família etc ela disse que sim e ele respondeu "então pronto vc tem tudo, se não tá feliz pula de uma ponte" pqp que porra é essa
λlain.bit retweeted
Replying to @fuckhunger
Médico devia fazer um teste psicológico a cada 6 meses pra saber se ta apto a lidar com as pessoas de forma humana, pq o tanto de medico sociopata q ja encontrei é brincadeira
λlain.bit retweeted
Sabe esse monte de jovens saudáveis caindo mortos por aí desde 2022? É stress, diz "a ciência". E dane-se o que dizem os estudos.
Luto Gabriel Félix: médica explica como alguém saudável pode ter uma morte súbita terra.com.br/diversao/gente/…
λlain.bit retweeted
Node.js got faster in September 🧵
The Node.js team and external collaborators have been working overtime to make Node.js as fast as possible. Node is fast and it will be the fastest place to run the huge ecosystem built for it
All of it ships in Node.js 26 and some on Node 24
λlain.bit retweeted
And here we go into the dense forest of trees.
And that also takes us past 300 pages of the book.
Making a Swift JavaScript lexer as fast as QuickJS's, with no unsafe code
I'm building Origami, a web engine in Swift, one small step at a time. This week's step: make its JavaScript lexer as fast as the lexer of QuickJS-ng, a small, well-tuned JS engine in C.
What a lexer does
A lexer is the first stage of a JS engine. It turns source text into tokens: names, numbers, strings, +, {, and so on. Every script on a page passes through it.
First: are the tokens right?
Before measuring speed, I checked that both lexers give exactly the same output. I ran all of test262, the official JavaScript test suite: 47,072 files, 73 MB. Every token from Origami was compared with the tokens of acorn (a JS parser) and of QuickJS: its kind, its position, and its value.
Result: 7,005,043 tokens, and not one differs.
How I measured speed
I wanted a fair, same-work comparison:
- Same input: the same 47,072 files, read into memory first.
- Same goals: JS has two readings of / (divide, or start a regex). Both lexers were told the same answer at each place, taken from acorn's parser.
- Same conditions: one thread, on the same Mac (M4 Max).
- The lexer only: the clock wraps only the lexing, not reading the files.
QuickJS's lexer is internal to its C code, so a small C program includes quickjs.c and calls the lexer directly.
The first run
- Origami: 275 ms, about 39 ns per token
- QuickJS: 198 ms, about 28 ns per token
QuickJS was about 1.4× faster.
Finding where the time went
I profiled both with macOS sample, running the lexer over all the files many times.
- QuickJS: almost all of its time is in one big function, next_token, where everything is inlined.
- Origami: the time was spread over many small functions, plus some reference counting that didn't need to happen.
The steps (each one measured on the same files):
1. 277 → 262 ms. Strings added each character by building a small UTF-16 view and copying it. Now they append the code units directly. Punctuators also stopped using a generic starts(with:) and compare bytes in a simple loop.
2. 262 → 237 ms. The function that reads one character had a long path for non-ASCII characters, which made it too big for the compiler to inline. I moved the long path into its own function. The short ASCII path now gets inlined everywhere. This was the best gain for the smallest change.
3. 237 → 211 ms. Each punctuator in the lookup table kept its bytes in an array, and arrays are reference-counted. Now the bytes sit in one plain integer, so a lookup does no retain or release.
4. 211 → 199 ms. 55% of test262 is comments. Once a comment has a line break, the only thing left to find is */, so it now runs a tighter loop.
Two ideas that didn't help
- Putting the common white-space characters first in a switch: no gain.
- A reserved-word table without arrays: slower or no gain.
Both were removed. A change that looks faster is not always faster, so I measured every one.
Final result (same files, same rules):
- Origami: ~200 ms, ~29 ns per token
- QuickJS: ~200 ms, ~29 ns per token
The tokens are still identical. QuickJS also does some extra work per token (it interns names as atoms), so this is a fair match on tokens, not on every detail.
The Swift code has no unsafe pointers. It's still the readable version, with a clear reference version next to each fast path and tests that compare the two.
Everything is written up step by step in the Origami book, with the tables.
zoio te desafio a maratonar essa playlist de haskell e programação funcional e virar TOP contribuidor do ghc vamo ve se tu é rardicore memo ai dps fala q é trolagi
youtube.com/playlist?list=PL…
1
91
λlain.bit retweeted
resolvi meu primeiro problema da IMO! grande momento individual para nós amantes da matemática
imo p6 1988 demorei 5 horas e 47 minutos... estourei o limite de tempo mas pelo menos resolvi, to muito feliz
λlain.bit retweeted
I wrote about who contributed to Postgres 19.
theconsensus.dev/p/2026/11/2…
λlain.bit retweeted
JavaScript engines are the most widely used language runtimes on the planet.
Reading a compact C implementation like QuickJS is one of the best ways to see how they actually work.
And ofc, Origami in just a while.
github.com/bellard/quickjs
ta na hora do brainrot
Replying to @summerson01 @MascaraDoVazio
houve o amigo ali de cima...
ACABOU!
qualquer atividade baseada puramente em conhecimento e inteligência acabou....
1
39






























