628 karma · joined November 13, 2021
This in the intro can't be of much use. Sure, it's an introductory book, but this isn't a correct simplification. Is JavaScript run by an interpreter or a compiler now? The quote can't decide; and the final stage of JavaScript JITs tends to be machine code too. I know there's often both (with interpreter for cold code, compiler for hot code); but given the level of the rest of the intro, throwing terms like "interpreted", "just in time", "compilation" and "bytecode" which haven't been defined would only lead to confusion, nor are they too relevant.
Atomics are handy in a parallel/multi-core tracing collector, but IME pointer chasing in tracing somehow manages to cover the time it takes to do atomic operations.
No it isn't. If your C++ compiler isn't devirtualising at all (implied by the article) it'll get stomped on by anything doing inline caching [0] which will generate the switch-case code. The JVM does that for example.
> Heap allocations are moderately expensive. The exact details depend on which allocator is in use, but each allocation (and deallocation) typically involves acquiring a global lock, doing some non-trivial data structure manipulation, and possibly executing a system call.
One sure hopes it doesn't take a global lock for each allocation; I don't think jemalloc does.
I tend towards pseudo-SML for scribbling things; once got in trouble for using "language specific constructs" like map() for university work. They weren't a fan of APL for adjacency matrix munging either, though that's how I went through that part of the course. In either case pseudocode is just ignoring the unpretty parts of any language, and it can hardly be said any language is more like pseudocode.
But putting metadata in the MSBs of pointers is a nice trick for concurrent garbage collection like Pauseless, ZGC, C4 and such [2]...though I'm not sure how much you win, as collections aren't _that_ frequent, so if you map the same physical memory multiple times (like ZGC, probably C4 too) your TLB should pick up whichever replica in virtual memory you're currently accessing quickly.
[0] https://gitlab.com/Linaro/tcwg/tbi_lisp/-/blob/main/SymbolTa...
[1] https://www.cs.princeton.edu/research/techreps/TR-412-93
[2] https://www.usenix.org/legacy/events/vee05/full_papers/p46-c... - the Azul hardware seemingly only stole one bit still.
Download the first input picture, search for it, and somehow the picture is AI generated ripping off itself, and somehow influenced by other images despite the first input and the output being bit-identical.
3 < 4 ifTrue: [ 'true' ] ifFalse: [ 'false' ]
But very arguably that is still if-then-else, it's just not a special construct in the language. Avoiding Boolean values is also sometimes better to convey intent more precisely ("Boolean blindness"), but that's just a stylistic thing and not forbidding Boolean values entirely.I don't have any problems with TLS; one probably already has OpenSSL around. More or less TLS is too big (in popularity) to fail - there are smaller implementations like BearSSL too. If it really is an issue, one has a perfectly fine protocol removing the TLS wrapper; it won't be Gemini though.
They don't; they still read a linear sequence of instructions.
And Forth is nothing new as a low-level, bending-over-to-the-machine language [1], except that its users to have constant urges to decry everything else as bloat (first link), civilisation-threatening, training wheels (third link), and all those wonderful things. Just don't do anything [0], and hoorah, you can write nothing too.
[0] https://news.ycombinator.com/item?id=28771886 is a classic on that topic.
[1] Bemusingly this does not make it necessarily fast; some Forthen are too simple and too low-level for compilers to get much done, c.f. https://applied-langua.ge/posts/i-dont-want-to-go-to-chel-c.... for the video described in the third link.
Another advantage there was that I would not have to build another computer to use two cheaper processors. But that only works as I don't think I am limited by any other factors like memory or disk bandwidth.
I did however limit the processor to a 65W TDP to reduce heat output and power usage, which only slowed down my very parallel programs about 10%, and didn't affect less parallel programs at all. (The duplicated other components of two machines would also draw more power, though perhaps not that much in comparison to processors here.)
[1] For a fuzzer you could easily give separate machines multiple random seeds, so really that is no issue. But for model checking/exhaustive search there needs to be a proper form of work distribution. I haven't a clue what the network bandwidth requirement of e.g. TLC, so that might also require faster NICs than one gets on motherboards to not stall processors on the network.
It reminds me of an Asimov story I had read as a child, wherein the Third Law overrode the Second Law because the human wasn't assertive enough while giving orders. Forgot the name though.