news
Programming Leftovers
-
Remy Wang ☛ Lua as a Query Language
Somehow I developed an allergy to writing parsers, so severe that I made up an entire query language (called Prela) just to avoid having to parse SQL. Prela itself turned out to be very nice, but there is one problem: it's not really a query langauge. It's just a bunch of Rust types and methods that give the feel of a query language. On one hand that's very convinient, because it means all the tooling built for Rust, including type checking, syntax highlighting, go-to-definition, etc., all work for Prela immediately. On the other hand, every query is compiled by rustc which usually takes even more time than executing the query itself... That's fine if the same query is meant to run again and again, but would be too much overhead for ad hoc queries.
-
David L Farquhar ☛ Why Johnny Can't Patch
I will say there are a lot of people who have opinions about patching vulnerabilities who have never done it before. I spent 4 years patching vulnerabilities for a living, exclusively. My client was the United States Air Force. The system I maintained supported two wars. Keeping that system secure was a matter of life and death.
In those 4 years, I resolved approximately 900,000 vulnerabilities, with a success rate of 100%, and exactly one missed deadline. (I missed that deadline by less than 24 hours.) My mean time to remediate was approximately 21 days. So that’s why I think I’m worth listening to. Also, there was no one to teach me or coach me. I had to figure it out.
-
Dmitri Sotnikov ☛ (iterate think thoughts): Native regions: a borrow-checked sublanguage inside Clojure
One aspect of Clojure that I've always liked is that it is, first and foremost, a pragmatic language. It will steer you towards using functional style by default, but it also offers imperative escape hatches for performance. For example, transients are used for cases when you need to build up a big vector in a tight loop. We can mutate a transient freely, then hand back an immutable value at the end by calling persistent!. What makes transients safe is that the mutation is explicitly scoped since any further attempt to mutate the data after persistent! was called throws. So, we can have the performance benefit of working with mutable data in a local scope, and the semantics of transients ensure that it can't leak to the outer context.
-
Jerry Tuttle ☛ Online College Math Teacher: When will that elevator arrive? Elevator dispatching
I was recently at a high-rise building with 23 floors and 6 elevators. There always seemed to be a long wait for an elevator. This made me think: there must be elevator algorithms where the set of elevators decides which one will answer your call. And of course there are. Elevator dispatching falls under operations research, optimization, queuing theory, etc.
-
Perl / Raku
-
Perl ☛ ANNOUNCE Perl.Wiki V 1.58, Mojo.Wiki 1.28
From my Wiki Haven you can could now access these new versions. cpan.metacurator.tree.html is there too.
-
-
Python
-
Mathieu ☛ slixmpp v1.18.0
Here is a new version for slixmpp, the python XMPP library.
The highlight of this release is a fix for a possible man-in-the-middle, so I encourage everyone to upgrade, or apply a patch against their old version if required.
Thanks to all contributors for this release!
-