• 0 Posts
  • 15 Comments
Joined 1 year ago
cake
Cake day: July 4th, 2023

help-circle



  • I recently spent some time optimizing a small Julia program I wrote that generates a lookup table of brainfuck constants. Because it only needs to run once, I originally didn’t care about performance when I originally wrote it (and the optimization was mostly for fun).

    I achieved an ~100x improvement by adding types, using static arrays and memoization. In the end, the performance was mostly limited by primitive math operations, I tried using multiple threads, but any synchronization destroyed the performance.

    However, the most impressive thing was the ability of Julia to scale from dynamically typed scripting language to almost a compiled language with minimal changes to the code.







  • You don’t even need to look at the extension to identify most file formats, as there are unique magic numbers stored at the beginning of most (binary) formats. Only when a single binary format is reused to appear as two different formats to the user, e.g. zip and cbz are extensions relevant. This is how the file command and most (?) Linux file explorers identify files, and why file extensions are traditionally largely irrelevant on Linux/Unix.

    This means your idea of suggesting software based on the file type is even more practicable than you described.



  • I would consider that ifconfig is deprecated on many distros and would therefore teach about iproute2 (mostly the ip and ss commands) instead. Additionally I would consider editing files essential, even if it is with nano.

    Maybe mention more modern and simpler help tools like tldr, as they could be even more useful to beginners.

    To introduce the shell and utilities, I would try to find a somewhat realistic use case that combines multiple aspects, like analyzing some files or spellchecking instead of simply mentioning every feature one by one.