HNHacker News
TopNewBestAskShowJobs

tjalfi

3,487 karma · joined May 5, 2016

Technologist at a law firm; I don't speak for them.

Topics of Interest:

  Compilers
  Programming Languages
  Functional Programming
  Optimal Lambda Reduction
submissionscomments
tjalfi··on Ask HN: What's the best book you read in 2021?
The Poppy War trilogy is excellent albeit depressing.
tjalfi··on A Note on Distributed Computing (1994) [pdf]
(submitter)

Here's the abstract.

We argue that objects that interact in a distributed system need to be dealt with in ways that are intrinsically different from objects that interact in a single address space. These differences are required because distributed systems require that the programmer be aware of latency, have a different model of memory access, and take into account issues of concurrency and partial failure. We look at a number of distributed systems that have attempted to paper over the distinction between local and remote objects, and show that such systems fail to support basic requirements of robustness and reliability. These failures have been masked in the past by the small size of the distributed systems that have been built. In the enterprise-wide distributed systems foreseen in the near future, however, such a masking will be impossible. We conclude by discussing what is required of both systems-level and application-level programmers and designers if one is to take distribution seriously.

tjalfi··on Princeton researcher apologizes for GDPR/CCPA email study
Here's one more thread.

Ask HN: Is this CCPA-related spam? - https://news.ycombinator.com/item?id=29539266 - Dec 2021 (4 comments)

tjalfi··on Lithuania evacuates its embassy in China
> Governments are a reflection of the people. They're not some nebulous, abstract entity; they're literally made and run by people of each country. They're chosen–or in some cases imposed–to represent the people to the world. Even in dictatorships, it is the people that choose for governments to remain in power. When that stops being the case, governments are overthrown, and a new set of people take power.

This seems closer to the mandate of heaven[0] than an explanation of how governments work or why they are overthrown.

Here's another explanation based on The Dictator's Handbook: Why Bad Behavior is Almost Always Good Politics by Bruce Bueno de Mesquita and Alastair Smith. The 18 minute video The Rules for Rulers[1] has a great summary of the principles from this book.

Dictators and elected representatives have the same problem; they must keep control of key supporters and reward them in order to remain in power.

Dictatorships have only a few key supporters - heads of the army, secret police, treasury, etc. Popular support isn't required; if these people are content with your rule, you will remain in power. If they aren't, you will be replaced.

Democracies have many more key supporters; we normally call them voting blocs - suburban voters, Hispanic voters, non-college voters, evangelic Protestants, etc. Popular support from these groups is required and this difference is why democratic governments change between parties so often.

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

[1] https://www.youtube.com/watch?v=rStL7niR7gs

tjalfi··on CCPA Scam – Human subject research study conducted by Princeton University
> I can only speak for the GDPR here, but had the requests been real and valid, the worst outcome would have been a regulator telling you to comply with it. Data protection authorities are more interested in helping companies get into compliance than punishing small businesses for minor infractions. If you look at past decisions, it usually takes serious and/or systematic violations to get fined.

The US legal system is quite different; litigants are responsible for their own legal fees[0] and frivolous lawsuits[1] are common.

[0] https://en.wikipedia.org/wiki/American_rule_(attorney's_fees)

[1] https://www.azag.gov/press-release/serial-litigant-permanent...

tjalfi··on Uncomfortable Truths in Software Engineering
> This is simply because it is an intellectual field that is not subject to professional norms of cognitive workers. You will likely find, if you read period pieces or biographies of similar situtations e.g. 19th century EM engineers, that they too had an inflated sense of the scope of their understanding of matters.

Engineering education in the 19th century was a crucible; only the best and brightest successfully graduated. The following excerpts are from a blog entry[0] on the book The Great Bridge.

In three years’ time he had also to master nearly a hundred different courses, including, among others, Analytical Geometry of Three Dimensions, … Calculus of Variations, Qualitative and Quantitative Analysis, Determinative Mineralogy, Higher Geodesy, …, Orthographic and Spherical Projections, Acoustics, Optics, Thermotics, Geology of Mining, Paleontology, Rational Mechanics of Solids and Fluids, Spherical Astronomy, … Machine Design, Hydraulic Motors, Steam Engines, Stability of Structures, Engineering and Architectural Design and Construction, and Intellectual and Ethical Philosophy.

A century later, D.B. Steinman, a noted bridgebuilder and professor of civil engineering, would write, “Under such a curriculum the average college boy of today woul be left reeling and staggering. In that earlier, era, before colleges embarked upon mass production, engineering education was a real test and training, an intensive intellectual discipline and professional equipment for a most exacting life work. Only the ablest and the most ambitious could stand the pace and survive the ordeal.

… Of the sixty-five students who started out in [Roebling’s class], only twelve finished. And among those who did not finish there had been some rather severe breakdowns, it appears, and one suicide.

