Plurrrr

a tumblelog
home

A "new" iPhone: refurbised iPhone 6S.

In the afternoon the Refurbished iPhone 6S Space Gray 64GB I ordered last Friday arrived. Later I made a backup, using iTunes, of my iPhone 5 and used this backup to initialise the 6S. This is the second iPhone I buy with Green Mobile and once more excellent service; thanks!

Higher Kinded Types in Python

dry-python/returns@0.15 is released! And it means that now anyone can use our Higher Kinded Types emulation in their projects.

In this post I will explain:

  • What Higher Kinded Types (HKTs) are and why they are useful
  • How they are implemented and what limitations there are
  • How can you use them in your own projects

Without further ado, let’s talk about typing!

Source: Higher Kinded Types in Python, an article by Nikita Sobolev.

Modular Computer: iPad Pro as a Tablet, Laptop, and Desktop

The more I think about it, the more I come to this conclusion: the iPad, unlike other computers running a “traditional” desktop OS, possesses the unique quality of being multiple things at once. Hold an iPad in your hands, and you can use it as a classic tablet; pair it with a keyboard cover, and it takes on a laptop form; place it on a desk and connect it to a variety of external accessories, and you’ve got a desktop workstation revolving around a single slab of glass. This multiplicity of states isn’t an afterthought, nor is it the byproduct of happenstance: it was a deliberate design decision on Apple’s part based on the principle of modularity.

Source: Modular Computer: iPad Pro as a Tablet, Laptop, and Desktop Workstation, an article by Federico Viticci.

Docker on macOS without noisy fans

TL;DR

  • Running Docker on macOS results in noisy CPU fans and low performance (build times)
  • Apple Silicon probably not the answer
  • The solution is using remote Linux Docker host (with setup instructions)

Source: Docker on macOS without noisy fans, an article by Coen Stevens.

New Toner for the Brother HL-L2350DW

Yesterday the toner I ordered on Friday arrived. Last week the Brother HL-L2350DW laser printer ran out of the toner it came with when it arrived the 3rd of May 2019. I had already watched how to install the toner cartridge by Ricky Adames. So, in the afternoon I removed the old cartridge, installed the new one, and did a test print. I ordered the cartridge with 123inkt.nl. The cartridge is not by Brother but their own brand which is slightly cheaper and has a larger capacity.

Atom vs. RSS

From working on Elfeed, I’ve recently become fairly intimate with the Atom and RSS specifications. I needed to write a parser for each that would properly handle valid feeds but would also reasonably handle all sorts of broken feeds that it would come across. At this point I’m quite confident in saying that Atom is by far the better specification and I really wish RSS didn’t exist. This isn’t surprising: Atom was created specifically in response to RSS’s flawed and ambiguous specification.

Source: Atom vs. RSS, an article by Chris Wellons.

An Intuition for Lisp Syntax

Every lisp hacker I ever met, myself included, thought that all those brackets in Lisp were off-putting and weird. At first, of course. Soon after we all came to the same epiphany: lisp’s power lies in those brackets! In this essay, we’ll go on a journey to that epiphany.

Source: An Intuition for Lisp Syntax, an article by Stepan Parunashvili.

MacOS Nix Setup

I recently got a new Macbook, and began setting up the Nix package manager to install my developer toolset. I mainly did this to try and have a working setup without installing Homebrew. Since I ran into a few issues, I wanted to briefly document what I did and why in case others wanted to try the same.

Source: MacOS Nix Setup (an alternative to Homebrew).

Resolving git rebase conflicts

When a git rebase conflict occurs you will be presented with a conflict region (or “hunk”) that shows why the rebased commit couldn’t be applied to the base branch. To resolve a rebase conflict, your task is to apply the logically-intended (i.e. semantic) change of the rebased commit to the base branch.

Source: Resolving git rebase conflicts.

CSS: The Important Stuff (Box Model)

