Plurrrr

week 39, 2021

Replacing jQuery with Vanilla ES6

Following a discussion with a colleague about how “necessary” jQuery is now-days, considering how far ES6 has come, I decided to conduct a small experiment: I would clone a live, functioning JS module and replace as much jQuery as possible (ideally all) with vanilla ES6.

Source: Replacing jQuery with Vanilla ES6, an article by Aaron T. Grogg.

Django on Azure - beyond "hello world"

In this tutorial, I’m assuming that you have written or are writing a Python web application that uses Django, and you want to deploy that application onto Microsoft Azure.

I’m not going to cover how to create or write a Django application, but instead, we’re going to focus on the last mile of development- getting it into production.

Source: Django on Azure - beyond "hello world", an article by Anthony Shaw.

Gentle introduction to GPUs inner workings

This article summarizes some lower level aspect of how GPU executes. Although GPU programming is not that complicated when compared to CPU, it also doesn’t match to what hardware is doing exactly. The reason is that we can’t just program GPU without some API, which is an abstraction over its inner workings. Since few years now, we have modern explicit APIs like DirectX 12 or Vulkan, which shrunken the gap to what is happening with hardware. Yet there still are few low-level bits (pun intended) that are worth explaining.

Source: Gentle introduction to GPUs inner workings, an article by Adrian Jurczak.

What every IT person needs to know about OpenBSD

"Functional, free and secure by default", OpenBSD remains a crucial yet largely unacknowledged player in the open source field. This talk aims to highlight the project's signature security features and development practices -- razor sharp focus on correct and secure code coupled with continuing code audit -- as well as the project's role as source of innovation in security practices and 'upstream' source for numerous widely used components such as OpenSSH, PF, LibreSSL and others.

Source: What every IT person needs to know about OpenBSD, an article by Peter N. M. Hansteen.

Why we spent the last month eliminating PostgreSQL subtransactions

Since last June, we noticed the database on GitLab.com would mysteriously stall for minutes, which would lead to users seeing 500 errors during this time. Through a painstaking investigation over several weeks, we finally uncovered the cause of this: initiating a subtransaction via the SAVEPOINT SQL query while a long transaction is in progress can wreak havoc on database replicas. Thus launched a race, which we recently completed, to eliminate all SAVEPOINT queries from our code. Here's what happened, how we discovered the problem, and what we did to fix it.

Source: Why we spent the last month eliminating PostgreSQL subtransactions, an article by Stan Hu and Grzegorz Bizon.

Citations in Org mode 9.5

After years of (on and off) discussion1, I am elated to be able to present Org’s new native citation syntax. Org has grown a thoroughly designed, modular, capable citation system. At last you can refer to Org for all your attribution needs. Special thanks must go to Nicolas Goaziou for leading the charge, John Kitchin for paving the way with the org-ref package, Bruce D’Arcus for driving a lot of careful consideration of design decisions and starting to document some of the details — and the many other denizens of the mailing list who have contributed to the discussion over the years.

András Simonyi’s also deserves a special mention for his work creating the Elisp CSL library Citeproc.el, which while not directly included in Org is crucial to providing robust CSL support, and integrates with oc-csl.el.

Source: Introducing citations!

Understanding AWK

I have a confession to make: I don’t know how to use Awk. Or at least I didn’t know how to use it before I started writing this article. I would hear people mention Awk and how often they used it, and I was pretty certain I was missing out on some minor superpower.

Source: Understanding AWK, an article by Gordon Bell.

Writing Python Extensions in Assembly

On occasion, you need to take something apart and put it back together to fully understand it. I’m sure many of the people reading this article will have been one of those kids. Kids who took a screwdriver to something, just to see whats inside it. It’s a thrill, but its a whole different skill to put it back together.

The working machine on the outside obscures a network of patterns, patches, and workarounds in its internals. Programmers are used to working on the guts of a system and manipulating the ugly-inner workings to get it to follow some simple instructions.

This experiment was no different. I wanted to see if I could write a CPython Extension in 100% assembly.

Source: Writing Python Extensions in Assembly, an article by Anthony Shaw.

Adventures in Looping

I was recently building a Slack bot in Haskell. The core of the Slack integration was a never-ending loop that read messages from a web socket and performed actions based on the message. But how should I go about looping forever in Haskell?

Source: Adventures in Looping, an article by Drew Olson.

On Multi-Platform Docker images

Until recently, Faktory only supported the x86_64 platform. With the rise of the Apple Silicon chip and AWS Graviton, it was obvious that I would need to roll out ARM64 support soon. This week I spent several days fighting Docker’s support for multi-platform images and wanted to document what I learned.

Source: On Multi-Platform Docker images, an article by Mike Perham.

Practical Makefiles, by example

The purpose of this document is to explain how to write practical makefiles for your everyday hacks and projects. I want to illustrate, how easy it is to use make for building your programs, and doing so, dispel the notion that resorting to big clunky graphical IDEs, or makefile generators such as autotools or cmake, is the way to focus on your code faster.

Source: Practical Makefiles, by example, an article by John Tsiombikas.

Nested strict data in Haskell

Every so often someone bemoans the space leaks that can arise due to Haskell’s laziness. A frequently touted remedy is to make data stricter by turning on BangPatterns, by defining data structures with explicitly strict fields, or by creating implicitly strict fields with the StrictData extension. Each of these approaches leaves something to be desired. In this article I’ll explain how the approaches work, what they leave to be desired, and a suggest a reasonably general alternative. The alternative seems lightweight enough for Haskell programmers to adopt when they define strict data structures.

Source: Nested strict data in Haskell.

Fast Perl module installation with cpm

My favorite of these over the past several years has been Shoichi Kaji’s cpm, mainly because it’s blazingly fast. As an example, the documentation cites an installation of Plack, the Perl web application toolkit, as taking three times as long using cpanm versus cpm. Both use the same Menlo core code but cpm achieves its speed by breaking down dependencies into individual streams, installing modules in parallel, and synchronizing the necessary worker processes.

Source: Fast Perl module installation with cpm, an article by Mark Gardner.

The Blood Mirror

The Seven Satrapies have collapsed into four - and those are falling before the White King's armies.

Gavin Guille, ex-emperor, ex-Prism, ex-galley slave, formerly the one man who might have averted war, is now lost, broken and trapped in a prison crafted by his own magical genius. But Gavin has no magic at all.

Worse, in this prison, he may not be alone.

Who will fight to prevent a tainted empire from becoming something even worse?

In the evening I started in The Blood Mirror, book 4 of the Lightbringer series by Brent Weeks.