mfashby.net

Website mfashby.net
git clone git://code.mfashby.net:/mfashby.net
Log | Files | Refs | Submodules | README

commit 82e7ac75954c973a5c59a02684788c0fb26e14dd
parent ff323f79e03174e4cdf2a709c095ff83e7ea3669
Author: Martin Ashby <martin@ashbysoft.com>
Date:   Sat, 21 Dec 2024 22:18:18 +0000

Bump zine 0.3.0 -> 0.8.0
Fix a lot of associated breakage
Fix broken rss.xml file as highlighted to me by Matthijs van der Wild
(thanks!)

Diffstat:
Rassets/static/css/fonts.css -> assets/css/fonts.css | 0
Rassets/static/css/style.css -> assets/css/style.css | 0
Mbuild.zig | 5+----
Mbuild.zig.zon | 4++--
Rcontent/about/cv.md -> content/about/cv.smd | 0
Rcontent/about/index.md -> content/about/index.smd | 0
Rcontent/index.md -> content/index.smd | 0
Rcontent/posts/2018-05-31-new-site.md -> content/posts/2018-05-31-new-site.smd | 0
Rcontent/posts/2018-06-01-mailu.md -> content/posts/2018-06-01-mailu.smd | 0
Rcontent/posts/2018-06-02-unicornpaint.md -> content/posts/2018-06-02-unicornpaint.smd | 0
Rcontent/posts/2021-09-17-restart.md -> content/posts/2021-09-17-restart.smd | 0
Rcontent/posts/2021-09-18-maddy.md -> content/posts/2021-09-18-maddy.smd | 0
Rcontent/posts/2021-09-19-longboard-setup.md -> content/posts/2021-09-19-longboard-setup.smd | 0
Rcontent/posts/2021-09-21-manjaro.md -> content/posts/2021-09-21-manjaro.smd | 0
Rcontent/posts/2021-09-26-pine64.md -> content/posts/2021-09-26-pine64.smd | 0
Rcontent/posts/2021-09-29-bike.md -> content/posts/2021-09-29-bike.smd | 0
Rcontent/posts/2021-09-29-recipe.md -> content/posts/2021-09-29-recipe.smd | 0
Rcontent/posts/2021-10-01-blog.md -> content/posts/2021-10-01-blog.smd | 0
Rcontent/posts/2021-10-06-clojure.md -> content/posts/2021-10-06-clojure.smd | 0
Rcontent/posts/2021-10-30-openbsd.md -> content/posts/2021-10-30-openbsd.smd | 0
Rcontent/posts/2021-11-05-postgres-query-rewrite.md -> content/posts/2021-11-05-postgres-query-rewrite.smd | 0
Dcontent/posts/2021-11-09-longboard-2.md | 16----------------
Acontent/posts/2021-11-09-longboard-2.smd | 17+++++++++++++++++
Rcontent/posts/2021-11-14-backups.md -> content/posts/2021-11-14-backups.smd | 0
Rcontent/posts/2021-12-04-contacts.md -> content/posts/2021-12-04-contacts.smd | 0
Rcontent/posts/2021-12-28-chat-server-protocol.md -> content/posts/2021-12-28-chat-server-protocol.smd | 0
Rcontent/posts/2022-02-11-philosophy-software-dev.md -> content/posts/2022-02-11-philosophy-software-dev.smd | 0
Rcontent/posts/2022-02-23-wordle.md -> content/posts/2022-02-23-wordle.smd | 0
Rcontent/posts/2022-03-19-wildcard.md -> content/posts/2022-03-19-wildcard.smd | 0
Rcontent/posts/2022-03-27-fossil.md -> content/posts/2022-03-27-fossil.smd | 0
Dcontent/posts/2022-04-30-longboard-3.md | 23-----------------------
Acontent/posts/2022-04-30-longboard-3.smd | 23+++++++++++++++++++++++
Dcontent/posts/2022-05-07-stolen-focus.md | 21---------------------
Acontent/posts/2022-05-07-stolen-focus.smd | 21+++++++++++++++++++++
Rcontent/posts/2022-06-09-rustlings.md -> content/posts/2022-06-09-rustlings.smd | 0
Rcontent/posts/2022-07-09-longboard-4.md -> content/posts/2022-07-09-longboard-4.smd | 0
Rcontent/posts/2022-07-30-fossil2.md -> content/posts/2022-07-30-fossil2.smd | 0
Rcontent/posts/2022-09-09-serverless.md -> content/posts/2022-09-09-serverless.smd | 0
Dcontent/posts/2022-09-25-back-to-git.md | 13-------------
Acontent/posts/2022-09-25-back-to-git.smd | 13+++++++++++++
Rcontent/posts/2022-10-07-blocky.md -> content/posts/2022-10-07-blocky.smd | 0
Rcontent/posts/2022-10-09-quine.md -> content/posts/2022-10-09-quine.smd | 0
Dcontent/posts/2022-10-09-skateboard-1.md | 20--------------------
Acontent/posts/2022-10-09-skateboard-1.smd | 22++++++++++++++++++++++
Dcontent/posts/2022-10-14-blogsite.md | 12------------
Acontent/posts/2022-10-14-blogsite.smd | 12++++++++++++
Rcontent/posts/2022-10-14-caddy.md -> content/posts/2022-10-14-caddy.smd | 0
Rcontent/posts/2022-10-15-blogsite2.md -> content/posts/2022-10-15-blogsite2.smd | 0
Rcontent/posts/2022-12-04-aoc.md -> content/posts/2022-12-04-aoc.smd | 0
Dcontent/posts/2022-12-20-longboard-5.md | 16----------------
Acontent/posts/2022-12-20-longboard-5.smd | 18++++++++++++++++++
Rcontent/posts/2022-12-26-spotifyd.md -> content/posts/2022-12-26-spotifyd.smd | 0
Rcontent/posts/2022-12-30-comments.md -> content/posts/2022-12-30-comments.smd | 0
Dcontent/posts/2022-12-31-cgit.md | 26--------------------------
Acontent/posts/2022-12-31-cgit.smd | 26++++++++++++++++++++++++++
Rcontent/posts/2023-01-31-oso.md -> content/posts/2023-01-31-oso.smd | 0
Dcontent/posts/2023-02-05-book-site-reliability-engineering.md | 20--------------------
Acontent/posts/2023-02-05-book-site-reliability-engineering.smd | 20++++++++++++++++++++
Rcontent/posts/2023-02-05-semantic-dissonance.md -> content/posts/2023-02-05-semantic-dissonance.smd | 0
Rcontent/posts/2023-04-09-designing-data-intensive-applications.md -> content/posts/2023-04-09-designing-data-intensive-applications.smd | 0
Rcontent/posts/2023-06-16-bike.md -> content/posts/2023-06-16-bike.smd | 0
Rcontent/posts/2023-08-11-4-eyes.md -> content/posts/2023-08-11-4-eyes.smd | 0
Dcontent/posts/2023-08-22-comments-2.md | 18------------------
Acontent/posts/2023-08-22-comments-2.smd | 18++++++++++++++++++
Dcontent/posts/2023-09-12-mcl.md | 20--------------------
Acontent/posts/2023-09-12-mcl.smd | 20++++++++++++++++++++
Rcontent/posts/2023-10-01-parable-of-the-sower.md -> content/posts/2023-10-01-parable-of-the-sower.smd | 0
Rcontent/posts/2023-10-07-zipdl.md -> content/posts/2023-10-07-zipdl.smd | 0
Rcontent/posts/2023-11-25-roc.md -> content/posts/2023-11-25-roc.smd | 0
Dcontent/posts/2023-11-26-skateboard-2.md | 16----------------
Acontent/posts/2023-11-26-skateboard-2.smd | 18++++++++++++++++++
Rcontent/posts/2023-12-01-aoc2023.md -> content/posts/2023-12-01-aoc2023.smd | 0
Rcontent/posts/2024-01-26-data-oriented-design.md -> content/posts/2024-01-26-data-oriented-design.smd | 0
Rcontent/posts/2024-01-26-dyn.md -> content/posts/2024-01-26-dyn.smd | 0
Rcontent/posts/2024-02-01-1brc.md -> content/posts/2024-02-01-1brc.smd | 0
Rcontent/posts/2024-02-05-phones.md -> content/posts/2024-02-05-phones.smd | 0
Rcontent/posts/2024-03-01-communication.md -> content/posts/2024-03-01-communication.smd | 0
Rcontent/posts/2024-03-03-catb.md -> content/posts/2024-03-03-catb.smd | 0
Rcontent/posts/2024-03-27-zine.md -> content/posts/2024-03-27-zine.smd | 0
Rcontent/posts/2024-03-31-stranger-times.md -> content/posts/2024-03-31-stranger-times.smd | 0
Rcontent/posts/2024-05-23-zigvm.md -> content/posts/2024-05-23-zigvm.smd | 0
Rcontent/posts/2024-08-09-bike.md -> content/posts/2024-08-09-bike.smd | 0
Rcontent/posts/2024-08-23-book-meltdown.md -> content/posts/2024-08-23-book-meltdown.smd | 0
Rcontent/posts/2024-08-24-wyag.md -> content/posts/2024-08-24-wyag.smd | 0
Rcontent/posts/2024-12-01-aoc2024.md -> content/posts/2024-12-01-aoc2024.smd | 0
Dcontent/posts/index.md | 10----------
Acontent/posts/index.smd | 12++++++++++++
Rcontent/projects/index.md -> content/projects/index.smd | 0
Rcontent/projects/zigvm.md -> content/projects/zigvm.smd | 0
Rcontent/projects/zipdl.md -> content/projects/zipdl.smd | 0
Mlayouts/list.shtml | 10+++++-----
Mlayouts/rss.xml | 14+++++++-------
Mlayouts/single.shtml | 8++++----
Mlayouts/templates/main.shtml | 8++++----
94 files changed, 263 insertions(+), 257 deletions(-)

