Programming Leftovers
-
Rachel ☛ Feedback on feed stuff and those pesky blue screens
The notion we tried to get known far and wide was "nothing goes everywhere at once". This means that code pushes, config changes, and even flag flips should happen piecemeal. Don't go from 0 to 100% in a single step. Take a bit and space it out. If you can't space it out, ask yourself why, then see if you can make it happen.
-
Daniel Lemire ☛ Converting ASCII strings to lower case at crazy speeds with AVX-512
Tony Finch recently described how you can take an ASCII string of arbitrary length and convert them to lower case quickly using AVX-512. Finch’s results is that for both tiny and large strings, the AVX-512 approach is faster. In his work, Finch assumes that the length of the string is known up front. However, C strings are stored as a pointer to the beginning of the string with a null character (\0) indicating its end. Thus the string love is stored in memory as love\0.
Can we extend his work to C strings?
-
Rlang ☛ Cluster Sampling in R: A Simple Guide
Cluster sampling is a useful technique when dealing with large datasets spread across different groups or clusters. It involves dividing the population into clusters, randomly selecting some clusters, and then sampling all or some members from these selected clusters. This method can save time and resources compared to simple random sampling.
In this post, we’ll walk through how to perform cluster sampling in R. We’ll use a sample dataset and break down the code step-by-step. By the end, you’ll have a clear understanding of how to implement cluster sampling in your projects.
-
Rlang ☛ All You Need to Know About Rhino 1.8 and 1.9 Updates: A Fireside Chat
Rhino, the R package development framework created by Appsilon, has recently released two updates – versions 1.8 and 1.9. In this fireside chat, Kamil Żyła (one of the core developers of Rhino) and Marek Rogala (Appsilon’s Head of Technology) sit down to discuss these updates and the vision behind Rhino.
-
Rlang ☛ {charcuterie} – What if Strings Were Iterable in R?
I’ve been using a lot of programming languages recently and they all have their
quirks, differentiating features, and unique qualities, but one thing most of
them have is that they handle strings as a collection of characters.
-
DJ Bernstein ☛ 2024.08.03: Clang vs. Clang
Beyond these scans, there are some other ideas I should mention. Adding support to GCC and Clang for secret data types sounds great, but I don't see how to make this robust given how GCC and Clang are structured. I have more hope for compilers that are built for security in the first place. Security-focused compilers that require new input languages, such as FaCT and the actively developed Jasmin, raise concerns about code-rewriting time, but, c'mon, is this really so scary? We have to be taking some sort of action anyway, given how compilers are handling current code. CLANG SMASH!
-
Python
-
Redowan Delowar ☛ Please don't hijack my Python root logger
With the recent explosion of LLM tools, I often like to kill time fiddling with different LLM client libraries and SDKs in one-off scripts. Lately, I’ve noticed that some newer tools frequently mess up the logger settings, meddling with my application logs. While it’s less common in more seasoned libraries, I guess it’s worth rehashing why hijacking the root logger isn’t a good idea when writing libraries or other forms of reusable code.
-
Juha-Matti Santala ☛ Reading and writing CSV with Python
Yesterday, I started with regular expressions and the re module. In it, I mentioned two ways to parse input data: regular expressions and string operations. Before we go any further, I’ll introduce a third one so you don’t get any ideas about parsing the CSV files by hand using either of the aforementioned methods.
Python’s standard library includes a fantastic module csv that provides a Reader and Writer objects for reading and writing CSVs.
-
-
Shell/Bash/Zsh/Ksh
-
Chris ☛ q What do I title this article?
These have become a great way to dip my toes into utilising llms more in my daily work, and I’m starting to sense where they are powerful and where they still have some ways to go.
-