-- Leo's gemini proxy

-- Connecting to gemini.tuxmachines.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

Tux Machines


Programming Leftovers


Posted by Roy Schestowitz on Aug 06, 2022


Devices and Open Hardware Projects

today's howtos



Character encoding and UTF-8


↺ Character encoding and UTF-8


> Luckily, there is an alternative. The upper 128 characters from the ASCII table can be used for additional characters. This means that new character sets came along, used the same bottom 128 characters from ASCII and appended their own on the top half. The problem now is that many new mappings exist and interoperability between them becomes difficult. A receiver using a different code page than the sender would read the incorrect message. If someone from Brazil writes a message using the letter é to multiple people, they would read as ة in Arabic, и in Cyrillic and as a corner pipe (╔) if they’re using IBM’s code page 850.



The Ideal Continuous Integration System, part one


↺ The Ideal Continuous Integration System, part one


> I recently wrote about my adventures in finding a continuous integration system to replace the Drone that I am running. It did not end on a happy note, and while it did list a couple of requirements and nice to haves, it did not provide a bigger picture, it did not describe how I'd like to work with my CI. I will try to do that today, and see how far I get.


> I think the best way to start is coming up with an ideal CI configuration for my riemann-c-client project - this is likely the project where my current configuration is the most complicated, and it also exercises a number of patterns I want to write about. So lets start with that! For reference, the current drone configuration is the starting point, and said configuration's build log is the standard I strive for.


> I'll start at a high level, look at what I would consider the ideal flow-chart for a single run of the build, and will work from there.



The Big CI hunt


↺ The Big CI hunt


> Just shy of four years ago, I set out to find a self-hosted continuous integration solution, and eventually settled on Drone. However, during these past four years, drone transitioned away from being fully open source into an open core model. Everything I self host, I can - and usually do - build from source, with the exception of my continuous integration system, and lets be honest, that's not good.


> So I set out to find myself a replacement, this time with more thoroughly specified guidelines than the last time. Before I go into the gory details, I will have to warn you, my dear reader: there is no happy ending just yet, and the tone here is frustrated and aggressive at times.



Crimes With Python's Pattern Matching


↺ Crimes With Python's Pattern Matching



Match Anything, Quickly | Tom Wyant [blogs.perl.org]


↺ Match Anything, Quickly | Tom Wyant [blogs.perl.org]


> Sometimes I want to filter a set of strings, but the details of the filter are not known beforehand. In particular, I may want a null filter, which simply accepts anything.


> This looks like a job for a regular expression, but I can think of at least two implementations. One is to pass around regular expression objects. The second is to wrap a match (m//) in a subroutine reference, and pass that around. Given the use of regular expressions, there are a number of possibilities for a regular expression that matches any string.


> I wondered whether one of the alternatives I was choosing among was faster than another, so I decided to Benchmark them. Both implementations applied the regular expression to a global variable. In practice this would probably be a localized $_, but my read of the Benchmark module says that it also localizes $_, but leaves it undef.




gemini.tuxmachines.org

-- Response ended

-- Page fetched on Thu Jun 13 22:07:05 2024