Programming Leftovers
-
AdventOfCode ☛ Day 6 - Advent of Code 2024
In this example, the guard will visit 41 distinct positions on your map.
Predict the path of the guard. How many distinct positions will the guard visit before leaving the mapped area?
-
Rlang ☛ Mastering For Loops in C: A Comprehensive Beginner’s Guide with Examples
Loops are a fundamental concept in programming that allow you to repeat a block of code multiple times. In C, there are three types of loops: for , while, and do-while. In this article, we’ll focus on the for loop and explore how it works with the help of several examples. By the end, you’ll have a solid understanding of how to use for loops effectively in your C programs.
-
Gergely Nagy ☛ Continuously integrating in the Attic
So I went ahead and set up Attic, because it was trivially easy to do so. All that I needed to do was to populate the cache. That opened another small can of worms, because I wanted to make things generic. I’ve set up caching in the past where I had to configure each and every project to tell the system what to cache, and what to restore.
I started the same way when experimenting with Attic, too: I saved the path of the nix build output, and uploaded just that path to the Attic. That helped a bit, but not much, because more often than not, other derivations are also built during the CI process, and I wanted to catch those too.
-
J Pieper ☛ callgrind profiling of embedded targets
When performing optimization or micro-optimization on desktop applications, callgrind combined with kcachegrind are one of my favorite combinations. While slow to run, it gives you precise information about where instructions are spent and has at least a decent way of moving up and down the call frame or digging into disassembly. The downside, is that it largely only works if you can run the application on your host processor, which isn’t that relevant when working with embedded targets like STM32 (or other) microcontrollers. Recently, I got fed up trying to find more cycles to shave off the moteus firmware, and decided to take a stab at making at least a minimal solution.
-
Marijke Luttekes ☛ Remove hard line breaks from READMEs / Marijke Luttekes
When working with accessibility and inclusive design experts, I learned many lessons, one of the most unexpected ones being to avoid hard line breaks in README files.
-
Marcus Buffett ☛ Locality of Behaviour, over the Single Responsibility Principle
The styling is there, the state update is there. Fetching from the store can be done right in the markup too. Hell, if I had a network call to make, I might do it right there too. I’m crazy like that. If in the future you want to reuse the styling, or call increment from more places, you can extract stuff then. Don’t pay the cost of extracting that code upfront, before you have any reason to suspect that you’ll need it from other places.
-
Rlang ☛ Quantitative Analysis: NVIDIA
Although the investors do not like the pace of revenue growth, in terms of QoQ, NVIDIA’s revenue increased for the first time in five quarters.
-
Qt ☛ Building a Unified Qt Hub: Your Ideas in Action
Hey Qt Community!
-
The 12-Step Program for Lispers
Posted in good fun for my lisp-loving friends.
1. Admit Powerlessness: Accept that you're powerless over parentheses, and that your code has become unmanageable due to excessive nesting.
2. Higher Order Function: Come to believe that a Higher Order Function greater than yourself could restore you to sanity-or at least bring your code to a level of elegance.
-
Federal News Network ☛ TMF award to help OPM modernize COBOL code via AI
Guy Cavallo, the OPM CIO, said by using artificial intelligence to rewrite software code, the agency will need fewer programmers without losing oversight rigor.
-
Perl / Raku
-
Perl Data Language ☛ Day 6: How to use PDL::Finance::TA to develop a trading strategy - PDL Advent calendar 2024
In this post, I show you how to start using PDL::Finance::TA to test out some theories that you can experiment with. A module named App::financeta exists that is a desktop GUI product that allows you to do this in an easier fashion without writing any code, but for this post we describe how to develop simple functions to do this from scratch. Maybe you want to embed this kind of functionality into a website you already have developed.
-
Perl ☛ Perl Advent Calendar 2024 - Have Yourself an AI Christmas!
OpenAI::API to the rescue! This handy-dandy Perl module exposes OpenAI's API to Perl, and lets you do chat, text completion, and image generation from the command line. What we're going to do is: [...]
-
-
Java
-
Frank Delporte ☛ JavaFX In Action #11 with Almas Baim about FXGL, a multipurpose game library for JavaFX
In the “JFX In Action” interviews, we already saw many business use cases of JavaFX. Let’s take a side step and look at game development. FXGL is a library that helps us create JavaFX games. But it’s much more than games! With the integrated Goal-Oriented Action Planning (GOAP) functionality, it can use game technology and AI to solve any kind of goal based on actions and preconditions.
In this video, Almas live-codes a fully working GOAP example application!
-
-
Rust
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 576
Hello and welcome to another issue of This Week in Rust!
-
Rust Blog ☛ The Rust Programming Language Blog: Launching the 2024 State of Rust Survey
It’s time for the 2024 State of Rust Survey!
Since 2016, the Rust Project has collected valuable information and feedback from the Rust programming language community through our annual State of Rust Survey. This tool allows us to more deeply understand how the Rust Project is performing, how we can better serve the global Rust community, and who our community is composed of.
-