Top all-time · #7744
shreevatsa.net
Personal blog · shreevatsa.net · on HN as svatmathprogrammingwriting
shreevatsa.net is a personal blog at shreevatsa.net about math, programming and writing. Since 2019, 10 different Hacker News readers have linked it 43 times, most often “Möbius Printing Helper”. It is still writing: the last post was on 2026-10-31, and you can follow it by feed.
Most-linked posts?
- Möbius Printing Helper4 people · 4 mentions · first linked 2021-03-03
- The TeX program: A program of study2 people · 4 mentions · first linked 2020-12-07
- Reverse-Engineering the "Irish Logarithm"2 people · 2 mentions · first linked 2023-10-02
What Hacker News says?
I'm glad to see this here, for two reasons: (1) In general it's nice when people return to the primary sources rather than second-hand accounts, and (2) this particular topic is of interest to me; here are a couple of previous comments that were somewhat well-received on HN: https://news.ycombinator.com/item?id=22221592 https://news.ycombinator.com/item?id=18699718 For further context you can look at past and future…
Comment linking /post/programming-pearls/
on “Donald Knuth was framed”Submitted Möbius Printing Helper as a story · 276 points
HN discussionThe equivalent from the TeX world is `xii.tex`: \let~\catcode~`76~`A13~`F1~`j00~`P2jdefA71F~`7113jdefPALLF PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;A$$FevP A@@FfPARR717273F737271P;ADDFRgniPAWW71FPATTFvePA**FstRsamP AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx :76jelse&U76jfiPLAKK7172F71l7271PAXX71FVLnOSeL71SLRyadR@oL RrhC?yLRurtKFeLPF…
Comment linking /post/xii/
on “Xmas.c (1988)”Submitted Douglas Adams on the English–American cultural divide over "heroes" as a story · 17 points
HN discussion(TLDR: Compare [2] and [4].) These are examples of files that have gone the route DVI → PS → PDF, where the PS file contained Type 3 (bitmap) fonts without hinting instructions for on-screen viewing. If you have the original PS file you can often fix them with Heiko Oberdiek's amazing `pkfix` (and `pkfix-helper` if needed) tool [1]. (You can zoom the PDF to 500% to see the font's glyph shapes down to actual pixels;…
Comment linking /post/2022-pkfix-etc/tr-98-033_pkfix-helper_pkfix_pstopdf.pdf
on “Donald Knuth – The Patron Saint of Yak Shaves (2017)”Submitted The TeX program: A program of study as a story · 3 points
HN discussionThe comparison has two points one of which says that for "Complex scripts (Devanagari, Arabic)", ghostty-web has " Proper grapheme handling". But when I tried something extremely simple at the https://ghostty-web.wasmer.app/ or https://ghostty.ondis.co/ demos (just `echo "कवि"`), it failed pretty miserably (and in different ways in the two demos). So I'm not sure what to make of it. (Seems slightly better in the act…
Comment linking /post/terminal-indic/
on “Ghostty compiled to WASM with xterm.js API compatibility”Submitted Two ways to crack a walnut, per Grothendieck as a story · 2 points
HN discussionI guess this was posted after someone saw this come up on HN yesterday: https://news.ycombinator.com/item?id=31295427 I've been planning (for 2+ years now so it probably won't happen) writing a large blog post about this matter, which would be called “Tries, Packed Tries, and the Bentley–Knuth–McIlroy story”: • Part 1 would introduce the trie data structure both abstractly (the tree structure) and concretely (how ex…
Comment linking /post/programming-pearls/
on “Donald Knuth was framed (2020)”Submitted Möbius Printing Helper as a story · 2 points
HN discussionWhile the name “Rewriting LaTeX in Pure Rust” is very exciting, there are two problems: • “LaTeX” is a set of macros (ab)using the macro/text-expansion feature of an underlying TeX engine (LuaTeX, XeTeX, pdTeX, original Knuth TeX, or this one), to provide things like cross-references, section numbering, etc. When you as a typical user use “LaTeX”, you're actually using these macros, along with a huge variety of macr…
Comment linking /tex/program
on “Rewriting LaTeX in Pure Rust”Submitted More on Shuffles as a story · 1 points
HN discussionLast year I wrote a couple of similar "local" PDF tools that run in the browser with no network requests. Each is just a single HTML file that will work offline: - https://shreevatsa.net/pdf-pages/ is for extracting pages, inserting blank pages, duplicating or reversing pages, etc. - https://shreevatsa.net/pdf-unspread/ is for splitting a PDF's "wide" pages (consisting of two-page spreads) in the middle. - https://s…
Comment linking /mobius-print/
on “Local PDF Tools – Powered by WebAssembly”Submitted Möbius Printing Helper as a story · 1 points
HN discussionThe word “typesetting” does not refer to all aspects of visual appearance, but merely to the crucial decision of where each character goes: what glyph (from the fonts available) is placed at what position on the page. This paper was first published in the ACM Computing Surveys journal, and the typesetting is fine (as you'll find if you pick up a physical copy of the journal) — I think what you're complaining about i…
Comment linking /tmp/2025-06/DEK-P67-Structured.programming.with.go.to.statements-LP.pdf
on “Revisiting Knuth's “Premature Optimization” Paper”Submitted Breaking Pills as a story · 1 points
HN discussionYou are right that literate programming first occurred to Knuth as a way to overcome the deficiencies of Pascal. Specifically, it was the product of a few things: 1. The first version of TeX was written in 1978 and spread like wildfire in a couple of years: ported by others to 200 programming environments i.e. (OS, language) pairs! So when he started writing his new version in 1980 trying to be portable to all those…
Comment linking /tex/program
on “Interview Transcript – Donald Knuth [pdf]”Submitted Reverse-Engineering the "Irish Logarithm" as a story · 1 points
HN discussionI agree with this: I found it very hard, at least until I got a good sense of the overall structure and conventions etc, to be able to understand just one part and ignore the rest. On the other hand, ironically, Knuth recommended getting familiar with the program by picking up one particular part and "navigating" the program to study just that part. (See https://youtu.be/D1jhVMx5lLo?t=4103 at 1:08:25, transcribed a…
Comment linking /tex/program/videos/s04/
on “tex.web – Version 3.141592653”I made some attempts a few years ago to read this program in its entirety. I managed only the faintest glimpse and had grand plans of making it easier. I wrote down some of it: https://shreevatsa.net/tex/program (Actually, a while after that I got more used to the style and I can now mostly read the program without the difficulties that used to bother me earlier, and I haven't gone back and updated the page. But I t…
Comment linking /tex/program
on “tex.web – Version 3.141592653”The third verse you quoted ( https://shreevatsa.net/bhartrhari/web/K157.html ) has a nice translation into English verse by Ryder: A REASON FOR RENUNCIATION Possessions leave us at the end, However long they stay; Then why not cast aside, my friend, What leaves us anyway? And if they leave against our will, The heart takes time in mending; If given willingly, they fill That heart with joy unending. The other two you…
Comment linking /bhartrhari/web/K085.html
on “Bhartrhari's Paradox”Incidentally, it is a matter of some debate whether Bhartṛhari the philosopher and Bhartṛhari the poet are the same person or two (or more, in the case of the anthology of verses). Oral tradition holds them to be the same person, scholars have debated back and forth. I have a collection of the poems here: https://shreevatsa.net/bhartrhari/web/ (will clean it up someday)
Comment linking /bhartrhari/web/
on “Bhartrhari's Paradox”I actually think it's a lovely paper (and he obviously intended to publish it, and put a lot of effort into compiling and editing it) and illustrates the nature of his writing very well: he's managed to be encyclopedic about all the topics he chose to discuss, while still having it be very personal (the matter at stake is one of programmers' style and preferences after all). This blog post ( https://blog.plover.com/…
Comment linking /tmp/2025-06/DEK-P67-Structured.programming.with.go.to.statements-LP.pdf
on “Some software bloat is OK”Here's a demonstration I made recently, of best rational approximations: https://shreevatsa.net/fraction/best — much of this Quanta magazine article sets up background on such approximations, so playing with the numbers on this web page may help build some intuition about the problem. In particular, the Duffin-Schaeffer conjecture that has just been proved involves asking about the set of irrational numbers that are…
Comment linking /fraction/best
on “New Proof Settles How to Approximate Numbers Like Pi”Thanks for making this site; I love it and have returned to it many times. (I don't mind the layout with all translations even on mobile; I just rotate my phone or decrease font size.) I read through the whole thing recently. ( https://twitter.com/svat/status/2004591889010643102 ) Thanks also for making it open-source. I used it for a blog post about a story I remembered from my school textbook :) https://shreevatsa…
Comment linking /bazin-letter-box/
on “Why Stoicism is one of the best mind hacks ever devised”(Posting here just for completeness…) Yes it can be solved optimally: https://shreevatsa.net/post/set-cover-ip/
Comment linking /post/set-cover-ip/
on “The SF Anthology Problem – Solved”See the line “The tables look a little uncouth at first but it is not hard to figure out what is going on” : this blog post is about the author's thought process in figuring out what is going on, carrying the reader along: such a figuring-out will often be messier, with occasional wrong turns, than presenting the end of the process as a fait accompli , but it can be more illuminating (like Euler's writing rather tha…
Comment linking /post/irish-logarithm/
on “The Irish Logarithm”This is a great idea; I had done something like this a couple of years ago for some specific set of videos (e.g. https://shreevatsa.net/tex/program/videos/s10/ — compare with https://youtubetranscript.com/?v=_0Cv1G_s4gQ for the same video), but never got around to making it general; glad someone has done it. It takes just a few lines of Javascript, using the Youtube API, to do this i.e. keeping the video and text in…
Comment linking /ramayana/sarga/
on “YouTubeTranscript.com”Big fan of offline tools like this. This one uses WebAssembly, but even that isn't necessary: I wrote a couple of PDF tools for my own use that simply use pdf-lib: https://shreevatsa.net/pdf-pages/ https://shreevatsa.net/pdf-unspread/
Comment linking /pdf-unspread/
on “Pdftool.org: modify pdfs offline in the browser”This is a nice article, and gently (with great explanation) introduces: • The idea of approximating a real number by rational numbers (e.g. √2 ≈ 99/70), • Dirichlet's approximation theorem, that every real number x has a rational approximation p/q such that |qx - p| < 1/(N+1) using a denominator q ≤ N, for any integer N, • The Duffin–Schaeffer conjecture, recently announced to be proved. BTW, I got the above "√2 ≈ 9…
Comment linking /fraction/best
on “Rational Math Catches Slippery Irrational Numbers”