r/programmingcirclejerk • u/ituuu • Dec 24 '25
"In SumatraPDF I don’t use STL. I don’t use std::string, I don’t use std::vector. For me it’s a symbol of my individuality, and my belief in personal freedom."
https://blog.kowalczyk.info/a-u2y2/implementation-of-optimized-vector-of-strings-in-c-in-sumatrapdf.html
281
Upvotes
255
u/Snarwin Dec 24 '25
The first rule of C++ programming is to have fun and be yourself :)
206
u/seq_page_cost Dec 24 '25 edited Dec 24 '25
sumatraPDF is built by compiling and running a Go program that runs permake5 to generate a Visual Studio solution file from configuration scripts written in Lua-based DSL
AI could never replace him
101
u/nicidob Dec 24 '25
Gotta read the whole post for more classics
In general I don’t advocate writing a lot of tests.71
u/zoonose99 Dec 24 '25
/uj Sumatra is an excellent pdf reader — I’ll never allow Adobe on my main box again.
67
u/Comfortable_Job8847 Dec 24 '25
Who is Krzysztof Kowalczyk, you ask? Hehe, take a seat kid. You're in for a tale. Back in those days we were outlaws. Rebels. Free thinkers. We didn't bow down to the STL. We didn't care what the committee had to say. We were pioneers - forging our own path. That's why we all went to Krzysztof gulch. We saw how other PDF readers performed - we knew the bloat of std::string's 32 bytes of overhead - we knew how the allocator behind 'new' was siphoning performance from us to give to the lazy and unoptimizing masses. We got together, all of us. Formed a compound. We saw how software was going. We knew it was only a matter of time before it all collapsed. Before the bloat imposed by Big Compiler made the whole system fall out from under itself. Yeah, that was a good twenty years ago. Hehe. Time flies kid. It's almost there though. Some of the guys were talking - ah hell. You know what, I'll pay you $1 to bring me another beer and get out of here. This ain't no conversation to bring a kid into. Not unless you've got money on you.
62
u/voidvector There's really nothing wrong with error handling in Go Dec 24 '25
Why doesn't he just use
std::pdf?64
u/VulgarExigencies Dec 24 '25
Dunno how he ever expects to achieve performance comparable to Acrobat Reader without using the STL
11
u/joahw Dec 24 '25 edited Dec 24 '25
Seems like a reasonable implementation with a terrible API. Dude loves calling strlen. Cniles gonna cnile, I guess.
10
u/rpkarma Dec 25 '25
Where jerk
Fuck the STL all my homies hate the STL
This post written by embedded gang
20
u/TomKavees Dec 24 '25
Eh, it's a decision of a single dude in a single project, hardly a jerking material
4
u/TheFearsomeEsquilax has not been tainted by the C culture Dec 24 '25
Uh oh. Baby, you'd better get me back to that hotel. You got me hotter than Georgia asphalt.
3
u/gvozden_celik Dec 26 '25 edited Dec 26 '25
I bet he also wears a snakeskin jacket
1
u/WystanH Dec 25 '25
If I should ever be asked to provide an example of peek cringe I can now respond with: "For me it’s a symbol of my individuality, and my belief in personal freedom."