HNHacker News
TopNewBestAskShowJobs

tkhattra

2,073 karma · joined July 11, 2015

taj <dot> khattra <at> gmail <dot> com
submissionscomments
tkhattra··on What Sun got wrong
I recall a fork/exec heavy shell script at a previous job that ran about an order of magnitude (~25s vs 3s) slower on Solaris/SparcV9 vs Linux/Intel P3 circa 2003. The standard retort back in those days was to rewrite it in Perl.
tkhattra··on What Sun got wrong
sure, they shoulda woulda coulda, but isn't that the innovator's dilemma?
tkhattra··on Sally McKee, who coined the term "the memory wall", has died
rip. i got a chuckle out of this trivia on her old website:

> Rob Pike didn't really name my favorite editor after me.

tkhattra··on A cryptography engineer's perspective on quantum computing timelines
From Filippo's post: "Sure, papers about an abacus and a dog are funny and can make you look smart and contrarian on forums."
tkhattra··on Beginning January 2026, all ACM publications will be made open access
I think they're already available? e.g. https://dl.acm.org/doi/epdf/10.1145/942572.807045
tkhattra··on Discovering errors in Donald Knuth's TAOCP
I have one for $7.68 ($2.56*3). Alas, it was for some minor typos and grammatical errors in SPOCS [1], not "real" math errors in TAOCP. Never plan on cashing it in though. And I can't remember where I stashed it, so there's that too... :)

[1] https://www-cs-faculty.stanford.edu/~knuth/cs.html

tkhattra··on Byte Queue Limits: the unauthorized biography
As the article states, BQL has been around since 2011 so it's most likely available - you can grep for CONFIG_BQL in your /boot/config-* file to confirm.

I'm not aware of any up-to-date list of drivers that support BQL. You could try something like [1], but I'm not sure if it will find all relevant drivers.

[1] https://livegrep.com/search/linux?q=file%3A%5C.c%24%20netdev...

tkhattra··on Go Is for Firmware Too
i'm not aware of any. i got the slide deck link from [1] on the TUHS mailing list.

[1] https://www.tuhs.org/pipermail/tuhs/2024-October/030941.html

tkhattra··on Wc2: Investigates optimizing 'wc', the Unix word count program
rob graham wrote an article on this wc program in the humorously titled PoC||GTFO journal - see [1]. he also tweeted about it a few years ago [2].

[1] https://github.com/angea/pocorgtfo/blob/master/contents/arti... [2] https://twitter.com/ErrataRob/status/1494009849427992576

tkhattra··on A Science of Concurrent Programs [pdf]
> He really was the first to get serious about formalizing concurrency. P and V, and all that.

The computer science of concurrency began with Dijkstra, not Wirth. And it was Dijkstra who introduced the P and V semaphore operations [1].

[1] https://www.cs.utexas.edu/users/EWD/transcriptions/EWD01xx/E...

tkhattra··on What Goes Around Comes Around [pdf]
from the abstract of a WIP followup to this article (co-authored by stonebraker and andy pavlo) - "We revisit this issue and argue that little has changed since 2005." [1]

[1] https://twitter.com/andy_pavlo/status/1659740200266870787

tkhattra··on BlazingMQ: High-performance open source message queuing system
yep, the authors of "Embracing Modern C++ Safely" [1] are Bloomberg folks

[1] https://vittorioromeo.info/emcpps.html

tkhattra··on An Architectural Overview of QNX (1992) [pdf]
Andy Valencia's open source microkernel VSTa [1] from the early 90's was inspired by QNX and Plan 9.

[1] https://sources.vsta.org:7100/vsta/index

tkhattra··on Don't abuse su for dropping user privileges (2015)
check out the setpriv command - https://man7.org/linux/man-pages/man1/setpriv.1.html
tkhattra··on Erlang/OTP 26 Highlights
i spent a couple of memorable weeks a few decades ago between jobs reading up on erlang, including joe armstrong's (RIP) wonderful phd thesis. when i started, erlang looked "strange" (i hadn't done much prolog in uni). but after being immersed in erlang for a few weeks, when i returned to look at some C/C++ code, they looked positively hideous compared to erlang's higher level functional, and prolog inspired pattern matching syntax.
tkhattra··on Investigating Linux phantom disk reads
it supports different commit modes (see [1]) - nosync, async, and sync. you can choose the more expensive but safer async or sync modes if you're willing to tolerate higher commit latency.

