news
Programming Leftovers
-
Varun Gandhi ☛ There continue to be reasons for software to be slow
I believe that this statement as written is well-intentioned but incorrect, in much of the same way in which the statement made by Lawson is well-intentioned but incorrect, and in the same way that formal methods advocates arguing that an increasingly larger fractionThe phrase “fraction” is deliberate here. If it were “quantity” instead, it really wouldn’t be a debate.
of software will be formally verified are well-intentioned but incorrect. To be clear, I’m very much in favor of better testing, use of formal methods, as well as performance work! I’ve done work along these lines at multiple jobs, including my current one! It’s just that I don’t agree with these predictions about the future.
-
Ham Vocke ☛ Find Git Commits by Commit Message Text
Today I learned: When using the git CLI you can reference a commit by its commit message using the :/some text syntax.
-
Jon Chiappetta: Trying Out A Set Of Hacky Tampermonkey Javascript Modifications For A Better kick.com Live Stream Video Experience
The kick.com live stream video experience on the web is not the best overall, it seems to constantly lose track of a previously buffered section of the live stream and then sends you to the live portion but mine also gets stuck on reconnecting again and remains frozen until a manual refresh! I tried to write a series of hacky javascript modifications to help solve the following issues: [...]
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: RProtoBuf 0.4.28 on CRAN: Small Updates
A new minor release 0.4.28 of RProtoBuf provides R with bindings to the
This release corrects a really old bug. Troy found, when working on gRPC based extensions, which is in and by itself exciting, that a small part of our interface surface (for service descriptors) was just wrong confusing single and double underscores.
-
Perl / Raku
-
Fuzzix ☛ Perl's Data::Checks and Tagged Types, of a Sort :: fuzzix dot org
Data::Checks and its associated ecosystem of attributes allows for convenient definition of runtime value constraint assertions. An example provided in its documentation offers a nice, succinct overview of the capabilities on offer: [...]
-
-
Python
-
Juha-Matti Santala ☛ T is for time-machine - Python A to Z
Quite a lot of our software has code in it that deals with time: either by displaying some time (current time, creation/modification time, countdowns etc.) or by doing different logic based on the current time (”show this for the week leading into Christmas” type of deal).
Time is wibbly wobbly — as my favourite Doctor would say — and when writing tests, it means that we need tools to control time. If we let tests run against the system clock, they will fail sometimes and succeed other times. That doesn’t make them very good tests.
-
University of Toronto ☛ Some notes on taming ruff (and mypy) so they're useful for me
One of the things that ruff can be is a Python linter (in addition to at least a formatter and a not very attractive language server). In its default configuration, ruff is a quite opinionated linter with plenty of views that I disagree with, but it also has some useful suggestions for modernizing code that's been converted from Python 2, which I have a lot of and would like help in fixing up. Fortunately it's possible to change ruff's configuration so that it skips complaining about views that I disagree with, both globally and on a per-project basis.
-
-
Java/Golang
-
Daniel Lemire ☛ Java’s String.indexOf can be slow (quadratic)
The Java implementation is much more sophisticated, and it is highly accelerated.
However, there are pathological cases where the Java implementation can be slow. What do I mean? Well, you do expect that the search will be more and more expensive as the size of the string grows. Right? So if you search through a 1 kilobyte string and then search through a 10 kilobyte search, you would not be surprised if the latter takes ten times slower.
-
Eli Bendersky ☛ Concurrent Servers: Part 8 - Go
This is part 8 in a series of posts on writing concurrent network servers. In this part, we'll switch to Go and see how it tackles the challenges described earlier in the series.
-