aliquote.org

Micro posting in August

August 31, 2023

2023-08-21:
imgHome sweet home.
2023-08-21: GNU Parallel, where have you been all my life?: Yet another nice example of why parallel is such a great program. I learned to use it a while ago, after having read Jearoen Janssens’ wonderful book, Data Science at the Command Line, in its first edition. BTW, the 2nd edition is available online for free.
2023-08-21: Non-Euclidean Geometry Online: a Guide to Resources: As the title suggests, a bunch of online resources to learn more about elliptical and hyperbolic geometries.
2023-08-22:

This post is a detailed discussion into user profiles, their directories, and how they are—to put it bluntly—in total disarray on Windows and Linux (I haven’t used a Mac in ages, but I assume the situation is very similar there, too). Applications treat the user profile as a dumping ground, and any user with a reasonably wide list of installed software will find their user profile very difficult to traverse after some time in use. There are platform conventions and attempts to standardise things on more open-source platforms, but a lot of developers resolutely refuse to change the behaviour of their software for a variety of reasons (some less valid than others). — $HOME, Not So Sweet $HOME

2023-08-22: TIL about lei: Using lei, b4, and mutt to do kernel development.
2023-08-23:

If you cannot solve the proposed problem try to solve first some related problem. Could you imagine a more accessible related problem? A more general problem? A more special problem? An analogous problem? Could you solve a part of the problem? — G. Polya, How to Solve ItWhich is probably why we face so many times the XY problem on forum, QAs sites, and mailing lists.

2023-08-23: The missing C++ smart pointer.
2023-08-23:

Sneak preview of summer’s latest culinary preparations.
2023-08-28:

Also, whenever someone tells me that Arch never breaks, “You just have to read the blog”. Uh, okay. No thanks. I’m not reading all the latest news about any other device I allow updates to. I’m not starting that nonsense in my fifties. — Why I use Ubuntu

2023-08-28:

Now, I’ll be quick to admit that you probably shouldn’t spend a huge amount of time trying to install something from source. For many packages the best case scenario is a complicated process requiring> specific build tools and dependencies with their own complications. The worst case scenario is poor or lacking documentation and no idea how to even get started. — Try installing from source firstI did install from scratch almost any app/program on my Mac 15 years ago. At that time, Mac systems were transitioning from 32 to 64 bits, and it was kind of a mess for some programs. Then I got bored and I choose to rely on Homebrew. Then Homebrew got sort of broken on my Macbook, and I was back at the magic incantation configure && make && make install.

2023-08-28: As a sequel of one of my last benchmarking post, here’s a rough estimate of Polars vs. Datatable performance when reading a 34 Mb file (NYC Flights Dataset, available from avrious sources; see e.g., this post):

import time
import datatable
import polars

tic = time.time()
flights = polars.read_csv("nycflights.csv", null_values="NA")
toc = time.time()
print(f"Elapsed time: {(toc-tic) * 10**3:.2f} ms")
## => Elapsed time: 54.61 ms

tic = time.time()
flights = datatable.fread("nycflights.csv")
toc = time.time()
print(f"Elapsed time: {(toc-tic) * 10**3:.2f} ms")
## => Elapsed time: 57.60 ms

Polars also offers a lazy CSV reader using scan_csv, which is way faster (1.22 ms). #python
2023-08-28: A Modern C Development Environment: A complete step by step tutorial to develop using Docker and GitHub workflow. Note that clang-tidy is available in ALE for Vim. If you use Neovim, the the clangd LSP already uses clang-tidy, or you can just add --clang-tidy to clangd parameters. Extra options can also be added in a .clang-tidy file. See also clang --help-hidden.
img
2023-08-28: Email Authentication: A Developer’s Guide: I got my emails treated as spam by Gmail when using my www provider (OVH), which is probably why. And this doesn’t happen when I send emails via may mac.com account. Note that Google only started rejecting my principal domain name a few months ago, or maybe last year.
2023-08-28: Identity Beyond Usernames. For random UUIDs, see also Fixed Bits of Version 4 UUID.
2023-08-29: My thoughts on Haskell in 2020. tl;dr Stick to Simple Haskell. #haskell
2023-08-29: Understanding Automatic Differentiation in 30 lines of Python: A simplified yet effective illustration of AD in the context of neural network training. #python
2023-08-29: Why does all() return True if the iterable is empty?. #python
2023-08-29:

Mood of the day.
2023-08-30: Until now when reading my feeds using Newsboat, I was simply filtering unread feeds, sorted by count using a dedicated keybinding (bind-key S rev-sort, which allows me to simply press Su to get the desired output). Now, I learned about l which filters unread feeds. It is quite handy since it acts as a filter and the list of unread feeds empties itself as you read articles.
2023-08-30: ♪ Benoît Delbecq · Anamorphoses
2023-08-31:

Nushell isn’t exactly a shell, at least not in the traditional Unix sense of the word. Nushell is trying to answer the question: “what if we asked more of our shells?” — The case for Nushell

With recent support for data frames, it becomes an interesting challenger for tiny on-the-fly data wrangling scripts. Beware that it relies on polars-arrow which (most of the time) require a recent stable Rust. Also, if you encounter an E0034 (“multiple applicable items in scope”) when compiling polars-related dependencies, try adding --locked to cargo install. When you’re done, enjoy the power of data frames right into your shell!With my last timing for processing a 30 Mb CSV file, loading the file in Nu shell is a breeze:

~/tmp> timeit {dfr open ./nycflights.csv}
70ms 682µs 766ns
~/tmp> timeit {open ./nycflights.csv}
1sec 194ms 477µs 961ns

First instruction uses dfr open while the second instruction relies on builtin open command.

2023-08-31: Among many of the text-based UIs advantages, I found that the ability to copy-paste almost anything using Vim shortcuts via tmux or the shift+ctrl combo of my terminal emulator is one of my preferred. Here is an excerpt from my long-running (server side) Irssi session, as a tribute to Vim’s creator:

23:57 -A_Dragon(A_D@libera/staff/dragon)- [Global Notice] The Matrix bridge is experiencing continued stability and privacy issues; we have requested it be shut down until they are resolved. Matrix have agreedto shut down the bridge no later than 1400UTC on Saturday. Feel free to ask further questions in #libera-matrix
---- Day changed to 05 août 202317:35 WALLOP kline:  Bram Moolenaar finally :wq after many years contributing to free software, his relentless hard work making vim arguably the #1 editor in the world. RIP Bram, and thank you for your work.https://groups.google.com/g/vim_announce/c/tWahca9zkt4
---- Day changed to 06 août 2023

2023-08-31: TIL that GitHub renders warning or note blocks with a special formatting in Markdown document, e.g. here.

See Also

» Micro posting in July » Micro posting in June » Micro posting in May » Micro posting in April » Micro posting in March