Programming Leftovers
-
Sean Conner ☛ Fixing a 27 year old bug that only now just got triggered
I will, from time to time, look at various logs for errors. And when I looked at the error log for my web server, intermixed with errors I have no control over like this: [...]
-
Daniel Lemire ☛ How fast can you open 1000 files?
I was curious and I decided to test it out. I wrote a small C++ program which opens 10,000 files. The files are opened and closed immediately. However, there are 10,000 distinct (empty) files. It is a simple test: there is no writing and the files do not remain open long.
-
Brandon Pugh ☛ Git Stash Without the Branch Name
When I stash changes in git, it’s usually work that is independent of the branch I’m working on. If I have work in progress that does belong on a particular branch, then I’ll create a WIP (“work in progress”) commit on that branch instead.
This means that git’s default behavior of including the branch name in the stash message just adds noise for me.
-
Colin Leroy-Mira ☛ Apple II: a simple way to play sound samples
I am currently in the process of porting (or rather, reimplementing from scratch) an old Macintosh game to the Apple II, and I wanted it to have acceptable sound. Like this: [...]
-
Mediocregopher ☛ How to Program Good
This attitude of low-stakes programming is what prevents us from ever discovering the rules and patterns which will regularly produce programs on which people can actually rely. To agree on a rule is to agree on entire categories of things which we will NOT do, but if what we do doesn't matter then we'll continue to simply do whatever we feel like without limitation.
-
France24 ☛ Cyclone Garance hits France's Reunion Island, kills at least three
French police said at least three people were killed when a tropical storm packing fierce winds and torrential rains thumped the French Indian Ocean island of Reunion on Friday. Residents were ordered to stay at home as Tropical Cyclone Garance brought heavy rain and winds exceeding 200 kilometers per hour (124 mph), causing floods, power cuts and damage to buildings.
-
Python
-
University of Toronto ☛ Using PyPy (or thinking about it) exposed a bug in closing files
I recently wanted to run a hacked up version of a NFS monitoring program written in Python under PyPy instead of CPython, so it would run faster and use less CPU on the systems I was interested in. Since I remembered this PyPy issue, I found myself wondering if it properly handled closing the file(s) it had to open, or if it left it to CPython garbage collection. When I looked at the code, what I found can be summarized as 'yes and no': [...]
-
-
Shell/Bash/Zsh/Ksh
-
Bozhidar Batsov ☛ Back to the Basics: Zsh without Oh My Zsh
I’ve been using the Z Shell (a.k.a. Zsh) for a very long time now. There was a time early on in my Zsh journey when I read the entire documentation, plus a book on Zsh and I had a simple, yet pretty decent custom configuration. At some point, however, I bought into the hype of Oh My Zsh and I’ve been mostly using it ever since.
-