news
Programming Leftovers
-
SANS ☛ PHP Vulnerability Wrap-Up - SANS Internet Storm Center
Many partial exploits have been released. Be careful; some of them may be "parasitic," trying to exploit whoever runs them. It may be hard to even identify the working exploit once it comes out.
-
John Mikael Lindbakk ☛ Introducing: Gaseto
Many argue that JSON Web Tokens (JWT) are problematic, especially when it comes to user authentication.
There is, however, a different standard that fixes a lot of these problems: PASETO.
-
University of Toronto ☛ A rare use (for me) of sed's backslash regular expression replacement
A common way to use the venerable sed is to use its 's/regexp/replacement/' operation to modify the text of lines as they pass through (both to change parts of the line and to delete parts). This is probably my common uses of sed (apart from things like 'sed Nq'), and I suspect I'm not alone (for example). However, one sed feature I never or almost never touch is the replacement text feature of the special escapes '\1' through '\9' to insert pieces (sub-expressions) of the matches of the regular expression. However peculiar it is, historically I've gone well out of my way to avoid having to work my way through the swamps of \1 and its friends.
-
Zig ☛ Partial Operator Precedence
As of yesterday, the second oldest open proposal for the Zig language was issue #114: require parentheses sometimes to disambiguate confusing operator precedence, opened February 8, 2016. Ten years later, that proposal has been implemented in the master branch version of Zig thanks to contributor CMDRZero.
This means that some combinations of operators no longer have a defined precedence, and for those that don’t, the compiler will now require parentheses: [...]
-
Thomas Habets ☛ Attention people who think UB is fine
After my post on undefined behavior in C some people insisted that it’s demonstrably fine, we know what the code will do, and at worst we’ll get a segfault.
This is false.
-
R T Feldman ☛ How close can pure FP get to C?
Roc's tagline is "Fast, Friendly, Functional," and Fast comes first because both running fast and compiling fast have always been central goals. Roc is not a mature language (it's still weeks away from its first numbered release, 0.1.0), and its nascent package ecosystem has had almost no optimization work done on it. Still, between its language design, longstanding optimizations, and brand-new compiler implementation, I figured Roc already had enough of a foundation in place to take on the champ: libdeflate.
-
Python
-
Juha-Matti Santala ☛ Assumptions are sneaky
The number 1 thing I always talk and write about in regards to debugging is to leave assumptions at the door and validate everything before following your assumptions. Yesterday, I failed miserably to follow my own advice.
I fell into the classic trap: I thought I knew how a thing works.
-
Juha-Matti Santala ☛ Debugging a flaky test — how I methodologically tamed an annoying bug
A flaky is a automated test in software development that seemingly non-deterministically fails. I hate them with passion because they erode your trust to your test suite, can cause people to start ignoring test failures and are annoying as heck to deal with.
Yesterday, I spent an afternoon dealing with one as part of my Djangonaut Space work for the Django Girls+ project. Here’s an exploration report for how I narrowed it down, found the root cause and fixed it. I followed my debugging process that relies to almost no prior knowledge about a project (other than knowing how to use your test runner) and that leaves all assumptions at the door.
-