λlain.bit (@lainbit) header
λlain.bit (@lainbit) profile picture

trying to be a christian + study notes + v8 + osdev + linux internals + sharing my several random thoughts + i'm practicing english + i hate web views

Joined April 2022
Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)Photo by λlain.bit (@lainbit)
kkkkkkkkkkkk isso aconteceu comigo tava com preguiça de remover do cache do autocomplete
Replying to @LiilyNightcore
azul + vermelho = roxo ficaria melhor imo
7
Replying to @ChristoPy_
os de vdd eu sei quem sao
1
1
184
λlain.bit retweeted
regra número um do design gráfico não faça uma suástica!!
41
436
81
7,721
108,248
Mano, imagine no calor insuportável do Afeganistão e a pessoa viver a vida toda vestida assim. Quanta crueldade!
Mulher muçulmana afegã chora ao descobrir que não terá mais direito a um NOME. Ela sabe o que isso significa! SEM ROSTO, SEM NOME: ELA NÃO EXISTE
1
8
54
1,325
Níveis de ponteiros em C
6
17
230
11,156
λ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. ```
27
35
2
527
36,981
my favorite jjk characters 1. gojo 2. okkotsu yuta 3. sukuna 4. toji fushiguro 5. itadori
1
1
43
for me aot ends in dawn of humanity
16
λlain.bit retweeted
uma comunidade sempre, moço
E ai rapaziada, ja sabem qual profissão seguir quando a IA substituir todos nós de dev/sec/ti?
1
7
251
λ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
175
533
123
21,173
395,676
λ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
22
1
658
13,859
Replying to @fuckhunger
Médico doente
40
λlain.bit retweeted
想把一台不用的笔记本完全改造成 Lisp machine 完全一体化的 Lisp 操作系统,窗口管理器、图形界面、编辑器、编译器、网络协议、各种应用服务全部用 Lisp 编写 #Lisp
8
8
61
8,522
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/…
10
31
2
195
4,973
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
Node.js saw more love in August 🧵 UTF-8 decoding up to 12× faster (!), with significant speedups across URLs, Web Streams, fs, and HTTP All of it landed in Node 24 & 26
1
2
1
43
3,162
λ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.
1
15
988
Replying to @greco_dev
acho q pelo mesmo motivo de não ser qualquer um que cria um sistema operacional para o desktop falta de app/conseguir rodar app feito para outra plataforma
2
732
Replying to @MafinhaBarba
não adianta muito bystander effect
1
271