Plurrrr

week 42, 2022

Sicario: Day of the Soldado (2018)

The drug war on the U.S.-Mexico border has escalated as the cartels have begun trafficking terrorists across the US border. To fight the war, federal agent Matt Graver re-teams with the mercurial Alejandro.

In the afternoon Esme and I watched Sicario: Day of the Soldado. I liked the movie and give it a 7.5 out of 10.

Speaking up for Sass

Sass — “Syntactically Awesome Style Sheets” — came into existence in 2006 and, almost from the beginning, one of its key slogans was that it “makes CSS fun again.” While I can differ with that opinion on occasion, I completely agree with the Sass website’s headline since 2013: “CSS with superpowers.”

And let me stop right here for those who are already grumbling, “Yeah, but in this day and age you can do so much more with plain, vanilla CSS than you could back when Sass was new and hot, so who needs it today?” My simple answer is: you might, if you support websites intended for use in either enterprises or government.

Source: Speaking up for Sass, an article by Bryce Wray.

Uncharted (2022)

Street-smart Nathan Drake is recruited by seasoned treasure hunter Victor "Sully" Sullivan to recover a fortune amassed by Ferdinand Magellan, and lost 500 years ago by the House of Moncada.

In the evening Alice, Esme, and I watched Uncharted. I liked the movie and give it a 7.5 out of 10.

The Mystery of 355/113

The fraction 355/113 is incredibly close to pi, within a third of a millionth of the exact value. This level of accuracy is far beyond its rights as a fraction with such a small denominator, and it causes various oddities elsewhere in math. For example, use any scientific calculator to compute cos(355) in radians. The oddball result is due to the freakish closeness of 355/113 to pi.

Source: The Mystery of 355/113, an article by David Bau.

Bullet Train (2022)

Five assassins aboard a swiftly-moving bullet train find out that their missions have something in common.

In the evening Alice, Esme, and I watched Bullet Train. I liked the movie and give it an 8.0 out of 10.

Create a Progress Bar in Python CLI

Whenever you download a file or start a game, you see an aesthetic animation that updates itself until completed. This is a progress bar. A progress bar is a graphical element used to visualize the progress of a task such as downloading, uploading, or transferring files.

There are two types of progress bars: determinate and indeterminate. Determinate progress bars track the progress of a task over time. Indeterminate progress bars run infinitely with a looping animation.

So, how can you create a determinate progress bar in a Python CLI program?

Source: Create a Progress Bar in Python CLI, an article by Sai Ashish Konchada.

Python CLI Tricks That Don't Require Any Code Whatsoever

Out-of-the-box, Python standard library ships with many great libraries some of which provide commandline interface (CLI), allowing us to do many cool things directly from terminal without needing to even open a .py file.

This includes things like starting a webserver, opening a browser, parsing JSON files, benchmarking programs and many more, all of which we will explore in this article.

Source: Python CLI Tricks That Don't Require Any Code Whatsoever, an article by Martin Heinz.

What does "isomorphic" mean (in Haskell)?

Sometimes you’ll hear someone describe two things as being “isomorphic” to one another and I wanted to explain what that means.

You might have already guessed that “isomorphic” is a synonym for “equivalent”, and that would have been a pretty good guess. Really, the main difference between the two words is that “isomorphic” has a more precise and more general definition than “equivalent”.

In this post I will introduce a more precise definition of “isomorphic”, using Haskell code. This definition won’t be the fully general definition, but I still hope to give you some taste of how “isomorphic” can denote something more than just “equivalent”.

Source: What does "isomorphic" mean (in Haskell)?, an article by Gabriella Gonzalez.

Quirks, Caveats, and Gotchas In SQLite

The SQL language is a "standard". Even so, no two SQL database engines work exactly alike. Every SQL implementation has it own peculiarities and oddities, and SQLite is no exception to this rule.

This document strives to highlight the principal differences between SQLite and other SQL implementations, as an aid to developers that are porting to or from SQLite or who are trying to build a system that works across multiple database engines.

Source: Quirks, Caveats, and Gotchas In SQLite.

Announcing the Haskell Error Index

