Programming Leftovers
-
Rlang ☛ Kill all R sessions
When working in R, there are times when managing multiple R sessions becomes essential.
-
Michael Stapelberg ☛ Debug Go core dumps with delve: export byte slices
Not all bugs can easily be reproduced — sometimes, all you have is a core dump from a crashing program, but no idea about the triggering conditions of the bug yet.
When using Go, we can use the delve debugger for core dump debugging, but I had trouble figuring out how to save byte slice contents (for example: the incoming request causing the crash) from memory into a file for further analysis, so this article walks you through how to do it.
-
Rlang ☛ How to Loop Through List in R with Base R and purrr: A Comprehensive Guide for Beginners
R programming has become an essential tool in the world of data analysis, offering powerful capabilities for manipulating and analyzing complex datasets. One of the fundamental skills that beginner R programmers need to master is the ability to loop through lists efficiently. This article will guide you through the process of looping through lists in R using both base R functions and the popular purrr package, complete with practical examples and best practices.
-
MaskRay ☛ ccls and LSP Semantic Tokens
I've spent countless hours writing and reading C++ code. For many years, Emacs has been my primary editor, and I leverage ccls' (my C++ language server) rainbow semantic highlighting feature.
-
Arduino ☛ Is there an online Arduino IDE?
Both the traditional Arduino IDE and the Cloud Editor have their strengths, but choosing the right one depends on your specific needs and project requirements. So, in this post, we’ll dive into the details so you can make an informed choice and pick the editor that is most suitable for you.
-
Buttondown LLC ☛ TLA from first principles
I'm working on v0.5 of Logic for Programmers. In the process of revising the "System Modeling" chapter, I stumbled on a great way to explain the temporal logic of actions that TLA+ is based on. I'm reproducing that bit here with some changes to fit the newsletter format.
Note that by this point the reader has already encountered property testing, formal verification, decision tables, and nontemporal specifications, and should already have a lot of practice expressing things as predicates.
-
Loris Cro ☛ Go Exceptions for the Unconvinced
In my previous post I argued that Go has exceptions because of panic/recover. Some people understood the message, some others had objections that roughly amounted to “you’re just being pedantic, there’s no practical consequence to it”.
Oh man, if only.
The talk that I linked in the other post goes over this point with exemplary clarity but, since I’m bothering to write a follow up post, I will just go through the example directly in here.
-
Python
-
Unix Men ☛ How to Run a Python Script: A Beginners Guide
Reading & Parsing JSON Data with Python: A Simple Tutorial
-
-
Shell/Bash/Zsh/Ksh
-
University of Toronto ☛ Quoting and not quoting command substitution in the Bourne shell
This came about because I ran an old shell script through shellcheck, which recommended replacing its use of var=`...` with var=$(...), and then I got to wondering why shellcheck wasn't telling me to write the second as var="$(...)" for safety against multi-word expansions. The answer is of course that multi-word expansion doesn't happen in this context; even if the $(...) produces what would normally be multiple words of output, they're all assigned to 'var' as a single word.
-
-
Java
-
Frank Delporte ☛ JavaFX In Action #8 with Ulas Ergin: How JavaFX helps to migrate from Swing to React UIs, all combined in one Java app
Based on the knowledge gained from the development of the developer tool, the decision was made to use JavaFX as the foundation to migrate an old application. This resulted in a new internal tool, used by the banking team and in the call centers. The screens of the old Swing application are integrated into this new tool, and are gradually transformed into React views. JavaFX components bind everything together and provide the main layout, menus, login screens, etc. The React views are integrated into this application with JxBrowser, a Chromium web browser that is fully integrated as a JavaFX component. For the call center team, the call manager was also integrated in this app, so they have all their tools available in one screen.
-
-
Standards/Consortia
-
Evan Hahn ☛ MIME types and atom bombs
So not only did Los Alamos produce humanity’s deadliest weapon, they also created a simple file format for listing URLs.
-
How to Loop Through List in R with Base R and purrr: A Comprehensive Guide for Beginners
R programming has become an essential tool in the world of data analysis, offering powerful capabilities for manipulating and analyzing complex datasets. One of the fundamental skills that beginner R programmers need to master is the ability to loop through lists efficiently. This article will guide you through the process of looping through lists in R using both base R functions and the popular purrr package, complete with practical examples and best practices.