Top all-time · #3873
L. Pereira
Personal blog · tia.mat.br/postsprogrammingsystems
L. Pereira's personal blog at tia.mat.br covers programming and systems. Since 2012, 20 different Hacker News readers have linked it 29 times, most often “Bootstrapping a Forth for Art”. It is still writing: the last post was on 2026-05-06, and you can follow it by feed.
Too few sampled comments (6) to say how often HN recommends it.?
Why HN links it
HN readers link this blog for systems programming posts on C, including coroutines, async I/O, string parsing techniques, and the internals of the Lwan web server.
Summarised by Claude from a sample of 6 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Bootstrapping a Forth for Art2 people · 2 mentions · first linked 2025-08-30
- Integer to String Conversion (2014)2 people · 2 mentions · first linked 2025-07-07
- Using emojis to identify threads in log messages2 people · 2 mentions · first linked 2023-12-18
- Life of an HTTP request, as seen by my toy web server2 people · 2 mentions · first linked 2014-10-06
- /posts/2018/02/01/more_on_string_switch_in_c.html2 people · 2 mentions · first linked 2018-09-14
- /blog/html/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html2 people · 2 mentions · first linked 2014-10-07
What Hacker News says?
setjmp()/longjmp() will work, but they're sort of inefficient as, at least under POSIX, they will save and restore the signal mask, which makes for two round-trips to the kernel just for a coroutine context switch. My web server uses coroutines, and for x86 and x86-64 it uses open-coded assembly routines to yield/resume, with fallbacks to setjmp()/longjmp() on other architectures. It works fairly well, performance-w…
Comment linking /blog/html/2014/10/06/life_of_a_http_request.html
on “How We Designed for Performance and Scale”Submitted Life of an HTTP request, as seen by my toy web server as a story · 117 points
HN discussionYes, Lwan's thread scheduler is pretty simple, and can be borderline useless if a thread blocks. This 2014 blog post has more details; not much in that regard has changed since then: https://tia.mat.br/posts/2014/10/06/life_of_a_http_request.h...
Comment linking /posts/2014/10/06/life_of_a_http_request.html
on “Lwan: A high-performance and scalable web server”Submitted Partially Applied Functions in C as a story · 105 points
HN discussion> Lookup tables are always faster than calculation - is that true? Maybe on the Z80. Contemporary RAM was quite fast compared to it, by our sad standards. A table lookup per byte will see you hit a pretty hard limit of about 1 cycle per byte on all x86 CPUs of the last decade. If you’re doing a state machine or a multistage table[1] where the next table index depends on both the next byte and the previous table valu…
Comment linking /posts/2014/06/23/integer_to_string_conversion.html
on “I Ported SAP to a 1976 CPU. It Wasn't That Slow”Submitted Integer to String Conversion (2014) as a story · 32 points
HN discussionMy web server, uses the same pattern. There's an article explaining it in details here: http://tia.mat.br/posts/2014/10/06/life_of_a_http_request.ht...
Comment linking /posts/2014/10/06/life_of_a_http_request.html
on “Fast Servers”Submitted Converting GW-BASIC to the Z80 as a story · 32 points
HN discussionyeah i like this model. then you can use whatever synchronization junk you prefer to share state between the threads, if you have any. your library looks well written and clean. thanks for sharing. if anyone else wants to go coroutine spelunking, these were interesting to me: https://github.com/higan-emu/libco/tree/master https://github.com/Tencent/libco https://github.com/hnes/libaco https://kernel.googlesource.com…
Comment linking /posts/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html
on “Show HN: Neco – Coroutine Library for C”Submitted Reducing Lwan memory usage by 2670% as a story · 8 points
HN discussionFor more information on some of the C magic behind this well-written piece of software, check out the authors blog[1]. It should be pretty interesting for any systems programmer. [1]: http://tia.mat.br/blog/html/index.html
Comment linking /blog/html/index.html
on “Lwan: Experimental, scalable, high performance HTTP server”Submitted Bootstrapping a Forth for Art as a story · 4 points
HN discussionThe section on Coroutines links to itself; perhaps you meant it to link to your other article on Coroutines? ( http://tia.mat.br/blog/html/2012/09/29/asynchronous_i_o_in_c... )
Comment linking /blog/html/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html
on “Life of an HTTP request, as seen by my toy web server”Submitted Integer to string conversion as a story · 4 points
HN discussionThe bit vector does give a nice compression compared to the jump table. But I believe the main thing to do for speeding up string parsing is to consume more than one character at a time. I personally found the techniques in https://tia.mat.br/posts/2018/02/01/more_on_string_switch_in... very helpful to explain these issues. EDIT: I especially like this statement from the conclusion: > The good thing about the switch…
Comment linking /posts/2018/02/01/more_on_string_switch_in_c.html
on “Bit Vectors and my first steps into assembly”Submitted Mustache templates in C as a story · 3 points
HN discussionShameless plug, inspired by pledge(2), if you're a Linux rather than BSD person: how to use elementary virus writing techniques to sandbox programs under Linux using seccomp-bpf: https://tia.mat.br/posts/2016/11/08/infect_to_protect.html
Comment linking /posts/2016/11/08/infect_to_protect.html
on “Why pledge(2) or, how I learned to love web application sandboxing”Submitted Mustache templates in C as a story · 3 points
HN discussionI like this trick that I use in C. It's limited, as it only matches string prefixes, but it works pretty well in the end: https://tia.mat.br/posts/2018/02/01/more_on_string_switch_in... It allows you to write something like this: https://github.com/lpereira/lwan/blob/master/src/lib/lwan-ti... -- which is generated as a binary search by GCC.
Comment linking /posts/2018/02/01/more_on_string_switch_in_c.html
on “Cttrie – Compile-time trie-based string matching for C++”Submitted Using emojis to identify threads in log messages as a story · 2 points
HN discussionThe lwan webserver uses them: http://tia.mat.br/blog/html/2012/09/29/asynchronous_i_o_in_c...
Comment linking /blog/html/2012/09/29/asynchronous_i_o_in_c_with_coroutines.html
on “Coroutines in C with Arbitrary Arguments”Submitted Locale-neutral case-insensitve string equality comparison as a story · 2 points
HN discussionI recently wrote one, in C, using tail calls to implement dispatch with CPS: https://tia.mat.br/posts/2025/08/30/forth-haiku.html It's already pretty efficient but I'm working on it to make it even more efficient so I can use it as some sort of primitive fragment shader for an art project. This Forth variant is intended to execute Forth Haikus, as defined by the Forth Salon website.
Comment linking /posts/2025/08/30/forth-haiku.html
on “Show HN: I built a minimal Forth-like stack interpreter library in C”Submitted Implementing a Playlist Shuffler as a story · 2 points
HN discussionSubmitted Lwan Web Server: 5 years in snippets as a story · 2 points
HN discussionSubmitted Infect to Protect as a story · 2 points
HN discussionSubmitted A new hash table for Lwan as a story · 1 points
HN discussionSubmitted How async/await works in the Lwan web server as a story · 1 points
HN discussionSubmitted Using emojis to identify threads in log messages as a story · 1 points
HN discussion