aliquote.org

Latest micro-posts

You can also also view the full archives of micro-posts. Longer blog posts are available in the Articles section.

2023-08-29 09:58 #

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 09:51 #

My thoughts on Haskell in 2020. tl;dr Stick to Simple Haskell. #haskell

2023-08-28 15:39 #

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 12:46 #

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 11:03 #
2023-08-28 10:22 #

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 first

I 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 09:32 #

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 09:08 #

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-23 10:04 #

Sneak preview of summer’s latest culinary preparations.