mögen das
A classic bug for a leap day: At work, colleagues discovered and fixed a bug in a lesser used tool that only occurs on February 29th. It did trip up the tests, so no one got to merge until it got identified and resolved.
The source file in question hadn't been touched in over 4 years. Last leap year, the 29th was on a Saturday, so likely no one noticed.
What was annoying is that the logic had been clearly written with the intent of handling leap years. A leap year check condition was present, validated only on a February > 28th, but had to get inverted.
You may wonder why we wouldn't have used the languages' standard library date functions to validate the date - unfortunately the language in question doesn't have such a sophisticated standard library (language omitted to protect the innocent).
Congratulations to Sergio Benitez on releasing rocket.rs 0.5.0! Thank you for this great framework. 👏
I got to follow rocket's journey to async and stable #rust with the PrivateBin directory service. Coming from Python flask apps, it is really easy to pick up and get going with your webservice, offering static & templated content, easy to create web forms and JSON APIs.
Thanks to rust's strict type system I could focus on the logic and didn't have to waste time double checking and casting data received by clients. If my API accepts an integer in a certain parameter, Rocket will ensure I only receive valid requests in my logic.
Bill Barnhill / GhostBear mag das.
teilten dies erneut
I like CSS-animations, clocks and dials for making metrics easier to digest (we are quicker at detecting angular changes than reading and parsing digits). So I'm in awe with this creative use of a watch-dial to visualize a 32-bit hexadecimal number:
GitHub - Nessex/yaml2json-rs: Command line utility (+libraries) to convert YAML to JSON.
Command line utility (+libraries) to convert YAML to JSON. - GitHub - Nessex/yaml2json-rs: Command line utility (+libraries) to convert YAML to JSON.GitHub
#TIL:
prompt injection, which is a form of cyberattack that exploits [an AI's] natural language processing abilities.
Bing: “I will not harm you unless you harm me first”
Last week, Microsoft announced the new AI-powered Bing: a search interface that incorporates a language model powered chatbot that can run searches for you and summarize the results, plus do …simonwillison.net
Release v1.5.1 - Filesystem purge lookup change & administration script - PrivateBin
This release reverts a filesystem purge lookup change and adds a script for administrative tasks.privatebin.info
PrivateBin 1.5.0 released - Adding S3 Storage backend, storage migration script & 4 new translations
privatebin.info/news/v1.5.0-re…
Error | OPNsense
This minor release adds support for Simple Storage Service (S3), a storage migration script, adds four new languages to the translations and includes updated libraries.privatebin.info
Error | OPNsense
This release improves the safety of the SVG attachment preview, adds Google Cloud Storage and Oracle database support, and new translations.privatebin.info
My team at LzLabs GmbH in Wallisellen, Switzerland, is looking for a 4th DevOps Engineer. You'd be working primarily with a CloudBees (Jenkins) cluster of around 90 blades for build & testing, for several software stacks that targets RHEL, but hopefully soon™ also other platforms. And of course there are also a lot of build and deployment related projects to be spice things up on the side, like maintaining and developing a test statistics database, code coverage reporting, change log and other automation projects, all in a mostly ansible-ized environment. The companies main language is English, living in or moving to the vicinity of Zürich would certainly be advantageous.
#followerpower #Stellenangebote #jobs #jeRecrute
DevOps Engineer
As one of our DevOps engineers you will join a team who lead the way for our CI/CD environment. The ideal engineer will bring experience, best practices, and a collaborative attitude to help drive Linux based CI/CD initiatives.lzlabs.peoplehr.net
My employer is looking for a Junior and a Senior Web Developer in Wallisellen, Switzerland. Please feel free to share and/or message me privately or publicly, if you want to know more about the company.
lzlabs.peoplehr.net/Pages/JobB…
lzlabs.peoplehr.net/Pages/JobB…
Good morning, currently reading a book called:
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
The book's title and subject is the one liner that produces a maze on the Commodore 64 BASIC V2. In one of the chapters the books authors consider ports to other 8 bit systems, as well as modern scripting languages, using unicode characters. Here is their port to perl:
perl -e 'binmode STDOUT,"utf8";{print chr(9585.5+rand);redo}'
Got me inspired, here are my attempts for python (the second one cheats a bit, as it uses POSIX shell to format the script):
python3 -c 'import random;exec("while True:\n\tprint(chr(int(9585.5+random.random())),end=\"\");")'
printf "import random\nwhile True:\n\tprint(chr(int(9585.5+random.random())),end='')" | python3 -
and php (still no native unicode support, so have to build the 3 bytes for the utf-8 symbol one by one):
php -r 'while(1){echo chr(226),chr(149),chr(177.5+rand(0,1));}'
Shell parsing is hard.
Yes, shell parsing is non-obvious - it does help enormously to understand that the shell takes what you type on the command line after you hit enter, parses it, replacing variables, expanding globs (wildcards) and other language constructs in the process and only then issues a system call, passing the resulting argv structure to the kernel for execution.
Exhibit A (source of the above quote): How the local shell ssh and the remote shell interact, in unexpected ways
Started looking into gemini space. Love how it feels - it's like the web ca. mid-90s. UI is back under your control and you can focus on reading the content instead of getting the site to work (because either you have issues with noscript turned on and sites requiring JS to display text or you have it disabled and have to click through modal windows informing you of cookie settings, sign up for that newsletter, etc. to get to the content).
I'm using Castor and wanted to merry it to my Gnome desktop, so clicking links in Firefox/Chromium opens them in Castor. Oh, and I got a gopher client for free with it as well. Was bummed when Firefox dropped gopher support. Here's how to register the gemini protocol in Gnome (and build castor):
While grep and sed are commoly used, awk fills a valuable niche when processing structured text, avoiding multiple pipes or more complicated regex extractions. Here is a handy flowchart to pick the ideal tool for your text processing task:
A plaintext chart and a simple example making use of several awk features can be found here:
Maybe a concept we could evaluate for use in our fediverse software as well:
This forms a relative reputation system. As uncomfortable as it may be, one man’s terrorist is another man’s freedom fighter, and different jurisdictions have different laws - and it’s not up to the Matrix.org Foundation to play God and adjudicate. Each user/moderator/admin should be free to make up their own mind and decide which reputation feeds to align themselves with.
Everything you always wanted to know about punch card data encoding, but were afraid to ask:
Duff's device (ca. 1984)
register n = (count + 7) / 8; /* count > 0 assumed */switch (count % 8)
{
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
} while (--n > 0);
}
elrido mag das.
Seien wir froh, müssen wir uns nur mit den modernen Datums- & Zeit-Problemen herumschlagen. Hier hat jemand eine ähnliche Liste mit Ausnahmen in alt-römischen Kalender-Problemen zusammengetragen:
privatebin.info/news/v1.3.4-re…
systemli.org/poll/#/poll/WO1PE…
#followerpower #poll
privatebin.info/news/v1.3.2-v1…
elrido
Als Antwort auf elrido • •