week 48, 2021

Bunkers in a forest

Alice needed photos of bunkers for her school project. Because the "Staelduinse Bos", a forest close to us has several bunkers we took our bikes and rode to the forest.

A bunker in the forest
A bunker in the forest.

The weather was nice and we had a great walk. I took the photos because Alice's phone had no battery left.

Another bunker in the forest
Another bunker in the forest.

After I had taken quite some photos of bunkers we walked back to the entry.

Adam and Alice walking in the forest
Adam and Alice walking in the forest.

How to use dig

When I first started using dig I found it a bit intimidating – there are so many options! I’m going to leave out most of dig’s options in this post and just talk about the ones I actually use.

Source: How to use dig, an article by Julia Evans.

zsh completions howto

The official documentation for writing zsh completion functions is difficult to understand, and doesn’t give many examples. At the time of writing this document I was able to find a few other tutorials on the web, however those tutorials only explain a small portion of the capabilities of the completion system. This document aims to cover areas not explained elsewhere, with examples, so that you can learn how to write more advanced completion functions. I do not go into all the details, but will give enough information and examples to get you up and running. If you need more details you can look it up for yourself in the official documentation.

Source: zsh completions howto.

Some guidelines for writing web scrapers

I’ve been working on, a job board for RTL and FPGA engineers, since September. Right now, RTLjobs is an aggregator. We index open FPGA/RTL roles at a number of companies, check them for relevance, and post them to our site. I’ve already written two job scraping systems to help ease the work of indexing jobs. Here’s some general rules I’ve come to hold for writing web scrapers and other ETL systems.

Source: Some guidelines for writing web scrapers, an article by Nash Reilly.

Result builders in Swift

The result builder proposal (originally it was called function builders) was implemented in Swift 5.4. This feature allows us to build up a result value using a sequence of components. At first sight, you might think, hey this looks like an array with a series of elements, except the coma in between the items, but nope, this is completely different. But why is it good for us?

Result builder can be used to create entirely new Domain-Specific Languages (DSLs) inside Swift. Creating a DSL has many advantages, since DSLs are usually tied to a specific problem, the syntax that you use to describe the language is very lightweight, yet powerful and capable. Since Swift DSLs are type safe, it is much safer to use one instead of manually concatenate objects. Swift DSLs also allows us to use basic control flows inside these embedded micro-languages. 🤔

Source: Result builders in Swift, an article by Tibor Bödecs.

Python's None problem

Like many languages, Python has a "null value", which it calls None. By default, any Python variable can have the value None at any moment in time, and the only way to know whether something is currently None is to manually inspect it.

Source: Python's None problem.

A practical, step-by-step guide to using Chrome's DevTools

In this post, we’ll aim to cover practical techniques developers can use to debug, manipulate, and otherwise probe running web applications via Chrome’s built-in devtools. The goal is to articulate the specific steps and shortcuts we would use at Reflect, and to favor breadth over depth. Readers can follow the guide step-by-step and try it out themselves at the provided link provided below.

Source: A practical, step-by-step guide to using Chrome's DevTools, an article by Kyle Sheehan.

How Does NTP Work?

The Network Time Protocol (NTP) is a system for synchronizing the clocks of hosts and clients across the Internet. NTP is a protocol intended to synchronize all computers participating in the network to within a few milliseconds of Coordinated Universal Time (UTC). The core of the protocol is NTP’s clock discipline algorithm that adjusts the local computer’s clock time and tick frequency in response to an external source — such as another trusted NTP server, a radio or satellite receiver, or a telephone modem. A core problem in NTP is establishing the trust and accuracy of nodes in the NTP network. This is done through a combination of selection and filtering algorithms to choose from the most reliable and accurate peer in the synchronization network.

Source: How Does NTP Work?, an article by Kevin Sookocheff.

Tables are Hard, Part 1: History

It's just a grid of data, right? Tables show up everywhere in software, and you probably don't think about them much. Yet modern software packs a surprising amount of functionality into them, accumulated over the past half a century.

In this post, we'll take a high altitude pass over that history. In later installments, we'll dive into how today's software handles the complex requirements of modern tables.

Source: Tables are Hard, Part 1: History, an article by Nick Lanam.

Exploring Go v1.18’s Generics

Go 1.18 is set to arrive in February 2021, and with it comes the long-awaited addition of generics to the language. It’s been a long process to find something that works with the current Go ecosystem, but a proposal has been accepted that tries to protect the objectives of the language while adding the largest changes to the language in over a decade. Will developers add more complexity and make things less maintainable with generics? Or will this enable new heights and capabilities for gophers everywhere?

Source: Exploring Go v1.18's Generics, an article by James Holdren.

Will Nix Overtake Docker?

In many discussions about Nix, the comparison of Nix and Docker comes up frequently. This question could be dismissed by saying that Nix and Docker are different tools that solve different problems. One is a toolkit for building and deploying containers and the other is a package and configuration manager. However, these tools do have some overlap: they can both be used to create reproducible environments. A reproducible environment is one that can be recreated from scratch in an identical way (ideally bit-for-bit). Practically, this means having the same tools, versions, and configuration between the environments.

Source: Will Nix Overtake Docker?, an article by Connor Brewster.

Practical parsing with Flex and Bison

Although parsing is often described from the perspective of writing a compiler, there are many common smaller tasks where it’s useful. Reading file formats, talking over the network, creating shells, and analyzing source code are all easier using a robust parser.

By taking time to learn general-purpose parsing tools, you can go beyond fragile homemade solutions, and inflexible third-party libraries. We’ll cover Lex and Yacc in this guide because they are mature and portable. We’ll also cover their later incarnations as Flex and Bison.

Source: Practical parsing with Flex and Bison, an article by Joe Nelson.

Swift actors

Since the very first version of Swift, we’ve been able to define our various types as either classes, structs, or enums. But now, with the launch of Swift 5.5 and its built-in concurrency system, a new type declaration keyword has been added to the mix — actor.

So, in this article, let’s explore the concept of actors, and what kinds of problems that we could solve by defining custom actor types within our code bases.

Source: Swift actors: How do they work, and what kinds of problems do they solve?, an article by John Sundell.

Some obscure C features

If you spent a few years programming in C, you're probably much more confident about your knowledge of the language than if you spent as much time working with C++ or java.

Both the C language and its standard library are quite close to the smallest they could be.

The current most used version of the language, c99, brought a bunch of new features, many of which are completely unknown to most C programmers (Older specifications obviously also have some dark corners).

Source: Some obscure C features, an article by Victor Collod.