how to build #Microsoft-Windows programs without CRT (libc) using MSVC or GCC, using your own mainCRTStartup or WinMainCRTStartup function, which you shouldn’t declare with __stdcall, and which should exit with TerminateProcess. Compile with cc -nostdlib example.c -lkernel32 with GCC. Also you have to deal with stack probing to commit stack pages unless you preallocate a big stack with -Xlinker --stack=0x200000,0x200000 or something, or avoid stack frames over 4K. #Wellons
Chris #Wellons explains hash #trie #algorithms in C, recommending a 4-way branching factor with arena allocation. Not the same as #HAMT. #performance
"falsify" implements test-case shrinking for #Haskell. “The test runner is able to go back and forth between shrinking the length and the list, and shrinking elements in the list. That is, we have integrated shrinking (like in hedgehog: we do not specify a separate generator and shrinker), which is internal: works across monadic bind. The Python #Hypothesis library showed the world how to achieve this. In this blog post...” #testing #PBT
how to implement setjmp and longjmp using inline #asm in a naked function on amd64 and i386. Describes the #Microsoft-Windows #calling-convention. #Wellons
#Wellons explains why the #C library is bad and he avoids using it whenever possible.
Why #C scanf is broken and unusable.
a #small-is-beautiful non-cryptographic #PRNG called "PCG32" by M.E. O'Neill, in 9 lines of #C. #algorithms
#PCG32 #PRNG #paper #PDF showing 29-66 gigabits per second #performance, more than twice the Mersenne Twister and ten times Arc4random. Same author as the “Genuine Sieve of Eratosthenes” #algorithms paper.
#DRMacIver’s #Hypothesis subset implementation in under 1000 lines of Python, intended as a tutorial for applying his innovative test-case generation and reduction approach to new languages that aren’t Python. #small-is-beautiful #PBT
#Wouter van Oortmerssen’s "FALSE" was the language that inspired #Brainfuck (and thus the whole #esolang scene), but is more practical.
#Wouter van Oortmerssen’s "TreeSheets" had #spreadsheets with nested cells.
#Wouter van Oortmerssen’s "Restructor" was a thing that looked at a program expressed as a giant expression and automatically factored it to remove duplication, then re-inlined any functions with only one caller.
how Shazam uses #DSP to identify music
How #Facebook disabled the #Chromium #JS console in 02013 (as an anti-self-xss #security measure) until the Chromium team fixed it
how to do text to #speech with Mozilla’s "Common Voice" system in JS. wss = window.speechSynthesis; s = new SpeechSynthesisUtterance('My lovely lady lumps'); s.voice = wss.getVoices()[100]; wss.speak(s) works. To specify specifically English voices, wss = window.speechSynthesis; s = new SpeechSynthesisUtterance('My lovely lady lumps'); for (let v of wss.getVoices()) { if (v.lang.substr(0,2) !== 'en') continue; s.voice = v; wss.speak(s);}
"Magicoder" is another “open-source” #LLM for generating Python and other programming language code. #neural-networks
DiskerNet or DownloadNet archives everything you view online and indexes it.
the "Service Worker" API is only available in secure contexts (or in Firefox with a debugging override option turned on), and it’s the replacement for the now deleted #cache-manifest mechanism, which didn’t require that.
A #polyfill for the #cache-manifest mechanism using #Service-Worker.
#Adafruit #I2C breakout boards typically have a 10KΩ pullup on each breakout board, so you can start having problems after putting 4 or 5 on the same I²C bus.
The #Framework laptop #electronics #hardware connectors’ design.
the giant list of classic (pre-NES) game programmers, by James Hague
how to implement the Game of #Life on the #Amiga blitter in 01987. #performance #history
#Za3k’s hack-a-day from 02023.
#HP #RPN #calculator #history, with the HP 9100A
semiconductor fabrication #history
#Binance #Bitcoin prosecution and patio11’s predictions about how it will play out