Programming Leftovers
-
Rachel ☛ Reader feedback: "bad" names, !main(), and Mastodon
Near as we can figure, they decided to code this up because it would let them claim to have automated some class of tickets that were being filed. It's like, sure, it would in fact remove the handful of tickets that get filed about this. It would also generate a godawful amount of hurt (and bad PR and so on) a few hours or days later, and would have to be turned off. But, the person managed to ship the feature, and so they can get their bonus, or promotion, or whatever.
Of course, karma is a bitch. A few months later, COVID hit and the company started laying people off in droves. I bet all of those people are gone now. Unfortunately, this also means anyone who learned a lesson from this event is probably gone, too. Hmph.
-
Marcus Buffett ☛ An honest review of my last year building Chessbook
One win was around compressing chess moves and positions. With some hand-rolled FEN compression, some arithmetic encoding of PGNs and SANs, and some cheating with common openings, we’ve reduced the size of each entry in our database by an average of 90%. This has meant retrieving records from Postgres is way faster, as we were I/O bound previously (shout-out Cloud SQL by GCP, for their anemic SSDs with 300MB/s reads).
Another win is adding a CDN layer in front of the frontend web server. I didn’t really feel this pain personally, being located near our servers, but my cofounder in Australia is certainly seeing the benefits here, along with the tens of thousands of users we have outside North America.
-
Fernando Borretti ☛ Implementing SM-2 in Rust
But I didn’t understand the implications of the change to the ease factor. So I decided to look into the algorithm. And, since what I do not create, I do not understand, I wrote a simple implementation of it in Rust.
Without further ado, the code is here. What follows is an explanation.
-
[Old] Justin Meiners ☛ Efficient Programming with Components
Course by: Alexander A. Stepanov (2013)
-
Noë Flatreaud ☛ Lua is so underrated
The more I learn about Lua's design and implementation, the more impressed I am. It's very rare to see software that does so much with so little code.
Unfortunately, Lua doesn’t have the same level of marketing and hype as some other languages. This lack of promotion means that fewer developers are aware of Lua’s capabilities and benefits. It is often perceived as a niche language, primarily used in gaming and embedded systems.
Consequently, Lua may not receive the attention it deserves, even though it has a lot to offer ;
-
Writing an extensible JSON-based DSL with Moose
At work, I've been maintaining a perl script that needs to run a number of steps as part of a release workflow.
Initially, that script was very simple, but over time it has grown to do a number of things. And then some of those things did not need to be run all the time. And then we wanted to do this one exceptional thing for this one case. And so on; eventually the script became a big mess of configuration options and unreadable flow, and so I decided that I wanted it to be more configurable. I sat down and spent some time on this, and eventually came up with what I now realize is a domain-specific language (DSL) in JSON, implemented by creating objects in Moose, extensible by writing more object classes.
-
pastewindow.nvim my first neovim plugin
pastewindow is a neovim plugin written in Lua to help to paste text from a buffer to a different window in Neovim. This is my first attempt of writing a plugin.
We can select a window (in the GIF below I am using a bash terminal as target) and send any text to that window. This will be helpful in my teaching sessions. Specially modifying larger Python functions etc.
-
Shell/Bash/Zsh/Ksh
-
Rlang ☛ The Complete Guide to Searching Files in Linux: A Beginner’s Tutorial
Finding files in Linux can seem daunting for beginners, especially when dealing with thousands of files across multiple directories. This guide will walk you through the most effective methods to search for files in Linux, making file management a breeze.
-
-
Mozilla
-
Mozilla ☛ Support.Mozilla.Org: Wrapping up 2024: How SUMO made support smarter, simpler, and more accessible
As 2024 comes to a close, we want to take a moment to celebrate the work we’ve accomplished together at Mozilla Support (SUMO). This year, we focused on making support resources easier to use, smarter to create, and better for everyone. From reducing users’ cognitive load to amplifying their voices through new programs, these wins are a testament to collaboration between our team, contributors, and the wider Mozilla community.
Let’s look back at the highlights.
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 579
Hello and welcome to another issue of This Week in Rust!
-