Programming Leftovers
-
Yoshua Wuyts ☛ Tasks are the wrong abstraction
Okay, so you've probably read the title and are thinking: "Hey is this clickbait?" - and no dear reader, it is not. I'm fairly convinced at this point that tasks, as an abstraction, are not right for Rust and we would do better to achieve parallel execution through composition. However when it comes to task scheduling things seem less clear, and I would like to have more data available. Because task scheduling strategies determine which APIs we can provide, and as we're looking to standardize the async Rust ecosystem, this will end up being important.
-
MaskRay ☛ Clang's -O0 output: branch displacement and size increase
tl;dr Clang 19 will remove the -mrelax-all default at -O0, significantly decreasing the text section size for x86.
-
Trail of Bits ☛ Announcing two new LMS libraries
The Trail of Bits cryptography team is pleased to announce the open-sourcing of our pure Rust and Go implementations of Leighton-Micali Hash-Based Signatures (LMS), a well-studied NIST-standardized post-quantum digital signature algorithm. If you or your organization are looking to transition to post-quantum support for digital signatures, both of these implementations have been engineered and reviewed by several of our cryptographers, so please give them a try!
-
Perl / Raku
-
Python
-
Earthly ☛ Top Python Frameworks for 2024
The article provides an overview of Python web frameworks. Earthly improves the efficiency of CI builds within your development lifecycle. Learn more about Earthly.
-
Redowan Delowar ☛ TypeIs does what I thought TypeGuard would do in Python
The handful of times I’ve reached for typing.TypeGuard in Python, I’ve always been confused by its behavior and ended up ditching it with a # type: ignore comment.
For the uninitiated, TypeGuard allows you to apply custom type narrowing1. For example, let’s say you have a function named pretty_print that accepts a few different types and prints them differently onto the console: [...]
-
-
Shell/Bash/Zsh/Ksh
-
Erika Rowland ☛ How to Count Unique Lines Using Unix Pipes
Sometimes I want to take a command line output and count the unique lines from that output. I can do this with a combination of standard unix tools and pipes:Read more about sort, uniq, and head in the linked GNU docs.Alternatively, use man sort, etc. to see what the available flags are on your system of choice.I always find new things when I read the docs. sort for example, has a --batch-size flag that limits the maximum number of inputs to be merged at once.Hillel Wayne advocates for this kind of “browsing” documentation instead of “searching” in his newsletter.
-