news
Programming Leftovers
-
Alisa Sireneva ☛ Superoptimizing an FPU emulator
Compilers are good at making mechanical transformations that make code faster. Unfortunately, most of them are not as good at non-trivial reasoning, so they can’t invent a completely novel approach to solving your problem.
When designing a library for floating-point calculations, I had to implement a function that takes a float f and produces a float corresponding to the lowest set bit in f. For example, if f=1.01101⋅210 in binary, it would return 0.00001⋅210=25.
-
ConcurrentML: Improving on Go's concurrency model
events: communication operations as values Wrapping events Composing choice Building on events Guard events Handling cancellation Cancellation in the print service Wrapping up loose threads closeing thoughts References Appendix: Events beyond channels LLM use disclosure: This post is primarily written by a human. However, I've used LLMs for speech-to-text, basic grammar correction, feedback about the writing and for adding inline API documentation links automatically. The Go programming language was instrumental in bringing the Communicating Sequential Processes (CSP) concurrency model into widespread use.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: RcppSimdJson 0.1.17 on CRAN: Updates
A brand new release 0.1.17 of the RcppSimdJson been built for r2u and on r-universe.
-
Steinar H Gunderson ☛ Steinar H. Gunderson: Decompilation patterns, part 13: Reverse loop
Anyone who's read “bro-coder” C from before that was a name will recognize this idiom: [...]
-
Perl / Raku
-
Perl ☛ URI::PackageURL 2.26 released: PURL and VERS for Perl
URI-PackageURL implements two specifications that are becoming central to software supply-chain security: [...]
-
-
Python
-
Daniel Lemire ☛ Decoding base64 in Python at 10 gigabytes per second
We sometimes need to convert binary data to text. For example, your emails must be stored as text files. Naïvely, you could just use a string of 0 and 1, but it would mean using one character per bit.
-
-
Java/Golang
-
Ruben Schade ☛ My A–Z Toolbox: Go
My surprising winner for G is Go. It’s oddly the first programming language since Perl (and Java, admittedly) that “clicks” the way my weird brain works. I’ve tried Python and Rust, but they’ve felt like a struggle. Ruby almost got me, but not like Go. I’ve written so many little tools in Go, even ones I might have reached for Perl to do before. At some point I’ll clean them up and share for wider critique, but not today.
-