[0] https://philip.greenspun.com/blog/2006/01/26/favorite-extrac...

tjalfi··on Third High Severity CVE in Log4j Is Published
Some platforms have reasonable markets for libraries; Advanced Messaging Systems[0], DevExpress[1] and Aspose[2] are three examples of companies that successfully sell software libraries for .NET, Java, and Office.

[0] https://www.dimastr.com/redemption/home.htm

[1] https://www.devexpress.com/

[2] https://www.aspose.com/

tjalfi··on Ask HN: What are the best books for professional effectiveness?
The Unwritten Laws of Engineering by W.J. King.

It's a bit dated but has a lot of helpful advice - I wish I had read it when I started my career.

tjalfi··on Windows 11 Officially Shuts Down Firefox’s Default Browser Workaround
> You'd think MS would be able to unify all this mess and consolidate Windows settings, but no.

Removing or redesigning the Control Panel would break third-party apps that rely on the existing structure; Raymond Chen's blog[0] has mentioned apps doing this.

[0] https://devblogs.microsoft.com/oldnewthing/

tjalfi··on HTTP/3 Is Fast
The TCP checksum catches some issues but it won't detect everything. Other newer algorithms like CRC32C are much more effective at detecting corrupt data.

The following is an excerpt from Performance of Checksums and CRCs over Real Data[0].

The TCP checksum is a 16-bit ones-complement sum of the data. This sum will catch any burst error of 15bits or less[8], and all 16-bit burst errors except for those which replace one 1’s complement zero with another (i.e., 16 adjacent 1 bits replaced by 16 zero bits, or vice-versa). Over uniformly distributed data, it is expected to detect other types of errors at a rate proportional to 1 in 2^16.

If you're deeply interested in this topic then I would recommend Jonathan Stone's Phd thesis.

[0] https://www.researchgate.net/publication/3334567_Performance...

tjalfi··on Go Replaces Interface{} with 'Any'
IntelliJ, Resharper, and presumably Rider have structural search and replace[0]. It's available for at least C#, Java, and Kotlin.

[0] https://www.jetbrains.com/help/idea/structural-search-and-re...

tjalfi··on Go Replaces Interface{} with 'Any'
I'm not sure about Copilot but IntelliJ IDEA's structural search and replace[0] is well suited to this task.

[0] https://www.jetbrains.com/help/idea/structural-search-and-re...

tjalfi··on Notes on the Go translation of Reposurgeon (2020)
go-sumtype[0] has completeness checking for sealed interfaces.

[0] https://github.com/BurntSushi/go-sumtype

tjalfi··on PDM: A Modern Python Package Manager
There's always Jim Waldo's proposed rule for the C++ standards committee.

Every extension proposal should be required to be accompanied by a kidney. People would submit only serious proposals, and nobody would submit more than two. — Jim Waldo

tjalfi··on Endiannes and Polymorphism in Rust
If you're looking for prior art, Ada has the Bit_Order and Scalar_Storage_Order attributes[0]; the latter is a GNAT extension.

[0] https://www.adacore.com/gems/gem-140-bridging-the-endianness...

tjalfi··on Dam the Bering Strait, use nuclear-powered propellers to melt poles (2020)
If you enjoy reading about mega projects then I would recommend Engineers' Dreams by Willy Ley. It’s an older book on large scale civil engineering proposals such as draining the Mediterranean sea, creating an inland sea in the Sahara, and irrigating the Jordan valley.
tjalfi··on Ask HN: Why is Docusign a $50B company?
David Friedman's Legal Systems Very Different From Our Own has a chapter on the Icelandic legal system.
tjalfi··on Ask HN: Why is Docusign a $50B company?
The UK used to have private prosecution. If you're interested in this topic, there's a chapter on it in the book Legal Systems Very Different From Our Own.
tjalfi··on Ask HN: What are the best-designed things you've ever used?
The Nack Pro utility knife[0][1] is a great tool; it's easy to operate one-handed and is virtually indestructible. The handle contains 30 blades in a rotating magazine; you change blades by rotating the base of the handle. I bought one in the early 2000s and it will probably last me the rest of my life.

[0] https://toolmonger.com/2008/12/08/utility-knife-revolver/

[1] https://www.ebay.com/itm/324381893450

tjalfi··on Consider LibreSSL as default OpenSSL provider again
> Someone's lawyers seem to understand it better than he did, company's seem eager to settle rather go to trial when they are found to be violating it.

It's often substantially cheaper to settle lawsuits than go to trial. This says more about our legal system and the American rule[0] than anything else.

[0] https://en.wikipedia.org/wiki/American_rule_(attorney's_fees)

tjalfi··on Individuals Matter
Peopleware calls this the Spanish Theory of Management[0].

