omoikane
Joined 14 years ago
Joined 14 years ago
https://github.com/thaliaarchi/bfcorpus/blob/main/ebosman/ma...
Be sure to check out other files in that directory for how the program is assembled.
(Erik Bosman's mandelbrot set is a personal favorite of mine, very useful for benchmarking brainfuck interpreters)
https://news.ycombinator.com/item?id=47625366 - United States Code (federal laws) in Git (2026-04-03, 15 comments)
https://news.ycombinator.com/item?id=47621591 - Every Law a Commit – US Law in GitHub (2026-04-02, 32 comments)
I think it's parsing this data:
https://uscode.house.gov/download.html
Which was discussed here:
https://news.ycombinator.com/item?id=6135504 - The entire US Code is now online in XML (2013-07-31, 237 comments)
Another alternative is to use `__builtin_unreachable()` (not standard, but available in GCC and Clang).
https://www.roguebasin.com/index.php/Cellular_Automata_Metho...
I like how he built a test stand near 7:22, which solves the motor flying off problem and is probably easier to iterate on. It reminds me of how rockets are tested.
https://dic.pixiv.net/a/%E3%81%93%E3%81%AE%E5%85%88%E7%94%9F...
https://www.youtube.com/watch?v=RlVpPstLPEc
My impression was that it strives to be a better C++ by fixing many of the annoyances and providing some well thought out convenience features, and it did a pretty good job. I thought the multiple version features and being able to write unit tests inline was especially nice.
But D came about before C++11 was a thing, and C++11 was a great ergonomic improvement over C++98. Since C++ got better, I haven't been keeping up with D.
[1] https://github.com/rottytooth/Folders/blob/015cf65c15ab681f5...
/*
* the behavior of the #pragma directive is implementation defined.
* this implementation defines it as follows.
*/
do_pragma ()
{
close (0);
if (open ("/dev/tty", O_RDONLY) != 0)
goto nope;
close (1);
if (open ("/dev/tty", O_WRONLY) != 1)
goto nope;
execl ("/usr/games/hack", "#pragma", 0);
execl ("/usr/games/rogue", "#pragma", 0);
execl ("/usr/new/emacs", "-f", "hanoi", "9", "-kill", 0);
execl ("/usr/local/emacs", "-f", "hanoi", "9", "-kill", 0);
nope:
fatal ("You are in a maze of twisty compiler features, all different");
}
It's gone by gcc 1.21: #if 0
/* This was a fun hack, but #pragma seems to start to be useful.
By failing to recognize it, we pass it through unchanged to cc1. */
...
#endif[1] https://www.ioccc.org/years.html
Mozilla might have anticipated this when they wrote "Diversify your browser engine" as one of the selling points.
https://www.firefox.com/en-US/enterprise/firefox-enterprise/...
Diversification is a good idea, personally I use both Chrome and Firefox every day (and sometimes Lynx).
https://bsky.app/profile/omoikane.bsky.social
https://mastodon.social/@omoikane
https://uguu-org.itch.io/