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 File for divorce from LLVM
Uber has a support contract[0] with the Zig Software Foundation.

[0] https://jakstys.lt/2022/how-uber-uses-zig/

tjalfi··on Cydra 5 supercomputer: design philosophies, decisions, tradeoffs (1989) [pdf]
> The late 80s/early 90s was such an interesting time for supercomputer architectures. I don't remember ever hearing about Cydra. But there were lots of niche ones -- Kendall Square Research had the ALLCACHE architecture, there was the Connection Machine from Thinking Machines, and the Tera MTA with lots of threads to hide memory latency. There are lots of others (anybody have an interesting or favorite one I'm forgetting?)

Multiflow's [0] Trace VLIWs were pretty impressive. They had three models - 7-wide, 14-wide, and 28-wide. Stardent's Titan used MIPS CPUs and their own vector processors. The book The Architecture of Supercomputers: Titan, a Case Study has an excellent description of how their systems worked.

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

tjalfi··on Racket frustrates me
> Even so, is there really something that can be done with macros that can't be done, just as elegantly, with simple state machines, or object composition style in other languages?

Many simple macro use cases are covered by lightweight lambda syntax, reflection, or language constructs, e.g. Go's defer, Python's with, and C#'s using. Complex macros can create DSLs or rewrite code for optimization, though. Series[0] is a Common Lisp library that rewrites lazy streams into an imperative loop. LOOP[1] and ITERATE[2] are DSLs for iteration. Schelog[3] embeds Prolog inside of Scheme. Serde[4] generates serialization code.

Here are some old threads on the Lightweight Languages mailing list that discuss use cases for macros. Participants include Trevor Blackwell, Paul Graham, Dave Moon, Todd Proebsting, Guy Steele, Dan Weinreb, and many others.

• Macros Make Me Mad [5]

• macros vs. blocks [6]

• how expressive are they [7]

[0] https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node347.html

[1] https://gigamonkeys.com/book/loop-for-black-belts.html

[2] https://iterate.common-lisp.dev/

[3] https://ds26gte.github.io/schelog/index.html

[4] https://serde.rs/derive.html

[5] https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/...

[6] https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/...

[7] https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/...

tjalfi··on Structures in C: From Basics to Memory Alignment
Some targets also don't use natural alignment. AIX, for example, uses 4-byte alignment for doubles that aren't the first field in the struct. GCC has the -malign-natural and -malign-power options for dealing with this.
tjalfi··on Every new DMD version breaks some of my code
I have compiled Fortran programs from the 70s on modern platforms without changing a line. The compiler, OS, and CPU architecture had all disappeared but the programs still worked correctly.
tjalfi··on Cydra 5 supercomputer: design philosophies, decisions, tradeoffs (1989) [pdf]
(submitter)

The actual title is The Cydra 5 departmental supercomputer: design philosophies, decisions, and trade-offs. I had to shrink it to fit.

If you're familiar with Itanium, then the design will look familiar. HP hired some of the Cydra designers.

tjalfi··on US Supreme Court backs man who sent female musician flood of unwanted messages
Here's the ruling. https://www.supremecourt.gov/opinions/22pdf/22-138_43j7.pdf
tjalfi··on Making C++ safe without borrow checking, reference counting, or tracing GC
The Kestrel web server[0] is an example of a codebase that makes extensive use of C#'s unsafe functionality. UnmanagedBufferAllocator[1], for example, looks pretty similar to how you'd write it in C++.

[0] https://github.com/dotnet/aspnetcore/tree/1a56bdb671700ae698...

[1] https://github.com/dotnet/aspnetcore/blob/1a56bdb671700ae698...

tjalfi··on Go 1.21 Release Candidate
The proposal[0] gives a rationale. Using builtin functions lets them be variadic without allocating a slice.

[0] https://github.com/golang/go/issues/59488

tjalfi··on JEP draft: Move the JDK to C17 and C++17
You can email hn@ycombinator.com and they'll fix it.
tjalfi··on Reddit impacted by Alphv ransomware group
> r/pics voted to continue with the strike by only allowing posts of pictures of John Oliver. I can see other subs starting such things as well and even if you change out the mods you will have your hands full of people making protest posts.

Several other subs are also doing similar things.

• r/art is running a John Oliver poll.

• r/evilbuildings is running a John Oliver poll.

• r/gifs passed a similar rule.

• r/iPhone is voting on a similar rule for Tim Cook.

tjalfi··on Reddit appears to be restoring edited/deleted comments
I requested mine last week and haven't heard back from them.
tjalfi··on CPU branch prediction evolution over years (2017)
Some architectures such as Itanium, MIPS, and x86 have branch hint instructions that allow the compiler to indicate whether branches are taken. I'm not sure about Itanium, but they weren't really beneficial on MIPS or x86; the MIPS branch hint instructions are deprecated and Intel's compiler stopped emitting branch hints at least a decade ago.
tjalfi··on OpenSSH 9.0
The text of the complaint is available at [0].

[0] https://03283664099418252878.googlegroups.com/attach/6f5422d...

tjalfi··on A project with a single 11,000-line code file
If you're looking for obfuscated code to refactor, nroff[0][1] is pretty notorious.

[0] http://dtrace.org/blogs/eschrock/2004/07/01/real-life-obfusc...

[1] https://www.youtube.com/watch?v=l6XQUciI-Sc&t=1h28m35s

tjalfi··on Google terminated our Developer Account, says it is “associated”
TVTropes has lists of science fiction with insectoid aliens[0] and books with giant spiders[1].

[0] https://tvtropes.org/pmwiki/pmwiki.php/Main/InsectoidAliens