The Haskell Error Index is a community-driven web site for improving the documentation of Haskell tooling. In the upcoming release of GHC, each error message or warning includes a unique code. This code can be looked up on the index to find user-contributed explanations and examples. As the specific phrasing of messages in GHC is improved over time, the codes will remain constant, which allows the documentation on the site to retain its value and its search-engine usefulness.

Source: Announcing the Haskell Error Index, an article by David Thrane Christiansen.

The Gray Man (2022)

When the CIA's most skilled operative-whose true identity is known to none-accidentally uncovers dark agency secrets, a psychopathic former colleague puts a bounty on his head, setting off a global manhunt by international assassins.

In the evening I watched The Gray Man. I liked the movie somewhat and give it a 6.5 out of 10.

A Look at Postgres 15: MERGE Command with Examples

With PostgreSQL 15 comes a new SQL Command called MERGE. MERGE has been in the SQL standard for quite a while, but it just made its way into the PostgreSQL codebase. Prior to MERGE, if you wanted to refresh a target table from a source table, prior to Postgres 15, you could use the "upsert" method with the ON CONFLICT clause.

Now, MERGE can be used instead! Some situations where MERGE makes a lot of sense are:

  • data loading from external sources, thru foreign data wrappers
  • staged and batched process jobs

Source: A Look at Postgres 15: MERGE Command with Examples, an article by Jean-Paul Argudo.

Tree search in Haskell

The interesting part of this program is the breadth-first tree traversal, and the tree traversal part now has only two arguments instead of three; the filter operation afterwards is trivial. Tree search in Haskell is mostly tree, and hardly any search!

Source: Tree search in Haskell, an article by Mark Dominus.

Difftastic diffing with Magit

difftastic is a structural diff tool that compares files based on their syntax. So for example, if you conditionalize some statement, the diff would only show the addition of one if with its condition instead of showing one line added (the if (condition)) and the line with the statement being removed and re-added (because of indentation changes). In many cases, such structural diffs transport the meaning of a change much better than the typical line-based diffs.

Source: Difftastic diffing with Magit, an article by Tassilo Horn.

Customizing packages in Nix

Nixpkgs provides a large number of packages that can be used in various ways. In some cases you want to make modifications to a package.

In this post we'll go through various ways how modified packages can be used in the Nix ecosystem, how packages can be modified and finally show some common use-cases:

Source: Customizing packages in Nix, an article by Bob van der Linden

Musings on Python Type Hints

Shortly after the release of TypeScript, Guido van Rossum and Ivan Levkivskyi created PEP 483 proposing a type hinting system for Python. Notably absent from this proposal is any "official" type checking program for verifying the correctness of type hints. As a result, there are four "major" type checkers for python:

  • mypy: A very early project (starting in 2012) from Jukka Lehtosalo. mypy and its predecessors have heavily influenced direction of python type hints. mypy has been supported heavily by Jukka's employer Dropbox. mypy is arguably the most popular type checker for Python.
  • pyright: A type checker built by Microsoft with great VS Code and LSP integration. Pyright was first released in 2019 and is bundled in the Microsoft Python extension for VS Code.
  • pytype: A static type analyzer built by Google. Pytype was first released in 2018 and emphasizes type inference and local leniency.
  • pyre: A static type checker built by Meta. Designed for large code bases and first-class integration with Buck, Meta's build system. The first release I can find dates back to 2019.

Source: Musings on Python Type Hints, an article by Samuel Eisenhandler.

Eyes of the Void

After eighty years of fragile peace, the Architects are back, wreaking havoc as they consume entire planets. In the past, Originator artefacts – vestiges of a long-vanished civilization – could save a world from annihilation. This time, the Architects have discovered a way to circumvent these protective relics. Suddenly, no planet is safe.

Facing impending extinction, the Human Colonies are in turmoil. While some believe a unified front is the only way to stop the Architects, others insist humanity should fight alone. And there are those who would seek to benefit from the fractured politics of war – even as the Architects loom ever closer.

Idris, who has spent decades running from the horrors of his past, finds himself thrust back onto the battlefront. As an Intermediary, he could be one of the few to turn the tide of war. With a handful of allies, he searches for a weapon that could push back the Architects and save the galaxy. But to do so, he must return to the nightmarish unspace, where his mind was broken and remade.

What Idris discovers there will change everything.

In the evening I started in Eyes of the Void, book 2 in The Final Architecture trilogy by Adrian Tchaikovsky.