news
Programming Leftovers
-
Sandor Dargo ☛ Time in C++: std::chrono::system_clock | Sandor Dargo's Blog
Last week, we started a series on clocks, by introducing the <chono> library in general. We saw the three pillars of the library: time_points, durations and clocks from a birds-eye view. As a next step, let’s talk about one of its most commonly used clocks: std::chrono::system_clock.
If you’ve ever logged timestamps or printed the current time, there is a fair chance that you’ve already used it. But let’s take a closer look at what this clock really represents and where its limitations lie.
-
EnterpriseDB Corporation ☛ Exploring Fibonacci & Turing Completeness in psql's Scripting Language
I noticed that psql supports setting variables (\set for literals and \gset for query results) and conditional blocks (\if). It also supports loops (with \watch) and recursion of sorts (with \include). Can we express any computation in psql's scripting language? Kinda sounds like it.
This post is for fun. Don't do this. But it happens to also be a nice introduction to some intermediate usage of psql itself.
-
Ben Joffe ☛ A Very Fast 64–Bit Date Algorithm: 30-40% faster
In this article I present my final very fast date conversion algorithm. It represents a significant speed gain — being similar in magnitude to the speed gains achieved by the previous fastest algorithm (Neri-Schneider 2021) over its predecessor (C++ Boost). The full algorithm implementation in C++ is released as free open source software (BSL-1.0 License).
The algorithm provides accurate results over a period of ±1.89 Trillion years, making it suitable to process the full UNIX 64–bit time (in seconds).
The entire algorithm has been re-written top-to-bottom, with various micro-optimisations, but three main new ideas: [...]
-
Sean Goedecke ☛ Becoming unblockable
With enough careful effort, it’s possible to become unblockable. In other words, you can put yourself in a position where you’re always able to make forward progress on your goals.
I wrote about this six months ago in Why strong engineers are rarely blocked, but I wanted to take another crack at it and give some more concrete advice.
-
Juha-Matti Santala ☛ Improve your programming skills with Advent of Code
Next Monday we turn our calendars to December and for us software developers it means Advent of Code starts again, for the 11th year. This year, there are some new changes though that will hopefully make it more approachable to many people.
-
Andrej ☛ What They Don't Tell You About Maintaining an Open Source Project
i spent hours writing documentation. setup guides, configuration examples, troubleshooting sections. tried to make it clear and comprehensive.
but here's the thing: people come from different backgrounds. what's obvious to me after building the thing isn't obvious to someone installing it for the first time.
someone opens an issue: "how do i install this?"
my first reaction was frustration. it's in the readme! but then i realized - maybe the readme assumes too much. maybe they're new to docker. maybe they're coming from windows and linux is foreign.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: tidyCpp 0.0.8 on CRAN: Maintenance
Another maintenance release of the tidyCpp package arrived on CRAN this morning, the first in about two years. The packages offers a clean C++ layer (as well as one small C++ helper class) on top of the C API for R which aims to make use of this robust (if awkward) C API a little easier and more consistent. See the (now updated, see below) vignette for motivating examples.
-
Python
-
Leon Mika ☛ Some Thoughts on the State of Python Package Documentation
This really is one area where Python shows it’s age. For a language that is popular and forward looking as it is, it feels like it missed that crucial time when the language designers took on the responsibility of standardising the way package documentation is published. Hope this is something that can be fixed. They’ve laid the foundation for this, by adding docstrings for example. They just need to make it easy to browse it (and no, pydoc does not do this. I’ve tried it).
-
Claus Wilke ☛ Python is not a great language for data science. Part 1: The experience
I think people way over-index Python as the language for data science. It has limitations that I think are quite noteworthy. There are many data-science tasks I’d much rather do in R than in Python.1 I believe the reason Python is so widely used in data science is a historical accident, plus it being sort-of Ok at most things, rather than an expression of its inherent suitability for data-science work.
At the same time, I think Python is pretty good for deep learning.2 There’s a reason PyTorch is the industry standard. When I’m talking about data science here, I’m specifically excluding deep learning. I’m talking about all the other stuff: data wrangling, exploratory data analysis, visualization, statistical modeling, etc. And, as I said in my opening paragraphs, I understand that if you’re already working in Python all day for a good reason (e.g., training AI models) you may also want to do all the rest in Python. I’m doing this myself, in the deep-learning classes I teach. This doesn’t mean I can’t be frustrated by how cumbersome data science often is in the Python world.
-
-
Shell/Bash/Zsh/Ksh
-
Linuxiac ☛ Tmux 3.6 Update Adds Scrollbars, New Theme Mode
Over a year after the 3.5 release, Tmux 3.6, a terminal multiplexer that lets you split your terminal into panes, manage multiple sessions, and keep them running in the background, is now available, bringing a wide range of improvements and a few standout additions.
One of the most noticeable additions is the added native scrollbar support. The new pane-scrollbars option enables scrollbars directly inside panes.
-
-
Java/Golang
-
Anton Zhiyanov ☛ Go proposal: Goroutine metrics
Go's runtime/metrics package already provides a lot of runtime stats, but it doesn't include metrics for goroutine states or thread counts.
-