diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-08-30 18:35:23 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-08-30 18:35:23 +0200 |
| commit | 5e3b4b6c21d33b28e60ce976479339f72d544a6c (patch) | |
| tree | 0e5a101d4944e7dd5a99606344b6a6807a9a5606 /src | |
| parent | d3f0841cfdd229ff16b8a230117737a435fc7a56 (diff) | |
| download | sebastiano.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.md | 2 | ||||
| -rw-r--r-- | src/blog/2022-08-14-website/website.md | 6 | ||||
| -rw-r--r-- | src/blog/2022-11-23-git-host/git-host.md | 18 | ||||
| -rw-r--r-- | src/blog/2022-12-30-blog-ready/blog-ready.md | 5 | ||||
| -rw-r--r-- | src/blog/2023-07-11-feed/feed.md | 2 | ||||
| -rw-r--r-- | src/blog/2024-04-30-taming-cpp-motivation/taming-cpp-motivation.md | 12 | ||||
| -rw-r--r-- | src/blog/2024-12-03-2fa/2fa.md | 4 | ||||
| -rw-r--r-- | src/blog/2024-12-26-taming-cpp-raii/taming-cpp-raii.md | 6 | ||||
| -rw-r--r-- | src/blog/2025-01-21-taming-cpp-templates/taming-cpp-templates.md | 24 | ||||
| -rw-r--r-- | src/blog/2025-02-27-elliptic-curves-javascript/ecm.md | 6 | ||||
| -rw-r--r-- | src/blog/2025-06-06-webdev/webdev.md | 18 | ||||
| -rw-r--r-- | src/blog/2025-06-26-borrow-checker/borrow-checker.md | 5 | ||||
| -rw-r--r-- | src/blog/2025-11-29-aoc-download/aoc-download.md | 2 | ||||
| -rw-r--r-- | src/blog/2026-03-27-programming-20-years/20-years-of-programming.md | 5 | ||||
| -rw-r--r-- | src/blog/2026-08-15-dotfiles/dotfiles.md | 2 | ||||
| -rw-r--r-- | src/git/git.md | 64 | ||||
| -rw-r--r-- | src/speedcubing/coordinates/coordinates.md | 12 |
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 | ||
| 119 | And it works! You can now find | 119 | And 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) |
| 121 | among my other [scripts](https://git.tronto.net/scripts). | 121 | among 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. |
| 25 | All of this is available on | 25 | All 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 |
| 27 | explain every detail of these build scripts here. In particular, my script | 27 | explain every detail of these build scripts here. In particular, my script |
| 28 | also builds a [gemini](https://sebastiano.tronto.net/blog/2022-06-04-gemini/) | 28 | also builds a [gemini](https://sebastiano.tronto.net/blog/2022-06-04-gemini/) |
| 29 | version of my website, which I won't discuss here. | 29 | version 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 | ||
| 90 | The main working directory also contains the | 90 | The 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) |
| 92 | and | 92 | and |
| 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) |
| 94 | files. These files are not uploaded directly to my server - they are not | 94 | files. These files are not uploaded directly to my server - they are not |
| 95 | even well-formed html files! - but they are used to build all other | 95 | even well-formed html files! - but they are used to build all other |
| 96 | html pages. | 96 | html 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 | ||
| 4 | host my git pages. Instead, I use [cgit](https://git.zx2c4.com/cgit/about). | ||
| 5 | I have updated all the links in this page to point to a frozen copy of | ||
| 6 | my stagit-based git page before the switch. If you want to visit my new | ||
| 7 | git page, go to [git.tronto.net](https://git.tronto.net)** | ||
| 8 | |||
| 3 | This is a follow-up to my earlier blog entry | 9 | This 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 | |||
| 14 | you how I do it, in the usual minimalist and | 20 | you how I do it, in the usual minimalist and |
| 15 | not-using-what-I-do-not-understand style. | 21 | not-using-what-I-do-not-understand style. |
| 16 | 22 | ||
| 17 | You can see the final result on my [git pages](https://git.tronto.net). | 23 | You can see the final result on my [git pages](https://stagit.tronto.net). |
| 18 | The scripts and other files I use to set this up are accessible | 24 | The 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. | |||
| 54 | After generating the pages you can personalize them by copying your logo, | 60 | After 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 |
| 56 | use `stagit-index` to generate | 62 | use `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 |
| 58 | consists of html files, you can simply edit them to personalize your git pages | 64 | consists of html files, you can simply edit them to personalize your git pages |
| 59 | even further - and below you'll see some examples. | 65 | even 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 | ||
| 162 | If I were calling stagit by hand after each `git push`, I | 168 | If 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" | |||
| 280 | And that's it. Well, I also copy the style files and add a bottom bar, | 286 | And that's it. Well, I also copy the style files and add a bottom bar, |
| 281 | and change the title from a `<span class="desc">` to an `<h1>` element, | 287 | and change the title from a `<span class="desc">` to an `<h1>` element, |
| 282 | again using `ed`. If you want to see the details you can check them out | 288 | again 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 | ||
| 15 | Very easy: in my | 15 | Very 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) |
| 17 | script that I run to | 17 | script 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) | ||
| 20 | function that takes care of building the index page and RSS feed for my blog. | 19 | function that takes care of building the index page and RSS feed for my blog. |
| 21 | 20 | ||
| 22 | It is enough to add the following lines inside its main loop: | 21 | It 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. | |||
| 62 | In the first version I made, my feeds were separated in folders, | 62 | In the first version I made, my feeds were separated in folders, |
| 63 | one per file, and one could select multiple feeds or even entire | 63 | one per file, and one could select multiple feeds or even entire |
| 64 | folders via dmenu using | 64 | folders 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) |
| 66 | for file selection. | 66 | for file selection. |
| 67 | Once the session was terminated, all shown feeds were marked as | 67 | Once 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 | ||
| 41 | To sort a list of a hundred million integers, in C we can use `qsort()` | 41 | To sort a list of a hundred million integers, in C we can use `qsort()` |
| 42 | from `stdlib.h` (see | 42 | from `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 | ``` |
| 46 | qsort(a, ARRAYSIZE, sizeof(int), compar); | 46 | qsort(a, ARRAYSIZE, sizeof(int), compar); |
| @@ -55,7 +55,7 @@ int compar(const void *x, const void *y) { | |||
| 55 | ``` | 55 | ``` |
| 56 | 56 | ||
| 57 | In C++ we can use `sort()` from `algorithm` (see | 57 | In 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 | ``` |
| 61 | std::sort(a, a+ARRAYSIZE, | 61 | std::sort(a, a+ARRAYSIZE, |
| @@ -69,7 +69,7 @@ instead of a comparison function. | |||
| 69 | Modern C++ also offers parallelized | 69 | Modern C++ also offers parallelized |
| 70 | version of common algorithms as part of the standard library, so if | 70 | version of common algorithms as part of the standard library, so if |
| 71 | we want to completely humiliate poor C we can use this (see | 71 | we 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 | ``` |
| 75 | std::sort(std::execution::par, a, a+ARRAYSIZE, | 75 | std::sort(std::execution::par, a, a+ARRAYSIZE, |
| @@ -94,9 +94,9 @@ Even without parallelization, C++ is twice as fast as C! | |||
| 94 | You might think that C++ is somehow optimizing for integer | 94 | You might think that C++ is somehow optimizing for integer |
| 95 | sorting. But this is not the case, as demonstrated by a similar experiment | 95 | sorting. But this is not the case, as demonstrated by a similar experiment |
| 96 | with *pairs* of integers (see | 96 | with *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 |
| 101 | compiler does not come up with any ad-hoc optimization): | 101 | compiler 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" | |||
| 64 | And that's it. However, you should not write you secret key in plain text | 64 | And that's it. However, you should not write you secret key in plain text |
| 65 | like this: instead you should keep it encrypted and decrypt it just | 65 | like this: instead you should keep it encrypted and decrypt it just |
| 66 | when you need it to generate a code. I do this by using my simple | 66 | when 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) |
| 68 | script, which is based on my | 68 | script, which is based on my |
| 69 | [secret](https://git.tronto.net/scripts/file/secret.html) | 69 | [secret](https://git.tronto.net/scripts/tree/secret) |
| 70 | tool that encrypts and decrypts stuff using openssl and a master | 70 | tool that encrypts and decrypts stuff using openssl and a master |
| 71 | password - which is obviously | 71 | password - 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 | |||
| 61 | changing the definition of `BadType`. In fact, you can make this program | 61 | changing the definition of `BadType`. In fact, you can make this program |
| 62 | do pretty much everything you want by changing `BadType`'s *constructor* | 62 | do pretty much everything you want by changing `BadType`'s *constructor* |
| 63 | to suit your needs (see | 63 | to 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 | ``` |
| 67 | class BadType { | 67 | class BadType { |
| @@ -83,7 +83,7 @@ And it does not stop here either: whenever a variable | |||
| 83 | of a class type goes out of scope, the corresponding | 83 | of 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) |
| 85 | is called - see | 85 | is 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 | ||
| 256 | I made a | 256 | I 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) |
| 258 | of how all of these operations work, so you can see when exactly each | 258 | of how all of these operations work, so you can see when exactly each |
| 259 | of them is called. Do check it out if you are interested! | 259 | of 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), |
| 45 | and if you want you can also have a look at the final version | 45 | and if you want you can also have a look at the final version |
| 46 | of my tiny library | 46 | of 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 |
| 48 | this post I am going to use Clang as a compiler, because I find its | 48 | this post I am going to use Clang as a compiler, because I find its |
| 49 | error messages more readable most of the times. | 49 | error messages more readable most of the times. |
| 50 | 50 | ||
| @@ -69,7 +69,7 @@ cannot, for example, assign an `std::vector<int>` object to an | |||
| 69 | As an example, let's take a simple standard library class such as | 69 | As 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). |
| 71 | It could be implemented as follows (see | 71 | It 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 | ``` |
| 75 | template<typename S, typename T> | 75 | template<typename S, typename T> |
| @@ -151,7 +151,7 @@ which in case you don't know are just a simplified syntax for pointers.) | |||
| 151 | Let's take this simple example to show an important property of templates. | 151 | Let's take this simple example to show an important property of templates. |
| 152 | Let's say that, perhaps by mistake, we implemented the swap function | 152 | Let's say that, perhaps by mistake, we implemented the swap function |
| 153 | using different template types for `a` and `b` (see | 153 | using 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 | ``` |
| 157 | template<typename S, typename T> | 157 | template<typename S, typename T> |
| @@ -204,7 +204,7 @@ to make these error messages more meaningful - we'll see some examples below. | |||
| 204 | Objects, not just types, can be template parameters. A classic example | 204 | Objects, not just types, can be template parameters. A classic example |
| 205 | is [`std::array`](https://en.cppreference.com/w/cpp/container/array), | 205 | is [`std::array`](https://en.cppreference.com/w/cpp/container/array), |
| 206 | a fixed-size container where the capacity is fixed at compile time (see | 206 | a 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) |
| 208 | for an example). | 208 | for an example). |
| 209 | 209 | ||
| 210 | Non-type parameters can be constants of any *structural type* - see | 210 | Non-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 | |||
| 213 | with compile-time (i.e. `constexpr`) constants! | 213 | with compile-time (i.e. `constexpr`) constants! |
| 214 | 214 | ||
| 215 | With non-type parameter you can do pretty wild stuff, see for example | 215 | With 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 |
| 218 | be replaced by a constexpr function. | 218 | be replaced by a constexpr function. |
| 219 | 219 | ||
| 220 | Fun fact: if you use `auto`, you don't even have to specify a type for | 220 | Fun fact: if you use `auto`, you don't even have to specify a type for |
| 221 | a non-type parameter. For example, the following code works just fine (see | 221 | a 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 | |||
| 278 | where `N` is a fixed at compile-time. | 278 | where `N` is a fixed at compile-time. |
| 279 | 279 | ||
| 280 | We may start with something like this (see | 280 | We 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 | |||
| 355 | more meaningful when using templates; they were added in C++20. | 355 | more meaningful when using templates; they were added in C++20. |
| 356 | 356 | ||
| 357 | In our case, introducing our constraint is quite simple (see | 357 | In 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 | ``` |
| 361 | template<int N> | 361 | template<int N> |
| @@ -392,7 +392,7 @@ type of N. | |||
| 392 | 392 | ||
| 393 | In order to do so, I can use a non-type parameter declared `auto` and | 393 | In 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 | ``` |
| 398 | template<auto N> | 398 | template<auto N> |
| @@ -409,7 +409,7 @@ public: | |||
| 409 | 409 | ||
| 410 | And of course I should also templatize the `extended_gcd()` function - | 410 | And of course I should also templatize the `extended_gcd()` function - |
| 411 | you can see the full code in | 411 | you 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 | ||
| 414 | Now we can use any type as a "base" for our modular integer! Well, almost. | 414 | Now we can use any type as a "base" for our modular integer! Well, almost. |
| 415 | I mentioned above that the type we use must be *structural*, but that is | 415 | I 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 | |||
| 417 | allow for compile-time constants - so we need, at least, a `constexpr` | 417 | allow for compile-time constants - so we need, at least, a `constexpr` |
| 418 | constructor. I could not find a suitable library online, so I ended | 418 | constructor. I could not find a suitable library online, so I ended |
| 419 | up writing my own - see | 419 | up 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 | ||
| 422 | The code is simple and not very efficient, but this library is not meant | 422 | The code is simple and not very efficient, but this library is not meant |
| 423 | to be efficient. I am just using it for educational purposes. | 423 | to 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 | |||
| 477 | and name a custom set of requirements. This can be done with *concepts*. | 477 | and name a custom set of requirements. This can be done with *concepts*. |
| 478 | In our example, we can require that our type supports all the operations | 478 | In our example, we can require that our type supports all the operations |
| 479 | we need (see | 479 | we 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 | ``` |
| 483 | template<typename T> | 483 | template<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 | |||
| 40 | of its more advanced features. So I decided to rewrite the whole thing. | 40 | of its more advanced features. So I decided to rewrite the whole thing. |
| 41 | 41 | ||
| 42 | I had a clear idea of where I wanted to start: a small | 42 | I 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), |
| 44 | with compile-time fixed | 44 | with 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 |
| 46 | and heavy use of | 46 | and heavy use of |
| @@ -57,7 +57,7 @@ algorithm with very large numbers. Unfortunately, I did not take into | |||
| 57 | account that with my setup I needed a big integer class that supported | 57 | account 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` |
| 59 | constructors. I could not find any, so I decided to write | 59 | constructors. 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). |
| 61 | This was less successful: implementing an *efficient* big integer library | 61 | This was less successful: implementing an *efficient* big integer library |
| 62 | was not as straightforward as the modular integers library. I decided | 62 | was not as straightforward as the modular integers library. I decided |
| 63 | not to care about efficiency for the time being, but that would come | 63 | not 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 | |||
| 258 | my friend [Jared](https://guissmo.com) for telling me about | 258 | my friend [Jared](https://guissmo.com) for telling me about |
| 259 | it. Apart from this I don't have anything interesting to comment | 259 | it. Apart from this I don't have anything interesting to comment |
| 260 | about the CSS part of the slides. You can check the full code | 260 | about 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; |
| 262 | everything is in a single HTML file. | 262 | everything is in a single HTML file. |
| 263 | 263 | ||
| 264 | The result looks fine, but it does not work perfectly will every screen | 264 | The 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 | ||
| 21 | I have recently worked on making a web application out of | 21 | I 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). |
| 23 | This involved building a rather complex C code base (with | 23 | This involved building a rather complex C code base (with |
| 24 | multithreading, SIMD, callback functions and whatnot) to | 24 | multithreading, 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 | ||
| 78 | The examples used in this tutorial are all contained in a git repository, | 78 | The examples used in this tutorial are all contained in a git repository, |
| 79 | which you can find either on | 79 | which 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 | ||
| 83 | In order to follow them you are going to need: | 83 | In order to follow them you are going to need: |
| @@ -161,7 +161,7 @@ but in case you are interested you can check out | |||
| 161 | You can find the code for this example, as well as scripts to | 161 | You can find the code for this example, as well as scripts to |
| 162 | build it and run the web server, in the directory `00_hello_world` | 162 | build it and run the web server, in the directory `00_hello_world` |
| 163 | of the git repository | 163 | of 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 | ||
| 167 | Anyway, now we can build our C code to run in a web page. But this is | 167 | Anyway, 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 | ||
| 325 | The code for this example can be found in the `01_library` folder in | 325 | The code for this example can be found in the `01_library` folder in |
| 326 | the git repository | 326 | the 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 | ||
| 594 | You can find the full the code for this example the folder | 594 | You 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. | |||
| 740 | With your server correctly set up, you can enjoy a multithreaded program | 740 | With your server correctly set up, you can enjoy a multithreaded program |
| 741 | running in your browser! As always, you can check out this example from | 741 | running in your browser! As always, you can check out this example from |
| 742 | the `03_threads` folder of the git repository | 742 | the `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 | ||
| 861 | You can check out this example in the directory `04_no_block` in the | 861 | You can check out this example in the directory `04_no_block` in the |
| 862 | repository | 862 | repository |
| 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)). |
| 865 | Try also large numbers, in the range of millions or tens of millions, and | 865 | Try also large numbers, in the range of millions or tens of millions, and |
| 866 | compare it with the previous example - but not don't go too large, we | 866 | compare 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 | ||
| 950 | And as you can check by running the example `05_callback` from the repo | 950 | And 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)), |
| 953 | everything works as expected, both in Node.js and in a web page. To make | 953 | everything works as expected, both in Node.js and in a web page. To make |
| 954 | the examples more interesting, the web page one is not only not logging the | 954 | the 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, |
| 1121 | you can check out the complete code in the folder `06_storage` of | 1121 | you can check out the complete code in the folder `06_storage` of |
| 1122 | the repository | 1122 | the 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 | ||
| 1126 | If generating this data on the user's side seems redundant, you can | 1126 | If 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 | ||
| 3 | As I mentioned in my [last post](../2025-06-13-cargo-culture-shock), | 3 | As I mentioned in my [last post](../2025-06-13-cargo-culture-shock), |
| 4 | in the last couple of weeks I have been learning Rust. I have written | 4 | in 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 |
| 10 | of 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)) |
| 13 | and I am now playing around with some past | 12 | and 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! | |||
| 79 | Typing out the full command above may look cooler than downloading the file | 79 | Typing out the full command above may look cooler than downloading the file |
| 80 | by right-clicking "Save page as", but it is just as annoying. So obviously I | 80 | by right-clicking "Save page as", but it is just as annoying. So obviously I |
| 81 | saved that command to | 81 | saved that command to |
| 82 | [a script](https://git.tronto.net/scripts/file/aoc.html) | 82 | [a script](https://git.tronto.net/scripts/tree/aoc) |
| 83 | that also detects the correct file to download based on the current date | 83 | that 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 |
| 85 | opens up an editor and [Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)) | 85 | opens 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 | ||
| 61 | I managed to recover some of the | 61 | I managed to recover some of the |
| 62 | programs I wrote between 2006 and 2010 in [a git | 62 | programs I wrote between 2006 and 2010 in [a git |
| 63 | repository](https://git.tronto.net/ancient-projects/file/README.md.html). | 63 | repository](https://git.tronto.net/ancient-projects). |
| 64 | The most successful one is JBriscola, a single-player game of | 64 | The 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 |
| 66 | actually quite fun to play, and a few of my friends played it regularly | 66 | actually 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 | |||
| 153 | some code for work: my supervisor and a colleague of mine had | 153 | some code for work: my supervisor and a colleague of mine had |
| 154 | devised an algorithm to compute the degrees of certain [field | 154 | devised an algorithm to compute the degrees of certain [field |
| 155 | extensions](https://en.wikipedia.org/wiki/Field_extension), | 155 | extensions](https://en.wikipedia.org/wiki/Field_extension), |
| 156 | and I [implemented | 156 | and I [implemented it](https://git.tronto.net/kummer-degrees). |
| 157 | it](https://git.tronto.net/kummer-degrees/file/README.md.html). | ||
| 158 | 157 | ||
| 159 | I don't know if this is what got me back into coding for fun, or if it | 158 | I don't know if this is what got me back into coding for fun, or if it |
| 160 | was just a matter of time, but by the end of 2019 I was already thinking | 159 | was 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, | |||
| 71 | in `/etc`), and so on. | 71 | in `/etc`), and so on. |
| 72 | 72 | ||
| 73 | I tried to automate these steps as much as I could turned them into [a | 73 | I tried to automate these steps as much as I could turned them into [a |
| 74 | script](https://git.tronto.net/config/file/scripts/setup-config-alpine.html). I | 74 | script](https://git.tronto.net/config/tree/scripts/setup-config-alpine). I |
| 75 | won't explain everything it does here, you can just read through it if you want - | 75 | won't explain everything it does here, you can just read through it if you want - |
| 76 | it is pretty self-explanatory. This script also takes care of cloning the dotfiles | 76 | it is pretty self-explanatory. This script also takes care of cloning the dotfiles |
| 77 | repository I mentioned above, so when I set up a new system I just need to download | 77 | repository 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 | |||
| 3 | I started writing code in 2005, with a toy programming language called Dark | ||
| 4 | Basic first and with Java shortly after that. In the past I enjoyed learning | ||
| 5 | different programming languages (C++, J, Python...), but I have recently found | ||
| 6 | more pleasure in writing software in plain C. | ||
| 7 | |||
| 8 | You 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). | ||
| 11 | You can clone a repository with `git clone https://git.tronto.net/[NAME]`. | ||
| 12 | |||
| 13 | Here 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 | |||
| 37 | Here are some scripts I wrote and lecture notes for some courses | ||
| 38 | I 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 | ||
| 48 | For the implementation, see | 48 | For 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) |
| 50 | and | 50 | and |
| 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), |
| 52 | as well as the definition of | 52 | as well as the definition of coordinate in cubetypes.h. |
| 53 | [coordinate](https://git.tronto.net/nissy-nx/file/src/cubetypes.h.html#l181) | ||
| 54 | in cubetypes.h. | ||
| 55 | 53 | ||
| 56 | ## Coordinate types | 54 | ## Coordinate types |
| 57 | 55 | ||
| @@ -252,7 +250,7 @@ the outermost loop above: | |||
| 252 | ``` | 250 | ``` |
| 253 | 251 | ||
| 254 | The code for this can be found in | 252 | The 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). |
| 256 | The use of pthread made it more complicated, so it can be hard to follow | 254 | The use of pthread made it more complicated, so it can be hard to follow |
| 257 | without reading this page first. | 255 | without reading this page first. |
| 258 | 256 | ||
| @@ -272,7 +270,7 @@ instead of a full representation of the cube is computing the | |||
| 272 | inverse. While it is possible to compute the inverse somewhat efficiently | 270 | inverse. While it is possible to compute the inverse somewhat efficiently |
| 273 | from a representation of the cube made of a smart selection of coordinate | 271 | from a representation of the cube made of a smart selection of coordinate |
| 274 | values, it is not necessarily efficient. | 272 | values, it is not necessarily efficient. |
| 275 | See [fst.c](https://git.tronto.net/nissy-nx/file/src/fst.c.html#l113) | 273 | See [fst.c](https://git.tronto.net/nissy-nx/tree/src/fst.c) |
| 276 | for an implementation. | 274 | for an implementation. |
| 277 | 275 | ||
| 278 | For these reasons, I am not using the coordinate approach described here | 276 | For these reasons, I am not using the coordinate approach described here |
