news
Programming Leftovers
-
Yordi Verkroost ☛ Advent of Code 2025 - Day 6
Today reminds me of how I did math in primary school. You know, putting two or more numbers below each other and then going from right to left, from digit to digit, to either add or multiply. Life was easy and peaceful back then. Much has changed since.
But I digress. Let's look at the puzzles.
-
Yordi Verkroost ☛ Advent of Code 2025 - Day 3
This principle is the main idea for solving this problem. In general, if we need to find the largest possible number consisting of x digits, we first look for the largest number in the list excluding the last x - 1 digits. For example, if we need to find the largest possible number consisting of 12 digits, we first look for the largest number in the list excluding the last 11 digits. For the second digit of the resulting number, we look in the list excluding the last 10 digits, but we also start one position after the index of the previously found digit. That way we make sure we never look to the left side of the previously found digit, and we also leave enough room at the end of the list to find new digits.
-
Martin Gunnarsson ☛ Advent of Code, Rockstar edition
At Øredev I met my pal Fredrik, who told me about this presentation he had just been to. It was about a fun programming language called Rockstar, which lets you write 80's rock ballad lyrics that compile. Fun! One faithful evening a few weeks later, after the rest of the family had gone to bed, I decided to have a couple of beers and give it a try.
-
Rlang ☛ Haskell IS a Great Language for Data Science
I’ve been learning Haskell for a few years now and I am really liking a lot of the features, not least the strong typing and functional approach. I thought it was lacking some of the things I missed from R until I found the dataHaskell project.
-
Daniel Lemire ☛ Why speed matters
Moving fast does not mean that you complete your projects quickly. Projects have many parts, and getting everything right may take a long time.
Nevertheless, you should move as fast as you can.
-
[Old] University of Arizona ☛ The Icon Programming Language
Icon was first released in 1979 as a modern successor to SNOBOL4, and it continued to evolve for the next two decades. Development has now been frozen, but the Unix implementation is still in active use and is maintained as necessary.
-
[Old] University of Arizona ☛ An Overview of the Icon Programming Language; Version 9
Icon emphasizes high-level string processing and a design philosophy that allows ease of programming and short, concise programs. Storage allocation and garbage collection are automatic in Icon, and there are few restrictions on the sizes of objects. Strings, lists, and other structures are created during program execution and their size does not need to be known when a program is written. Values are converted to expected types automatically; for example, numeral strings read in as input can be used in numerical computations without explicit conversion. Icon has an expression-based syntax with reserved words; in appearance, Icon programs resemble those of Pascal and C.
-
[Old] University of Arizona ☛ A Brief Introduction to Icon
In Icon, values, not variables, are typed. Built-in data types include numerics, character sets, strings, sets, lists, associative tables, records, and procedures. The aggregate types - sets, lists, tables, and records - can hold values of any type. Tables can be indexed by values of any type. Numerics, character sets, and strings are atomic values; operations on them produce new values. Aggregates use pointer semantics; operations on them can change existing values as well as produce new ones. Strings and aggregates can be of arbitrary size, and their sizes can change during execution. Memory management is automatic.
Icon has an expression-oriented syntax; even control structures are expressions. Procedures consist of zero or more expressions separated by newlines or semicolons. Icon programs consist of one or more procedure definitions, and execution begins by calling the procedure named main.
-
[Old] Mitchell Software Engineering ☛ Mitchell Software Engineering -- The Icon Programming Language
Here's a simple example of Icon -- a program that reads lines from standard input and prints the lines in reverse order (last line first; first line last): [...]
-
Andrew Vittiglio ☛ The “Good Enough” Lie in Engineering
In other words, “What we have now is good enough, but we’ll take a look later.”
I’ve spent the last six months building dev tools for C2PA, and I’ve watched this pattern repeat across the ecosystem. The aphorism “perfect is the enemy of good” has become a conversational cheat code morphing engineering rigor into obstructionism, framing the critic as an idealist and the defender as a pragmatist. But after seeing it used to dismiss security failures, I’ve come to a different conclusion:
Perfect isn’t the enemy of good. “Good enough” is the enemy of “actually good.”
-
Daniel Beskin ☛ What's the Point of Learning Functional Programming? - Daniel Beskin's Blog
But let's rewind for a bit of background first. As I found myself standing in front of a frightened looking class, reviewing some Haskell basics, I was starting to feel guilty1 for overwhelming them with all these foreign new concepts. Recursion, currying, function composition, algebraic data types, and the list goes on and on. So it felt natural to give them an escape hatch.
I mean, if all you know in life are loops, how can you possibly make do with just recursion? So when it was time for a new homework assignment we gave them a hint along the following lines: [...]
-
AdventOfCode ☛ Day 7 - Advent of Code 2025
To repair the teleporter, you first need to understand the beam-splitting properties of the tachyon manifold. In this example, a tachyon beam is split a total of 21 times.
Analyze your manifold diagram. How many times will the beam be split?
-
AdventOfCode ☛ Day 8 - Advent of Code 2025
This list describes the position of 20 junction boxes, one per line. Each position is given as X,Y,Z coordinates. So, the first junction box in the list is at X=162, Y=817, Z=812.
To save on string lights, the Elves would like to focus on connecting pairs of junction boxes that are as close together as possible according to straight-line distance. In this example, the two junction boxes which are closest together are 162,817,812 and 425,690,689.
-
Yordi Verkroost ☛ Advent of Code 2025 - Day 7
I'm actually not going part by part in this post today. I've refactored a lot of code for part two and re-added logic for part one back into it. So let's go backwards and start with part two.
-
Juan J Martínez ☛ Learning OCaml
Long story short, it is not easy to cross-compile projects in Haskell. For example, I would like to build a Windows binary in my Linux machine, and because how GHC –the Haskell compiler– is designed, it isn’t trivial. I managed to cross-compile using WINE, and definitely you can do it with Nix; but I my opinion, if a problem requires this type of solution, it is a problem.
-
Chloé Vulquin ☛ Squint Testing Lisps
Now, almost 20 years later, we have more hindsight. Typical responses to it are to say that the squint test makes no sense for a programming language. Now a rejection of the premise is all fine and good, but I want to do more. This is because I think that lisps actually pass the squint test.
-
Nova ☛ OOPs, I'm so dead!
Okay, okay, I know what you're thinking: what's this data-oriented design zealot doing, opening their mouth about object-oriented programming? Don't they know that OOP is alive, well, and keeps spawning more successful projects than any other programming paradigm ever did, like Shub-Niggurath the Black Goat of the Woods with a Thousand Young spawns progeny? And don't they know that basically everything in programming is actually OOP, including their favourite ML and DOD features?
So, let's start off with some clarifications: [...]
-
Jakob Nybo Nissen ☛ Review: Julia trimming for Advent of Code 2025
Advent of Code is a great opportunity to play around with programming to learn something new. This year, I didn't want to try solving it in Rust or Zig again. Instead, I've test driven a few experimental features of Julia that I haven't yet dared to use production code: Trimming, JETLS and a few not-so-established packages.
This post is a review of trimming, in its current, experimental, state.
-
Colin M Strickland ☛ Regular Expressions and counting lengths
I was messing around with regular expressions on some default interpreters on my Debian machine, wondering about what the default encoding behaviour for string literals might be. As you do. So, given a string with a "pesky foreign accent" in it, how many characters do various languages think it has?
-
[Old] Mitchell Software Engineering ☛ Programming with GNU Emacs Lisp
GNU Emacs is a full-featured text editor that contains a complete Lisp system. Emacs Lisp is used for a variety of things: [...]
-
Perl / Raku
-
Arne Sommer ☛ The Good Shuffle with Raku
You are given a string.
Write a script to return the number of good substrings of length three in the given string.
A string is good if there are no repeated characters.
-
Rakulang ☛ Day 7 – Allowing for fewer dollars – Raku Advent Calendar
When back home, Lizzybel thought: “But the Raku Programming Language is no stranger to sigilless constants”
my constant answer = 42;
“is but an example”. “And with a little trick, you could even make sigilless variables”, she was mumbling to herself: [...]
-
Perl ☛ Perl Advent Calendar 2025 - Abstract storage of Christmas letters
Next, he wrote a small Mojolicious application which implemented the LetterStore service. It contained two actions - /letters/count to fetch the total number of letters, and /letters to fetch them. To avoid returning too many letters at once, he decided that they will be returned in pages, 5 at a time. The action to return them returns cursor, which may return an index of the next letter to fetch if there are more letters. This value can be appended into the action URL to fetch the next page: [...]
-
Perl ☛ Perl Advent Calendar 2025 - Perl who is Naughty or Nice?
The data from Data::Random::Contact is actually generated from Fakenamegenerator.com. To make the test data as close to production, Chaz wrote the script to generate at least 200 records.
-
The Weekly Challenge ☛ Advent Calendar - December 7, 2025
This post presents my solutions to the Perl Weekly Challenge 309.
I keep doing the Perl Weekly Challenge in order to mantain my coding skills in good shape, as well as in order to learn new things, with particular regard to Raku, a language that I love.
This week, I solved the following tasks:
The PL/Perl implementations are very similar to a pure Perl implementation, even if the PostgreSQL environment could involve some more constraints. Similarly, the PL/PgSQL implementations help me keeping my PostgreSQL programming skills in good shape.
-
The Weekly Challenge ☛ Advent Calendar - December 8, 2024
The majory of the work can be done in a single line. Conveniently the tr function returns the number of characters effected by the command. For our purposes that means telling tr to delete all numerals. We then check if the number of numerals removed is even inside of a grep block. The number of matches is then returned. Note the one catch, in order to use tr we need to assign $_ to a temporary value, $x. Otherwise we would get an error Modification of a read-only value.
-
[Old] Colin M Strickland ☛ Perl's decline was cultural
I can't imagine Perl disappearing entirely in my lifetime. I can remember entire programming environments and languages that are much, much deader than I can ever see Perl becoming.
[...]
Perl also got to be if not first, then certainly early to dominate a new market paradigm. Plenty of things never manage that. It's hard to see Perl as anything other than an enormous success on these terms. Perl innovated and influenced languages that came after in some truly significant ways.
-
-
R / R-Script
-
Rlang ☛ ARIMA-Black-Scholes: Semi-Parametric Market price of risk for Risk-Neutral Pricing (code + preprint)
In quantitative finance, pricing derivatives often requires working under a risk-neutral measure (Q) rather than the real-world physical measure (P). While the Girsanov theorem provides a theoretical framework for this change of measure, practical implementation can be challenging—especially for complex models like stochastic volatility with jumps.
This blog post demonstrates a semi-parametric approach that bridges classical time series modeling with risk-neutral pricing. We’ll show how to: [...]
-
-
Shell/Bash/Zsh/Ksh
-
[Old] Mitchell Software Engineering ☛ Computing with Pipes (Just Pipe It!) [PDF]
One way to solve a problem is to write a program but some problems can be solved by simply connecting programs.
Pipes let us connect programs.
An essential notion underlying pipes is that of standard input and standard output. A pipe connects the standard output of one program to the standard input of another.
-
-
Java/Golang
-
Vincent Bernat ☛ Compressing embedded files in Go
Go’s embed feature lets you bundle static assets into an executable, but it stores them uncompressed. This wastes space: a web interface with documentation can bloat your binary by dozens of megabytes. A proposition to optionally enable compression was declined because it is difficult to handle all use cases. One solution? Put all the assets into a ZIP archive! 🗜️
-