Programming Leftovers
-
Julia Evans ☛ Mounting git commits as folders with NFS
It’s pretty experimental (I’m not sure if this is actually a useful piece of software to have or just a fun toy to think about how git works) but it was fun to write and I’ve enjoyed using it myself on small repositories so here are some of the problems I ran into while writing it.
-
Noel Rappin ☛ How To Manage Duplicate Test Setup, or Can I Interest You In Weird RSpec?
You have a series of test cases. They cover the same logic with different inputs. In order to get to that logic, there’s some overhead: objects have to be created first. Then there’s more logic needed to evaluate the result.
What’s the best way to manage these tests?
-
Evan Hahn ☛ Introducing Sqids Crystal
In an effort to blog about more of my random projects, today I’m announcing my port of Sqids to the Crystal programming language.
Sqids is a simple encoding for a list of numbers. For example,
[123, 456]
gets encoded asB9fj0X
. I didn’t create this project, but I thought it was neat.Sqids Crystal, as the name suggests, is a Crystal library for encoding and decoding Sqids. This is the thing I made!
Because Crystal is so similar to Ruby, it was a small effort to port Sqids Ruby to Crystal. For the most part, I was able to copy-paste the code and make some small changes: [...]
-
Evan Hahn ☛ When static types make your code shorter
In short: I learned that static types, often derided for verbosity, can sometimes make your code shorter. In my case, I was able to delete some validation code because of the type annotations.
I was recently porting some code from Ruby to Crystal and was surprised by something: the Crystal code was shorter because it used static types. The Ruby code was 190 lines and the Crystal version was 163; about 15% shorter.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: RcppArmadillo 0.12.6.6.1 on CRAN: No More Deprecation
widely used by (currently) 1126 other packages on CRAN, downloaded 31.7 million / vignette) by Conrad and myself has been cited 569 times according
This release ends the practice on asking Armadillo to suppress deprecation warnings. RcppArmadillo, as noted, has a large user base. Sometimes Conrad sometimes made changes without too much of a heads-up so at times it was opportune to not bring those warnings to dozens (or maybe hundreds) of packages at CRAN. Yet we need to balance this with the demonstrable need to call out older deprecated code use.
-
Perl / Raku
-
Rakulang ☛ Rakudo Weekly 2023.49 Venting This AD
The first batch of Advent Calendar 2023 posts about the Raku Programming Language has arrived again! Kudos to Dominique In a mail on the mailing-list, Dominique Dumont announces their stepping down from being the packager of Rakudo for the Debian distribution after 10 years!
-
-
Python
-
Medevel ☛ VidGear is a High-Performance Video Processing Python Library
VidGear is a powerful video processing Python library that guarantees high performance. It offers a user-friendly, highly customizable, and extensively optimized multi-threaded + asyncio API framework.
-