Programming Leftovers
-
Unix Men ☛ How to Use Fopen: C projects guide
LSOF: How to List Open Files in Unix Systems
-
Unix Men ☛ Node Version Manager (NVM): Guide for Managing Node.js Versions
Bash For Loop: A Complete Guide for Perfect Scripts
-
Rlang ☛ How to Combine Vectors in R: A Comprehensive Guide with Examples
Combining vectors is a fundamental operation in R programming. As an R programmer, you’ll often need to merge datasets, create new variables, or prepare data for further processing. This comprehensive guide will explore various methods to combine vectors into a single vector, matrix, or data frame using base R functions, with clear examples to help you master these techniques.
-
Michael Stapelberg ☛ Testing with Go and PostgreSQL: ephemeral DBs
Let’s say you created a Go program that stores data in PostgreSQL — you installed PostgreSQL, wrote the Go code, and everything works; great!
But after writing a test for your code, you wonder: how do you best provide PostgreSQL to your automated tests? Do you start a separate PostgreSQL in a Docker container, for example, or do you maybe reuse your development PostgreSQL instance?
-
Chris ☛ So You Think You Know Ada?
This is yet another article I wrote a long time ago but never published, but it was a joy to proof-read it before publishing now. Ada is a very well-designed language. It looks funky with its Pascal-like syntax, but it’s clear people thought hard about how things should fit together to give the programmer a good experience. There are reasonable alternatives to Ada these days (D, Rust, among others) but Ada will always hold a special place in my heart.
In the style of So You Think You Know C? I present this article. Fair warning, though: it may be much easier than you would have hoped. I have converted the C code to Ada, and I have tried to keep it as faithful to the original as possible.
-
Eric McClure ☛ Stop Making Me Memorize The Borrow Checker
I started learning Rust about 3 or 4 years ago. I am now knee-deep in several very complex Rust projects that keep slamming into the limitations of the Rust compiler. One of the most common and obnoxious problems is hitting a situation the borrow-checker can’t deal with and realizing that I need to completely re-architect how my program works, because lifetimes are “contagious” the same way async is. Naturally, Rust has both!
-
Paged Out!! ☛ Paged Out! Institute [PDF]
Hello, dear Reader! This is a Generative Pre-trained Transformer in PyTorch on a single page. It takes a sequence of tokens (e.g. P|age|d) and produces the next token (e.g. Out).
-
Ethan Smith ☛ Traits are a Local Maximavlog
Today we’re talking about Rust traits . As you might’ve guessed from the title, we will not be talking about them positively. Woah woah, hang on, put down your pitchfork. A local maxima is still a maxima, I love traits as much as anyone.
Traits are one of the few programming language concepts beloved enough to earn multiple names. You might have heard about typeclasses in Haskell or protocols in Swift. Heck, if the teacher’s not watching, even interfaces can be considered a kind of trait. Elm famously left out traits, and it was so requested it spawned an FAQ explaining their absence.
Traits have a rich history dating back to 80s. How could such a mature and cherished feature have problems? Especially, problems substantial enough to warrant a blog post?
-
Python
-
ID Root ☛ How To Build URL Shortener using Python
In the digital age, sharing links is an integral part of communication and marketing strategies. However, long URLs can be cumbersome and unattractive. This is where URL shorteners come into play. They simplify lengthy web addresses into concise, manageable links that are easy to share across various platforms.
-
Unix Men ☛ Pip: Install Specific Version of a Python Package Instructions
How to Update and Upgrade the Pip Command
-
SusamPal ☛ Negative Lookahead Assertion
Here is an example of negative lookahead assertion in regular expression using Python: [...]
-
Adnan Siddiqi ☛ Develop AI Cover letter generator app in Flask using Gemini API
Since the app is a web app, I am going to use Python Flask for this purpose. If it is not installed you may install it by running the following command in the terminal: [...]
-