Add blog post with hero
parent
07b73d8427
commit
f9c5f635c1
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
After Width: | Height: | Size: 440 KiB |
|
@ -0,0 +1,15 @@
|
|||
+++
|
||||
title = "cellular automata toys in löve2d"
|
||||
date = "2022-09-15"
|
||||
[taxonomies]
|
||||
tags = ["cellular-automata", "lua", "löve2d"]
|
||||
+++
|
||||
|
||||
<figure>
|
||||
<img class="hero" alt="The oracle reading the future from Conway's Game of Life, technomancer aesthetic, digital illustration, 8k uhd - generated using Stable Diffusion" src=hero.png />
|
||||
<figcaption><h4><i>The oracle reading the future from Conway's Game of Life, technomancer aesthetic, digital illustration, 8k uhd</i> - generated using Stable Diffusion</h4></figcaption>
|
||||
</figure>
|
||||
|
||||
after reading [Andrew Healey's blog post about Langton's Ant](https://healeycodes.com/virtual-ants), i found myself inspired to reimplement some of his work. i've read numerous rave reviews of löve2d for writing simple toys, so i decided to give that a shot here as well. Langton's Ant went well enough that i also implemented Life and Wireworld.
|
||||
|
||||
[check the toys out here; there are instructions for running with löve2d directly or using nix](https://git.mat.services/mat/love-cellular-automata). the code is hosted on a personal instance of gitea, so if you want to collaborate or share feedback, you'll have to request an account or shoot me an email.
|
|
@ -284,7 +284,7 @@ RUN caddy
|
|||
```
|
||||
|
||||
We can use a multi-stage build to run the Nix build first, then copy that into a container with the Caddyfile and run that. We're set to deploy!
|
||||
```shell
|
||||
```bash
|
||||
flyctl deploy
|
||||
```
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ writeShellScriptBin "optimize-images" ''
|
|||
file=$(basename $image)
|
||||
newimage=$path/''${file:1}
|
||||
echo "optimizing $image"
|
||||
${pngquant}/bin/pngquant --quality 80-90 -f -o $newimage $image
|
||||
${pngquant}/bin/pngquant --quality 70-90 -f -o $newimage $image
|
||||
oldsize=$(stat --format=%s $image)
|
||||
newsize=$(stat --format=%s $newimage)
|
||||
pct=$(${bc}/bin/bc <<< "scale=1; $newsize * 100 / $oldsize")
|
||||
|
|
|
@ -4,6 +4,11 @@ img:not(#logo):not(#pixel) {
|
|||
border-radius: 5px;
|
||||
}
|
||||
|
||||
img.hero {
|
||||
margin-top: 1.5rem;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
figure {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
|
|
Loading…
Reference in New Issue