Historians long ago formed an abstraction about different theories of value: The Spanish Theory, for one, held that only a fixed amount of value existed on earth, and therefore the path to the accumulation of wealth was to learn to extract it more efficiently from the soil or from people’s backs. Then there was the English Theory that held that value could be created through ingenuity and technology. So the English had an Industrial Revolution, while the Spanish spun their wheels trying to exploit the land and the Indians in the New World. They moved huge quantities of gold across the ocean, and all they got for their effort was enormous inflation (too much gold money chasing too few usable goods).

The Spanish Theory of Value is alive and well among managers everywhere. You see that whenever they talk about productivity. Productivity ought to mean achieving more in an hour of work, but all too often it has come to mean extracting more for an hour of pay. There is a large difference. The Spanish Theory managers dream of attaining new productivity levels through the simple mechanism of unpaid overtime. They divide whatever work is done in a week by forty hours, not by the eighty or ninety hours that the worker actually put in.

[0] https://blog.bryanbibat.net/2009/08/31/spanish-theory-of-val...

tjalfi··on Running a Law Firm on Linux
> Basically all of these things are teething problems. The early adopters have problems, the problems get solved, then they're solved for everybody

It's not just teething problems.

Using OpenOffice and Linux means that you're opting out of the substantial ecosystem of legal-specific Word add-ins - document templates for court filings, semantic analysis for contracts, metadata scrubbing, etc. Most of these tools are only available for Windows although some of them support Macs. A small practice can get away with using Linux but a large firm would be foolish to do so.

tjalfi··on Running a Law Firm on Linux
> Pretty sure you can edit most office documents in google docs via the browser without issue.

That's just the tip of the iceberg. Using Google Docs means that you're opting out of the substantial ecosystem of legal-specific Word add-ins - document templates for court filings, semantic analysis for contracts, metadata scrubbing, etc.

tjalfi··on Upcoming Features in Go 1.18
go-sumtype[0] has completeness checking for sealed interfaces.

[0] https://github.com/BurntSushi/go-sumtype

tjalfi··on Simple Linux kernel memory corruption bug can lead to complete system compromise
The Stratus recommendations for structure marking would be a bit harder to defeat.

Here's an excerpt from an old Stratus presentation[0] on writing robust software.

Add TYPE, SIZE, VERSION, and OWNER to data structure

TYPE: Unique number for each different structure

SIZE: in bytes

VERSION: Changed whenever structure declaration changes

OWNER: Unique ID of owner, must be independent of structure contents; can be UID, least significant bits of clock, etc.

[0] https://web.archive.org/web/20170303065858/http://ftp.stratu...

tjalfi··on Intel’s future now depends on making everyone else’s chips
Organized stay-behind[0] operations such as Operation Gladio[1] were common in western Europe during the Cold War.

The Taiwanese military has had decades to prepare for a Chinese invasion; it would be surprising if they didn't have a similar setup in place.

[0] https://en.m.wikipedia.org/wiki/Stay-behind

[1] https://en.m.wikipedia.org/wiki/Operation_Gladio

tjalfi··on Simple Linux kernel memory corruption bug can lead to complete system compromise
Multics and Stratus VOS are two operating systems that use structure marking[0].

[0] https://multicians.org/thvv/marking.html

tjalfi··on It takes a PhD to develop that
Screen reader support[0] may have a noticeable performance cost.

[0] https://github.com/microsoft/terminal/issues/10528#issuecomm...

tjalfi··on Succinct Dynamic Data Structures (2001) [pdf]
Here's the abstract.

We develop succinct data structures to represent (i) a sequence of values to support partial sum and select queries and update (changing values) and (ii) a dynamic array consisting of a sequence of elements which supports insertion, deletion and access of an element at any given index.

For the partial sums problem on n non-negative integers of k bits each, we support update operations in O(b) time and sum in O(logb n) time, for any parameter b, lgn/ lg lg n ≤ b ≤ nƐ for any fixed positive Ɛ < 1. The space used is kn+o(kn) bits and the time bounds are optimal. When b = lgn/ lg lg n or k = 1 (i.e., when we are dealing with a bit-vector), we can also support the select operation in the same time as the sum operation, but the update time becomes amortised.

For the dynamic array problem, we give two structures both using o(n) bits of extra space where n is the number of elements in the array: one supports lookup in constant worst case time and updates in O(nƐ) worst case time, and the other supports all operations in O(lg n/lg lg n) amortized time. The time bound of both these structures are optimal.

tjalfi··on Tesla opens a center on Native American land, selling cars straight to consumers
Dealer's Choice[0] explains why these laws were originally passed; Ford and GM forced dealerships to accept new cars during the 1920 depression and the Great Depression. The laws persist because car dealerships are well-connected politically and donate heavily to campaigns; it's just a special interest group protecting their business model.

[0] https://www.newyorker.com/magazine/2006/09/04/dealers-choice...

← PreviousPage 4 of 22Next →