[1] https://questdb.io/docs/reference/configuration/#cairo-engin...

tkhattra··on Jacob Ziv has died
LZ77 and LZ78 are ubiquitous, forming the basis of compression schemes used in ZIP, PNG, GIF, and Yann Collet's Zstandard.

[0] https://en.wikipedia.org/wiki/LZ77_and_LZ78

tkhattra··on Ken Thompson's 75 year project: A century of popular music in a jukebox [video]
i submitted it ~4 days ago with the title "Ken Thompson's 75 year project", but the title was evidently too boring to gain any traction :) (like some others have commented, the raspbian os "revelation" was the least interesting part for me too)

it was cool to hear that he's still working on chess endgames, an interest which goes back many decades too [1].

[1] https://www.bell-labs.com/usr/dmr/www/ken-games.html

tkhattra··on DuckDB – An in-process SQL OLAP database management system
the latter - you can either have multiple concurrent readers or a single writer. see https://duckdb.org/faq.html#how-does-duckdb-handle-concurren....
tkhattra··on Librandombytes – a public domain library for generating randomness
sorry, yes i meant randombytes()
tkhattra··on Librandombytes – a public domain library for generating randomness
getrandombytes() in librandombytes uses getrandom() or getentropy() or /dev/urandom (in decreasing order of priority), while getrandombytes() above uses /dev/urandom exclusively.
tkhattra··on SQLite-loadable-rs: A framework for building SQLite Extensions in Rust
yes, we use BEGIN IMMEDIATE with a 2 second busy timeout. that has a worst case wait time of 2 seconds, but the 95th percentile wait time is around 100 to 1000 microseconds and the 99th percentile is around 1 to 10 milliseconds. for a high throughput and/or low latency service, a worst case wait time of 2 seconds might be unacceptable, but it's fine in our case.
tkhattra··on SQLite-loadable-rs: A framework for building SQLite Extensions in Rust
> Only send writes from a single process

depending on your use case, using multiple writer processes can be fine, e.g. multiple writer processes storing periodic metrics (once per minute) into a single sqlite database. the occasional "database is locked" error (it does happen a few times a day) is handled by simply returning and trying again at the next interval. that's fine for this particular use case - the metrics for the last interval are just delayed a bit.

tkhattra··on Programmimg Pearls (1985)
i don't think that's the text of the entire book - it looks like a scrape of the book's former website (www.programmingpearls.com).
tkhattra··on Programmimg Pearls (1985)
bentley revised and updated some of his "programming pearls" columns and published them in 2 editions of books published circa 1986 and 2000. they are among my favorite computer science books, and a great companion to more theoretical data structures, algorithms, and software engineering texts. a great mix of theory, engineering, rules of thumb, insight, creativity etc., all presented lucidly. highly recommended!
tkhattra··on Fred Brooks has died
> he said he hoped students today looked at biology the way he looked at computer science back in the 50s and 60s

that's interesting, i believe ken thompson said something similar re: getting into biology in an interview about 20 years ago.

tkhattra··on How stdbuf works
djb had a similar tool called 'nobuf', released as part of his ptyget package [0] way back on comp.sources.unix during the usenet era

[0] http://jdebp.info/Softwares/djbwares/bernstein-ptyget.html

tkhattra··on Podman Desktop: A Free OSS Alternative to Docker Desktop
a workaround to get the latest and greatest podman on debian/ubuntu is to use opensuse's kubic repo - it's even mentioned on the podman installation page [0]. but they don't recommend it for production use (though i haven't noticed any issues so far on ubuntu 22.04 and 22.10).

[0] https://podman.io/getting-started/installation

tkhattra··on eBPF – Adding functionality to OS at runtime
the bpftool-prog(8) man page documents the bpftool-prog subcommands
tkhattra··on Microsoft Office 365 Message Encryption Insecure Mode of Operation
ironically, it was Microsoft cryptographer Marsh Ray who said "Everybody knows ECB mode is bad because we can see the penguin." [1]

[1] Serious Cryptography, Jean-Philippe Aumasson

Page 1 of 2Next →