aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-08-30 18:35:23 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-08-30 18:35:23 +0200
commit5e3b4b6c21d33b28e60ce976479339f72d544a6c (patch)
tree0e5a101d4944e7dd5a99606344b6a6807a9a5606 /src
parentd3f0841cfdd229ff16b8a230117737a435fc7a56 (diff)
downloadsebastiano.tronto.net-5e3b4b6c21d33b28e60ce976479339f72d544a6c.tar.gz
sebastiano.tronto.net-5e3b4b6c21d33b28e60ce976479339f72d544a6c.zip
Switch from stagit to cgit
Diffstat (limited to 'src')
-rw-r--r--src/blog/2022-06-12-shell-ide-sed/shell-ide-sed.md2
-rw-r--r--src/blog/2022-08-14-website/website.md6
-rw-r--r--src/blog/2022-11-23-git-host/git-host.md18
-rw-r--r--src/blog/2022-12-30-blog-ready/blog-ready.md5
-rw-r--r--src/blog/2023-07-11-feed/feed.md2
-rw-r--r--src/blog/2024-04-30-taming-cpp-motivation/taming-cpp-motivation.md12
-rw-r--r--src/blog/2024-12-03-2fa/2fa.md4
-rw-r--r--src/blog/2024-12-26-taming-cpp-raii/taming-cpp-raii.md6
-rw-r--r--src/blog/2025-01-21-taming-cpp-templates/taming-cpp-templates.md24
-rw-r--r--src/blog/2025-02-27-elliptic-curves-javascript/ecm.md6
-rw-r--r--src/blog/2025-06-06-webdev/webdev.md18
-rw-r--r--src/blog/2025-06-26-borrow-checker/borrow-checker.md5
-rw-r--r--src/blog/2025-11-29-aoc-download/aoc-download.md2
-rw-r--r--src/blog/2026-03-27-programming-20-years/20-years-of-programming.md5
-rw-r--r--src/blog/2026-08-15-dotfiles/dotfiles.md2
-rw-r--r--src/git/git.md64
-rw-r--r--src/speedcubing/coordinates/coordinates.md12
17 files changed, 65 insertions, 128 deletions
diff --git a/src/blog/2022-06-12-shell-ide-sed/shell-ide-sed.md b/src/blog/2022-06-12-shell-ide-sed/shell-ide-sed.md
index 410d2ce..bcb97d0 100644
--- a/src/blog/2022-06-12-shell-ide-sed/shell-ide-sed.md
+++ b/src/blog/2022-06-12-shell-ide-sed/shell-ide-sed.md
@@ -117,7 +117,7 @@ $ cth do_ src/*
117``` 117```
118 118
119And it works! You can now find 119And it works! You can now find
120[this script](https://git.tronto.net/scripts/file/cth%2Ehtml) 120[this script](https://git.tronto.net/scripts/tree/cth)
121among my other [scripts](https://git.tronto.net/scripts). 121among my other [scripts](https://git.tronto.net/scripts).
122 122
123*Remark: in bash one can simply do `sed -n "/^$1/,/^}/ p" ${@:2}` to match 123*Remark: in bash one can simply do `sed -n "/^$1/,/^}/ p" ${@:2}` to match
diff --git a/src/blog/2022-08-14-website/website.md b/src/blog/2022-08-14-website/website.md
index 8019c60..f76c5f2 100644
--- a/src/blog/2022-08-14-website/website.md
+++ b/src/blog/2022-08-14-website/website.md
@@ -23,7 +23,7 @@ files, writing a script that adds a header and a footer to the output of
23[lowdown](https://kristaps.bsd.lv/lowdown/), and using 23[lowdown](https://kristaps.bsd.lv/lowdown/), and using
24[rsync](https://en.wikipedia.org/wiki/Rsync) to deploy the files to my server. 24[rsync](https://en.wikipedia.org/wiki/Rsync) to deploy the files to my server.
25All of this is available on 25All of this is available on
26[my git page](https://git.tronto.net/sebastiano.tronto.net/), but I won't 26[my git page](https://git.tronto.net/sebastiano.tronto.net), but I won't
27explain every detail of these build scripts here. In particular, my script 27explain every detail of these build scripts here. In particular, my script
28also builds a [gemini](https://sebastiano.tronto.net/blog/2022-06-04-gemini/) 28also builds a [gemini](https://sebastiano.tronto.net/blog/2022-06-04-gemini/)
29version of my website, which I won't discuss here. 29version of my website, which I won't discuss here.
@@ -88,9 +88,9 @@ Without this trick the correct URL would have been
88`sebastiano.tronto.net/git.html` or something, which I don't like. 88`sebastiano.tronto.net/git.html` or something, which I don't like.
89 89
90The main working directory also contains the 90The main working directory also contains the
91[`top.html`](https://git.tronto.net/sebastiano.tronto.net/file/top%2Ehtml%2Ehtml) 91[`top.html`](https://git.tronto.net/sebastiano.tronto.net/tree/top.html)
92and 92and
93[`bottom.html`](https://git.tronto.net/sebastiano.tronto.net/file/bottom%2Ehtml%2Ehtml) 93[`bottom.html`](https://git.tronto.net/sebastiano.tronto.net/tree/bottom.html)
94files. These files are not uploaded directly to my server - they are not 94files. These files are not uploaded directly to my server - they are not
95even well-formed html files! - but they are used to build all other 95even well-formed html files! - but they are used to build all other
96html pages. 96html pages.
diff --git a/src/blog/2022-11-23-git-host/git-host.md b/src/blog/2022-11-23-git-host/git-host.md
index cc9fc27..9976b91 100644
--- a/src/blog/2022-11-23-git-host/git-host.md
+++ b/src/blog/2022-11-23-git-host/git-host.md
@@ -1,5 +1,11 @@
1# Self-hosted git pages with stagit (featuring ed, the standard editor) 1# Self-hosted git pages with stagit (featuring ed, the standard editor)
2 2
3**Update 2026-08-30: Since August 2026, I am no longer using stagit to
4host my git pages. Instead, I use [cgit](https://git.zx2c4.com/cgit/about).
5I have updated all the links in this page to point to a frozen copy of
6my stagit-based git page before the switch. If you want to visit my new
7git page, go to [git.tronto.net](https://git.tronto.net)**
8
3This is a follow-up to my earlier blog entry 9This is a follow-up to my earlier blog entry
4[How I update my website](../2022-08-14-website). 10[How I update my website](../2022-08-14-website).
5 11
@@ -14,9 +20,9 @@ via web pages, on your personal server? In this post I am going to show
14you how I do it, in the usual minimalist and 20you how I do it, in the usual minimalist and
15not-using-what-I-do-not-understand style. 21not-using-what-I-do-not-understand style.
16 22
17You can see the final result on my [git pages](https://git.tronto.net). 23You can see the final result on my [git pages](https://stagit.tronto.net).
18The scripts and other files I use to set this up are accessible 24The scripts and other files I use to set this up are accessible
19[here](https://git.tronto.net/git-hooks). 25[here](https://stagit.tronto.net/git-hooks).
20 26
21## Hosting git repositories on your own server 27## Hosting git repositories on your own server
22 28
@@ -54,7 +60,7 @@ a bunch of html files that you can simply move to your www hosting directory.
54After generating the pages you can personalize them by copying your logo, 60After generating the pages you can personalize them by copying your logo,
55[favicon](https://en.wikipedia.org/wiki/Favicon) or CSS style sheet. You can 61[favicon](https://en.wikipedia.org/wiki/Favicon) or CSS style sheet. You can
56use `stagit-index` to generate 62use `stagit-index` to generate
57[an index page for your repositories](https://git.tronto.net/). Since everything 63[an index page for your repositories](https://stagit.tronto.net/). Since everything
58consists of html files, you can simply edit them to personalize your git pages 64consists of html files, you can simply edit them to personalize your git pages
59even further - and below you'll see some examples. 65even further - and below you'll see some examples.
60 66
@@ -155,8 +161,8 @@ add or change:
155* I would like to have a download button so that people who don't use git 161* I would like to have a download button so that people who don't use git
156 can still download my files. This makes sense especially for those 162 can still download my files. This makes sense especially for those
157 repos that are mostly documents, such as my 163 repos that are mostly documents, such as my
158 [lecture notes](https://git.tronto.net/mathsoftware) or my 164 [lecture notes](https://stagit.tronto.net/mathsoftware) or my
159 [FMC tutorial](https://git.tronto.net/fmctutorial). 165 [FMC tutorial](https://stagit.tronto.net/fmctutorial).
160* I would like to convert README.md files to html. 166* I would like to convert README.md files to html.
161 167
162If I were calling stagit by hand after each `git push`, I 168If I were calling stagit by hand after each `git push`, I
@@ -280,7 +286,7 @@ stagit-index /home/git/*.git | sed 's|/log\.html||g' > "$basedir/index.html"
280And that's it. Well, I also copy the style files and add a bottom bar, 286And that's it. Well, I also copy the style files and add a bottom bar,
281and change the title from a `<span class="desc">` to an `<h1>` element, 287and change the title from a `<span class="desc">` to an `<h1>` element,
282again using `ed`. If you want to see the details you can check them out 288again using `ed`. If you want to see the details you can check them out
283[here](https://git.tronto.net/git-hooks/file/post-receive-stagit.html). 289[here](https://stagit.tronto.net/git-hooks/file/post-receive-stagit.html).
284 290
285## Conclusions 291## Conclusions
286 292
diff --git a/src/blog/2022-12-30-blog-ready/blog-ready.md b/src/blog/2022-12-30-blog-ready/blog-ready.md
index 144e5e2..a6f0ff0 100644
--- a/src/blog/2022-12-30-blog-ready/blog-ready.md
+++ b/src/blog/2022-12-30-blog-ready/blog-ready.md
@@ -13,10 +13,9 @@ messy at some point! It would be nice to divide these posts by year...
13## Adding year sections to my blog index 13## Adding year sections to my blog index
14 14
15Very easy: in my 15Very easy: in my
16[build.sh](https://git.tronto.net/sebastiano.tronto.net/file/build.sh.html) 16[build.sh](https://git.tronto.net/sebastiano.tronto.net/tree/build.sh)
17script that I run to 17script that I run to
18[build my website](../2022-08-14-website), there is a 18[build my website](../2022-08-14-website), there is a `makeblog()`
19[`makeblog()`](https://git.tronto.net/sebastiano.tronto.net/file/build.sh.html#l52)
20function that takes care of building the index page and RSS feed for my blog. 19function that takes care of building the index page and RSS feed for my blog.
21 20
22It is enough to add the following lines inside its main loop: 21It is enough to add the following lines inside its main loop:
diff --git a/src/blog/2023-07-11-feed/feed.md b/src/blog/2023-07-11-feed/feed.md
index feb5cd6..9c56bcb 100644
--- a/src/blog/2023-07-11-feed/feed.md
+++ b/src/blog/2023-07-11-feed/feed.md
@@ -62,7 +62,7 @@ reader UI.
62In the first version I made, my feeds were separated in folders, 62In the first version I made, my feeds were separated in folders,
63one per file, and one could select multiple feeds or even entire 63one per file, and one could select multiple feeds or even entire
64folders via dmenu using 64folders via dmenu using
65[dmenu-filepicker](https://git.tronto.net/scripts/file/dmenu-filepicker.html) 65[dmenu-filepicker](https://git.tronto.net/scripts/tree/dmenu-filepicker)
66for file selection. 66for file selection.
67Once the session was terminated, all shown feeds were marked as 67Once the session was terminated, all shown feeds were marked as
68"read" by writing the timestamp of the last read item on a cache 68"read" by writing the timestamp of the last read item on a cache
diff --git a/src/blog/2024-04-30-taming-cpp-motivation/taming-cpp-motivation.md b/src/blog/2024-04-30-taming-cpp-motivation/taming-cpp-motivation.md
index 3181eb0..532a0dd 100644
--- a/src/blog/2024-04-30-taming-cpp-motivation/taming-cpp-motivation.md
+++ b/src/blog/2024-04-30-taming-cpp-motivation/taming-cpp-motivation.md
@@ -40,7 +40,7 @@ You can find the code I wrote in
40 40
41To sort a list of a hundred million integers, in C we can use `qsort()` 41To sort a list of a hundred million integers, in C we can use `qsort()`
42from `stdlib.h` (see 42from `stdlib.h` (see
43[sort.c](https://git.tronto.net/taming-cpp/file/sort-benchmark/integers/sort.c.html)): 43[sort.c](https://git.tronto.net/taming-cpp/tree/sort-benchmark/integers/sort.c)):
44 44
45``` 45```
46qsort(a, ARRAYSIZE, sizeof(int), compar); 46qsort(a, ARRAYSIZE, sizeof(int), compar);
@@ -55,7 +55,7 @@ int compar(const void *x, const void *y) {
55``` 55```
56 56
57In C++ we can use `sort()` from `algorithm` (see 57In C++ we can use `sort()` from `algorithm` (see
58[sort.cpp](https://git.tronto.net/taming-cpp/file/sort-benchmark/integers/sort.cpp.html)): 58[sort.cpp](https://git.tronto.net/taming-cpp/tree/sort-benchmark/integers/sort.cpp)):
59 59
60``` 60```
61std::sort(a, a+ARRAYSIZE, 61std::sort(a, a+ARRAYSIZE,
@@ -69,7 +69,7 @@ instead of a comparison function.
69Modern C++ also offers parallelized 69Modern C++ also offers parallelized
70version of common algorithms as part of the standard library, so if 70version of common algorithms as part of the standard library, so if
71we want to completely humiliate poor C we can use this (see 71we want to completely humiliate poor C we can use this (see
72[sort_parallel.cpp](https://git.tronto.net/taming-cpp/file/sort-benchmark/integers/sort_parallel.cpp.html)): 72[sort_parallel.cpp](https://git.tronto.net/taming-cpp/tree/sort-benchmark/integers/sort_parallel.cpp)):
73 73
74``` 74```
75std::sort(std::execution::par, a, a+ARRAYSIZE, 75std::sort(std::execution::par, a, a+ARRAYSIZE,
@@ -94,9 +94,9 @@ Even without parallelization, C++ is twice as fast as C!
94You might think that C++ is somehow optimizing for integer 94You might think that C++ is somehow optimizing for integer
95sorting. But this is not the case, as demonstrated by a similar experiment 95sorting. But this is not the case, as demonstrated by a similar experiment
96with *pairs* of integers (see 96with *pairs* of integers (see
97[sort.c](https://git.tronto.net/taming-cpp/file/sort-benchmark/pairs/sort.c.html), 97[sort.c](https://git.tronto.net/taming-cpp/tree/sort-benchmark/pairs/sort.c),
98[sort.cpp](https://git.tronto.net/taming-cpp/file/sort-benchmark/pairs/sort.cpp.html) and 98[sort.cpp](https://git.tronto.net/taming-cpp/tree/sort-benchmark/pairs/sort.cpp) and
99[sort_parallel.cpp](https://git.tronto.net/taming-cpp/file/sort-benchmark/pairs/sort_parallel.cpp.html) 99[sort_parallel.cpp](https://git.tronto.net/taming-cpp/tree/sort-benchmark/pairs/sort_parallel.cpp)
100- I used a non-standard mixed lexicographic order to be reasonably sure the 100- I used a non-standard mixed lexicographic order to be reasonably sure the
101compiler does not come up with any ad-hoc optimization): 101compiler does not come up with any ad-hoc optimization):
102 102
diff --git a/src/blog/2024-12-03-2fa/2fa.md b/src/blog/2024-12-03-2fa/2fa.md
index 66f3661..3a84682 100644
--- a/src/blog/2024-12-03-2fa/2fa.md
+++ b/src/blog/2024-12-03-2fa/2fa.md
@@ -64,9 +64,9 @@ $ athtool -b --totp "SECRET_KEY"
64And that's it. However, you should not write you secret key in plain text 64And that's it. However, you should not write you secret key in plain text
65like this: instead you should keep it encrypted and decrypt it just 65like this: instead you should keep it encrypted and decrypt it just
66when you need it to generate a code. I do this by using my simple 66when you need it to generate a code. I do this by using my simple
67[2fa](https://git.tronto.net/scripts/file/2fa.html) 67[2fa](https://git.tronto.net/scripts/tree/2fa)
68script, which is based on my 68script, which is based on my
69[secret](https://git.tronto.net/scripts/file/secret.html) 69[secret](https://git.tronto.net/scripts/tree/secret)
70tool that encrypts and decrypts stuff using openssl and a master 70tool that encrypts and decrypts stuff using openssl and a master
71password - which is obviously 71password - which is obviously
72[correcthorsebatterystaple](https://xkcd.com/936/). 72[correcthorsebatterystaple](https://xkcd.com/936/).
diff --git a/src/blog/2024-12-26-taming-cpp-raii/taming-cpp-raii.md b/src/blog/2024-12-26-taming-cpp-raii/taming-cpp-raii.md
index 6450521..a7c1bae 100644
--- a/src/blog/2024-12-26-taming-cpp-raii/taming-cpp-raii.md
+++ b/src/blog/2024-12-26-taming-cpp-raii/taming-cpp-raii.md
@@ -61,7 +61,7 @@ But there is a more interesting way to make this program fail by only
61changing the definition of `BadType`. In fact, you can make this program 61changing the definition of `BadType`. In fact, you can make this program
62do pretty much everything you want by changing `BadType`'s *constructor* 62do pretty much everything you want by changing `BadType`'s *constructor*
63to suit your needs (see 63to suit your needs (see
64[surprising-error.cpp](https://git.tronto.net/taming-cpp/file/raii/surprising-error.cpp.html)): 64[surprising-error.cpp](https://git.tronto.net/taming-cpp/tree/raii/surprising-error.cpp)):
65 65
66``` 66```
67class BadType { 67class BadType {
@@ -83,7 +83,7 @@ And it does not stop here either: whenever a variable
83of a class type goes out of scope, the corresponding 83of a class type goes out of scope, the corresponding
84[destructor](https://en.cppreference.com/w/cpp/language/destructor) 84[destructor](https://en.cppreference.com/w/cpp/language/destructor)
85is called - see 85is called - see
86[constructor-hello-world.cpp](https://git.tronto.net/taming-cpp/file/raii/constructor-hello-world.cpp.html): 86[constructor-hello-world.cpp](https://git.tronto.net/taming-cpp/tree/raii/constructor-hello-world.cpp):
87 87
88``` 88```
89#include <iostream> 89#include <iostream>
@@ -254,7 +254,7 @@ from a function is a classic example, but they also come up when using
254[smart pointers](https://en.cppreference.com/book/intro/smart_pointers). 254[smart pointers](https://en.cppreference.com/book/intro/smart_pointers).
255 255
256I made a 256I made a
257[comprehensive example](https://git.tronto.net/taming-cpp/file/raii/all-constructors.cpp.html) 257[comprehensive example](https://git.tronto.net/taming-cpp/tree/raii/all-constructors.cpp)
258of how all of these operations work, so you can see when exactly each 258of how all of these operations work, so you can see when exactly each
259of them is called. Do check it out if you are interested! 259of them is called. Do check it out if you are interested!
260 260
diff --git a/src/blog/2025-01-21-taming-cpp-templates/taming-cpp-templates.md b/src/blog/2025-01-21-taming-cpp-templates/taming-cpp-templates.md
index bce440f..903a1ff 100644
--- a/src/blog/2025-01-21-taming-cpp-templates/taming-cpp-templates.md
+++ b/src/blog/2025-01-21-taming-cpp-templates/taming-cpp-templates.md
@@ -44,7 +44,7 @@ You can find the code examples for this post in the
44[companion repository for this series](https://git.tronto.net/taming-cpp), 44[companion repository for this series](https://git.tronto.net/taming-cpp),
45and if you want you can also have a look at the final version 45and if you want you can also have a look at the final version
46of my tiny library 46of my tiny library
47[on my git page](https://git.tronto.net/zmodn/file/README.md.html). For 47[on my git page](https://git.tronto.net/zmodn). For
48this post I am going to use Clang as a compiler, because I find its 48this post I am going to use Clang as a compiler, because I find its
49error messages more readable most of the times. 49error messages more readable most of the times.
50 50
@@ -69,7 +69,7 @@ cannot, for example, assign an `std::vector<int>` object to an
69As an example, let's take a simple standard library class such as 69As an example, let's take a simple standard library class such as
70[`std::pair`](https://en.cppreference.com/w/cpp/utility/pair). 70[`std::pair`](https://en.cppreference.com/w/cpp/utility/pair).
71It could be implemented as follows (see 71It could be implemented as follows (see
72[pair.cpp](https://git.tronto.net/taming-cpp/file/templates/pair.cpp.html)): 72[pair.cpp](https://git.tronto.net/taming-cpp/tree/templates/pair.cpp)):
73 73
74``` 74```
75template<typename S, typename T> 75template<typename S, typename T>
@@ -151,7 +151,7 @@ which in case you don't know are just a simplified syntax for pointers.)
151Let's take this simple example to show an important property of templates. 151Let's take this simple example to show an important property of templates.
152Let's say that, perhaps by mistake, we implemented the swap function 152Let's say that, perhaps by mistake, we implemented the swap function
153using different template types for `a` and `b` (see 153using different template types for `a` and `b` (see
154[swap.cpp](https://git.tronto.net/taming-cpp/file/templates/swap.cpp.html)): 154[swap.cpp](https://git.tronto.net/taming-cpp/tree/templates/swap.cpp)):
155 155
156``` 156```
157template<typename S, typename T> 157template<typename S, typename T>
@@ -204,7 +204,7 @@ to make these error messages more meaningful - we'll see some examples below.
204Objects, not just types, can be template parameters. A classic example 204Objects, not just types, can be template parameters. A classic example
205is [`std::array`](https://en.cppreference.com/w/cpp/container/array), 205is [`std::array`](https://en.cppreference.com/w/cpp/container/array),
206a fixed-size container where the capacity is fixed at compile time (see 206a fixed-size container where the capacity is fixed at compile time (see
207[std_array.cpp](https://git.tronto.net/taming-cpp/file/templates/std_array.cpp.html) 207[std_array.cpp](https://git.tronto.net/taming-cpp/tree/templates/std_array.cpp)
208for an example). 208for an example).
209 209
210Non-type parameters can be constants of any *structural type* - see 210Non-type parameters can be constants of any *structural type* - see
@@ -213,13 +213,13 @@ for a precise definition. Remember that you can only specialize them
213with compile-time (i.e. `constexpr`) constants! 213with compile-time (i.e. `constexpr`) constants!
214 214
215With non-type parameter you can do pretty wild stuff, see for example 215With non-type parameter you can do pretty wild stuff, see for example
216[factorial.cpp](https://git.tronto.net/taming-cpp/file/templates/factorial.cpp.html) 216[factorial.cpp](https://git.tronto.net/taming-cpp/tree/templates/factorial.cpp)
217- although this specific example is not very useful, since it can easily 217- although this specific example is not very useful, since it can easily
218be replaced by a constexpr function. 218be replaced by a constexpr function.
219 219
220Fun fact: if you use `auto`, you don't even have to specify a type for 220Fun fact: if you use `auto`, you don't even have to specify a type for
221a non-type parameter. For example, the following code works just fine (see 221a non-type parameter. For example, the following code works just fine (see
222[println.cpp](https://git.tronto.net/taming-cpp/file/templates/println.cpp.html)): 222[println.cpp](https://git.tronto.net/taming-cpp/tree/templates/println.cpp)):
223 223
224``` 224```
225#include <iostream> 225#include <iostream>
@@ -278,7 +278,7 @@ template for
278where `N` is a fixed at compile-time. 278where `N` is a fixed at compile-time.
279 279
280We may start with something like this (see 280We may start with something like this (see
281[zmodn-1.cpp](https://git.tronto.net/taming-cpp/file/templates/zmodn-1.cpp.html)): 281[zmodn-1.cpp](https://git.tronto.net/taming-cpp/tree/templates/zmodn-1.cpp)):
282 282
283``` 283```
284#include <iostream> 284#include <iostream>
@@ -355,7 +355,7 @@ are a way to prevent nasty run-time errors and / or make compiler errors
355more meaningful when using templates; they were added in C++20. 355more meaningful when using templates; they were added in C++20.
356 356
357In our case, introducing our constraint is quite simple (see 357In our case, introducing our constraint is quite simple (see
358[zmodn-2.cpp](https://git.tronto.net/taming-cpp/file/templates/zmodn-2.cpp.html)): 358[zmodn-2.cpp](https://git.tronto.net/taming-cpp/tree/templates/zmodn-2.cpp)):
359 359
360``` 360```
361template<int N> 361template<int N>
@@ -392,7 +392,7 @@ type of N.
392 392
393In order to do so, I can use a non-type parameter declared `auto` and 393In order to do so, I can use a non-type parameter declared `auto` and
394[`decltype()`](https://en.cppreference.com/w/cpp/language/decltype) (see 394[`decltype()`](https://en.cppreference.com/w/cpp/language/decltype) (see
395[zmodn-3.cpp](https://git.tronto.net/taming-cpp/file/templates/zmodn-3.cpp.html)): 395[zmodn-3.cpp](https://git.tronto.net/taming-cpp/tree/templates/zmodn-3.cpp)):
396 396
397``` 397```
398template<auto N> 398template<auto N>
@@ -409,7 +409,7 @@ public:
409 409
410And of course I should also templatize the `extended_gcd()` function - 410And of course I should also templatize the `extended_gcd()` function -
411you can see the full code in 411you can see the full code in
412[zmodn-3.cpp](https://git.tronto.net/taming-cpp/file/templates/zmodn-3.cpp.html). 412[zmodn-3.cpp](https://git.tronto.net/taming-cpp/tree/templates/zmodn-3.cpp).
413 413
414Now we can use any type as a "base" for our modular integer! Well, almost. 414Now we can use any type as a "base" for our modular integer! Well, almost.
415I mentioned above that the type we use must be *structural*, but that is 415I mentioned above that the type we use must be *structural*, but that is
@@ -417,7 +417,7 @@ relatively easy to satisfy. A bigger problem is that our type must
417allow for compile-time constants - so we need, at least, a `constexpr` 417allow for compile-time constants - so we need, at least, a `constexpr`
418constructor. I could not find a suitable library online, so I ended 418constructor. I could not find a suitable library online, so I ended
419up writing my own - see 419up writing my own - see
420[bigint.h](https://git.tronto.net/taming-cpp/file/templates/bigint.h.html). 420[bigint.h](https://git.tronto.net/taming-cpp/tree/templates/bigint.h).
421 421
422The code is simple and not very efficient, but this library is not meant 422The code is simple and not very efficient, but this library is not meant
423to be efficient. I am just using it for educational purposes. 423to be efficient. I am just using it for educational purposes.
@@ -477,7 +477,7 @@ Along with constraints, C++20 also introduced the possibility to define
477and name a custom set of requirements. This can be done with *concepts*. 477and name a custom set of requirements. This can be done with *concepts*.
478In our example, we can require that our type supports all the operations 478In our example, we can require that our type supports all the operations
479we need (see 479we need (see
480[zmodn-4.cpp](https://git.tronto.net/taming-cpp/file/templates/zmodn-4.cpp.html)): 480[zmodn-4.cpp](https://git.tronto.net/taming-cpp/tree/templates/zmodn-4.cpp)):
481 481
482``` 482```
483template<typename T> 483template<typename T>
diff --git a/src/blog/2025-02-27-elliptic-curves-javascript/ecm.md b/src/blog/2025-02-27-elliptic-curves-javascript/ecm.md
index 56b876c..27e5021 100644
--- a/src/blog/2025-02-27-elliptic-curves-javascript/ecm.md
+++ b/src/blog/2025-02-27-elliptic-curves-javascript/ecm.md
@@ -40,7 +40,7 @@ Recently I have been learning C++, and I wanted to experiment with some
40of its more advanced features. So I decided to rewrite the whole thing. 40of its more advanced features. So I decided to rewrite the whole thing.
41 41
42I had a clear idea of where I wanted to start: a small 42I had a clear idea of where I wanted to start: a small
43[library for modular arithmetic](https://git.tronto.net/zmodn/file/README.md.html), 43[library for modular arithmetic](https://git.tronto.net/zmodn),
44with compile-time fixed 44with compile-time fixed
45[modulus](https://en.wikipedia.org/wiki/Modular_arithmetic) via templates 45[modulus](https://en.wikipedia.org/wiki/Modular_arithmetic) via templates
46and heavy use of 46and heavy use of
@@ -57,7 +57,7 @@ algorithm with very large numbers. Unfortunately, I did not take into
57account that with my setup I needed a big integer class that supported 57account that with my setup I needed a big integer class that supported
58*compile-time constants* - for example in the form of `constexpr` 58*compile-time constants* - for example in the form of `constexpr`
59constructors. I could not find any, so I decided to write 59constructors. I could not find any, so I decided to write
60[my own big integer class](https://git.tronto.net/zmodn/file/bigint.h.html). 60[my own big integer class](https://git.tronto.net/zmodn/tree/bigint.h).
61This was less successful: implementing an *efficient* big integer library 61This was less successful: implementing an *efficient* big integer library
62was not as straightforward as the modular integers library. I decided 62was not as straightforward as the modular integers library. I decided
63not to care about efficiency for the time being, but that would come 63not to care about efficiency for the time being, but that would come
@@ -258,7 +258,7 @@ pieces of text and pictures in the slides - shoutout to
258my friend [Jared](https://guissmo.com) for telling me about 258my friend [Jared](https://guissmo.com) for telling me about
259it. Apart from this I don't have anything interesting to comment 259it. Apart from this I don't have anything interesting to comment
260about the CSS part of the slides. You can check the full code 260about the CSS part of the slides. You can check the full code
261[here](https://git.tronto.net/ecm/file/index.html.html) if you want; 261[here](https://git.tronto.net/ecm/tree/index.html) if you want;
262everything is in a single HTML file. 262everything is in a single HTML file.
263 263
264The result looks fine, but it does not work perfectly will every screen 264The result looks fine, but it does not work perfectly will every screen
diff --git a/src/blog/2025-06-06-webdev/webdev.md b/src/blog/2025-06-06-webdev/webdev.md
index 3bf4f9b..b712a85 100644
--- a/src/blog/2025-06-06-webdev/webdev.md
+++ b/src/blog/2025-06-06-webdev/webdev.md
@@ -19,7 +19,7 @@
19## Introduction 19## Introduction
20 20
21I have recently worked on making a web application out of 21I have recently worked on making a web application out of
22[my latest Rubik's cube optimal solver](https://git.tronto.net/nissy-core/file/README.md.html). 22[my latest Rubik's cube optimal solver](https://git.tronto.net/nissy-core).
23This involved building a rather complex C code base (with 23This involved building a rather complex C code base (with
24multithreading, SIMD, callback functions and whatnot) to 24multithreading, SIMD, callback functions and whatnot) to
25[WebAssembly](https://en.wikipedia.org/wiki/WebAssembly) via 25[WebAssembly](https://en.wikipedia.org/wiki/WebAssembly) via
@@ -77,7 +77,7 @@ With this out of the way, let's get started!
77 77
78The examples used in this tutorial are all contained in a git repository, 78The examples used in this tutorial are all contained in a git repository,
79which you can find either on 79which you can find either on
80[my git page](https://git.tronto.net/emscripten-tutorial/file/README.md.html) or 80[my git page](https://git.tronto.net/emscripten-tutorial) or
81[on github](https://github.com/sebastianotronto/emscripten-tutorial). 81[on github](https://github.com/sebastianotronto/emscripten-tutorial).
82 82
83In order to follow them you are going to need: 83In order to follow them you are going to need:
@@ -161,7 +161,7 @@ but in case you are interested you can check out
161You can find the code for this example, as well as scripts to 161You can find the code for this example, as well as scripts to
162build it and run the web server, in the directory `00_hello_world` 162build it and run the web server, in the directory `00_hello_world`
163of the git repository 163of the git repository
164([git.tronto.net](https://git.tronto.net/emscripten-tutorial/file/README.md.html), 164([git.tronto.net](https://git.tronto.net/emscripten-tutorial),
165[github](https://github.com/sebastianotronto/emscripten-tutorial)). 165[github](https://github.com/sebastianotronto/emscripten-tutorial)).
166 166
167Anyway, now we can build our C code to run in a web page. But this is 167Anyway, now we can build our C code to run in a web page. But this is
@@ -324,7 +324,7 @@ The answer is 42
324 324
325The code for this example can be found in the `01_library` folder in 325The code for this example can be found in the `01_library` folder in
326the git repository 326the git repository
327([git.tronto.net](https://git.tronto.net/emscripten-tutorial/file/README.md.html), 327([git.tronto.net](https://git.tronto.net/emscripten-tutorial),
328[github](https://github.com/sebastianotronto/emscripten-tutorial)). 328[github](https://github.com/sebastianotronto/emscripten-tutorial)).
329 329
330## Intermezzo II: JavaScript and the DOM 330## Intermezzo II: JavaScript and the DOM
@@ -593,7 +593,7 @@ is included directly in `script.mjs`.
593 593
594You can find the full the code for this example the folder 594You can find the full the code for this example the folder
595`02_library_modularized` in the git repository 595`02_library_modularized` in the git repository
596([git.tronto.net](https://git.tronto.net/emscripten-tutorial/file/README.md.html), 596([git.tronto.net](https://git.tronto.net/emscripten-tutorial),
597[github](https://github.com/sebastianotronto/emscripten-tutorial)). 597[github](https://github.com/sebastianotronto/emscripten-tutorial)).
598 598
599## Multithreading 599## Multithreading
@@ -740,7 +740,7 @@ the server you are using; with darkhttpd you can use the `--header` option.
740With your server correctly set up, you can enjoy a multithreaded program 740With your server correctly set up, you can enjoy a multithreaded program
741running in your browser! As always, you can check out this example from 741running in your browser! As always, you can check out this example from
742the `03_threads` folder of the git repository 742the `03_threads` folder of the git repository
743([git.tronto.net](https://git.tronto.net/emscripten-tutorial/file/README.md.html), 743([git.tronto.net](https://git.tronto.net/emscripten-tutorial),
744[github](https://github.com/sebastianotronto/emscripten-tutorial)). 744[github](https://github.com/sebastianotronto/emscripten-tutorial)).
745 745
746## Intermezzo III: Web Workers and Spectre 746## Intermezzo III: Web Workers and Spectre
@@ -860,7 +860,7 @@ whose `data` property contains the object that was sent with `postMessage()`.
860 860
861You can check out this example in the directory `04_no_block` in the 861You can check out this example in the directory `04_no_block` in the
862repository 862repository
863([git.tronto.net](https://git.tronto.net/emscripten-tutorial/file/README.md.html), 863([git.tronto.net](https://git.tronto.net/emscripten-tutorial),
864[github](https://github.com/sebastianotronto/emscripten-tutorial)). 864[github](https://github.com/sebastianotronto/emscripten-tutorial)).
865Try also large numbers, in the range of millions or tens of millions, and 865Try also large numbers, in the range of millions or tens of millions, and
866compare it with the previous example - but not don't go too large, we 866compare it with the previous example - but not don't go too large, we
@@ -948,7 +948,7 @@ Other than that, you just need to add a couple of compiler flags:
948 out module at runtime with `addFunction()`. 948 out module at runtime with `addFunction()`.
949 949
950And as you can check by running the example `05_callback` from the repo 950And as you can check by running the example `05_callback` from the repo
951([git.tronto.net](https://git.tronto.net/emscripten-tutorial/file/README.md.html), 951([git.tronto.net](https://git.tronto.net/emscripten-tutorial),
952[github](https://github.com/sebastianotronto/emscripten-tutorial)), 952[github](https://github.com/sebastianotronto/emscripten-tutorial)),
953everything works as expected, both in Node.js and in a web page. To make 953everything works as expected, both in Node.js and in a web page. To make
954the examples more interesting, the web page one is not only not logging the 954the examples more interesting, the web page one is not only not logging the
@@ -1120,7 +1120,7 @@ And with all this, we are ready to run our optimized version of the
1120`primes_in_range()` algorithm, all from within our browser! As always, 1120`primes_in_range()` algorithm, all from within our browser! As always,
1121you can check out the complete code in the folder `06_storage` of 1121you can check out the complete code in the folder `06_storage` of
1122the repository 1122the repository
1123([git.tronto.net](https://git.tronto.net/emscripten-tutorial/file/README.md.html), 1123([git.tronto.net](https://git.tronto.net/emscripten-tutorial),
1124[github](https://github.com/sebastianotronto/emscripten-tutorial)). 1124[github](https://github.com/sebastianotronto/emscripten-tutorial)).
1125 1125
1126If generating this data on the user's side seems redundant, you can 1126If generating this data on the user's side seems redundant, you can
diff --git a/src/blog/2025-06-26-borrow-checker/borrow-checker.md b/src/blog/2025-06-26-borrow-checker/borrow-checker.md
index b22d741..10c4ac5 100644
--- a/src/blog/2025-06-26-borrow-checker/borrow-checker.md
+++ b/src/blog/2025-06-26-borrow-checker/borrow-checker.md
@@ -2,12 +2,11 @@
2 2
3As I mentioned in my [last post](../2025-06-13-cargo-culture-shock), 3As I mentioned in my [last post](../2025-06-13-cargo-culture-shock),
4in the last couple of weeks I have been learning Rust. I have written 4in the last couple of weeks I have been learning Rust. I have written
5[a small library](https://git.tronto.net/zmodn-rs/file/README.md.html) for 5[a small library](https://git.tronto.net/zmodn-rs) for
6[integers modulo N](https://en.wikipedia.org/wiki/Modular_arithmetic) 6[integers modulo N](https://en.wikipedia.org/wiki/Modular_arithmetic)
7(the original C++ version was mentioned in 7(the original C++ version was mentioned in
8[this post](../2025-01-21-taming-cpp-templates), rewritten 8[this post](../2025-01-21-taming-cpp-templates), rewritten
9[my implementation](https://git.tronto.net/ecm/file/README.md.html) 9[my implementation](https://git.tronto.net/ecm) of the
10of the
11[ECM algorithm](https://en.wikipedia.org/wiki/Lenstra_elliptic-curve_factorization) 10[ECM algorithm](https://en.wikipedia.org/wiki/Lenstra_elliptic-curve_factorization)
12(mentioned in [this other post](../2025-02-27-elliptic-curves-javascript)) 11(mentioned in [this other post](../2025-02-27-elliptic-curves-javascript))
13and I am now playing around with some past 12and I am now playing around with some past
diff --git a/src/blog/2025-11-29-aoc-download/aoc-download.md b/src/blog/2025-11-29-aoc-download/aoc-download.md
index 29e56fc..bbde45e 100644
--- a/src/blog/2025-11-29-aoc-download/aoc-download.md
+++ b/src/blog/2025-11-29-aoc-download/aoc-download.md
@@ -79,7 +79,7 @@ And you are good to go!
79Typing out the full command above may look cooler than downloading the file 79Typing out the full command above may look cooler than downloading the file
80by right-clicking "Save page as", but it is just as annoying. So obviously I 80by right-clicking "Save page as", but it is just as annoying. So obviously I
81saved that command to 81saved that command to
82[a script](https://git.tronto.net/scripts/file/aoc.html) 82[a script](https://git.tronto.net/scripts/tree/aoc)
83that also detects the correct file to download based on the current date 83that also detects the correct file to download based on the current date
84(or on two optional parameters for the year and the day). My script also 84(or on two optional parameters for the year and the day). My script also
85opens up an editor and [Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)) 85opens up an editor and [Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser))
diff --git a/src/blog/2026-03-27-programming-20-years/20-years-of-programming.md b/src/blog/2026-03-27-programming-20-years/20-years-of-programming.md
index 8e5b1a2..1daa441 100644
--- a/src/blog/2026-03-27-programming-20-years/20-years-of-programming.md
+++ b/src/blog/2026-03-27-programming-20-years/20-years-of-programming.md
@@ -60,7 +60,7 @@ it creates a few more.
60 60
61I managed to recover some of the 61I managed to recover some of the
62programs I wrote between 2006 and 2010 in [a git 62programs I wrote between 2006 and 2010 in [a git
63repository](https://git.tronto.net/ancient-projects/file/README.md.html). 63repository](https://git.tronto.net/ancient-projects).
64The most successful one is JBriscola, a single-player game of 64The most successful one is JBriscola, a single-player game of
65[briscola](https://en.wikipedia.org/wiki/Briscola) with a decent AI. It is 65[briscola](https://en.wikipedia.org/wiki/Briscola) with a decent AI. It is
66actually quite fun to play, and a few of my friends played it regularly 66actually quite fun to play, and a few of my friends played it regularly
@@ -153,8 +153,7 @@ a PhD. But at the beginning of my PhD, in 2019, I wrote
153some code for work: my supervisor and a colleague of mine had 153some code for work: my supervisor and a colleague of mine had
154devised an algorithm to compute the degrees of certain [field 154devised an algorithm to compute the degrees of certain [field
155extensions](https://en.wikipedia.org/wiki/Field_extension), 155extensions](https://en.wikipedia.org/wiki/Field_extension),
156and I [implemented 156and I [implemented it](https://git.tronto.net/kummer-degrees).
157it](https://git.tronto.net/kummer-degrees/file/README.md.html).
158 157
159I don't know if this is what got me back into coding for fun, or if it 158I don't know if this is what got me back into coding for fun, or if it
160was just a matter of time, but by the end of 2019 I was already thinking 159was just a matter of time, but by the end of 2019 I was already thinking
diff --git a/src/blog/2026-08-15-dotfiles/dotfiles.md b/src/blog/2026-08-15-dotfiles/dotfiles.md
index cdaea19..ce10ef0 100644
--- a/src/blog/2026-08-15-dotfiles/dotfiles.md
+++ b/src/blog/2026-08-15-dotfiles/dotfiles.md
@@ -71,7 +71,7 @@ edit some configuration files that are outside of `$HOME` (for example,
71in `/etc`), and so on. 71in `/etc`), and so on.
72 72
73I tried to automate these steps as much as I could turned them into [a 73I tried to automate these steps as much as I could turned them into [a
74script](https://git.tronto.net/config/file/scripts/setup-config-alpine.html). I 74script](https://git.tronto.net/config/tree/scripts/setup-config-alpine). I
75won't explain everything it does here, you can just read through it if you want - 75won't explain everything it does here, you can just read through it if you want -
76it is pretty self-explanatory. This script also takes care of cloning the dotfiles 76it is pretty self-explanatory. This script also takes care of cloning the dotfiles
77repository I mentioned above, so when I set up a new system I just need to download 77repository I mentioned above, so when I set up a new system I just need to download
diff --git a/src/git/git.md b/src/git/git.md
deleted file mode 100644
index cbfbf80..0000000
--- a/src/git/git.md
+++ /dev/null
@@ -1,64 +0,0 @@
1# Git repositories
2
3I started writing code in 2005, with a toy programming language called Dark
4Basic first and with Java shortly after that. In the past I enjoyed learning
5different programming languages (C++, J, Python...), but I have recently found
6more pleasure in writing software in plain C.
7
8You can find all my git repositories at
9[git.tronto.net](https://git.tronto.net/) or on
10[my github page](https://github.com/sebastianotronto).
11You can clone a repository with `git clone https://git.tronto.net/[NAME]`.
12
13Here are some highlights of what you can find in my git repositories.
14
15## Programs and scripts
16
17* [nissy](https://git.tronto.net/nissy): A Rubik's cube solver,
18 intended primarily as a tool for practicing FMC. Since april 2023
19 the stable version of the project has been moved to
20 [nissy-classic](https://git.tronto.net/nissy-classic), while I kept
21 working on the H48 optimal solver. This new solver, which will be
22 integrated in a future version of nissy, can be found
23 [here](https://git.tronto.net/nissy-core).
24 Check out also [the project's homepage](https://nissy.tronto.net).
25* [scripts](https://git.tronto.net/scripts): Various scripts
26 for Unix-like systems.
27* [zmodn](https://git.tronto.net/zmodn): A simple C++ library for working
28 with modular arithmetic.
29
30## Tutorials
31
32* [fmctutorial](https://git.tronto.net/fmctutorial): an in-depth
33 tutorial for the Rubik's cube *Fewest Moves Challenge*, or FMC.
34
35## Math courses and programs
36
37Here are some scripts I wrote and lecture notes for some courses
38I taught at the [University of Luxembourg](https://wwwen.uni.lu)
39(2018-2022).
40
41* [mathsoftware](https://git.tronto.net/mathsoftware): a full
42 course (3 ECTS) on LaTeX and SageMath.
43* [preplogic](https://git.tronto.net/preplogic): notes and
44 exercises for two introductory lectures on elementary logic.
45* [kummer-degrees](https://git.tronto.net/kummer-degrees): a
46 SageMath script for computing the degrees of Kummer extensions of the
47 rational numbers.
48* [arithmeticbilliard](https://git.tronto.net/arithmeticbilliard):
49 a python program for drawing the path of 2- and 3-dimensional arithmetic
50 billiards.
51
52## Miscellanea
53
54* [My personal website](https://git.tronto.net/sebastiano.tronto.net):
55 source files (mostly markdown) and build scripts for this website.
56* [My git hooks](https://git.tronto.net/git-hooks), used to keep my
57 web git instance up do date automatically when I push new changes. See
58 [this blog post](https://sebastiano.tronto.net/blog/2022-11-23-git-host).
59* [Platonic solids](https://git.tronto.net/platonicsolids) in TikZ (LaTeX).
60* [bclibrary](https://git.tronto.net/bclibrary): A collectiono of functions
61 for [bc(1)](https://man.openbsd.org/bc).
62* [A simple Python module written in C](https://git.tronto.net/python-c):
63 A minimal example of Python bindings for C code, for educational
64 purposes.
diff --git a/src/speedcubing/coordinates/coordinates.md b/src/speedcubing/coordinates/coordinates.md
index e1e6785..3d1687c 100644
--- a/src/speedcubing/coordinates/coordinates.md
+++ b/src/speedcubing/coordinates/coordinates.md
@@ -46,12 +46,10 @@ To work with cube coordinates, we need to implement the following:
46 can be applied. 46 can be applied.
47 47
48For the implementation, see 48For the implementation, see
49[coord.c](https://git.tronto.net/nissy-nx/file/src/coord.c.html) 49[coord.c](https://git.tronto.net/nissy-nx/tree/src/coord.c)
50and 50and
51[coord.h](https://git.tronto.net/nissy-nx/file/src/coord.h.html), 51[coord.h](https://git.tronto.net/nissy-nx/tree/src/coord.h),
52as well as the definition of 52as well as the definition of coordinate in cubetypes.h.
53[coordinate](https://git.tronto.net/nissy-nx/file/src/cubetypes.h.html#l181)
54in cubetypes.h.
55 53
56## Coordinate types 54## Coordinate types
57 55
@@ -252,7 +250,7 @@ the outermost loop above:
252``` 250```
253 251
254The code for this can be found in 252The code for this can be found in
255[pruning.c](https://git.tronto.net/nissy-nx/file/src/pruning.c.html). 253[pruning.c](https://git.tronto.net/nissy-nx/tree/src/pruning.c).
256The use of pthread made it more complicated, so it can be hard to follow 254The use of pthread made it more complicated, so it can be hard to follow
257without reading this page first. 255without reading this page first.
258 256
@@ -272,7 +270,7 @@ instead of a full representation of the cube is computing the
272inverse. While it is possible to compute the inverse somewhat efficiently 270inverse. While it is possible to compute the inverse somewhat efficiently
273from a representation of the cube made of a smart selection of coordinate 271from a representation of the cube made of a smart selection of coordinate
274values, it is not necessarily efficient. 272values, it is not necessarily efficient.
275See [fst.c](https://git.tronto.net/nissy-nx/file/src/fst.c.html#l113) 273See [fst.c](https://git.tronto.net/nissy-nx/tree/src/fst.c)
276for an implementation. 274for an implementation.
277 275
278For these reasons, I am not using the coordinate approach described here 276For these reasons, I am not using the coordinate approach described here

Generated with cgit - Back to sebastiano.tronto.net