Killing Moon: Excellent
In the afternoon I finished Killing Moon, a Harry Hole Novel (13) by Jo Nesbø. An excellent story; a real page turner. Recommended.
In the afternoon I finished Killing Moon, a Harry Hole Novel (13) by Jo Nesbø. An excellent story; a real page turner. Recommended.
I'd like to put forth my current thinking about asyncio. I hope this will answer some of the questions I've received as to whether Peewee will one day support asyncio, but moreso I hope it will encourage some readers (especially in the web development crowd) to question whether asyncio is appropriate for their project, and if so, look into alternatives like gevent.
Source: asyncio, an article by Charles Leifer.
gevent
is a coroutine-based cooperative multitasking python framework that relies on monkey patching to make all code cooperative. Gevent actually draws its lineage from Eve Online which was implemented using Stackless Python which eventually evolved into eventlet which inspired gevent. Just like Eve Online, gevent is full of skullduggery and confounds outsiders.
Source: What the heck is gevent? (Part 1 of 4), an article by Roy Williams.
Dom Toretto and his family are targeted by the vengeful son of drug kingpin Hernan Reyes.
In the evening Esme and I watched Fast X. The movie was OK and I give it a 6 out of 10.
Pattern matching for switch statements and expressions has been evolving for a couple of latest releases. We can already play with the most exciting changes, such as pattern guards and record patterns, in the Java 19 and 20 preview versions.
Source: Java 20 pattern matching for switch: what’s under the hood?, an article by Nataliia Dziubenko.
Welcome to my opinionated guide on how to write views in Django!
It is the result of mistakes made and lessons learned in a range of Django and Python projects over 15+ years.
Source: Django Views — The Right Way.
In January 2019 I raised an issue in the W3C CSS GitHub titled Please bring back scoped styles. There had once been a
scoped
HTML attribute but it got deprecated. It’s been replaced by@scope
in CSS. Browser support is still forthcoming. It’s due to land in Chrome 117. Safari has a positive position on the specification.There are two selling points of @scope: styling based on proximity and setting a lower boundary for a selector.
Source: An introduction to @scope in CSS, an article by Ollie Williams.
If a cat kneads on your lap, it's likely because it feels safe around you. But why do they knead in the first place?
Source: Why do cats knead?, an article by Charles Q. Choi.
In this document, we’ll take a tour of Python’s features suitable for implementing programs in a functional style. After an introduction to the concepts of functional programming, we’ll look at language features such as iterators and generators and relevant library modules such as
itertools
andfunctools
.
Source: Functional Programming HOWTO, an article by Andrew M. Kuchling.
Writing shell scripts leaves a lot of room to make mistakes, in ways that will cause your scripts to break on certain input, or (if some input is untrusted) open up security vulnerabilities. Here are some tips on how to make your shell scripts safer.
Source: Writing Safe Shell Scripts.
Swift’s generic functions allow us to explore a beautiful idea that straddles the line between mathematics and computer science. If you write down and implement a function using only generic data types, there is a corresponding mathematical theorem that you have proven true. There are a lot of pieces to that statement, but by the end of this short article you will understand what that means, and we will have constructed a computer proof of De Morgan’s law.
Source: Proof in Functions, an article by Brandon Williams.
A twisted tale of two estranged sisters whose reunion is cut short by the rise of flesh-possessing demons, thrusting them into a primal battle for survival as they face the most nightmarish version of family imaginable.
In the evening Alice, Esme, and I watched Evil Dead Rise. I liked the movie and give it a 7 out of 10.
When you need to speed up your NumPy processing—or just reduce your memory usage—the Numba just-in-time compiler is a great tool. It lets you write Python code that gets compiled at runtime to machine code, allowing you to get the kind of speed improvements you’d get from languages like C, Fortran, or Rust.
Or at least, that’s the theory. In practice, your initial Numba code may be no faster than the NumPy equivalent.
But you can do better, once you have a better understanding of how CPUs work. And this knowledge will help you more broadly with any compiled language.
Source: Understanding CPUs can help speed up Numba and NumPy code, an article by Itamar Turner-Trauring.
Liquid Haskell is a tool that can analyse a program and calculate proof obligations that would ensure that the program meets some specification (not unlike Dafny, Why3, or F*). The specification is included in the program as a special comment inserted by the programmer. The compiler ignores this comment, but Liquid Haskell can find it. Once the proof obligations are identified, they are given to a theorem prover (an SMT solver specifically) in an attempt to save the programmer the trouble of writing a proof.
Source: Why Liquid Haskell matters, an article by Facundo Domínguez.
Rate-limiting is a common strategy for safe guarding a server from potential DDoS attacks or sudden peaks in network traffic. Rate-limiting instructs the server to block requests from certain IP addresses that are sending an unusual number of requests to the system.
We can apply rate-limiting to both Nginx and HAProxy. Nginx runs on each end node hosting the service, while HAProxy serves as the load-balancer and distributes incoming requests among available nodes. This post describes how to rate-limit requests on both Nginx and HAProxy and shows how to whitelist IPs and rate-limit a single URL. The final section shows how to apply this configuration in Puppet.
Source: Rate limiting in HAProxy and Nginx, an article by Adeel Ahmad.
An untested American submarine captain teams with U.S. Navy Seals to rescue the Russian president, who has been kidnapped by a rogue general.
In the evening Esme and I watched Hunter Killer. I liked the movie and give it a 7 out of 10.
Programming languages rise and fall in popularity. For awhile everyone is keen on C, then C++, followed by languages such as Golang, Rust, Haskell, Python, or [fill in the blank with your favourite language]. Their popularity is frequently driven by need — the desire to find the best tools for highly complex programming projects.
Some languages fall by the wayside. Few programmers still use Algol, Fortran, COBOL, Basic, or Pascal. Though they were widely used in their day, they now appear mainly in legacy programs.
And some languages, while no longer as widely used, still persist among those who appreciate their special qualities. These include Common Lisp and, my favourite, Perl.
Source: In Praise of Perl, an article by Gene Wilburn.
PyStack is a tool that uses forbidden magic to let you inspect the stack frames of a running Python process or a Python core dump, helping you quickly and easily learn what it's doing (or what it was doing when it crashed) without having to interpret nasty CPython internals.
Source: PyStack.
Subflakes is a rather undocumented pattern of Nix flakes. By having a separate flake in a subdirectory, the subflake is able to access its parent directory’s contents with
../.
*.
There has been some discussion recently about the bypassing of Little Snitch by the first datagram of a three-way TCP handshake. The facts: When a deny-rule for a domain is set in Little Snitch, and a TCP connection is made to that domain, a TCP SYN data packet is sent to the remote server. Although this packet does not carry any payload, it does include crucial information such as your IP address, as well as the sending and receiving port numbers.
Image processing plays a crucial role in numerous fields, ranging from computer vision and medical imaging to surveillance systems and photography. The implementation of image processing algorithms in programming languages like C has become increasingly important due to the need for efficient and optimized solutions especially on embedded devices where computing power is still limited.
Source: Modern Image Processing Algorithms Overview & Implementation in C/C++.
There’s been quite a lot of discussion lately about whether or not to use an ORM. As someone who’s been both proponent and opponent of the use of ORM’s over the years, I figured I’d write a blog post about my current opinion on the matter (which may change again a couple of times in the future ;-)).
Source: ORM - data model vs domain model, an article by Gert Goeman.
So I almost fell out of my seat yesterday when I caught wind of the announcement that CSS nesting has landed in actual browsers and if you want to play around with them then you can do that in the latest version of Safari Technology Preview. This means it’s half a step away from landing in real browsers very soon.
Source: CSS Nesting, an article by Robin Rendle.
This guide shares strategies and tactics for getting better results from GPTs. The methods described here can sometimes be deployed in combination for greater effect. We encourage experimentation to find the methods that work best for you.
Source: GPT best practices.
Telnet, the protocol and the command line tool, were how system administrators used to log into remote servers. However, due to the fact that there is no encryption all communication, including passwords, are sent in plaintext meant that Telnet was abandoned in favour of SSH almost as soon as SSH was created.
For the purposes of logging into a remote server, you should never, and probably have never considered it. This does not mean that the
telnet
command is not a very useful tool when used for debugging remote connection problems.In this guide, we will explore using
telnet
to answer the all too common question, “Why can’t I ###### connect‽”.
Source: Why You Should Still Love Telnet, an article by Elliot Cooper.