#TIL The C preprocessor is actually Turing-complete if you try hard enough. There's even the Order programming language, a functional programming language built entirely upon the C99 preprocessor, with first-class anonymous functions, partial application, tail recursion, reflection, arbitrary-precision arithmetic, and more! https://github.com/rofl0r/order-pp/tree/master/example
Its author also found there were only two C compilers in the world that could run Order correctly, one was GCC, another was the Wave C++ preprocessor library, everything else violated C99 (and even C89) in some ways.
#TIL The C preprocessor is actually Turing-complete if you try hard enough. There's even the Order programming language, a functional programming language built entirely upon the C99 preprocessor, with first-class anonymous functions, partial application, tail recursion, reflection, arbitrary-precision arithmetic, and more! https://github.com/rofl0r/order-pp/tree/master/example
Its author also found there were only two C compilers in the world that could run Order correctly, one was GCC, another...
MFW Firefox's spellcheck corrects me for saying Fortran as it should be FORTRAN. I'm now waiting for it to correct all instances Unix to UNIX... Beware of the imposters!
Embedded programmers routinely do serious hacks in the firmware. One technique is token passing, every time before calling and returning from a function, one sets one (or multiple) global variable to an unique value and double checks it for consistency. Other tricks include saving multiple copies of critical data, or repeating if-else checks multiple times.
The idea is to make code safer to run on general-purpose, non-fault-tolerate CPU. If CPU malfunctions and goes out of control due to external electrical interference like EMI and ESD, the code has a chance to catch it, recover, or at least reset the system.
Software developers who see computers as a platonic machine approximation of pure logic would find it's just madness. Meanwhile, for hardware designers, software is just programmable hardware. If adding more logic gates for redundancy is reasonable, adding more code is also reasonable, and not necessary a "hack."
The real problem is that it's 2022 and most compilers and other devtools still don't have any built-in support to automate this task. Often, everyone still has to do it manually by hand. :blobcatfacepalm: Software security experts (on Control-Flow Integrity, Stack Canaries, Address Sanitizer, or other compiler-level mitigations) should seriously help saving embedded system developers by applying their expertise in the hardware field and making them standard features in software toolchains. #electronics
Embedded programmers routinely do serious hacks in the firmware. One technique is token passing, every time before calling and returning from a function, one sets one (or multiple) global variable to an unique value and double checks it for consistency. Other tricks include saving multiple copies of critical data, or repeating if-else checks multiple times.
The idea is to make code safer to run on general-purpose, non-fault-tolerate CPU. If CPU malfunctions and goes out of control due to external...
BUGS: This sleep command cannot handle requests for durations much longer than about 250 billion years. Any such attempt will result in an error, and immediate termination. It is suggested that when there is a need for sleeps exceeding this period, the sleep command be executed in a loop, with each individual sleep invocation limited to 200 billion years approximately.https://man.netbsd.org/sleep.1
Silicon bugs be like... The worst-case scenario is when the datasheet is public but the chip bug errata is only explained in an NDAed document. #electronics
The "incomplete distribution" architecture of the Fediverse, in a sense, makes the filter bubble even worse than centralized social sites. A while ago, I saw a discussion thread on how increased speech suppression in China is driving some users to Fedi. One poster replied that he almost never saw any Fedi user from China despite using it for years, and found the claim hard to believable.
Meanwhile it's a matter of fact that the number of active users from China currently exceeds 20,000 on Fedi. And this community already has diverse interests for its small size. You can't find most of them at joinmastodon.org's index and probably have never ever saw them in your timeline, but there are several large general-purpose sites, spin-off communities from pre-existing domestic social sites, and also small instances for niche topics and personal uses. Some examples of the smaller sites out there: a VA-11 Hall-A themed instance, an instance for Legend of the Galactic Heroes fans, and I know at least 3 different LGBTQ+ instances (I bet there are more, unknown to me).
As long as there's no interaction between instances (many don't even want interactions), for practical purposes they don't exist. No user profile is fetched, no hashtag is shared, no post is processed. The takeaway message is, there are multiple independent galaxies in the Fediverse, many are lightyears away and not connected by hyperspace transport. Every instance has its own event horizon. Don't assume the Fediverse from your own instance's point-of-view is complete and representative.
The "incomplete distribution" architecture of the Fediverse, in a sense, makes the filter bubble even worse than centralized social sites. A while ago, I saw a discussion thread on how increased speech suppression in China is driving some users to Fedi. One poster replied that he almost never saw any Fedi user from China despite using it for years, and found the claim hard to believable.
Meanwhile it's a matter of fact that the number of active users from China currently exceeds 20,000 on Fedi. And...