Recent submissions

Comment · 1 month ago
X-rays! not gamma rays.
Comment · 5 months ago
Perhaps worth noting that the number of lines in a cache is often different than the number of rows, which can be relevant for some workloads.

The size of an ordinary cache is rows × ways × size(line), where rows = 2 ↑ num-idx-bits. For example, most Intel 64 and AMD 64 processors use log₂(size(page)) − log₂(size(line)) = 12 − 6 = 6 index bits for the L1 cache*, so an L1 cache with 8-way associativity is 64 sets × 8 lines/set × 64 bytes/line = 32 KB large, and an L1 cache with 12-way associativity is 64 × 12 × 64 = 48 KB large. I remember being surprised to learn that most processors have only 64 rows in the L1 cache!

*So that virtual indexes and physical indexes are identical (so that retrieval of the row can happen in parallel with TLB lookup).

Comment · 6 months ago
Comment · 8 months ago
Comment · 9 months ago
Comment · 10 months ago
Comment · 10 months ago
I may be wrong, but I believe the name of the type family is simply Times New; the name of the italic face would then be Times New Italic rather than the contradictory Times New Roman Italic. It’s strange that the name of the roman face specifically is always used; I’d suppose it’s merely because that’s how the digital fonts were inadvertently named? Times New Roman has been the name in dropdown menus, and most laypeople are unfamiliar with roman as a term of art, so there’s no reason people wouldn’t use that name. But I wonder how the digital fonts came to be named Times New Roman rather than Times New.
Comment · 11 months ago
> A data race occurs any time two threads access the same memory location concurrently and non-deterministically when at least one of the accesses is a write.

From what I understand of the C++ memory model (shared by C and Rust), this is not the definition of data race – a data race occurs when two or more threads access memory concurrently where at least one access is a write and the accesses are unsynchronized. However, synchronized accesses may not have a deterministic ordering, in which case a race condition occurs.

(Confusing as it may be, I believe this is standard terminology.)

Comment · 1 year ago
I’d argue there’s a very big difference between “x: y” and “x : y”. I can only see the former as assignment and the latter as the has-type relation.

(I find it baffling in the extreme that in many mainstream languages the convention is to write type annotations as “x: T”, both prima facie and because in those languages the notation then collides with field assignment!)

Comment · 1 year ago
A small nit: the development of Unix began on the PDP-7 in assembly, not the PDP-11.

(The B language was implemented for the PDP-7 before the PDP-11, which are rather different machines. It’s sometimes suggested that the increment and decrement operators in C, which were inherited from B, are due to the instruction set architecture of the PDP-11, but this could not have been the case. Per Dennis Ritchie:¹

> Thompson went a step further by inventing the ++ and -- operators, which increment or decrement; their prefix or postfix position determines whether the alteration occurs before or after noting the value of the operand. They were not in the earliest versions of B, but appeared along the way. People often guess that they were created to use the auto-increment and auto-decrement address modes provided by the DEC PDP-11 on which C and Unix first became popular. This is historically impossible, since there was no PDP-11 when B was developed. The PDP-7, however, did have a few “auto-increment” memory cells, with the property that an indirect memory reference through them incremented the cell. This feature probably suggested such operators to Thompson; the generalization to make them both prefix and postfix was his own.

Another person puts it this way:²

> It's a myth to suggest C’s design is based on the PDP-11. People often quote, for example, the increment and decrement operators because they have an analogue in the PDP-11 instruction set. This is, however, a coincidence. Those operators were invented before the language [i.e. B] was ported to the PDP-11.

In any case, the PDP-11 usually gets all the love, but I want to make sure the other PDPs get some too!)

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

[2] https://retrocomputing.stackexchange.com/questions/8869

Comment · 1 year ago
I’ve noticed that, besides the magnetism and drive for sex (which would be sufficient for a species to propagate), many people also experience the biological imperative (wanting their genes replicated) as its own separate feeling.

This makes no sense to me – it’s not a feeling I can personally relate to. I’d like to raise kids because I’d enjoy getting to teach them and share things with them, but I don’t care whether they are my biological children or not.

So it’s something I’ve wondered about. The likely why makes sense, but I don’t really get the what.

Comment · 1 year ago
At some point in my life I unconsciously decided that charisma (in this sense) was something I did not want to exercise, and was perhaps even wrong to exercise.

In so many facets of our lives already, our wants are being manipulated for the benefit of others. And who am I to decide what is important? For things that involve other people, I’d rather make that decision collectively. I want the thoughts, opinions, and feelings of people who don’t possess or exercise charisma to have space and weight.

Comment · 1 year ago
Comment · 1 year ago
You’d perhaps be better off using U+2002 EN SPACE (or the canonically equivalent U+2000 EN QUAD).

From what I recall, the size of a typical interword space is ⅓ of an em, and traditionally a bit more than this is inserted between sentences (but less than ⅔ of an em). The period itself introduces a fair amount of negative space, and only a skosh more is needed if any.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton