Programming Leftovers
-
John Nunley ☛ Why am I writing a Rust compiler in C?
To understand why I’ve followed this path of madness, you first need to understand bootstrapping and why it is important.
Let’s say that you’ve written some code in Rust. In order to run this code, you need to compile it. A compiler is a program that parses your code, validates its correctness, and then transforms it into machine code that the CPU can understand.
-
Quentin Santos ☛ Linux Pipes are Slow
Some programs use a particular system call “vmsplice” to move data faster through a pipe. Francesco already did a deep dive on using vmsplice to make things fast. However, while experimenting with it, I noticed that, when not using vmsplice, Linux pipes are slower than what I would have expected. Since you cannot always use it, I wanted to understand exactly why that was, and whether it could be improved.
The reason I want to move data through pipes is that I am writing a program encode/decode Morse code blazingly fast.
-
[Old] Quentin Santos ☛ Quentin Santos | Make it work. Make it right. Make it fast. | Page 2
What I did not talk about is that there is a reason that push so many people to heresy. And that reason is fearing having to resolve merge conflicts!
The thing is that merge conflicts are really not hard to resolve when using the right method. But it’s not the default one. The default one looks like this: [...]
-
[Old] Kevin Boone ☛ Kevin Boone: They don’t make ’em like that any more: Borland Turbo Pascal 7
So that’s Turbo Pascal: a colossus of the microcomputing world, which faded and died largely unlamented. It always was a creature of its time – it prospered for the brief period when microcomputers were limited enough to reward skilled development, but widespread enough to create a substantial market for programmers. By the time it started to become difficult to find enough highly-skilled programmers to satisfy the market needs, it didn’t matter: computers were getting powerful enough to make good our limitations as programmers. That almost nobody has the skills these days to implement something like TP is something we could eventually come to regret – or, rather, our grandchildren could. Software development is becoming a semi-skilled industry, and I doubt that the rise of AI will entirely compensate for this.
But who needs a Turbo Pascal, when you have 128Gb of RAM attached to an 5GHz CPU, for a hastily-written, bloated Java program to burn?
-
Daniel Lemire ☛ Parsing tiny and very large floating-point values: a programming-language comparison
Most programming languages support floating-point numbers. You typically have the ability to turn a string into a floating-point number. E.g., “3.1416” could be parsed as a number close to pi. However strings typically cannot be represented exactly or at all.
-
Perl / Raku
-
Rakulang ☛ Rakudo Weekly 2024.35 Cro 💍 HTMX
Steve Roe has started a series of blog posts about the marriage of Cro and HTMX, exciting stuff for people who’d like to get rid of the complexities of modern web development [...]
-
-
Python
-
University of Toronto ☛ What's going on with 'quit' in an interactive CPython session (as of 3.12)
It's an infamous and frustrating 'error' message and we've probably all seen it (there's a similar one for 'exit'). Today I was reminded of this CPython behavior by a Fediverse conversation and as I was thinking about it, the penny belatedly dropped on what is going on here in CPython.
-
Juha-Matti Santala ☛ Parse command line arguments with argparse
Python comes with argparse module that allows you to declare your arguments, their types and options.
I wanted to bring this to the attention of my readers who might have not used it before but since I’ve already written about it at length, I’m gonna refer you to read that original piece How to parse command line arguments in Python.
-
-
R
-
Rlang ☛ {golem} 0.5.0 is now available
-
Rlang ☛ A new method for deriving a nonparametric confidence interval for the mean
Deriving a nonparametric confidence interval for the mean using stratified sampling, the bootstrap, surrogates and density estimation
-
Rlang ☛ Text analysis of 2024 US Presidential convention speeches
-
Rlang ☛ Unveiling Bottlenecks (Part 2): A Deep Dive into Profiling Tools
In our previous blog post, we introduced the concept of profiling for optimizing Shiny app performance. Today, we’ll take a deep dive into three powerful tools in this arsenal: reactlog, profvis and shiny.tictoc.
-
Rlang ☛ Exploring the Top 5 pharmaverse Packages
The pharmaverse is a collaborative project where leading pharmaceutical companies and passionate individuals come together to create helpful tools for clinical reporting. By using R programming and the open-source community, the pharmaverse makes it easier to gain insights and increase transparency in the pharma industry.
-
Rlang ☛ Mastering the sapply() Function in R: A Comprehensive Guide for Data Manipulation
Introduction
Are you looking to boost your data manipulation skills? Look no further than the powerful sapply() function!
-
-
Rust
-
Rust Blog ☛ The Rust Programming Language Blog: 2024 Leadership Council Survey
One of the responsibilities of the leadership council, formed by RFC 3392, is to solicit feedback on a yearly basis from the Project on how we are performing our duties.
Each year, the Council must solicit feedback on whether the Council is serving its purpose effectively from all willing and able Project members and openly discuss this feedback in a forum that allows and encourages active participation from all Project members. To do so, the Council and other Project members consult the high-level duties, expectations, and constraints listed in this RFC and any subsequent revisions thereof to determine if the Council is meeting its duties and obligations.
This is the council's first year, so we are still figuring out the best way to do this. For this year, a short survey was sent out to all@ on June 24th, 2024, ran for two weeks, and we are now presenting aggregated results from the survey. Raw responses will not be shared beyond the leadership council, but the results below reflect sentiments shared in response to each question. We invite feedback and suggestions on actions to take on Zulip or through direct communication to council members.
We want to thank everyone for their feedback! It has been very valuable to hear what people are thinking. As always, if you have thoughts or concerns, please reach out to your council representative any time.
-
-
Kernel Space
-
Barry Kauler ☛ Kernel 6.6.47 compiled fix bt5 mouse
The problem with bluetooth v5 mouse is discussed in the forum:
https://forum.puppylinux.com/viewtopic.php?t=9055
We need the 'uhid' kernel module, so I have compiled the 6.6.47 kernel, with uhid builtin not as a module. The Gentoo wiki was used as a guide: [...]
-