diff --git a/assets/static/css/fonts.css b/assets/css/fonts.css diff --git a/assets/static/css/style.css b/assets/css/style.css diff --git a/build.zig b/build.zig @@ -6,10 +6,7 @@ pub fn build(b: *std.Build) !void { .layouts_dir_path = "layouts", .content_dir_path = "content", .assets_dir_path = "assets", - .static_assets = &.{ - "static/css/fonts.css", - "static/css/style.css", - }, + .static_assets = &.{}, .host_url = "https://mfashby.net", .title = "mfashby.net", }); diff --git a/build.zig.zon b/build.zig.zon @@ -3,8 +3,8 @@ .version = "0.0.0", .dependencies = .{ .zine = .{ - .url = "https://github.com/kristoff-it/zine/archive/refs/tags/v0.3.0.zip", - .hash = "122082799c345efd9630f2f8c55c8a4093125fd10f0f8a7ecd7d768c06c831955483", + .url = "https://github.com/kristoff-it/zine/archive/refs/tags/v0.8.0.zip", + .hash = "122049c99f3faaaff159cdccb3792d1518b10534e8225e26e5b24a369d325b0ebdc5", }, }, .paths = .{"."}, diff --git a/content/about/cv.md b/content/about/cv.smd diff --git a/content/about/index.md b/content/about/index.smd diff --git a/content/index.md b/content/index.smd diff --git a/content/posts/2018-05-31-new-site.md b/content/posts/2018-05-31-new-site.smd diff --git a/content/posts/2018-06-01-mailu.md b/content/posts/2018-06-01-mailu.smd diff --git a/content/posts/2018-06-02-unicornpaint.md b/content/posts/2018-06-02-unicornpaint.smd diff --git a/content/posts/2021-09-17-restart.md b/content/posts/2021-09-17-restart.smd diff --git a/content/posts/2021-09-18-maddy.md b/content/posts/2021-09-18-maddy.smd diff --git a/content/posts/2021-09-19-longboard-setup.md b/content/posts/2021-09-19-longboard-setup.smd diff --git a/content/posts/2021-09-21-manjaro.md b/content/posts/2021-09-21-manjaro.smd diff --git a/content/posts/2021-09-26-pine64.md b/content/posts/2021-09-26-pine64.smd diff --git a/content/posts/2021-09-29-bike.md b/content/posts/2021-09-29-bike.smd diff --git a/content/posts/2021-09-29-recipe.md b/content/posts/2021-09-29-recipe.smd diff --git a/content/posts/2021-10-01-blog.md b/content/posts/2021-10-01-blog.smd diff --git a/content/posts/2021-10-06-clojure.md b/content/posts/2021-10-06-clojure.smd diff --git a/content/posts/2021-10-30-openbsd.md b/content/posts/2021-10-30-openbsd.smd diff --git a/content/posts/2021-11-05-postgres-query-rewrite.md b/content/posts/2021-11-05-postgres-query-rewrite.smd diff --git a/content/posts/2021-11-09-longboard-2.md b/content/posts/2021-11-09-longboard-2.md @@ -1,16 +0,0 @@ ---- -.title = "Longboard 2", -.author = "Martin Ashby", -.date = @date("2021-11-09T21:56:41Z"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -Since my last post on longboarding, I've been learning to [push up slide](https://downhill254.com/how-to-push-up-slide-longboarding/) and [coleman slide](https://downhill254.com/coleman-slide-for-longboard-downhill-pendulum-slide/). These are essential skills to control your speed so you can safely tackle steeper and longer hills. - -I've also made a couple of hardware changes -- switched to [powell peralta snakes](https://newtons-shred.co.uk/shop/skateboards/wheels/cruiser-filmer/powell-peralta-snakes-red-66mm-75a/), following many many reviews on [reddit](https://teddit.net/r/longboarding) -- added [freebrake brake soles](https://newtons-shred.co.uk/shop/safety/other/footbraking-sole/freebrake-longboard-skateboard-footbraking-sole-4mm-pair/) to my shoes. I had nearly worn through the heel and toe on my right foot from frequent braking. These appear to be up-cycled car tyres! - -<iframe title="10-11-21-longboard-slides" width="560" height="315" src="https://tube.spdns.org/videos/embed/732ac4eb-a149-4e47-abd2-dc4538a7e0e8" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> - diff --git a/content/posts/2021-11-09-longboard-2.smd b/content/posts/2021-11-09-longboard-2.smd @@ -0,0 +1,17 @@ +--- +.title = "Longboard 2", +.author = "Martin Ashby", +.date = @date("2021-11-09T21:56:41Z"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +Since my last post on longboarding, I've been learning to [push up slide](https://downhill254.com/how-to-push-up-slide-longboarding/) and [coleman slide](https://downhill254.com/coleman-slide-for-longboard-downhill-pendulum-slide/). These are essential skills to control your speed so you can safely tackle steeper and longer hills. + +I've also made a couple of hardware changes +- switched to [powell peralta snakes](https://newtons-shred.co.uk/shop/skateboards/wheels/cruiser-filmer/powell-peralta-snakes-red-66mm-75a/), following many many reviews on [reddit](https://teddit.net/r/longboarding) +- added [freebrake brake soles](https://newtons-shred.co.uk/shop/safety/other/footbraking-sole/freebrake-longboard-skateboard-footbraking-sole-4mm-pair/) to my shoes. I had nearly worn through the heel and toe on my right foot from frequent braking. These appear to be up-cycled car tyres! + +```=html +<iframe title="10-11-21-longboard-slides" width="560" height="315" src="https://tube.spdns.org/videos/embed/732ac4eb-a149-4e47-abd2-dc4538a7e0e8" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> +``` diff --git a/content/posts/2021-11-14-backups.md b/content/posts/2021-11-14-backups.smd diff --git a/content/posts/2021-12-04-contacts.md b/content/posts/2021-12-04-contacts.smd diff --git a/content/posts/2021-12-28-chat-server-protocol.md b/content/posts/2021-12-28-chat-server-protocol.smd diff --git a/content/posts/2022-02-11-philosophy-software-dev.md b/content/posts/2022-02-11-philosophy-software-dev.smd diff --git a/content/posts/2022-02-23-wordle.md b/content/posts/2022-02-23-wordle.smd diff --git a/content/posts/2022-03-19-wildcard.md b/content/posts/2022-03-19-wildcard.smd diff --git a/content/posts/2022-03-27-fossil.md b/content/posts/2022-03-27-fossil.smd diff --git a/content/posts/2022-04-30-longboard-3.md b/content/posts/2022-04-30-longboard-3.md @@ -1,23 +0,0 @@ ---- -.title = "Longboard 3", -.author = "Martin Ashby", -.date = @date("2022-04-30T19:49:39+01:00"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- -Since my [last post](/2021-11-09-longboard-2/) on longboarding, I've become a lot more comfortable with push-up and coleman slides, and now I aim to learn [toeside pendulum slide](https://youtu.be/a5B_XaubQNE). I have had limited success so far, and one bad high-side attempting it (fall down-hill direction, as opposed to low-side falling in the uphill direction). Luckily my helmet did it's job, I'll be trying again in the future. - -I have also bought a second board, an [original apex diamond drop 37"](https://originalskateboards.com/longboards/apex-37-diamonddrop-longboard/), obtained second hand from facebook marketplace. It differs from the Lush Freebyrd in a couple of ways: -* It has usable kick-tails, which opens up some freestyle skating opportunities (manuals, pivots, ollies, etc) -* As a result, it's a drop-deck rather than a drop-through, to retain the low & stable ride height and remain strong enough for freestyle. - -[Here](https://youtu.be/oVB5Karx-90) is a review from Axel Serrat (weirdly, NSFW). It should be noted this guy can probably skate a plank of wood with rocks on the bottom better than I can skate this nice board. - -This particular board has caliber II (reverse king pin) trucks. I've swapped the 90a bushings for very soft 85/87a since I don't weigh very much. This is really carvy and I quite like how it rides as a result. I've also swapped my powell-peralta snakes to this board and returned the cultrons to my freebyrd. I really didn't like the [rad glides](https://tgmskateboards.com/rad-wheels-glide-70mm-82a/) which the previous owner had fitted, they seemed very hard for my terrain. I might give them another go as they should be very slidey, but for now they are shelved. - -Much more importantly, I've found a fellow longboarder to skate with, and a couple of new spots nearby. Videos to follow! - - -![Apex Diamond Drop Top](apex_1.jpg) -![Apex Diamond Drop Bottom](apex_2.jpg) - diff --git a/content/posts/2022-04-30-longboard-3.smd b/content/posts/2022-04-30-longboard-3.smd @@ -0,0 +1,23 @@ +--- +.title = "Longboard 3", +.author = "Martin Ashby", +.date = @date("2022-04-30T19:49:39+01:00"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- +Since my [last post](/posts/2021-11-09-longboard-2) on longboarding, I've become a lot more comfortable with push-up and coleman slides, and now I aim to learn [toeside pendulum slide](https://youtu.be/a5B_XaubQNE). I have had limited success so far, and one bad high-side attempting it (fall down-hill direction, as opposed to low-side falling in the uphill direction). Luckily my helmet did it's job, I'll be trying again in the future. + +I have also bought a second board, an [original apex diamond drop 37"](https://originalskateboards.com/longboards/apex-37-diamonddrop-longboard/), obtained second hand from facebook marketplace. It differs from the Lush Freebyrd in a couple of ways: +* It has usable kick-tails, which opens up some freestyle skating opportunities (manuals, pivots, ollies, etc) +* As a result, it's a drop-deck rather than a drop-through, to retain the low & stable ride height and remain strong enough for freestyle. + +[Here](https://youtu.be/oVB5Karx-90) is a review from Axel Serrat (weirdly, NSFW). It should be noted this guy can probably skate a plank of wood with rocks on the bottom better than I can skate this nice board. + +This particular board has caliber II (reverse king pin) trucks. I've swapped the 90a bushings for very soft 85/87a since I don't weigh very much. This is really carvy and I quite like how it rides as a result. I've also swapped my powell-peralta snakes to this board and returned the cultrons to my freebyrd. I really didn't like the [rad glides](https://tgmskateboards.com/rad-wheels-glide-70mm-82a/) which the previous owner had fitted, they seemed very hard for my terrain. I might give them another go as they should be very slidey, but for now they are shelved. + +Much more importantly, I've found a fellow longboarder to skate with, and a couple of new spots nearby. Videos to follow! + + +![Apex Diamond Drop Top](apex_1.jpg) +![Apex Diamond Drop Bottom](apex_2.jpg) + diff --git a/content/posts/2022-05-07-stolen-focus.md b/content/posts/2022-05-07-stolen-focus.md @@ -1,21 +0,0 @@ ---- -.title = "Book - Stolen Focus", -.author = "Martin Ashby", -.date = @date("2022-05-07T15:18:58+01:00"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -I've recently finished reading [Stolen Focus](stolenfocusbook.com/) by Johann Hari. - -In it, the author presents an argument that online social media (i.e. facebook, instagram, etc) is currently harmful, and this is because of misaligned incentives. The companies producing this software are funded by advertisers, whose adverts are more effective if they spend more time in front of user's eyes. This results in platforms optimizing for 'engagement' among users; i.e. more time spent on the site. Human negative reactions are stronger, and causing these emotions keeps users on the site for longer than positive ones. Therefore to increase screen time, platforms end up presenting stories that enrage the user. This has a variety of negative impacts including; polarizing the user's beliefs, adding stress and alienating other people. - -I hadn't come across this particular argument before, it seems fairly compelling. It rests on a couple of premises, for which Johann provides some evidence; -* Social media companies are indeed optimizing for 'screen time' engagement in order to maximize profit. -* Optimizing for increased screen time does indeed result in the negative effects (wasted time, stress, polarization) - -Johann suggests banning this business model. Only when the companies' incentives are aligned with the users of their product can they instead optimize their product in a way that improves the users' quality of life. Two suggestions for changing the business model are proposed; 1. charging users for the product, 2. acquisition by government. Neither suggestion is without it's own significant problems. - -The book also touches on many other subjects, in fact the author lists around a dozen reasons why our attention span today is more limited than in the past. These include increased air pollution and decreased childhood freedom for example. He also makes the critical point that a failing attention span is not only a personal problem; while there is personal variation, the wider environment has a huge impact. This means that personal efforts to improve the situation are more likely to be stymied. This is similar to some other problems like obesity; where e.g. the environment is full of cheap, sugary, processed, high-fat foods, and yet people feel solely responsible when they gain excess weight, or fail to lose it. - -Personally, the book has made me more conscious of my personal habits regarding my phone & social media usage. It has also made me more conscious of my work as a software enginneer; that misaligned incentives can have very negative consequences for users of your software. You should find a business model that somehow translates increased quality of life for users into profit. It also highlighted the importance of collective action for improving society; we should remember that our high quality of life right now is a direct result of many collective actions in the past. diff --git a/content/posts/2022-05-07-stolen-focus.smd b/content/posts/2022-05-07-stolen-focus.smd @@ -0,0 +1,21 @@ +--- +.title = "Book - Stolen Focus", +.author = "Martin Ashby", +.date = @date("2022-05-07T15:18:58+01:00"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +I've recently finished reading [Stolen Focus](https://stolenfocusbook.com/) by Johann Hari. + +In it, the author presents an argument that online social media (i.e. facebook, instagram, etc) is currently harmful, and this is because of misaligned incentives. The companies producing this software are funded by advertisers, whose adverts are more effective if they spend more time in front of user's eyes. This results in platforms optimizing for 'engagement' among users; i.e. more time spent on the site. Human negative reactions are stronger, and causing these emotions keeps users on the site for longer than positive ones. Therefore to increase screen time, platforms end up presenting stories that enrage the user. This has a variety of negative impacts including; polarizing the user's beliefs, adding stress and alienating other people. + +I hadn't come across this particular argument before, it seems fairly compelling. It rests on a couple of premises, for which Johann provides some evidence; +* Social media companies are indeed optimizing for 'screen time' engagement in order to maximize profit. +* Optimizing for increased screen time does indeed result in the negative effects (wasted time, stress, polarization) + +Johann suggests banning this business model. Only when the companies' incentives are aligned with the users of their product can they instead optimize their product in a way that improves the users' quality of life. Two suggestions for changing the business model are proposed; 1. charging users for the product, 2. acquisition by government. Neither suggestion is without it's own significant problems. + +The book also touches on many other subjects, in fact the author lists around a dozen reasons why our attention span today is more limited than in the past. These include increased air pollution and decreased childhood freedom for example. He also makes the critical point that a failing attention span is not only a personal problem; while there is personal variation, the wider environment has a huge impact. This means that personal efforts to improve the situation are more likely to be stymied. This is similar to some other problems like obesity; where e.g. the environment is full of cheap, sugary, processed, high-fat foods, and yet people feel solely responsible when they gain excess weight, or fail to lose it. + +Personally, the book has made me more conscious of my personal habits regarding my phone & social media usage. It has also made me more conscious of my work as a software enginneer; that misaligned incentives can have very negative consequences for users of your software. You should find a business model that somehow translates increased quality of life for users into profit. It also highlighted the importance of collective action for improving society; we should remember that our high quality of life right now is a direct result of many collective actions in the past. diff --git a/content/posts/2022-06-09-rustlings.md b/content/posts/2022-06-09-rustlings.smd diff --git a/content/posts/2022-07-09-longboard-4.md b/content/posts/2022-07-09-longboard-4.smd diff --git a/content/posts/2022-07-30-fossil2.md b/content/posts/2022-07-30-fossil2.smd diff --git a/content/posts/2022-09-09-serverless.md b/content/posts/2022-09-09-serverless.smd diff --git a/content/posts/2022-09-25-back-to-git.md b/content/posts/2022-09-25-back-to-git.md @@ -1,13 +0,0 @@ ---- -.title = "Back to Git", -.author = "Martin Ashby", -.date = @date("2022-09-25T21:09:31+01:00"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -I moved back to git from fossil SCM, after [previously](posts/2022-03-27-fossil/) migrating the other way. - -I use git for work and so couldn't forget how to use git and go all-in on fossil, and remembering two sets of commands proved somewhat painful and I wasn't seeing the benefit of built-in issue tracking or anything like that. Now I run [gitea](https://gitea.io/) git server instead. - -Weirdly I don't have too much trouble remembering two programming languages, but I think that's slightly different somehow. diff --git a/content/posts/2022-09-25-back-to-git.smd b/content/posts/2022-09-25-back-to-git.smd @@ -0,0 +1,13 @@ +--- +.title = "Back to Git", +.author = "Martin Ashby", +.date = @date("2022-09-25T21:09:31+01:00"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +I moved back to git from fossil SCM, after [previously](/posts/2022-03-27-fossil/) migrating the other way. + +I use git for work and so couldn't forget how to use git and go all-in on fossil, and remembering two sets of commands proved somewhat painful and I wasn't seeing the benefit of built-in issue tracking or anything like that. Now I run [gitea](https://gitea.io/) git server instead. + +Weirdly I don't have too much trouble remembering two programming languages, but I think that's slightly different somehow. diff --git a/content/posts/2022-10-07-blocky.md b/content/posts/2022-10-07-blocky.smd diff --git a/content/posts/2022-10-09-quine.md b/content/posts/2022-10-09-quine.smd diff --git a/content/posts/2022-10-09-skateboard-1.md b/content/posts/2022-10-09-skateboard-1.md @@ -1,19 +0,0 @@ ---- -.title = "Skateboard 1", -.author = "Martin Ashby", -.date = @date("2022-10-09T13:21:00+01:00"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -Following my [previous post](posts/2022-07-09-longboard-4/) on longboarding, I took a few more trips to the skate park. I eventually decided to buy a regular (or 'popsicle') board as they really open up a lot more of the park, and tricks. - -I bought second hand from a local skater, and I'm quite pleased that I got a board in good condition with nice trucks. However, I'm used to a longboard and I really didn't like the typical skateboard wheels (52mm, 82a hardness) as I found them noisy and slow. I added some risers and fitted 60mm, 75a OJ wheels from a local skate shop. These are really great for cruising. They are not quite so great for tricks, however the difference to me isn't so noticeable since I'm used to large longboard wheels. - -I went through several sets of bushings until finally settling on [bones hardcore medium](https://bones.com/bones-wheels-bushing-medium-white-pack). I tried independent 'soft' and 'super-soft', but the 'soft' ones I found ironically hard, and super-soft felt 'mushy' and didn't return to centre very well. I much prefer the springy-ness of the bones bushings, and the medium hardness lets me avoid wheel-bite while still being easy enough to turn and carve. - -Finally; I bought a skate-tool. Previously I'd been carrying a socket-wrench around in my bag, and it wasn't super convenient. The skate tool fits in my pocket so I can pack lighter :) - -![Skateboard](skateboard.jpg) - -<iframe title="drop-in" width="560" height="315" src="https://tube.spdns.org/videos/embed/637ab1fd-2ad4-4a88-9010-a0a04bd4a33a" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> -\ No newline at end of file diff --git a/content/posts/2022-10-09-skateboard-1.smd b/content/posts/2022-10-09-skateboard-1.smd @@ -0,0 +1,21 @@ +--- +.title = "Skateboard 1", +.author = "Martin Ashby", +.date = @date("2022-10-09T13:21:00+01:00"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +Following my [previous post](/posts/2022-07-09-longboard-4/) on longboarding, I took a few more trips to the skate park. I eventually decided to buy a regular (or 'popsicle') board as they really open up a lot more of the park, and tricks. + +I bought second hand from a local skater, and I'm quite pleased that I got a board in good condition with nice trucks. However, I'm used to a longboard and I really didn't like the typical skateboard wheels (52mm, 82a hardness) as I found them noisy and slow. I added some risers and fitted 60mm, 75a OJ wheels from a local skate shop. These are really great for cruising. They are not quite so great for tricks, however the difference to me isn't so noticeable since I'm used to large longboard wheels. + +I went through several sets of bushings until finally settling on [bones hardcore medium](https://bones.com/bones-wheels-bushing-medium-white-pack). I tried independent 'soft' and 'super-soft', but the 'soft' ones I found ironically hard, and super-soft felt 'mushy' and didn't return to centre very well. I much prefer the springy-ness of the bones bushings, and the medium hardness lets me avoid wheel-bite while still being easy enough to turn and carve. + +Finally; I bought a skate-tool. Previously I'd been carrying a socket-wrench around in my bag, and it wasn't super convenient. The skate tool fits in my pocket so I can pack lighter :) + +![Skateboard](skateboard.jpg) + +```=html +<iframe title="drop-in" width="560" height="315" src="https://tube.spdns.org/videos/embed/637ab1fd-2ad4-4a88-9010-a0a04bd4a33a" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> +``` +\ No newline at end of file diff --git a/content/posts/2022-10-14-blogsite.md b/content/posts/2022-10-14-blogsite.md @@ -1,12 +0,0 @@ ---- -.title = "Blogsite", -.author = "Martin Ashby", -.date = @date("2022-10-14T22:59:01+01:00"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -I was thinking about this blog and how it's set up. I [covered](posts/2021-10-01-blog/) the setup in a previous post, but it's quite simple: the site is generated from markdown files with [hugo](https://gohugo.io/) and published to git. The server pulls from git on a schedule, rebuilds it and copies it to the web server directory. - -I made a [little experiment](https://blogsite.mfashby.net/1-hello-new-blog) with a different approach [source](https://code.mfashby.net/martin/blogsite). Instead of statically generating the site, it's a Single Page Application which does the templating and routing on the client side. In theory this has a couple of upsides: if you visit multiple pages fewer bytes are transferred overall, and it totally removes the static site generation step; the folder is all just static content provided to the web server. This approach likely has some downsides too, like; requires javascript enabled client, no RSS feed or sitemap generation, and my implementation at least is relying on some fairly modern JS features like async/await and fetch API. - diff --git a/content/posts/2022-10-14-blogsite.smd b/content/posts/2022-10-14-blogsite.smd @@ -0,0 +1,12 @@ +--- +.title = "Blogsite", +.author = "Martin Ashby", +.date = @date("2022-10-14T22:59:01+01:00"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +I was thinking about this blog and how it's set up. I [covered](/posts/2021-10-01-blog/) the setup in a previous post, but it's quite simple: the site is generated from markdown files with [hugo](https://gohugo.io/) and published to git. The server pulls from git on a schedule, rebuilds it and copies it to the web server directory. + +I made a [little experiment](https://blogsite.mfashby.net/1-hello-new-blog) with a different approach [source](https://code.mfashby.net/martin/blogsite). Instead of statically generating the site, it's a Single Page Application which does the templating and routing on the client side. In theory this has a couple of upsides: if you visit multiple pages fewer bytes are transferred overall, and it totally removes the static site generation step; the folder is all just static content provided to the web server. This approach likely has some downsides too, like; requires javascript enabled client, no RSS feed or sitemap generation, and my implementation at least is relying on some fairly modern JS features like async/await and fetch API. + diff --git a/content/posts/2022-10-14-caddy.md b/content/posts/2022-10-14-caddy.smd diff --git a/content/posts/2022-10-15-blogsite2.md b/content/posts/2022-10-15-blogsite2.smd diff --git a/content/posts/2022-12-04-aoc.md b/content/posts/2022-12-04-aoc.smd diff --git a/content/posts/2022-12-20-longboard-5.md b/content/posts/2022-12-20-longboard-5.md @@ -1,15 +0,0 @@ ---- -.title = "Longboard 5", -.author = "Martin Ashby", -.date = @date("2022-12-20T14:16:49Z"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -I've been stuck inside with the cold weather recently. However, I've also discovered [Ampskate](https://www.ampskate.com/tricks) which is a great little guide for learning longboard dance and freestyle. - -Here's a little clip: - -<iframe title="skate4" width="560" height="315" src="https://tube.spdns.org/videos/embed/caffae4c-3646-401b-a5f8-73915baafea9" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> - -Which is my attempt at a [cross-step](https://www.ampskate.com/tricks/cross-step). My goal is to learn the [ghostride kickflip](https://www.ampskate.com/tricks/ghostride-kickflip). -\ No newline at end of file diff --git a/content/posts/2022-12-20-longboard-5.smd b/content/posts/2022-12-20-longboard-5.smd @@ -0,0 +1,17 @@ +--- +.title = "Longboard 5", +.author = "Martin Ashby", +.date = @date("2022-12-20T14:16:49Z"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +I've been stuck inside with the cold weather recently. However, I've also discovered [Ampskate](https://www.ampskate.com/tricks) which is a great little guide for learning longboard dance and freestyle. + +Here's a little clip: + +```=html +<iframe title="skate4" width="560" height="315" src="https://tube.spdns.org/videos/embed/caffae4c-3646-401b-a5f8-73915baafea9" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> +``` + +Which is my attempt at a [cross-step](https://www.ampskate.com/tricks/cross-step). My goal is to learn the [ghostride kickflip](https://www.ampskate.com/tricks/ghostride-kickflip). +\ No newline at end of file diff --git a/content/posts/2022-12-26-spotifyd.md b/content/posts/2022-12-26-spotifyd.smd diff --git a/content/posts/2022-12-30-comments.md b/content/posts/2022-12-30-comments.smd diff --git a/content/posts/2022-12-31-cgit.md b/content/posts/2022-12-31-cgit.md @@ -1,25 +0,0 @@ ---- -.title = "Cgit", -.author = "Martin Ashby", -.date = @date("2022-12-31T23:39:38Z"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -In a [previous post](posts/2022-09-25-back-to-git/) I switched back from fossil to git. I found [gitea](https://gitea.io/) to be a pretty good server. However, it has many features I do not use, and it takes a minimum of 15% of the RAM on my Raspberry Pi home server! I found a simpler setup. - -I have switched to plain git server accessed with SSH, which [git-scm](https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server) documents how to set up. I'd still like a web UI to allow others to see and download my code. [Cgit](https://wiki.archlinux.org/title/Cgit) is a simple web user interface for multiple git repositories. It runs as a CGI application, and I use caddy web server, so thanks to [Luke Hsiao's blog post](https://luke.hsiao.dev/blog/cgit-caddy-gitolite/) and [Andras Schneider's Caddy CGI plugin](https://github.com/aksdb/caddy-cgi) I managed to get it running fairly easily. - -One hitch was adding git LFS support. I use git LFS for some media files on my blog. Gitea includes git LFS support out of the box, but a plain git server does not. I am using the standalone [reference server](https://github.com/git-lfs/lfs-test-server). This has a disclaimer that it's not 'production ready', but since I'm running this behind tailscale I'm reasonably happy it's ok. - -A second hitch was figuring out how to redirect from old repo locations to new ones, so I don't have to update every link in my blog. New repo locations simply don't have the `/martin` prefix. This seemed difficult in caddy, until I found [this post](https://caddy.community/t/modify-uri-and-then-redirect/16686/4) and I wound up with the following configuration, which seems to work well: -``` - ... - handle /martin* { - route { - uri strip_prefix /martin - redir https://{host}{uri} - } - } - ... -``` -\ No newline at end of file diff --git a/content/posts/2022-12-31-cgit.smd b/content/posts/2022-12-31-cgit.smd @@ -0,0 +1,25 @@ +--- +.title = "Cgit", +.author = "Martin Ashby", +.date = @date("2022-12-31T23:39:38Z"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +In a [previous post](/posts/2022-09-25-back-to-git/) I switched back from fossil to git. I found [gitea](https://gitea.io/) to be a pretty good server. However, it has many features I do not use, and it takes a minimum of 15% of the RAM on my Raspberry Pi home server! I found a simpler setup. + +I have switched to plain git server accessed with SSH, which [git-scm](https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server) documents how to set up. I'd still like a web UI to allow others to see and download my code. [Cgit](https://wiki.archlinux.org/title/Cgit) is a simple web user interface for multiple git repositories. It runs as a CGI application, and I use caddy web server, so thanks to [Luke Hsiao's blog post](https://luke.hsiao.dev/blog/cgit-caddy-gitolite/) and [Andras Schneider's Caddy CGI plugin](https://github.com/aksdb/caddy-cgi) I managed to get it running fairly easily. + +One hitch was adding git LFS support. I use git LFS for some media files on my blog. Gitea includes git LFS support out of the box, but a plain git server does not. I am using the standalone [reference server](https://github.com/git-lfs/lfs-test-server). This has a disclaimer that it's not 'production ready', but since I'm running this behind tailscale I'm reasonably happy it's ok. + +A second hitch was figuring out how to redirect from old repo locations to new ones, so I don't have to update every link in my blog. New repo locations simply don't have the `/martin` prefix. This seemed difficult in caddy, until I found [this post](https://caddy.community/t/modify-uri-and-then-redirect/16686/4) and I wound up with the following configuration, which seems to work well: +``` + ... + handle /martin* { + route { + uri strip_prefix /martin + redir https://{host}{uri} + } + } + ... +``` +\ No newline at end of file diff --git a/content/posts/2023-01-31-oso.md b/content/posts/2023-01-31-oso.smd diff --git a/content/posts/2023-02-05-book-site-reliability-engineering.md b/content/posts/2023-02-05-book-site-reliability-engineering.md @@ -1,19 +0,0 @@ ---- -.title = "Book - Site Reliability Engineering", -.author = "Martin Ashby", -.date = @date("2023-02-05T15:53:43Z"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -I've read [Site Reliability Engineering](https://sre.google/sre-book/table-of-contents/) (SRE) from Google/O'Reilly. It's an interesting insight into how Google scales their operations work. - -A core theme of the book is ensuring that 'operations' work i.e. managing servers, computers, networks, hardware and applications scales [sub-linearly](https://stackoverflow.com/questions/32311924/what-are-sublinear-algorithms) with both the number of users of a service, and the number of services the company provides. The book is really a series of shorter articles about how Google accomplishes this through technology, business processes and personal interactions. - -A lot of the guidance in the book seems more applicable at large scales (100s of engineers) rather than smaller organizations. For example; configuring extensive monitoring to check services are meeting their 'service level objectives' (SLOs) and alert when they're not can be lots of work, especially if the objectives are not extremely well defined to begin with. It can be hard to justify this work alongside delivering the actual minimum product which will satisfy the customer demand. That's not to say monitoring should be ignored completely until later, but getting monitoring done 'right' to the standard shown in the book is likely out of reach for organizations without dedicated SRE team. - -Some advice seems useful regardless of scale, for instance holding meaningful post-mortems on incidents, and having at least some basic incident response plans. - -The real take-away messsage for me is: outsourcing as much as possible. When SRE isn't your core capability, use hosted or fully managed services wherever possible and leave the operations work to companies that specialize in it. This might be public cloud services like Amazon Web Services or Google Cloud Platform, however in my experience those platforms still end up requiring dedicated teams to manage them; for example managing Identity & Access Management (IAM) can get complex very quickly. Using 'infrastructure as code' (IAC) tools like terraform can help to keep the complexity under control, but these tools bring their own cognitive overhead as well. - -Services which offer to handle _all_ the infrastructure concerns, like [darklang](https://darklang.com) or [shuttle.rs](https;//shuttle.rs), or [webapp.io](https://webapp.io/) are very attractive for this reason. See my previous post on ['serverless'](https://mfashby.net/posts/2022-09-09-serverless/) for some thoughts about those! If I was to have a great idea for a web-based SAAS and I built it, I would likely choose to use one of these services; probably shuttle.rs. -\ No newline at end of file diff --git a/content/posts/2023-02-05-book-site-reliability-engineering.smd b/content/posts/2023-02-05-book-site-reliability-engineering.smd @@ -0,0 +1,19 @@ +--- +.title = "Book - Site Reliability Engineering", +.author = "Martin Ashby", +.date = @date("2023-02-05T15:53:43Z"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +I've read [Site Reliability Engineering](https://sre.google/sre-book/table-of-contents/) (SRE) from Google/O'Reilly. It's an interesting insight into how Google scales their operations work. + +A core theme of the book is ensuring that 'operations' work i.e. managing servers, computers, networks, hardware and applications scales [sub-linearly](https://stackoverflow.com/questions/32311924/what-are-sublinear-algorithms) with both the number of users of a service, and the number of services the company provides. The book is really a series of shorter articles about how Google accomplishes this through technology, business processes and personal interactions. + +A lot of the guidance in the book seems more applicable at large scales (100s of engineers) rather than smaller organizations. For example; configuring extensive monitoring to check services are meeting their 'service level objectives' (SLOs) and alert when they're not can be lots of work, especially if the objectives are not extremely well defined to begin with. It can be hard to justify this work alongside delivering the actual minimum product which will satisfy the customer demand. That's not to say monitoring should be ignored completely until later, but getting monitoring done 'right' to the standard shown in the book is likely out of reach for organizations without dedicated SRE team. + +Some advice seems useful regardless of scale, for instance holding meaningful post-mortems on incidents, and having at least some basic incident response plans. + +The real take-away messsage for me is: outsourcing as much as possible. When SRE isn't your core capability, use hosted or fully managed services wherever possible and leave the operations work to companies that specialize in it. This might be public cloud services like Amazon Web Services or Google Cloud Platform, however in my experience those platforms still end up requiring dedicated teams to manage them; for example managing Identity & Access Management (IAM) can get complex very quickly. Using 'infrastructure as code' (IAC) tools like terraform can help to keep the complexity under control, but these tools bring their own cognitive overhead as well. + +Services which offer to handle _all_ the infrastructure concerns, like [darklang](https://darklang.com) or [shuttle.rs](https://shuttle.rs), or [webapp.io](https://webapp.io/) are very attractive for this reason. See my previous post on ['serverless'](https://mfashby.net/posts/2022-09-09-serverless/) for some thoughts about those! If I was to have a great idea for a web-based SAAS and I built it, I would likely choose to use one of these services; probably shuttle.rs. +\ No newline at end of file diff --git a/content/posts/2023-02-05-semantic-dissonance.md b/content/posts/2023-02-05-semantic-dissonance.smd diff --git a/content/posts/2023-04-09-designing-data-intensive-applications.md b/content/posts/2023-04-09-designing-data-intensive-applications.smd diff --git a/content/posts/2023-06-16-bike.md b/content/posts/2023-06-16-bike.smd diff --git a/content/posts/2023-08-11-4-eyes.md b/content/posts/2023-08-11-4-eyes.smd diff --git a/content/posts/2023-08-22-comments-2.md b/content/posts/2023-08-22-comments-2.md @@ -1,17 +0,0 @@ ---- -.title = "Comments 2", -.author = "Martin Ashby", -.date = @date("2023-08-22T14:48:41+01:00"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -[Previously](/posts/2022-12-30-comments/) I added a basic comment system to my website using a separate web server which served only the comment HTML. This is fine, but it does require another program running continuously on my server. Since that server is a raspberry pi, and it is running a lot of other software as well, and my blog doesn't get a lot of hits (let alone comments), I thought I could do better by using the [Common Gateway Interface (CGI)](https://en.wikipedia.org/wiki/Common_Gateway_Interface). CGI doesn't require a daemon program, but instead will launch a program to generate dynamic content when someone loads the page. In this way, no memory or CPU is required until an actual page is requested. The downside is that a new process is launched for each page load, but I think that's an OK trade-off for me. I already have CGI configured on my web server for running [cgit](/posts/2022-12-31-cgit/). - -I also wanted to explore the [zig](ziglang.org/) programming language some more by writing an actual program with it, so I chose to rewrite it in zig. - -I made a [quick exploratory program](https://code.mfashby.net/cgifun/about/) just to remind myself how CGI works in Caddy, then I ported my original comments app to a [CGI app](https://code.mfashby.net/mfashby.net/tree/comments). The new app has far fewer dependencies since it doesn't embed a web server or web framework. It depends on the [zig standard library](https://ziglang.org/documentation/master/std/), [libpq](https://www.postgresql.org/docs/current/libpq.html), [mustache-zig](https://github.com/batiati/mustache-zig) and some of my own shared code from another project to do page routing. - -The new comments app works just the same as the old one, although with some loss of functionality - it no longer emails me when a new comment is posted. I plan to implement this, however the zig ecosystem is much less mature than rust right now, and I could not find a good email library so I might end up rolling my own. - -Another spin-off from this project could be a pure-zig postgres database library. Libpq is great, however it's a C library and requires linking the C standard library, and makes code less easily portable to other platforms. The [pgx](https://github.com/jackc/pgx) project shows that it's possible to have a pure-go postgresql driver, and this might be inspiration for a zig version. Another advantage of using the host language rather than the C library is making use of future [asynchronous capabilities](https://ziglearn.org/chapter-5/). -\ No newline at end of file diff --git a/content/posts/2023-08-22-comments-2.smd b/content/posts/2023-08-22-comments-2.smd @@ -0,0 +1,17 @@ +--- +.title = "Comments 2", +.author = "Martin Ashby", +.date = @date("2023-08-22T14:48:41+01:00"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +[Previously](/posts/2022-12-30-comments/) I added a basic comment system to my website using a separate web server which served only the comment HTML. This is fine, but it does require another program running continuously on my server. Since that server is a raspberry pi, and it is running a lot of other software as well, and my blog doesn't get a lot of hits (let alone comments), I thought I could do better by using the [Common Gateway Interface (CGI)](https://en.wikipedia.org/wiki/Common_Gateway_Interface). CGI doesn't require a daemon program, but instead will launch a program to generate dynamic content when someone loads the page. In this way, no memory or CPU is required until an actual page is requested. The downside is that a new process is launched for each page load, but I think that's an OK trade-off for me. I already have CGI configured on my web server for running [cgit](/posts/2022-12-31-cgit). + +I also wanted to explore the [zig](https://ziglang.org/) programming language some more by writing an actual program with it, so I chose to rewrite it in zig. + +I made a [quick exploratory program](https://code.mfashby.net/cgifun/about/) just to remind myself how CGI works in Caddy, then I ported my original comments app to a [CGI app](https://code.mfashby.net/mfashby.net/tree/comments). The new app has far fewer dependencies since it doesn't embed a web server or web framework. It depends on the [zig standard library](https://ziglang.org/documentation/master/std/), [libpq](https://www.postgresql.org/docs/current/libpq.html), [mustache-zig](https://github.com/batiati/mustache-zig) and some of my own shared code from another project to do page routing. + +The new comments app works just the same as the old one, although with some loss of functionality - it no longer emails me when a new comment is posted. I plan to implement this, however the zig ecosystem is much less mature than rust right now, and I could not find a good email library so I might end up rolling my own. + +Another spin-off from this project could be a pure-zig postgres database library. Libpq is great, however it's a C library and requires linking the C standard library, and makes code less easily portable to other platforms. The [pgx](https://github.com/jackc/pgx) project shows that it's possible to have a pure-go postgresql driver, and this might be inspiration for a zig version. Another advantage of using the host language rather than the C library is making use of future [asynchronous capabilities](https://ziglearn.org/chapter-5/). +\ No newline at end of file diff --git a/content/posts/2023-09-12-mcl.md b/content/posts/2023-09-12-mcl.md @@ -1,19 +0,0 @@ ---- -.title = "Mcl (minecraft launcher)", -.author = "Martin Ashby", -.date = @date("2023-09-12T07:03:15+01:00"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -I wrote a [minecraft launcher](https://code.mfashby.net/mcl/about/) in [zig](ziglang.org/) as a learning exercise. - -I got a lot of practice writing zig code and I learned a few things about it. - -- The [GeneralPurposeAllocator](https://ziglang.org/documentation/master/std/#A;std:heap.GeneralPurposeAllocator) is really useful for finding memory leaks, as is the std.testing.allocator for use in tests. -- The standard library HTTP client is really cool, but unfortunately fails on a lot of websites because it lacks TLSv1.2 support. -- Calling into C code is really easy. I used [libCURL](https://curl.se/libcurl/) instead of the zig stdlib and it was easy to write a wrapper around it. -- The standard library JSON parsing is good, but error messages are not verbose enough to help you and by default they don't indicate _where_ in the tree the problem is. This can be added but it's not obvious how to do it (spoiler: set the .diagnostics element on a std.json.Scanner). For types which the standard library can't cope with, there is an escape hatch: implement jsonParse method for that type. -- The builtin module has useful constants for checking the current operating system and CPU architecture, which I used for hacking in linux-aarch64 support. - -Finally however, I learned that minecraft on the pinebook pro sucks :( It's just not got enough power to run the game well. -\ No newline at end of file diff --git a/content/posts/2023-09-12-mcl.smd b/content/posts/2023-09-12-mcl.smd @@ -0,0 +1,19 @@ +--- +.title = "Mcl (minecraft launcher)", +.author = "Martin Ashby", +.date = @date("2023-09-12T07:03:15+01:00"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +I wrote a [minecraft launcher](https://code.mfashby.net/mcl/about/) in [zig](https://ziglang.org/) as a learning exercise. + +I got a lot of practice writing zig code and I learned a few things about it. + +- The [GeneralPurposeAllocator](https://ziglang.org/documentation/master/std/#A;std:heap.GeneralPurposeAllocator) is really useful for finding memory leaks, as is the std.testing.allocator for use in tests. +- The standard library HTTP client is really cool, but unfortunately fails on a lot of websites because it lacks TLSv1.2 support. +- Calling into C code is really easy. I used [libCURL](https://curl.se/libcurl/) instead of the zig stdlib and it was easy to write a wrapper around it. +- The standard library JSON parsing is good, but error messages are not verbose enough to help you and by default they don't indicate _where_ in the tree the problem is. This can be added but it's not obvious how to do it (spoiler: set the .diagnostics element on a std.json.Scanner). For types which the standard library can't cope with, there is an escape hatch: implement jsonParse method for that type. +- The builtin module has useful constants for checking the current operating system and CPU architecture, which I used for hacking in linux-aarch64 support. + +Finally however, I learned that minecraft on the pinebook pro sucks :( It's just not got enough power to run the game well. +\ No newline at end of file diff --git a/content/posts/2023-10-01-parable-of-the-sower.md b/content/posts/2023-10-01-parable-of-the-sower.smd diff --git a/content/posts/2023-10-07-zipdl.md b/content/posts/2023-10-07-zipdl.smd diff --git a/content/posts/2023-11-25-roc.md b/content/posts/2023-11-25-roc.smd diff --git a/content/posts/2023-11-26-skateboard-2.md b/content/posts/2023-11-26-skateboard-2.md @@ -1,15 +0,0 @@ ---- -.title = "Skateboard 2", -.author = "Martin Ashby", -.date = @date("2023-11-26T20:33:27Z"), -.layout = "single.shtml", -.custom = {"comments": true}, ---- - -I've been skating indoors at [LS-ten skatepark](https://ls-ten.org/) recently, as the poor weather over the last few weeks has made outdoor skating... not fun. I've mostly abandoned my shorter board in favour of the [Lush Throttle](https://lushlongboards.com/buy/throttle/). At 34" length it's not too much longer than a typical 'popsicle' board, but I find it much more comfortable. I don't mind the lack of double kicktail, and I prefer the longer wheelbase. - -I've been working on the basics of skating ramps and bowls - drop-ins, roll-ins, kick turns, rock-to-fakie, and tail stall; and I'm still quite rough as you can see in the following video. I hope to continue skating regularly and improving. - -<iframe title="mini ramp fun" width="560" height="315" src="https://tube.spdns.org/videos/embed/415b33b3-80ed-4d60-8063-e7a9492dab59" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> - -(on a technical note, I've signed up for a peertube instance and I'm posting my skate videos there. I have the content backed up locally as well, but I figured I might avoid hosting videos from my home server for now) -\ No newline at end of file diff --git a/content/posts/2023-11-26-skateboard-2.smd b/content/posts/2023-11-26-skateboard-2.smd @@ -0,0 +1,17 @@ +--- +.title = "Skateboard 2", +.author = "Martin Ashby", +.date = @date("2023-11-26T20:33:27Z"), +.layout = "single.shtml", +.custom = {"comments": true}, +--- + +I've been skating indoors at [LS-ten skatepark](https://ls-ten.org/) recently, as the poor weather over the last few weeks has made outdoor skating... not fun. I've mostly abandoned my shorter board in favour of the [Lush Throttle](https://lushlongboards.com/buy/throttle/). At 34" length it's not too much longer than a typical 'popsicle' board, but I find it much more comfortable. I don't mind the lack of double kicktail, and I prefer the longer wheelbase. + +I've been working on the basics of skating ramps and bowls - drop-ins, roll-ins, kick turns, rock-to-fakie, and tail stall; and I'm still quite rough as you can see in the following video. I hope to continue skating regularly and improving. + +```=html +<iframe title="mini ramp fun" width="560" height="315" src="https://tube.spdns.org/videos/embed/415b33b3-80ed-4d60-8063-e7a9492dab59" frameborder="0" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups"></iframe> +``` + +(on a technical note, I've signed up for a peertube instance and I'm posting my skate videos there. I have the content backed up locally as well, but I figured I might avoid hosting videos from my home server for now) +\ No newline at end of file diff --git a/content/posts/2023-12-01-aoc2023.md b/content/posts/2023-12-01-aoc2023.smd diff --git a/content/posts/2024-01-26-data-oriented-design.md b/content/posts/2024-01-26-data-oriented-design.smd diff --git a/content/posts/2024-01-26-dyn.md b/content/posts/2024-01-26-dyn.smd diff --git a/content/posts/2024-02-01-1brc.md b/content/posts/2024-02-01-1brc.smd diff --git a/content/posts/2024-02-05-phones.md b/content/posts/2024-02-05-phones.smd diff --git a/content/posts/2024-03-01-communication.md b/content/posts/2024-03-01-communication.smd diff --git a/content/posts/2024-03-03-catb.md b/content/posts/2024-03-03-catb.smd diff --git a/content/posts/2024-03-27-zine.md b/content/posts/2024-03-27-zine.smd diff --git a/content/posts/2024-03-31-stranger-times.md b/content/posts/2024-03-31-stranger-times.smd diff --git a/content/posts/2024-05-23-zigvm.md b/content/posts/2024-05-23-zigvm.smd diff --git a/content/posts/2024-08-09-bike.md b/content/posts/2024-08-09-bike.smd diff --git a/content/posts/2024-08-23-book-meltdown.md b/content/posts/2024-08-23-book-meltdown.smd diff --git a/content/posts/2024-08-24-wyag.md b/content/posts/2024-08-24-wyag.smd diff --git a/content/posts/2024-12-01-aoc2024.md b/content/posts/2024-12-01-aoc2024.smd diff --git a/content/posts/index.md b/content/posts/index.md @@ -1,10 +0,0 @@ ---- -.title = "mfashby.net", -.author = "Martin Ashby", -.date = @date("1900-01-01T00:00:00Z"), -.layout = "list.shtml", -.alternatives = [{ - .layout = "rss.xml", - .output = "index.xml", -}], ---- diff --git a/content/posts/index.smd b/content/posts/index.smd @@ -0,0 +1,12 @@ +--- +.title = "mfashby.net", +.author = "Martin Ashby", +.date = @date("1900-01-01T00:00:00Z"), +.layout = "list.shtml", +.alternatives = [{ + .name = "rss", + .type = "application/rss+xml", + .layout = "rss.xml", + .output = "index.xml", +}], +--- diff --git a/content/projects/index.md b/content/projects/index.smd diff --git a/content/projects/zigvm.md b/content/projects/zigvm.smd diff --git a/content/projects/zipdl.md b/content/projects/zipdl.smd diff --git a/layouts/list.shtml b/layouts/list.shtml @@ -1,11 +1,11 @@ <extend template="main.shtml"> <div id="main"> - <h1 var="$page.title"></h1> - <p var="$page.content"></p> - <ul loop="$page.subpages()"> + <h1 :text="$page.title"></h1> + <p :html="$page.content()"></p> + <ul :loop="$page.subpages()"> <li> - <span class="date" var="$loop.it.date.format('2006/01/02')"></span> - <a href="$loop.it.link()" var="$loop.it.title"></a> + <span class="date" :text="$loop.it.date.format('2006/01/02')"></span> + <a href="$loop.it.link()" :text="$loop.it.title"></a> </li> </ul> </div> \ No newline at end of file diff --git a/layouts/rss.xml b/layouts/rss.xml @@ -8,13 +8,13 @@ <language>en-gb</language> <lastBuildDate>Sun, 03 Mar 2024 19:31:27 +0000</lastBuildDate> <atom:link href="https://mfashby.net/index.xml" rel="self" type="application/rss+xml"/> - <item inline-loop="$page.subpages()"> - <title var="$loop.it.title"></title> - <link var="$loop.it.link()"></link> - <pubDate var="$loop.it.date.formatHTTP()"></pubDate> - <guid isPermaLink="true" var="$loop.it.link()"></guid> - <description var="$loop.it.description"></description> - <content:encoded var="$loop.it.content"></content:encoded> <!-- This doesn't work, an empty tag is emitted --> + <item :loop="$page.subpages()"> + <title :text="$loop.it.title"></title> + <link :text="$loop.it.link()"></link> + <pubDate :text="$loop.it.date.formatHTTP()"></pubDate> + <guid isPermaLink="true" :text="$loop.it.link()"></guid> + <description :text="$loop.it.description"></description> + <!-- <content:encoded :html="$loop.it.content()"></content:encoded> It doesn't work --> </item> </channel> </rss> \ No newline at end of file diff --git a/layouts/single.shtml b/layouts/single.shtml @@ -1,15 +1,15 @@ <extend template="main.shtml"> <div id="main"> <div class="article-meta"> - <h1><span class="title" var="$page.title"></span></h1> + <h1><span class="title" :text="$page.title"></span></h1> </div> - <main var="$page.content"></main> + <main :html="$page.content()"></main> <footer> <div class="article-meta"> <span class="author">Author - <span var="$page.author"></span></span><br> + <span :text="$page.author"></span></span><br> <span>Updated - <span class="date" var="$page.date.format('2006/01/02')"></span></span><br> + <span class="date" :text="$page.date.format('2006/01/02')"></span></span><br> </div> </footer> </div> \ No newline at end of file diff --git a/layouts/templates/main.shtml b/layouts/templates/main.shtml @@ -5,9 +5,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="author" content="$page.author"> <meta name="description" content="$page.description"> - <title var="$page.title.suffix('|', $site.title)"></title> - <link rel="stylesheet" href="/css/style.css"> - <link rel="stylesheet" href="/css/fonts.css"> + <title :text="$page.title.suffix('|', $site.title)"></title> + <link rel="stylesheet" href="$site.asset('css/style.css').link()"> + <link rel="stylesheet" href="$site.asset('css/fonts.css').link()"> <link rel="alternate" type="application/rss+xml" title="RSS" href="/index.xml"> </head> <body> @@ -24,7 +24,7 @@ <super> </div> <footer> - <div if="$page.custom.get('comments', false)"> + <div :if="$page.custom.getOr('comments', false)"> <h2>comments</h2> <div style="visibility: hidden" id="comments">comments go here</div> <div style="visibility: hidden" id="comment_form">comment form goes here</div>