Programming Leftovers
-
Michał Sapka ☛ Hiatus due to Advent of Code
-
AdventOfCode ☛ Day 8 - Advent of Code 2024
The signal only applies its nefarious effect at specific antinodes based on the resonant frequencies of the antennas. In particular, an antinode occurs at any point that is perfectly in line with two antennas of the same frequency - but only when one of the antennas is twice as far away as the other. This means that for any pair of antennas with the same frequency, there are two antinodes, one on either side of them.
-
James G ☛ Advent of Patterns: Information previews
Applications that aggregate or have lists of information commonly show previews of information in an overall view of the system. An example of this pattern can be seen on email clients. When I go to my emails, I see a table with a list of entries. Each list entry has the essential information I need to evaluate what action I want to take next: open, respond, archive, mark as spam, and more.
-
Daniel Lemire ☛ Data structures as jigs for programmers (Go edition)
Data structures can be thought of as jigs for programmers. Much like how a jig guides the tool to make precise cuts or shapes, data structures in programming provide a framework for organizing and accessing data. Just as a jig guides the tool, data structures guide how data should be stored, accessed, and manipulated. Data structures help us ensure that operations on the data are performed in a predictable and efficient manner.
-
Daniel Lemire ☛ Data structures as jigs for programmers (Go edition)
A data structure in programming is a specific way of organizing and storing data in a computer so that it can be accessed and used efficiently. In woodworking or metalworking, a jig holds a piece of work and guides the tools operating on it.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: pinp 0.0.11 on CRAN: Maintenance
A new version of our pinp package arrived on CRAN today, and is the first release in four years. The pinp package allows for snazzier one or two column Markdown-based pdf vignettes, and is now used by a few packages. A screenshot of the package vignette can be seen below. Additional screenshots are at the pinp page.
-
Perl / Raku
-
Perl ☛ Perl Advent Calendar 2024 - Pixie the Elf Picks an Artist: Exploring Perl's new class syntax
Pixie the Elf (whose parents had strange ideas about names), was well-known at the North Pole for her love of music. But she often found herself in a bit of a repetitive loop. It was just too easy to listen to the same artists over and over again. With 15 years of meticulously scrobbled data on Last.fm, she wondered if she could leverage this information to diversify her playlists. Determined to find a solution, Pixie delved into the Last.fm API and, after some coding, developed pickanartist, a Perl program designed to recommend artists she hadn't engaged with recently.
-
Perl ☛ Perl Advent Calendar 2024 - A Time-Tested Powerhouse for Processing XML
XML was the preferred communication language used by services in the early 2000s. During that time, governments were establishing their own e-government systems, while companies were developing their SOAP services. Then, BOOM! Services began to adopt JSON because it was a lightweight and efficient alternative to XML. However, even though JSON became the new standard, old services were still in use and being maintained.Rewriting a system from scratch is not easy, and it might not even be necessary. That might be why XML is still in use, or perhaps governments and companies simply adopt the "as far as it goes" mindset. Who knows! Let's parse some XML and beat that services up!
Here is where the sweetest and most beloved Perl library, XML::Twig, comes into play.
-
Perl Data Language ☛ Day 8: Simplex optimisation with Perl Data Language - PDL Advent calendar 2024
The simplex algorithm finds the optimum "point" (coordinates) in a space you define, which can have any number (called n here) of dimensions.
The algorithm takes either a fully-formed cloud of n+1 points, or a single starting point, in which case it constructs the cloud for you using the "initsize" parameter. It also takes a function that will take a series of points in your space, and returns the "value" at each of those points. From that, it works out which point of the simplex to move to be closer to the optimum point, which has the lowest value of your function.
It also takes other, less important parameters, which you'll see, including a "logging" function which you can use to report progress, or plot data.
-
Perl Data Language ☛ Day 9: Exploring Data with D3.js and Mojolicious - PDL Advent calendar 2024
Sometimes PDL doesn't scratch the particular itch you have. PDL isn't like Vegas. It doesn't have to stay there. After crunching your data, you can get it out to Perl and beyond.
-
-
Python
-
ID Root ☛ Calculate Derivatives using Python
In the world of mathematics and computer science, calculating derivatives is a fundamental skill with wide-ranging applications. Python, known for its simplicity and versatility, offers powerful tools for computing derivatives efficiently. This comprehensive guide will walk you through the process of calculating derivatives using Python, exploring both symbolic and numerical methods.
-
ID Root ☛ Calendar Month using Python
In the world of programming, working with dates and calendars is a common task that developers often encounter. Python, known for its versatility and extensive library support, offers powerful tools for handling calendar-related operations. This article delves into the intricacies of using Python’s calendar module to display, manipulate, and customize calendar months.
-
-
Shell/Bash/Zsh/Ksh
-
Étienne Pflieger ☛ RVM and fish shell
Clearly, all the time I spent using zsh, and configuring it, make me a lot more aware of what a shell really is, what happen under the hood, etc. So after reading Julia Evans article, I tried the fish shell again… and actually loved it. So much that after only 3 days or so, I decided and successfuly switch to fish as my session shell.
-
-
Standards/Consortia
-
Luis Quintanilla ☛ Starter Packs with OPML and RSS
More importantly, because RSS and OPML are open standards, you're not limited to building starter packs for Bluesky. You can create, share, and subscribe to starter packs for any platform that supports RSS. That includes blogs, podcasts, forums, YouTube, Mastodon, etc. Manton seems to have something similar in mind as a means of building on open standards that make it easy for Micro.blog to interop with various platforms.
-