[1] https://tvtropes.org/pmwiki/pmwiki.php/GiantSpider/Literatur...

tjalfi··on Ask HN: How to understand theory of infantry tactics
We read The Defense of Duffer's Drift[0] when I was in ROTC.

[0] https://www.benning.army.mil/infantry/199th/ocs/content/pdf/...

tjalfi··on Why isn't there a Swagger/OpenAPI for binary formats?
ASN.1's Encoding Control Notation[0] allows bit-level encoding control and can be used to write ASN.1 specifications for existing protocols.

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

tjalfi··on Chris Lattner left Swift core team
> Why is string parsing so much harder than it should be?

Mike Ash answered[0] this question back in 2015.

[0] https://www.mikeash.com/pyblog/friday-qa-2015-11-06-why-is-s...

tjalfi··on Long-standing literary magazines are struggling to stay afloat
Literary augury[0] is my term for that kind of literature discussion.

[0] https://www.britannica.com/topic/augury

tjalfi··on A new programming language for high-performance computers
Jovial 73 has the PAR qualifier which converts an AoS to a SoA.
tjalfi··on 1999 Repeal of Glass-Steagall was the worst deregulation enacted in US history
> This statement made me think quite hard. Why do I not really believe in quid pro quo's (especially like this)? I didn't come up with any particularly good answers, but it would seem to be related to my own childhood and probably the rest of my life, that seems remarkably free of any such arrangements. I've seen them written about, portrayed on TV and in movies, but never in a way that convinced me that they were real (or common, or something). Now, there's every chance that I'm just simply wrong about this, and quid pro quos really are how the world works. It just doesn't seem that way to me.

Quid pro quos[0] are how the world works; you may not have been exposed to it. If you want a detailed discussion of corruption, the book Game of Mates[1] documents corrupt dealing in Australia. If you want a domestic example, look at Illinois politics.

[0] https://en.wikipedia.org/wiki/2019_college_admissions_briber...

[1] https://gameofmates.com/

tjalfi··on German gov plans software company's liability for damages caused by vulns
Jon Bentley's The Back of the Envelope[0] has a much better lesson about bridge building and software design.

"Most of you," says Vyssotsky, "probably recall pictures of 'Galloping Gertie,' the Tacoma Narrows bridge which tore itself apart in a windstorm in 1940. Well, suspension bridges had been ripping themselves apart that way for 80 years or so before Galloping Gertie. It's an aerodynamic lift phenomenon, and to do a proper engineering calculation of the forces, which involve drastic nonlinearities, you have to use the mathematics and concepts of Kolmogorov to model the eddy spectrum. Nobody really knew how to do this correctly in detail until the 1950s or thereabouts. So, why hasn't the Brooklyn Bridge torn itself apart, like Galloping Gertie?

"It's because John Roebling had sense enough to know what he didn't know. His notes and letters on the design of the Brooklyn Bridge still exist, and they are a fascinating example of a good engineer recognizing the limits of his knowledge. He knew about aerodynamic lift on suspension bridges; he had watched it. And he knew he didn't know enough to model it. So he designed the stiffness of the truss on the Brooklyn Bridge roadway to be six times what a normal calculation based on known static and dynamic loads would have called for. And, he specified a network of diagonal stays running down to the roadway, to stiffen the entire bridge structure. Go look at those sometime; they're almost unique.

"When Roebling was asked whether his proposed bridge wouldn't collapse like so many others, he said, 'No, because I designed it six times as strong as it needs to be, to prevent that from happening.'

"Roebling was a good engineer, and he built a good bridge, by employing a huge safety factor to compensate for his ignorance. Do we do that? I submit to you that in calculating performance of our real-time software systems we ought to derate them by a factor of two, or four, or six, to compensate for our ignorance. In making reliability/availability commitments, we ought to stay back from the objectives we think we can meet by a factor of ten, to compensate for our ignorance. In estimating size and cost and schedule, we should be conservative by a factor of two or four to compensate for our ignorance. We should design the way John Roebling did, and not the way his contemporaries did-- so far as I know, none of the suspension bridges built by Roebling's contemporaries in the United States still stands, and a quarter of all the bridges of any type built in the U.S. in the 1870s collapsed within ten years of construction.

"Are we engineers, like John Roebling? I wonder."

[0] https://www.seltzer.com/margo/teaching/CS508.19/background/p...

tjalfi··on Washington state shuts down Amazon price-fixing program nationwide
I have found that sometimes Abebooks and foreign Amazon sites have lower prices for books than Amazon.
tjalfi··on Last Windows 11 update changed all default browser settings to Edge
Your company may have removed the crapware; that’s what our image team did.
tjalfi··on Unidentified PC DOS 1.1 Boot Sector Junk Identified
Goodreads has the What's the Name of That Book?[0] group for identifying books based on a description.

[0] https://www.goodreads.com/group/show/185-what-s-the-name-of-...

tjalfi··on Ask HN: What book should I buy for my 18th birthday?
Prisoners of Geography: Ten Maps That Explain Everything About the World - Tim Marshall
tjalfi··on The C language will never stop you from making mistakes (2020)
This was previously discussed at [0].

[0] https://news.ycombinator.com/item?id=24108109

tjalfi··on You can't copy code with memcpy
Older versions of Windows used a similar technique to replace the PREFETCHW instruction with NOPs on processors that didn't support it.
tjalfi··on The Google home page is 500K
Have you considered adding business or enterprise subscriptions[0]? B2B users are a lot less price sensitive[1] than consumers especially when you're competing against a free product.

[0] https://news.ycombinator.com/item?id=2781133

[1] https://news.ycombinator.com/item?id=13843743

← PreviousPage 3 of 22Next →