Programming Leftovers
-
Stephen Kell ☛ Rambles around computer science
Over on the development side of the blog, I recently wrote a throwaway hacky hash-bang recipe for making a single-file C source program executable and self-rebuilding.
I've recently done what I think is slightly better, by dispensing with a hash-bang line entirely, in favour of what I call a “slash-slash line”.
-
Loris Cro ☛ Yes, Go Does Have Exceptions
The Go standard library uses panic/recover as a control flow mechanism in parser code for example.
-
Carl Svensson ☛ Quines
Hence, here are two quines. One is in JavaScript, using a few language idiosyncracies to keep it short. The other is in Python, using a somewhat more traditional approach. They are perhaps not the best quines, but they are mine.
-
Rlang ☛ How to Loop Through Column Names in Base R with Examples
Looping through column names in R is a crucial technique for data manipulation, especially for beginners. This article will guide you through various methods to loop through column names in R, providing practical examples and insights to enhance your data analysis skills.
-
Karl Seguin ☛ TCP Server in Zig - Part 5b - Poll
In the previous part we introduced non-blocking sockets and used them, along with the poll system call, to maximize the efficiency of our server. Rather than having a thread-per-connection, waiting on data, a single thread can now manage multiple client connections. But this performance leap doesn't come for free: our code has gotten more complex.
At a high level, I think the idea behind evented I/O is straightforward. We ask the operating system to monitor a list of sockets, and it notifies us when those sockets are ready. We'll soon switch to alternatives to poll which perform better, have nicer APIs and are more powerful (at the cost of more complexity), but despite polls awkwardness we've managed to create a relatively clean TCP server implementation.
-
Medevel ☛ 17 Free Open-source Laravel Admin Panel and Dashboard Starter [2024]
Laravel is a powerful open-source PHP framework that streamlines web application development with its elegant syntax and robust features. Emphasizing clean code and maintainability, Laravel empowers developers to build applications rapidly and efficiently. Its extensive ecosystem, including packages and libraries, enhances functionality and reduces development time. l
-
Databases
-
Brian Douglas ☛ Sensible SQLite defaults
SQLite is cool now. DHH uses it, Laravel defaults to it. Here is a list of sensible defaults when using sqlite.
-
-
Education
-
Sandor Dargo ☛ C++ Brain Teasers by Anders Schau Knatten
I bought C++ Brain Teasers at C++ On Sea where the author also gave a presentation and made a few references to his book. I couldn’t wait to read it. Now that I finally did it, I’d like to share my thoughts.
Despite the fact that it’s a relatively short book (the ebook is 122 pages), it has something to teach to everyone I think. Maybe you’ll improve your C++ vocabulary and you’ll better use some terms and expressions, maybe you’ll get every teaser right at the beginning (kudos if you really do so!) and you’ll simply learn about the reasons behind, but I’m sure you’ll find something useful in this book.
-
Rlang ☛ Highlights from Shiny in Production (2024)
Hot on the heels of Shiny in Production 2022 & 2023, we were excited to dive back into all things Shiny for a third consecutive year. In this post we recap the highlights from the two days of talks and workshops.
-
-
Python
-
Jeff Triplett ☛ 📓 My notes on publishing a Python package with UV and building a custom GitHub Action for files-to-claude-xml - Jeff Triplett's Micro.blog
My new Python application files-to-claude-xml is now on PyPI, which means they are packaged and pip installable. My preferred way of running files-to-claude-xml is via UV’s tool run, which will install it if it still needs to be installed and then execute it.
-
-
Shell/Bash/Zsh/Ksh
-
Idiomdrottning ☛ md, mvd and cpd
I have gotten so much mileage out of these three zsh functions for making directories for over a decade, I should’ve posted them a long time ago but I just didn’t think to.
-