StrictYAML
StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification.
Source: StrictYAML.
StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification.
Source: StrictYAML.
Once I was asked at an interview (which I seemed to fail because they did not contact me anymore): what's special in multiple inheritance in Python? Well, such a question is somewhat weird. What special? Special implies among others, or in comparison with others.
In the afternoon we went to Kijkduin on bike. On our way through the dunes Esme spotted a young red fox. I tried to take a few photos but it was too far away.
On the beach Adam found a piece of seaweed which according to Google lens is called Corallina officinalis.
On the way back we spotted the red fox again, this time on the other side of the road. Adam got of his bike and moved slowly closer and took some photos.
With rsync up and running, it’s time to take a peek under the hood of rsync to better understand how it works.
Source: rsync, article 3: How does rsync work?, an article by Michael Stapelberg.
The Rust team is happy to announce a new version of Rust, 1.62.0. Rust is a programming language empowering everyone to build reliable and efficient software.
Source: Announcing Rust 1.62.0.
The story of Alana Kane and Gary Valentine growing up, running around and going through the treacherous navigation of first love in the San Fernando Valley, 1973.
In the evening Esme and I watched Licorice Pizza. I liked the movie and give it a 7 out of 10.
Flask and Quart both utilise Werkzeug's HTTP router to route request paths to the relevant function. With the upcoming 2.2 release of Werkzeug this router will be significantly faster, with up to a factor of 5 seen in testing. This speedup increases with the size of the routing table and so you are likely to see further increases in your production applications. However, simple routing tables, as seen in micro-benchmarks, are unaffected and are unlikely to show a speedup.
The speedup is achieved by changing the algorithm from the original that matches against a list of regexs. Initially a radix/prefix tree algorithm was tried, but it couldn't support all of Werkzeug's features. Instead a state machine algorithm has been developed to be the new routing algorithm for Werkzeug.
Source: Faster routing for Flask & Quart, an article by Philip Jones.
Beyond exception handling, there's something else I see people struggling with, which is logging.
Most people don't know what to log, so they decide to log anything thinking it might be better than nothing, and end up creating just noise. Noise is a piece of information that doesn't help you or your team understand what's going on or resolving a problem.
Source: How to Python Logging 🐍🌴, an article by Guilherme Latrova.
High-quality Git commits are the key to a maintainable and collaborative open- or closed-source project. Learn strategies to improve and use commits to streamline your development process.
Source: Write Better Commits, Build Better Projects, an article by Victoria Dye.
A reclusive romance novelist on a book tour with her cover model gets swept up in a kidnapping attempt that lands them both in a cutthroat jungle adventure.
In the evening we watched The Lost City. I liked the movie and give it a 7 out of 10.
After 6 years of intense Python-Programming, I am starting into Guile Scheme. And against my expectations, I feel at home.
Source: Going from Python to Guile Scheme, an article by Arne Babenhauserheide.
Have you ever typed ctrl-c instead of ctrl-v and had to recopy again? Have you ever needed to copy and paste multiple entries at once from a page causing you to switch back and forth? Have you ever needed to copy the output of a program running in the terminal? I did, and got fed up with them almost 5 years ago, I’ll show you how you can eliminate these problems.
Source: Clipboard Goodies For Productivity, an article by Mátyás Budavári.
This post is an attempt to catalog some of my practices around testing Python projects. It's not meant to be treated as dogma- I anticipate I'll update this significantly over time.
Source: My Python testing style guide, and article by Stargirl (Thea) Flowers.
It's rare to see a web app that doesn't use XMLHttpRequest (or fetch, the new API with comparable capability). XMLHttpRequest (which we can call XHR if you're into the whole brevity thing) is as handy as a shirt pocket, but it doesn't do much to encourage robust and resilient programming practices. Any app that runs in the real world will sometimes encounter transient network interruptions and server outages. We should gracefully recover from both by automatically retrying our requests. But, we shouldn't turn a brief server hiccup into a full-on fireworks display by retrying too fast or by having every client retry at the same time.
This good advice gives us three concrete goals:
- Retry our XHR when we get an error.
- Pause an appropriate duration before retrying.
- Randomize the duration of the pause.
Source: Retry XMLHttpRequest Carefully, an article by Aaron D. Parks.
Lossless data compression is the size reduction of a file, such that a decompression function can restore the original file exactly with no loss of data. Lossless data compression is used ubiquitously in computing, from saving space on your personal computer to sending data over the web, communicating over a secure shell, or viewing a PNG or GIF image.
When I first used Git it drove me almost to tears of rage and frustration. But I did get it under control. I don't love Git, but I use it every day, by choice, and I use it effectively.
The magic key that rescued me was John Wiegley's Git From the Bottom Up
Git From the Bottom Up explains the model. I read it. After that I wept no more. I understood what was going on. I knew how to try things out and how to interpret what I saw. Even when I got a surprise, I had a model to fit it into.
Source: Things I wish everyone knew about Git (Part I), an article by Mark Dominus.
After many years of gradual improvement Vim now takes a big step with a major release. Besides many small additions the spotlight is on a new incarnation of the Vim script language: Vim9 script.
Source: Vim 9.0.
Today I’d like to talk about the package manager. Specifically, a lovely gateway into the rest of the ecosystem,
nix-shell
.Some people will tell you that the point of Nix is to set up your software so it can be built with Nix, which allows you to tightly control all dependencies and emit something that is as close to reproducible as possible. I am all for this, but if we can tightly control the dependencies without actually building inside a Nix environment, we’ve still improved the reproducibility a lot, and it’s not that hard.
Source: Throwaway development environments with Nix, an article by Samir Talwar.
The open source Git project just released Git 2.37. Take a look at some of our highlights from the latest release.
Source: Highlights from Git 2.37, an article by Taylor Blau.
When programming in Python, I spend a large amount of time using IPython and its powerful interactive prompt, not just for some one-off calculations, but for significant chunks of actual programming and debugging. I use it especially for exploratory programming where I’m unsure of the APIs available to me, or what the state of the system will be at a particular point in the code.
Source: REPL Python programming and debugging with IPython, an article by Luke Plant.
In this post I explore a couple of new (to me) operators in jq's arsenal:
JOIN
andINDEX
, based on an answer to a question that I came across on Stack Overflow.
Source: Understanding jq's SQL style operators JOIN and INDEX, an article by DJ Adams.
But how do I select the previous sibling of an element? Something like
p:before(hr)
which would select all paragraphs that precede an<hr>
element.
Source: A Previous Sibling Selector, an article by Jim Nielsen.