commit 5ed505e280c6c6a7459bb2e4249313fa65df052f parent 0ece949b176312dd7b9a2305892acc8f013a0e67 Author: Sebastiano Tronto <sebastiano@tronto.net> Date: Tue, 14 Nov 2023 17:36:51 +0100 Merge branch 'master' of tronto.net:sebastiano.tronto.net Diffstat:
20 files changed, 359 insertions(+), 14 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -DEST="tronto.net:/var/www/htdocs/sebastiano.tronto.net" +DEST="sebastiano@tronto.net:/var/www/htdocs/sebastiano.tronto.net" RSYNC=$$( (command -V rsync 2>&1 > /dev/null && echo rsync) || echo openrsync) all: clean diff --git a/build.sh b/build.sh @@ -50,6 +50,7 @@ makeblogindexandfeed() { sed "s/TITLE/Blog/" < top.html > "$bf" { echo '<h1 id="blog">Blog</h1>'; echo '<table id="blog">'; + echo '<a href="../series">Blog series</a> - '; echo '<a href="feed.xml">RSS feed</a>'; } >> "$bf" cp feed-top.xml "$ff" diff --git a/src/blog/2022-05-29-man/man.md b/src/blog/2022-05-29-man/man.md @@ -1,5 +1,7 @@ # The man page reading club: man(1) +*This post is part of [series](../../series)* + I have been using Linux as my main operating system for the last 14 years, and as my only one for the last 10. Needless to say, I really like it. However, at the end of last year I @@ -261,3 +263,5 @@ markup, pipe the output to col(1) -b instead. ``` If you are curious, check the [new post](../2022-09-05-man-col)! + +*Next in the series: [more(1)](../2022-06-08-more)* diff --git a/src/blog/2022-06-08-more/more.md b/src/blog/2022-06-08-more/more.md @@ -1,5 +1,7 @@ # The man page reading club: more(1) +*This post is part of a [series](../../series)* + In the second episode of this blog series we are going to cover a UNIX pager. Instead of the popular less(1), we are going to check out the classic more(1). @@ -190,3 +192,5 @@ can be used to pipe arbitrary portions of the current file to an external command. But apart from this I could easily live in the pre-1985 era. See you next time! + +*Next in the series: [shutdown(8)](../2022-07-07-shutdown)* diff --git a/src/blog/2022-07-07-shutdown/shutdown.md b/src/blog/2022-07-07-shutdown/shutdown.md @@ -1,5 +1,7 @@ # The man page reading club: shutdown(8) +*This post is part of a [series](../../series)* + I would like to write about more interesting things, but I do not have time or energy to do so. I need to shut down for a little while. @@ -124,3 +126,5 @@ mainframes and how administrators used to shut them down when multiple users were logged in. But I am not going to do it now. Good night. + +*Next in the series: [sh(1) - part 1: shell grammar](../2022-09-13-sh-1)* diff --git a/src/blog/2022-09-13-sh-1/sh-1.md b/src/blog/2022-09-13-sh-1/sh-1.md @@ -1,5 +1,7 @@ # The man page reading club: sh(1) - part 1: shell grammar +*This post is part of a [series](../../series)* + After [last time's short entry](../2022-07-07-shutdown) and a relatively long hiatus, we are back in business with a big one! @@ -383,3 +385,5 @@ rules together. To finish this manual page we are going to need another long post, or two shorter ones. See you next time! + +*Next in the series: [sh(1) - part 2: commands and builtins](../2022-09-20-sh-2)* diff --git a/src/blog/2022-09-20-sh-2/sh-2.md b/src/blog/2022-09-20-sh-2/sh-2.md @@ -1,5 +1,7 @@ # The man page reading club: sh(1) - part 2: commands and builtins +*This post is part of a [series](../../series)* + This is the second and last part of our exciting sh(1) manual page read. This time we are going to learn about *commands* and *builtins*. In case you have missed it, check out the [first part](../2022-09-13-sh-1) @@ -394,3 +396,5 @@ other hand long pages are often more interesting. Anyway, I hope you enjoyed this long double-post and that you may have learnt something new. See you next time! + +*Next in the series: [tetris(6)](../2022-10-01-tetris)* diff --git a/src/blog/2022-10-01-tetris/tetris.md b/src/blog/2022-10-01-tetris/tetris.md @@ -1,5 +1,7 @@ # The man page reading club: tetris(6) +*This post is part of a [series](../../series)* + Sometimes you just need to relax and have some fun :-) ## Boredom @@ -145,3 +147,5 @@ $ /usr/games/tetris ``` or just update your `$PATH`. + +*Next in the series: [ed(1)](../2022-12-24-ed)* diff --git a/src/blog/2022-12-24-ed/ed.md b/src/blog/2022-12-24-ed/ed.md @@ -1,5 +1,7 @@ # The man page reading club: ed(1) +*This post is part of a [series](../../series)* + I enjoyed writing a little introduction at the beginning of every post of this series, but I am running out of ideas. I am not much of fiction writer. I'll skip this time, maybe I'll get back to doing @@ -419,3 +421,5 @@ more than one line at the time. If you are interest in this topic I highly suggest reading the article [The command line philosophy](http://www.eklhad.net/philosophy.html) by Karl Dahlke, the author of [edbrowse](https://edbrowse.org). + +*Next in the series: [dc(1)](../2023-03-30-dc)* diff --git a/src/blog/2023-01-11-aaron-swartz/aaron-swartz.md b/src/blog/2023-01-11-aaron-swartz/aaron-swartz.md @@ -65,24 +65,16 @@ there is still long. *Aaron is dead.* - -*Wanderers in this crazy world,* - +*Wanderers in this crazy world,* *we have lost a mentor, a wise elder.* - -*Hackers for right, we are one down,* - +*Hackers for right, we are one down,* *we have lost one of our own.* - -*Nurtures, careers, listeners, feeders,* - -*parents all,* - +*Nurtures, careers, listeners, feeders,* +*parents all,* *we have lost a child.* - *Let us all weep.* -- [Tim Berners-Lee](https://en.wikipedia.org/wiki/Tim_Berners-Lee) diff --git a/src/blog/2023-03-30-dc/dc.md b/src/blog/2023-03-30-dc/dc.md @@ -1,5 +1,7 @@ # The man page reading club: dc(1) +*This post is part of a [series](../../series)* + For this episode I have decided to go back to the basics, in multiple ways. Indeed `dc`, the *desk calculator*, is: diff --git a/src/blog/2023-10-15-build-time/bios.jpg b/src/blog/2023-10-15-build-time/bios.jpg Binary files differ. diff --git a/src/blog/2023-10-15-build-time/build-time.md b/src/blog/2023-10-15-build-time/build-time.md @@ -0,0 +1,119 @@ +# Build time! + +After thinking about it for quite some time, my girlfriend and I finally +got a nice desktop PC. This is our first build, and the first time I +open up a desktop PC in 10 years or so! + +![A low-quality picture of my desk with the new PC](desk.jpg) + +## Specs + +* CPU: AMD Ryzen 7 7700 (8 cores / 16 threads, 3.8GHz base / 5.3GHz Boost) +* GPU: Asus AMD Radeon RX 6650 XT (8GB dedicated memory) +* RAM: 2x32GB +* SSD: 2TB NVMe + +We (especially my girlfriend) play some games, but not the newest AAA +titles, and we are definitely willing to sacrifice some graphics quality. +So we went for some "best bang for the buck" CPU and GPU, paying attention +to the power usage, too. + +I also write code for fun, and for one of my hobby projects I would like +to experiment with different sizes of RAM, so I wanted at least 32GB. We +ended up getting 64 because we had some money left in our budget and we +did not need (or want) a better (and more power-hungry) CPU or GPU. + +With the case and all the peripherals, including a pretty good 27" +screen, we got it for less than 1400€, which I think is a good price. + +## Building it up + +We were a bit scared of putting all the pieces together. My girlfriend +has never done it, and the last time I assembled a +PC it was back in the days of spinning hard drives with +[IDE connectors](https://en.wikipedia.org/wiki/Parallel_ATA) +and motherboard +[beep codes](https://en.wikipedia.org/wiki/Power-on_self-test#Progress_and_error_reporting). +You know, when the PC kindly told you in pseudo-Morse code exactly what +was wrong. Those were the days! + +Nostalgia aside, the build process went pretty smoothly - except for +a small cut on my middle finger. Here are some of the things I found +interesting: + +### Black is the new green + +I remember mother boards and graphics card used to be all green, now not +anymore! At least in our case, they are all black. Cool, I guess. + +### Tiny NVMe drive + +Modern NVMe drives are really small! I remember old hard disks being +literal bricks - you would not want to drop one of those, lest it breaks +your toes or damages the floor. Now you would not want to drop one for +fear of loosing it under the sofa. + +### Fans everywhere + +The case has a fan, the CPU has a fan, the GPU has two. I don't remember +there were this many fans in ~2009, but if it keeps my chips cool, +I'll take it! + +### Damned RGB + +We (especially me) do not like at all the modern "gamer aesthetics" that +demand RGB lights everywhere. So we carefully chose components that had +the no LEDs, or as little as possible. Unfortunately, the stock CPU fan +has more lights than a Christmas tree. Our solid black case saves us here. + +### Ugly BIOS + +I mean, WTF is this screen? + +![A picture of my new PC showing the main BIOS screen](bios.jpg) + +It's like a B-tier early 2000s video game. I think the classic 80s +style, curses-like graphics looked much better. But on the other hand, +who cares. + +## Operating system + +We agreed on using Linux, because we are both Linux users, because all +the games we would like to play work either natively or via proton, +and because fuck you Microsoft and your crappy spyware. + +I use [Void](https://voidlinux.org/), but for a shared PC I would like +something that "just works" with minimal setup. My girlfriend uses +[Mint](https://linuxmint.com/), but she wanted to try out something +new. Debian seemed like a solid choice, and it is +[very similar to Linux](https://www.youtube.com/watch?v=s5ocXFgowZA) +(in case you can't click on the link or don't understand Italian, it's a joke). + +For the desktop environment we initially went for XFCE, but my +girlfriend immediately disliked it because many administration tasks +were counter-intuitive or just impossible (e.g. adding a new user). So +we switched to KDE, and we are both reasonably satisfied with it. However, +I am a bit disappointed to see that it is (still) a bit buggy - some of the +first disappointments include: [Discover](https://apps.kde.org/discover/) +failing to open, KDE "administrator" users not being able to use `sudo`, +the [screen failing to turn off](https://discussion.fedoraproject.org/t/f37-kde-5-27-screen-doesnt-dim-nor-turn-off/73960) +after the set timeout. At least it is not as buggy as the initial KDE4 +release in 2008. + +## Build time? + +So, how long does it take to build Linux on my new Linux build? + +``` +$ sudo apt build-dep linux +$ wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.7.tar.xz +$ tar -xvf linux-6.5.7.tar.xz +$ cd linux-6.5.7.tar.xz +$ make mrproper +$ make defconfig +$ time make -j16 + +real 1m27.215 +user 17m57.806s +sys 1m46.663s +``` diff --git a/src/blog/2023-10-15-build-time/build-time.md.bak b/src/blog/2023-10-15-build-time/build-time.md.bak @@ -0,0 +1,119 @@ +# Build time! + +After thinking about it for quite some time, my girlfriend and I finally +got a nice desktop PC. This is our first build, and the first time I +open up a desktop PC in 10 years or so! + +![A low-quality picture of my desk with the new PC](desk.jpg) + +## Specs + +* CPU: AMD Ryzen 7 7700 (8 cores / 16 threads, 3.8GHz base / 5.3GHz Boost) +* GPU: Asus AMD Radeon RX 6650 XT (8GB dedicated memory) +* RAM: 2x32GB +* SSD: 2TB NVMe + +We (especially my girlfriend) play some games, but not the newest AAA +titles, and we are definitely willing to sacrifice some graphics quality. +So we went for some "best bang for the buck" CPU and GPU, paying attention +to the power usage, too. + +I also write code for fun, and for one of my hobby projects I would like +to experiment with different sizes of RAM, so I wanted at least 32GB. We +ended up getting 64 because we had some money left in our budget and we +did not need (or want) a better (and more power-hungry) CPU or GPU. + +With the case and all the peripherals, including a pretty good 27" +screen, we got it for less than 1400€, which I think is a good price. + +## Building it up + +We were a bit scared of putting all the pieces together. My girlfriend +has never done it, and the last time I assembled a +PC it was back in the days of spinning hard drives with +[IDE connectors](https://en.wikipedia.org/wiki/Parallel_ATA) +and motherboard +[beep codes](https://en.wikipedia.org/wiki/Power-on_self-test#Progress_and_error_reporting). +You know, when the PC kindly told you in pseudo-morse code exactly what +was wrong. Those were the days! + +Nostalgia aside, the build process went pretty smoothly - except for +a small cut on my middle finger. Here are some of the things I found +interesting: + +### Black is the new green + +I remember mother boards and graphics card used to be all green, now not +anymore! At least in our case, they are all black. Cool, I guess. + +### Tiny NVMe drive + +Modern NVMe drives are really small! I remember old hard disks being +literal bricks - you would not want to drop one of those, lest it breaks +your toes or damages the floor. Now you would not want to drop one for +fear of loosing it under the sofa. + +### Fans everywhere + +The case has a fan, the CPU has a fan, the GPU has two. I don't remember +there were this many fans in ~2009, but if it keeps my chips cool, +I'll take it! + +### Damned RGB + +We (espcially me) do not like at all the modern "gamer aesthetics" that +demand RGB lights everywhere. So we carefully chose components that had +the no LEDs, or as little as possible. Unfortunately, the stock CPU fan +has more lights than a Christmas tree. Our solid black case saves us here. + +### Ugly BIOS + +I mean, WTF is this screen? + +![A picture of my new PC showing the main BIOS screen](bios.jpg) + +It's like a B-tier early 2000s video game. I think the classic 80s +style, curses-like graphics looked much better. But on the other hand, +who cares. + +## Operating system + +We agreed on using Linux, because we are both Linux users, because all +the games we would like to play work either natively or via proton, +and because fuck you Microsoft and your crappy spyware. + +I use [Void](https://voidlinux.org/), but for a shared PC I would like +something that "just works" with minimal setup. My girlfriend uses +[Mint](https://linuxmint.com/), but she wanted to try out something +new. Debian seemed like a solid choice, and it is +[very similar to Linux](https://www.youtube.com/watch?v=s5ocXFgowZA) +(in case you can't click on the link or don't understand Italian, it's a joke). + +For the desktop environment we initially went for XFCE, but my +girlfriend immediately disliked it because many administration tasks +were counter-intuitive or just impossible (e.g. adding a new user). So +we switched to KDE, and we are both reasonably satisfied with it. However, +I am a bit disappointed to see that it is (still) a bit buggy - some of the +first disappointments include: [Discover](https://apps.kde.org/discover/) +failing to open, KDE "administrator" users not being able to use `sudo`, +the [screen failing to turn off](https://discussion.fedoraproject.org/t/f37-kde-5-27-screen-doesnt-dim-nor-turn-off/73960) +after the set timeout. At least it is not as buggy as the inital KDE4 +release in 2008. + +## Build time? + +So, how long does it take to build Linux on my new Linux build? + +``` +$ sudo apt build-dep linux +$ wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.7.tar.xz +$ tar -xvf linux-6.5.7.tar.xz +$ cd linux-6.5.7.tar.xz +$ make mrproper +$ make defconfig +$ time make -j16 + +real 1m27.215 +user 17m57.806s +sys 1m46.663s +``` diff --git a/src/blog/2023-10-15-build-time/desk.jpg b/src/blog/2023-10-15-build-time/desk.jpg Binary files differ. diff --git a/src/blog/2023-10-31-spooky-shell-expansions/spooky-shell-expansion.md b/src/blog/2023-10-31-spooky-shell-expansions/spooky-shell-expansion.md @@ -0,0 +1,47 @@ +# Spooky shell expansions + +*Let me tell you a story to chill the bones* +*One that happened to me long time ago* + +*It was a dark and cold night* +*Plague spreading outside* + +*In the summer of '20* +*I was hacking alone* +*A little program I wanted to install* +*Not in `/usr/local`, but in my `$HOME`* + +*Young and foolish I was* +*As I changed the Makefile* +*`PREFIX = ~/.local`* +*And then `make` I typed* + +*That did not work, of course* +*And I soon realized* +*A new folder named `~`* +*Had shown up in my `$HOME`* + +*"How foolish I was" - I thought* +*"That must not work,* +*A Makefile won't expand* +*As a shell script sure does"* + +*A folder named `~`* +*When left alone,* +*Is no reason to fear* +*Does no harm at all* + +*But care must be taken* +*And alas, I did not* +*Soon to learn the hard way* +*What a `~` gives, a `~` takes away* + +*"Let this be undone!" I exclaimed* + +*As I typed* + +*Four little bytes* + +``` +$ rm ~ +``` diff --git a/src/series/series.md b/src/series/series.md @@ -0,0 +1,37 @@ +# List of blog series + +I my [blog](../blog) I sometimes write multiple posts on the same +topic, or posts in multiple parts. This page contains the list of these +"blog series". + +**Note:** This is *not* a full list of my blog posts divided by topic. + +## The man page reading club + +In these posts I walk through the [manual page](https://man.openbsd.org) +of a classic UNIX utility, highlighting the most important features. +Each post is introduced by a fictional context. + +* [man(1)](../blog/2022-05-29-man) +* [more(1)](../blog/2022-06-08-more) +* [shutdown(8)](../blog/2022-07-07-shutdown) +* [sh(1) part 1](../blog/2022-09-13-sh-1) +* [sh(1) part 2](../blog/2022-09-20-sh-2) +* [tetris(6)](../blog/2022-10-01-tetris) +* [ed(1)](../blog/2022-12-24-ed) +* [dc(1)](../blog/2023-03-30-dc) + +## UNIX text filter + +In this series I explore three classic UNIX commands, in increasing order +of complexity: `grep`, `sed` and `awk`. Work in progress. + +* [grep](../blog/2023-08-20-grep) +* sed [coming soon] +* awk [coming less soon] + +## The UNIX shell as an IDE + +This series contains only one post for now, but I may add more in the future. + +* [Look stuff up with sed](../blog/2022-06-12-shell-ide-sed) diff --git a/src/speedcubing/cubing.jpg b/src/speedcubing/cubing.jpg Binary files differ. diff --git a/src/speedcubing/cubing.png b/src/speedcubing/cubing.png Binary files differ. diff --git a/src/speedcubing/speedcubing.md b/src/speedcubing/speedcubing.md @@ -1,6 +1,6 @@ # Speedcubing -![Me solving a Rubik's cube during an official competition](cubing.png "Me solving a cube") +![Me solving a Rubik's cube during an official competition](cubing.jpg "Me solving a cube") I have been practicing [speedcubing](https://en.wikipedia.org/wiki/Speedcubing) since 2008,