LOL! I'm actually reasonably enjoying Netflix Games Minesweeper which is over-campained and over- in general, but not horribly (no ads/sells). The tweak there is a sea/islands setting with non-rectangular boards — it's actually adding some nice variation.
Lol, the expletives were clearly the most troubling part of these texts. Good thing the reporter spared us some [language]. /s
I suppose a "reasonable person" should now conclude that expletives are only part of speech with a reasonable expectation of privacy. /s
[fwiw if I were a human flagged to review these texts, I'd likely report them. My problem is with building huge systems marketed as almost a tool for thought, and then exposing these almost-thoughts for unlimited copyright case retention, for human threat review, and god knows what else.]
Ruby's `[1, 2, 3].inject(:+)` alias for `reduce` (name borrowed from Smalltalk) nicely reinforces that very mnemonic: you inject the operator _between_ the elements: 1 + 2 + 3.
:+ here is symbol meaning "send + message", more general form takes a block:
[1, 2, 3].inject { |a,b| a + b }
The downside of the "between" mnemonic is encouraging not handling an empty collection! Ruby's separate syntax to pass (args) {block} at least offers natural place to add initial value, but with symbol shorthand the API is harder to guess:
numbers.inject(0) { |a,b| a + b }
numbers.inject(0, :+)
(Also, it's always a left fold ((a) OP b) OP c, even if you give a symbol like :* which parses right-assiciative without parens — making the "inject operator between values" mental model less accurate.)
> benefits of abstracting and separating node types from payloads
If you mean being able to a generic `list<foo>` type (whether by C++ templates, macros, or good old void* casts), it's more than that.
The benefit of non-intrusive is being able to create/manipulate/pass around multiple collections pointing to same payloads, without disturbing the payloads or the other collections in any way¹. That makes it easier to return and manipulate collections functionally (both in the narrow immutable sense, but also in the wider "treat collections like _values_ sense)... The deepest benefit arising from that I suppose is code modularity: different code areas need not be aware of each other's existence.
That all obviously comes at some tradeoff to performance. By definition, not having a full picture of the pathways your data travels means you can't choose the fastest representation!
¹The cheat is GC. For multiple unconnected collections to point to same payload, you need ref counting, or mark&sweep or similar to control its lifetime. Technically, GC does disturb the objects it's tracking (though that's well abstracted from other code).
However, you're largely right that specifically linked lists are rarely a good choice for non-intrusive collections => Arrays usually beat them, and if not then hash sets.
(LISP & ML & Haskell do stick to lists for tail sharing — a choice which is arguably outdated by growing CPU / mem random access gap. I suppose Clojure's persistent vectors are an improvement.)
I'm not american, and didn't follow that one deeply, but presumably that's not just "due to bad req. gathering", it's also due to the structure of gov procurement? E.g. it wasn't the pained users who approve the payment to the contractors, right?
You could counter "if only performance was legally included in the contracts, a better site would be delivered."
Maybe, but my point is there is big difference between internal "req. gathering" that informs work while everyone is long-term motivated for good user experience anyway, vs. external contract/deadline gathering for almost adversarial "deliver worst thing that passes and walk away" settings. Brushing both under same wording feels insufficient to me.
That's just one half of it: Intelligent defaults + configurability of what files/dirs to skip. That part has been iterated on in prior tools like `ack` and `ag` and `git grep` for like a decade, and ripgrep was informed by that tradition.
The other part is extreme optimizations, from I/O and OS aspects to CPU, both asymptotic complexity (from scratch NFA regex engine), concrete complexity (rust, SIMD) and ad-hoc opitimizations for statistically common uses like fixed strings...
Then there are some "product" choices driven by performance insights, e.g. no line numbering, defaulting to non-deterministic unsorted output order — these go against most programmers' intuition for "ideal tool I'd like", but turns out the speed gains are significant and what I really like is how fast it is :-)
Both usability & optimizations are described in depth by the author in https://burntsushi.net/ripgrep/, which is one of the best perf. readings ever, highly recommended.
This is a stunning achievement for many reasons! Having been born in USSR, a particular reason it moves me to tears how this vindicates Bulgakov's famous "manuscripts don't burn", which he presented as a plain metaphysical fact:
"Unfortunately I cannot show it to you," replied the master, "because I burned it in my stove."
"I'm sorry but I don't believe you," said Woland. "You can't have done. Manuscripts don't burn." He turned to his cat. "Come on, Behemoth, let us have the novel."
– towards the end of The Master and Margarita. In the battle against both censorship & entropy, recovering a 2kyo text which was considered forever lost is an incredible victory.
As Val Town aspired to make programming more accessible, I'll particularly mention the neatly coined "End-programmer programming" https://stevekrouse.com/syndicated/end-programmer , as well as overlapping communities https://live-workshop.github.io/primer/ & https://malleable.systems/.
reply