CSS is one of those technologies that has a low barrier to entry (good thing 🎉), but because of this sometimes how it works can seem like magic. It's easy to get started writing CSS, so we quickly dive head first into it. Sometimes we smash our face into the concrete with frustration. Why won't my text move over yonder? Where did that scroll bar come from? How do I center this junk?

This is a series I'm starting called, "CSS: The Important Stuff". The goal is to take a dive into the mechanics of CSS so we can get a better intuition when styling and positioning elements. In part one we'll take a look at Box Model; the underlying layout of the web.

Source: CSS: The Important Stuff (Box Model), an article by Dylan Paulus.

An invitation to category theory

Early in our mathematical education, we learn about a strong interplay between algebra and geometry—algebraic equations give rise to graphs and geometric figures, and geometric features can be encoded in algebraic expressions. It’s almost as if there’s a portal or bridge connecting these two realms in the grand landscape of mathematics: whatever occurs on one side of the bridge is mirrored on the other.

So although algebra and geometry are very different areas of mathematics, this connection suggests that they are intrinsically related. Incidentally, the `bridge’ that spans them is a but a dim foreshadow of much deeper connections that exist between other branches of mathematics that also may, a priori, seem unrelated: set theory, group theory, linear algebra, topology, graph theory, differential geometry, and more. And what’s amazing is that these relationships—these bridges—are more than just a neat observation. They are mathematics, and that mathematics has a name: category theory.

Source: An invitation to category theory, an article by Tai-Danae Bradley.

The Nuances of Constants in Go; Go Isn’t JavaScript

Constants can be confusing and easy to misuse in Go if you are coming from an untyped language. Let’s take a look at some of the nuanced details of how they work in Go. It’s probably unsurprising, but Go’s constants are almost nothing like JavaScript’s bastardized version of the concept.

Source: The Nuances of Constants in Go; Go Isn't JavaScript, an article by Lane Wagner.

A Visual Guide to Regular Expression

It’s a common task in NLP to either check a text against a pattern or extract parts from the text that matches a certain pattern. A regular expression or “regex” is a powerful tool to achieve this.

While powerful, regex can feel daunting as it comes with a lot of features and sub-parts that you need to remember.

In this post, I will illustrate the various concepts underlying regex. The goal is to help you build a good mental model of how a regex pattern works.

Source: A Visual Guide to Regular Expression, an article by Amit Chaudhary.

SSH & SSL — Step-siblings or Rivals?

People often wonder whether SSH uses SSL/TLS for traffic encryption. The short answer is NO, even though both protocols have much in common, under the hood SSH has its own transport protocol, independent from SSL.

  • Both of them were created to secure and encrypt traffic between clients and servers (SSL for website traffic, SSH for remote control over host)
  • They both start with asymmetric encryption in order to negotiate static key for the rest of the session using symmetric encryption (SSH uses proprietary key exchange protocol, SSL/TLS uses PKI infrastructure)

Also keep in mind that both were developed almost in parallel somewhere in 1995 (SSL1.0 was first though) so they couldn’t actually use each other’s implementation at the time.

However, instead of comparing both protocols, I would like to dedicate most of this post to the attempt to combine both protocols in order to achieve the most secure, scalable and easy-to-use mass scale SSH control over multiple Linux servers.

Source: SSH & SSL — Step-siblings or Rivals?, an article by Artiom Levinton.

Forcing Functions in Software Development

Here’s an unavoidable fact: the software project you’re working on has some flaws that no one knows about. Not you, your users, nor anyone in your team. These could be anything from faulty assumptions in the UI to leaky abstractions in the architecture or an error-prone release process.

Given enough time, these flaws will be discovered. But time is money. The sooner you discover them, the cheaper they are to fix. So how do you find out about them sooner?

Source: Forcing Functions in Software Development, an article by Matthew Clarke.

Facebook Container Extension for Firefox

Facebook can track almost all your web activity and tie it to your Facebook identity. If that’s too much for you, the Facebook Container extension isolates your identity into a separate container tab, making it harder for Facebook to track you on the web outside of Facebook.

Source: Facebook Container for Firefox.

Fear and Loathing in YAML

We kinda went down a rabbit hole the other day when I suggested folks check out yq, “The aim of the project is to be the jq or sed of yaml files.” First, there’s nothing wrong with this project. I like it, I find the tool useful, and that’s that. But the great debate started over our lord and savior, YAML. Yeah, I know, XML vs. JSON vs. YAML vs. TOML vs. the next thing is a tired and old debate.

Source: Fear and Loathing in YAML, an article by Chris Short.

Asciidoctor

Asciidoctor is a fast, open source text processor and publishing toolchain for converting AsciiDoc content to HTML5, DocBook, PDF, and other formats. Asciidoctor is written in Ruby and runs on all major operating systems. The Asciidoctor project is hosted on GitHub.

Source: Asciidoctor.

Aphonopelma seemanni close up

In the evening the female Aphonopelma seemanni I keep was out of its burrow. I could remove the lid of her enclosure without disturbing the large spider and took a few close up photos with my dated iPhone 5.

Close up of a female Aphonopelma seemanni
Close up of a female Aphonopelma seemanni.

Because she closes off her burrow now and then and refuses food I expect her to molt soon. That would be the second time in my care, the first time was the 28th of June, 2020.

Highlights from Git 2.29

The open source Git project just released Git 2.29 with features and bug fixes from over 89 contributors, 24 of them new. Last time we caught up with you, Git 2.28 had just been released. One version later, let’s take a look at the most interesting features and changes that have happened since then.

Source: Highlights from Git 2.29, an article by Taylor Blau.

Fun with Lambda Calculus

In 1935, a gentleman called Alonzo Church came up with a simple scheme that could compute…just about anything. His scheme was called Lambda Calculus. It was a phenomenal innovation, given that there weren’t even computers for him to test out his ideas. Even cooler is that those very ideas affect us today: anytime you use a function, you owe a hat tip to Mr. Church.

Lambda Calculus is so cool that many hackers use it as their secret handshake — a “discreet signal” if you will. The most famous, of course, is PG’s Y Combinator. In this essay, we’ll find out what it’s all about, and do things with functions that we’d never have imagined. In the end you’ll have built just about every programming concept: numbers, booleans, you name it…just with functions.

Source: Fun with Lambda Calculus, an article by Stepan Parunashvili.

Python needs to change

Open-source programming language Python has become one of the few languages that won't disappear anytime soon. It's the top or one of the top two languages in most notable language popularity indexes, and even looks set to beat Java these days.

But 35-year-old Python does have its weaknesses. Not necessarily for the data-science and machine-learning communities built around Python extensions like NumPy and skippy, but as a general programming language.

Source: Programming language Python is a big hit for machine learning. But now it needs to change, an article by Liam Tung.

Half Moon Bay: Good

In the evening I finished Half Moon Bay, Clay Edison Book 3 by Jonathan Kellerman and Jesse Kellerman. While a good read I think I liked the first two books in the series more.

Linesman

The lines. No ship can traverse the void without them. Only linesmen can work with them. But only Ean Lambert hears their song. And everyone thinks he’s crazy…

Most slum kids never go far, certainly not becoming a level-ten linesman like Ean. Even if he’s part of a small, and unethical, cartel, and the other linesmen disdain his self-taught methods, he’s certified and working.

Then a mysterious alien ship is discovered at the edges of the galaxy. Each of the major galactic powers is desperate to be the first to uncover the ship’s secrets, but all they’ve learned is that it has the familiar lines of energy—and a defense system that, once triggered, annihilates everything in a 200 kilometer radius.

The vessel threatens any linesman who dares to approach it, except Ean. His unique talents may be the key to understanding this alarming new force—and reconfiguring the relationship between humans and the ships that serve them, forever.

In the evening I started in Linesman by S. K. Dunstall, which is the pen name used by Australian sisters Sherylyn and Karen Dunstall.

The friendly calico cat

In the afternoon, in the small town 't Woudt, I spotted a beautiful calico cat. When I called her she came immediately to me to be petted.

The friendly calico cat
The friendly calico cat.

I was in 't Woudt to meet with my friend Simon. I had also bought books for him, a belated birthday present:

Of course I highly recommend the above books; they are good. And as luck had it, he hadn't read any of those.

Meet Face ID and Touch ID for the Web

This blog post extends the content of WWDC 2020 “Meet Face ID and Touch ID for the web” session by providing detailed examples to assist developers’ adoption of this new technology, including how to manage different user agent user interfaces, how to propagate user gestures from user-activated events to WebAuthn API calls, and how to interpret Apple Anonymous Attestation. This article will end by summarizing the unique characteristics of Apple’s platform authenticator and the current status of security key support. If you haven’t heard about WebAuthn before, you’re strongly encouraged to first watch the WWDC 2020 session, which covers the basic concepts. Otherwise, please enjoy.

Source: Meet Face ID and Touch ID for the Web, an article by Jiewen Tan.

Better Git diff output for Ruby, Python, Elixir, Go and more

And it’s not just Ruby where Git struggles to figure out the correct enclosing context. Many other programming languages and file formats also get short-changed when it comes to the hunk header context.

Thankfully, it’s not only possible to configure a custom regex specific to your language to help Git better orient itself, there’s even a pre-defined set of patterns for many languages and formats right there in Git. All we have to do is tell Git which patterns to use for our file extensions.

Source: Better Git diff output for Ruby, Python, Elixir, Go and more, an article by Tekin Süleyman.

First Page on Hacker News

Yesterday I managed to get on the first page of Hacker News with a link to tumblelog on GitHub: Show HN: Static blog generator in about 1 KLOC. In the past I had submitted tumblelog more than once but didn't get much upvotes, sometimes none at all. But the magic word KLOC (kilo lines of code) and maybe the submission time did the trick.

Position 17 on Hacker News

I did manage to get on position 17 on the front page. At least that's what I know. So what has been the effect of this? At the time of writing according to GitHub:

  • 1,755 Unique visitors.
  • Three clones.
  • Number of stars went from 49 to 68.

The number of visitors I have is normally a few a day, so the effect was very significant on the number of visitors. I am very happy with the increase in the number of stars, thanks everyone who voted!

I hope that this will result in people using tumblelog for their blog. And hopefully also some feedback.

The Emacs Problem

Charles G. pointed out in an email discussion recently:

Lisp still doesn't seem like the right language for doing text manipulation, and nothing I've seen from the Emacs libraries is making me think any differently. It sure beats the hell out of Java though. Maybe someday someone will write Emacs using Ruby as the embedded interpreter...

These are all great points. I know exactly how he feels. I know soooo exactly how Charles feels that I decided to write a blog instead of an email reply. Because all the things he's brought up are real, bona-fide problems.

Source: The Emacs Problem, an article by Steve Yegge.

Coding Tip: Try to Code Without If-statements

When I teach beginners to program and present them with code challenges, one of my favorite follow-up challenges is: Now solve the same problem without using if-statements (or ternary operators, or switch statements).

Source: Coding Tip: Try to Code Without If-statements, an article by Samer Buna.

No, The iPad Pro is not a development machine

iPads, which is to say any iPad made in the last three years (yes, even the base models) has more than enough power to run development tools and compile most codebases you would care to. The more recent iPad Pro models even give modern Core i9 laptops a run for their money in some metrics.

Why then do we not see development tools on the iPad? Or at least, why do we not see more of the development tools we’re used to seeing on the platform. The reason, unfortunately, is iPadOS.

Source: No, The iPad Pro is not a development machine. But it so easily could be, an article by Jay Rodgers.

Self-hosting Git

cgit is very bare bones. It is cgi web interface interface to git, and nothing more. You may browse repositories, view diffs, commit logs and even clone via http. If you are looking to replace Github with cgit, keep in mind that cgit does not handle issues or pull/merge requests. If people wish to contribute to your work, they would have to send you a patch via email.

Source: Self-hosting Git, an article by Akshay Oppiliappan.

Tumblelog 4.1.0

In the evening I finally released an updated version of tumblelog; a static blog generator that comes in two versions: a version written in Perl and a version written in Python. I use mostly the Perl version to generate Plurrrr but now and then run the Python version to verify it generates the same output given the same input.

This version fixes a bug I found using Ahrefs Webmaster Tools. I also used pylint version 2.6.1-dev1 to improve the Python code. The score went from 8.57 to 8.85. Some of the issues found where also in the Perl code, so I corrected the Perl version as well.

Next I used perlcritic version 1.138 to critique the Perl version of tumblelog. Several of the issues found were fixed.

Last, but not least, I factored out the font stacks of all styles into a separate _fonts.scss file and used stylelint version 13.7.2 with a custom .stylelintrc.json to clean up the styles for tumblelog.

Version 4.1.0 of tumblelog is available on GitHub. As always feedback is very welcome.

Mambo Sun

In the early afternoon I listened to a new track by Pixies; a cover version of T. Rex's Mambo Sun. While it's a catchy tune I do miss the days of Surfer Rosa/Come On Pilgrim and Doolittle.

iOS and iPadOS 14: The MacStories Review

The context of 2020 is what makes iOS and iPadOS 14 so fascinating and, to a certain extent, fun to review. On one hand, we have two major OS updates that may or may not have been impacted by the global pandemic in their focus on fewer groundbreaking additions and more consistent improvements across built-in apps; on the other, just like any other year, we have a suite of overarching themes and potential implications to dissect.

But for all those users still pausing over that ‘Install’ button, pondering whether updating their most important communication and work-from-home devices is worth it, there’s only one consideration that matters:

Will this go any better than last year?

Source: iOS and iPadOS 14: The MacStories Review, an article by Federico Viticci.

Gitology #1 - git-flip-history

This is the first post in a series to expand on various utilities I wrote to assist my work with Git. Some of these utilities are located in a repository on Github called misc-gitology.

Today I'll introduce the history flipper - git-flip-history.

Source: Gitology #1 - git-flip-history, an article by Dan Aloni.

Chromatopelma cyaneopubescens eating

Early in the evening I gave the Chromatopelma cyaneopubescens, common name "Green Bottle Blue" (GBB for short), that I keep a mealworm.

Chromatopelma cyaneopubescens eating a mealworm
Chromatopelma cyaneopubescens eating a mealworm.

PCG, A Family of Better Random Number Generators

PCG is a family of simple fast space-efficient statistically good algorithms for random number generation. Unlike many general-purpose RNGs, they are also hard to predict.

Source: PCG, A Family of Better Random Number Generators, an article by M.E. O'Neill.

My Favorite ARM Instruction

LDM—or load multiple—is my favorite assembly instruction of the ARM instruction set. Here’s why.

Source: LDM: My Favorite ARM Instruction, an article by Vladimir Keleshev.

Dockerfile Security Best Practices

Container security is a broad problem space and there are many low hanging fruits one can harvest to mitigate risks. A good starting point is to follow some rules when writing Dockerfiles.

I’ve compiled a list of common security issues and how to avoid them. For every issue I’ve also written an Open Policy Agent (OPA) rule ready to be used to statically analyze your Dockerfiles with conftest. You can’t shift more left than this!

Source: Dockerfile Security Best Practices, an article by Gianluca Brindisi.

Prefer Fakes Over Mocks

When writing tests, I prefer to avoid mocks as much as possible and rely on fake implementations instead. They require a bit of additional upfront investment, but provide many practical advantages which are important to consider.

In this article we will look at the differences between these two variants of test doubles, identify how using one over the other impacts test design, and why using fakes often results in more manageable test suites.

Source: Prefer Fakes Over Mocks, an article by Alexey Golub.

A few words on Git

Git is not a success story. Git is a failure as a system with a crap user experience that forces you to learn more about the tool you're using that about getting your work done.

Source: A few words on Git, an article by Hadi Hariri.