agalunar
Joined 8 years ago
Joined 8 years ago
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).
https://github.com/official-stockfish/fishtest/wiki/Fishtest...
A . B : C :. D
would be, as I understand it, equivalent to: ((A B) C) D
The “general principle” is that a larger number of dots indicates a larger subformula.¹What if you need to nest parentheses? Then you use more dots. A double dot (:) is like a single dot, but stronger. For example, we write ((1 + 2) × 3) + 4 as 1 + 2 . × 3 : + 4, and the double dot isolates the entire 1 + 2 . × 3 expression into a single sub-formula to which the + 4 applies.²
A dot can be thought of as a pair of parentheses, “) (”, with implicit parentheses at the beginning and end as needed.
In general the “direction” rule for interpreting a formula ‘A.B’ will be to first indicate that the center dot “works both backwards and forwards” to give first ‘A).(B’, and then the opening and closing parentheses are added to yield ‘(A).(B)’. The extra set of pairs of parentheses is then reduced to the formula (A.B).³
So perhaps one way of thinking about it is that more dots indicates more separation.
¹ https://plato.stanford.edu/entries/pm-notation/dots.html
² https://blog.plover.com/math/PM.html
³ https://plato.stanford.edu/entries/pm-notation/dots.html
See also https://plato.stanford.edu/entries/pm-notation/index.html and https://muse.jhu.edu/article/904086.
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.)
(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!)
(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!)
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.
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.
(Homepage) https://takoshell.org/index.html
(Differences from Xonsh) https://takoshell.org/xonsh.html
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.