HNHacker News
TopNewBestAskShowJobs

dhosek

9,983 karma · joined October 22, 2010

Writing a successor to TeX/LaTeX: https://finl.xyz

My book on LaTeX: https://preppylion.com

Writing fiction (and occasionally poetry): https://dahosek.com

submissionscomments
dhosek··on Crypto in 2026: Oh, This Is the Bad Place
I don’t think I’ve ever worked with anyone in engineering who I would consider degenerate aside from the occasional crypto supporter. Even 30% seems like a scary high percentage of degenerate engineers.
dhosek··on Mexican government unveils a prototype for a new homegrown, ultra-affordable EV
What’s interesting is that while most cars imported into Mexico (except for those from the NAFTA region) face stiff tariffs or outright bans (if you move to Mexico from the US you can only bring your car if it was manufactured in Mexico/Canada/US, other cars are not allowed at all), but electric cars have no tariff at all which means that, e.g., Chinese EVs are widely available there. The BYD Seal sells for MXN888000 in its AWD/big battery configuration which translates to USD51,184¹ which is comparable to the Tesla Model 3 price in Mexico (and a bit lower than the equivalent price in the US). Mexico is going at the EV transition with a two-pronged strategy: Building a domestic industry and encouraging imports at the same time. This seems to be the exact opposite of the US strategy.

⸻

1. Worth noting two key differences between the Mexican and American car buying experience: First, prices are fixed. There’s none of this negotiating with the dealer about the price or upselling you on undercoating stuff. You can look on the website and know what the price is. Second, instead of sales tax, Mexico uses VAT to achieve the same purpose. As a result, the price you see for a product is going to be the actual price you pay walking out the door and not the price before sales tax (at my current residence, the total sales tax is currently 10%). As a consequence, some things that might appear to be slightly more expensive in Mexico, depending on where you live, may actually be slightly cheaper.

dhosek··on My Mathematical Regression
There’s a bit of hand-waving in the jump to 2n choose n solution, which I suppose is fine, and my ex–math teacher brain really wants to have a proper proof or at least solid reasoning rather than “it follows the pattern” based on three observations.

But I am reminded of how during my engagement 24 years ago, my future father-in-law raised an issue of being able to determine whether they were getting the full amount of sandpaper on large rolls that they were paying for. I was able to simplify the question a bit to one that treated the rolls as if they were simple concentric rolls of a specified thickness and from there could turn it into the good old Gaussian sum formula times 2π to get the length. The engineers working for the company came up with the same solution, but instead of using n(n-1)/2 they did the summation with multiple rows in excel.

dhosek··on Renting a sewing machine from the library
Hmm, my library had a T-Mobile wireless hotspot available and the wait time on the hold was less than what was expected. It ended up being rather fortuitous as the first half of 2020 corresponded to the beginnings of the dissolution of my marriage and I spent that time living in a mostly unfurnished house with no internet and I got the hotspot just before everything shut down in March and it enabled me to have internet for a couple months while the library was closed.
dhosek··on Renting a sewing machine from the library
That theoretical wait time doesn’t usually end up being so long. Between borrowers returning things early, people on the wait list giving up and most importantly, the library deciding that the current inventory is insufficient, the wait times usually are much less than that (I’ve observed this with books and other materials at my local library and the wait on in-demand times is never as long as the queue would imply).
dhosek··on Computed goto for efficient dispatch tables (2012)
I believe that Rust does this which implies that it might be common to the clang back end.
dhosek··on Zenzizenzizenzic
Fractions are art and man, music relies so much on fractions.
dhosek··on Show HN: Are You in the Weights?
I discovered on a later try that “D A HOSEK” gives different results than “D. A. HOSEK” with the latter actually surfacing my writing, although all the summaries are full of amusing hallucinations.

The weird thing was that putting my kids’ names in (they are 12 and have no on-line presence), the system hallucinated fictional versions of them that matched their interests (my daughter a singer/actor/artist, my son a software engineer). My ex-wife, who has a published computer book to her name, on the other hand, was hallucinated as four different activists in different areas of interest.

dhosek··on Show HN: Are You in the Weights?
Don’t worry, I’ll enter your real name for you.
dhosek··on Show HN: Are You in the Weights?
So despite publishing a lot of fiction and poetry I’m apparently most well known for my contributions to the TeX, LaTeX and typography communities. It also thinks I’m a professional athlete having played professional baseball hockey and basketball.
dhosek··on Made a free macOS menu bar app that fixes typing in the wrong keyboard layout
I’ve noticed that Apple does a pretty good job of detecting when I switch between English and Spanish typing on my Mac. On my phone/iPad it tends to defer to the keyboard (I have a default English/Spanish keyboard I use the most, but I have a few others that I use less often, most notably French, which I seem to occasionally switch to without noticing and then get weird autocorrects of my writing into nearish French words. Not as bad as some of the odd texts I’ll get from my ex-wife when she dictates something in English while her phone is expecting Spanish though.
dhosek··on Made a free macOS menu bar app that fixes typing in the wrong keyboard layout
Long press on the iPhone used to (maybe still does?) omit ý on the long press for y and I think some other uncommon Czech diacriticals and I had to add a Czech keyboard to type those, but the other changes around that keyboard were really annoying and I would occasionally switch to it inadvertently causing weird autocorrect issues.
dhosek··on Made a free macOS menu bar app that fixes typing in the wrong keyboard layout
A lot depends on using a national keyboard. I use ABC - Extended as my default keyboard and turn off long press because I don’t like it, since I’d rather type ş with opt-c s and ñ with opt-n n (I’d say I type maybe 85% English, 14% Spanish and 1% Czech or Slovene), but some people prefer national keyboards for non-English which make diacriticalized letters more ergonomic at the expense of making some punctuation or symbols less accessible (I was just talking with my ex-wife who writes a lot more Spanish than I do about convenient/inconvenient keyboard layout changes—she uses the globe key switching which I avoid because like long press, I don’t like it, especially since I use it often as a fn key and the other functionality often get triggered by mistake until I disabled it).
dhosek··on TIL: You can make HTTP requests without curl using Bash /dev/TCP
When I was working at the computing center at University of Illinois at Chicago in the 80s, we found a fairly simple route to spoofing emails from other users through batch jobs on the MVS side of our mainframe. It came crashing to a halt when someone sent a spoofed email from the director to one of the other employees saying that they were fired and to bring their keys to her office immediately. I think the person responsible nearly lost his job over that, but as I recall, the ability to do this was never closed.
dhosek··on Abandoned and Little-Known Airfields
I both love and hate the 90s web design of the page. Looking through my local area (Chicago near-west suburbs), it appears to be missing two airfields that used to be nearby: Cicero Field (which is mentioned but not listed) and another one that used to be in Forest Park (which is not even mentioned).

I didn’t know about the field that used to be in La Grange, whose location is now a gravel pit (which, combined with another one on the other side of Joliet Road is responsible for the closure of a stretch of historic Route 66 although the gravel pit operators insist that despite quarrying to within a dozen feet of the roadway on either side, they aren’t responsible for the subsistence of the road.

dhosek··on But yak shaving is fun (2019)
But the name of the game is, “Don’t whiz on the electric fence”!
dhosek··on All about the IBM 1130 Computing System
A lot of our software really depends on things like fast disks and significant memory. I think we might have ended up with the development of memory-constrained algorithms that don’t exist now, and computing would be very much a batch-mode endeavor rather than the interactive process we have now.
dhosek··on Calvin and Hobbes and the price of integrity
Berke Breathed should have taken their example more seriously.
dhosek··on Calvin and Hobbes and the price of integrity
I model my parenting style on Calvin’s dad. I actually had almost the identical conversation with my kids about why old pictures are in black and white. When they were in fourth grade my daughter came home from school angry at me about having let her and her brother believe for four years that the world used to be in black and white.

They haven’t brought up bridges and weight limits yet so I can only assume they still believe that.

dhosek··on Apple's weird anti-nausea dots cured my car sickness
I have the same issue your mom does. First-person shooters give me motion sickness (which is why I never got past the first level of Wolfenstein back in the day). Maybe the newer FPS games would be better for my brain, but I don’t have much interest in trying.
dhosek··on The time the x86 emulator team found code so bad they fixed it during emulation
Thankfully we’ve moved past that era.

Now the bugs that get ignored for new features cause bad results AND bad performance.

dhosek··on The time the x86 emulator team found code so bad they fixed it during emulation
16 bits? Luxury. I had 6 colors when I was a kid and was happy to have them.
dhosek··on Fox to buy Roku
I had to look to see whether this was NewsCorp Fox or Disney Fox. In the 00s I did some contract work at Fox Filmed Entertainment (the part of the company later bought by Disney) which was introduced during interviews as Fox Filmed Entertainment We Have Nothing To Do With Fox News.
dhosek··on The experience of rendering Arabic typography and its technical debt
Also worth noting that unlike Arabic and Islam, the Jewish tradition is that Hebrew is in fact the language of God and was the pre-Babel language.
dhosek··on The experience of rendering Arabic typography and its technical debt
Nope, not at all. Monotype had a special system for doing math in hot metal typesetting. With handset type it was possible, but very time-consuming. You can find typeset mathematics going back centuries before the computer. There were also (somewhat impractical) systems for setting music with metal type although engraving was more common because of the interactions of lines and symbols.
dhosek··on The experience of rendering Arabic typography and its technical debt
Not really. The selective pressure really comes well before that: Tabular presentation of numbers, whether that was log/trig tables or railroad time tables, there was a preference for uniform-width and regular height characters for those contexts (this is also why there is a number-width parameter in TT typography to enable a designer to let digits be variable-width in text but still allow tabular setting if desired).
dhosek··on The experience of rendering Arabic typography and its technical debt
The complexities of mixed LR and RL text are quite astonishing since it’s not really even a case of just switching modes when switching scripts since double-nested (or more) texts can change the semantics of line breaks. This article provides a good overview: https://tug.org/TUGboat/tb08-1/tb17knutmix.pdf [1]

In college [2], when I wanted to quote some texts from Exodus in Hebrew in a paper that I wrote, I ended up avoiding the issue by hand-reversing the letter order and manually breaking lines. 8 bits is insufficient to cover all the possible combinations of letters and vowel markings so the font didn’t include any vowel markings and only did dageshim for בּ and פּ if I recall correctly.

⸻

1. As an aside, it would have been really nice if Unicode provided a R-L mirrored Latin alphabet to make it easier for monolingual developers to grasp the complexities surrounding mixed directional typesetting. I suppose it could still be added, although Unicode tends towards conservatism on adding additional characters.

2. This was 1990, well before Unicode in the era of a hundred or so 8-bit character encodings, most of which were not implemented widely. I also had to type the text using the arbitrary ASCII-Hebrew mapping of the font I was using which, among other things, led me to discover that letter frequency in Hebrew is much more uniform than it is in English.

dhosek··on Tectonic: A modernized, complete, self-contained TeX/LaTeX engine
Huh? Overleaf supports XeTeX out of the box. The LaTeX project, incidentally has been moving towards requiring LuaTeX as the engine (also supported in Overleaf).

The pdftex engine is pretty much a dead end these days and I would only recommend its use for compiling legacy documents.

That said, the biggest problem is nothing to do with the source code of TeX. The change file mechanism is pretty straightforward and there have been tools for decades to allow application of more than one change file against the source, although with the standardization on web2c in the build process as well as better cross-platform C compilation in 2026 vs 1982, there isn’t the proliferation of platform-dependent change files that there were in the 80s when people were compiling on Pascal compilers that supported different subsets of the language.

But as I was saying before I got into that digression, the source language isn’t the issue with TeX so much as the basic architecture which is highly coupled to the limitations of computers in the late 70s/early 80s when even 7-bit ASCII couldn’t be assumed to be consistent between systems¹. As much as I enjoy writing TeX macros and can do wonderful things with them that most people would consider dark magic, it’s a cursed way to do programming and has no parallel in any other programming paradigm.

⸻

1. The SAIL platform at Stanford where Knuth did the initial work, for example, had ↑ in the code space ASCII designates as ^, and IBM mainframes all used EBCDIC which has the complication of having | and ¦ as two separate characters both of which were typically mapped to | in EBCDIC to ASCII conversions with the reverse conversions arbitrarily choosing one of the two characters so that there was no guarantee that you’d get the expected character in your text file conversion² or your ASCII terminal controller.

2. Which is yet another reason why non-Unix operating systems would have distinct text and binary modes for opening files.

dhosek··on macOS 27 Beta breaks the ability to boot Asahi Linux
I don’t use Windows so I don’t have advertisements on my desktop. I have had very little friction with using MacOS for development.
dhosek··on Emacs appearances in pop culture
Oh, it’s been a long time since I’ve watched the movie. Unlike I&II it does not bear rewatching, so I’m going by a memory of watching this for the first time in the 80s, probably on TV.
← PreviousPage 7 of 34Next →