aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-11-17 16:23:51 -0700
committerMelody Horn <melody@boringcactus.com>2020-11-17 16:23:51 -0700
commit4e7085e82e7aa48b8bc404fd7926b673fc425cdf (patch)
tree0f2d01cc638c86f799e5e5652ea1f3f420ab4fbc
parent4bd4d8dab61993b7d24ee1ca147264ad761dfc68 (diff)
downloadboringcactus.com-4e7085e82e7aa48b8bc404fd7926b673fc425cdf.tar.gz
boringcactus.com-4e7085e82e7aa48b8bc404fd7926b673fc425cdf.zip
rework around cactus-ssg
-rw-r--r--.build.yml22
-rw-r--r--Dockerfile6
-rw-r--r--Gemfile4
-rw-r--r--README.md5
-rw-r--r--_config.yml9
-rw-r--r--_layouts/default.gmi5
-rw-r--r--_layouts/default.html22
-rw-r--r--_posts/2018-06-23-slicing-images-gimp-python.md2
-rw-r--r--_posts/2020-06-26-police-scanner-setup.md6
-rw-r--r--_posts/2020-09-16-survey-of-rust-embeddable-scripting-languages.md12
-rw-r--r--_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md14
-rw-r--r--_posts/2020-10-19-crowbar-3-this-is-tough.md2
-rw-r--r--assets/fuck-hn.js (renamed from fuck-hn.js)0
-rw-r--r--assets/site.css (renamed from site.css)4
-rw-r--r--feed.xml23
-rw-r--r--index.md6
16 files changed, 87 insertions, 55 deletions
diff --git a/.build.yml b/.build.yml
new file mode 100644
index 0000000..130204f
--- /dev/null
+++ b/.build.yml
@@ -0,0 +1,22 @@
+image: alpine/latest
+packages:
+ - python3-pip
+ - rsync
+sources:
+ - https://git.sr.ht/~boringcactus/boringcactus.com
+ - https://git.sr.ht/~boringcactus/cactus-ssg
+environment:
+ deploy: services@boringcactus.com
+secrets:
+ - b5cb9b2b-1461-4486-95e1-886451674a89
+tasks:
+ - install: |
+ cd cactus-ssg
+ python3 -m pip install -r requirements.txt
+ - build: |
+ cd boringcactus.com
+ python3 ../cactus-ssg/build.py
+ - deploy: |
+ cd boringcactus.com
+ rsync -rP _site/html/ $deploy:/var/www/html/www.boringcactus.com/
+ rsync -rP _site/gmi/ $deploy:/var/gemini/gmi/boringcactus.com/
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index cac9cee..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,6 +0,0 @@
-FROM jekyll/jekyll AS build
-COPY . /srv/jekyll
-RUN jekyll build && cp -r /srv/jekyll/_site /var/jekyll_site
-
-FROM nginx
-COPY --from=build /var/jekyll_site /usr/share/nginx/html
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index 594877b..0000000
--- a/Gemfile
+++ /dev/null
@@ -1,4 +0,0 @@
-source 'https://rubygems.org'
-gem 'jekyll-feed'
-gem 'github-pages', group: :jekyll_plugins
-gem 'wdm', '>= 0.1.0' if Gem.win_platform?
diff --git a/README.md b/README.md
index 4fdb38b..e766570 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,3 @@
-# boringcactus.github.io
-http://boringcactus.com
+<https://www.boringcactus.com>
+
+<gemini://boringcactus.com>
diff --git a/_config.yml b/_config.yml
deleted file mode 100644
index 929180d..0000000
--- a/_config.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-plugins:
- - jekyll-feed
-title: boringcactus
-description: boringcactus's blog posts
-author: boringcactus (Melody Horn)
-exclude:
- - Dockerfile
- - LICENSE
- - README.md
diff --git a/_layouts/default.gmi b/_layouts/default.gmi
new file mode 100644
index 0000000..4a249fd
--- /dev/null
+++ b/_layouts/default.gmi
@@ -0,0 +1,5 @@
+{% if page.url != "/" %}=> / (brought to you by boringcactus)
+{% endif %}# {{ page.title }}
+{% if page.date %}## {{ page.date.strftime('%d %b %Y') }}
+{% endif %}
+{{ content }}
diff --git a/_layouts/default.html b/_layouts/default.html
index 3aa9e43..c56a2d4 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -4,36 +4,36 @@
<meta charset="utf-8"/>
<meta name="referrer" content="no-referrer" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="description" content="{% if page.description != nil %}{{ page.description }}{% else %}{{ page.excerpt | strip_html | strip }}{% endif %}" />
+ <meta name="description" content="{{ page.describe() }}" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@boring_cactus" />
<meta name="twitter:title" content="{{ page.title }}" />
- <meta name="twitter:description" content="{% if page.description != nil %}{{ page.description }}{% else %}{{ page.excerpt | strip_html | strip }}{% endif %}" />
- <meta property="og:url" content="{{ page.url | absolute_url }}" />
+ <meta name="twitter:description" content="{{ page.describe() }}" />
+ <meta property="og:url" content="{{ page.url | absolute_url }}.html" />
<meta property="og:title" content="{{ page.title }}" />
- <meta property="og:description" content="{% if page.description != nil %}{{ page.description }}{% else %}{{ page.excerpt | strip_html | strip }}{% endif %}" />
- {% if page.url == "/" %}
+ <meta property="og:description" content="{{ page.describe() }}" />
+ {% if page.url == "index" %}
<meta property="og:type" content="website" />
<title>{{ page.title }}</title>
{% else %}
<meta property="og:type" content="article" />
- <meta property="article:published_time" content="{{ page.date }}" />
+ <meta property="article:published_time" content="{% if page.date %}{{ page.date }}{% endif %}" />
<title>{{ page.title }} | boringcactus</title>
{% endif %}
- <link rel="stylesheet" href="/site.css">
- {% feed_meta %}
+ <link rel="stylesheet" href="/assets/site.css">
+ <link type="application/atom+xml" rel="alternate" href="/feed.xml" title="boringcactus" />
<script async defer data-domain="boringcactus.com" src="https://stats.boringcactus.com/js/index.js"></script>
</head>
<body>
<header>
- {% if page.url != "/" %}
+ {% if page.url != "index" %}
<p>(brought to you by <a href="/">boringcactus</a>)</p>
{% endif %}
</header>
<main>
- <h1>{{ page.title }}{% if page.date %} <small>({{ page.date | date_to_string }})</small>{% endif %}</h1>
+ <h1>{{ page.title }}{% if page.date %} <small>({{ page.date.strftime('%d %b %Y') }})</small>{% endif %}</h1>
{{ content }}
</main>
-<script src="/fuck-hn.js"></script>
+<script src="/assets/fuck-hn.js"></script>
</body>
</html>
diff --git a/_posts/2018-06-23-slicing-images-gimp-python.md b/_posts/2018-06-23-slicing-images-gimp-python.md
index 1ad3514..83264b8 100644
--- a/_posts/2018-06-23-slicing-images-gimp-python.md
+++ b/_posts/2018-06-23-slicing-images-gimp-python.md
@@ -70,7 +70,7 @@ def crop(image, x, width, y, height):
```
The next step is to figure out the filename for this specific tile; here we're getting an index back from the offsets and width and height.
-```python
+```python
x_idx = x / width + 1
y_idx = y / width + 1
filename = pdb.gimp_image_get_filename(image)
diff --git a/_posts/2020-06-26-police-scanner-setup.md b/_posts/2020-06-26-police-scanner-setup.md
index 3f51871..b8c621b 100644
--- a/_posts/2020-06-26-police-scanner-setup.md
+++ b/_posts/2020-06-26-police-scanner-setup.md
@@ -79,7 +79,7 @@ of audio input and output devices. check the number in the input list that goes
with CABLE Output - for me it's 3. pull up notepad and make a new file. since
my input was number 3, i'm typing
-```
+```bat
DSDPlus.exe -i3M
```
@@ -89,7 +89,7 @@ is set to "All Files", and name the file `run.bat`. close dsd+, go to that
folder, and open that `run.bat` file you just created. it should pull up dsd+
and if you're lucky it'll print
-```
+```text
audio input device #3 (CABLE Output (VB-Audio Virtual ) initialized
```
@@ -194,7 +194,7 @@ you'll need to set DSD+ to output to "CABLE-A Input" like how you set it to
input from "CABLE Output" - Cable A is the fourth output in DSD+, so my run.bat
now looks like this:
-```
+```bat
DSDPlus.exe -i3M -o4
```
diff --git a/_posts/2020-09-16-survey-of-rust-embeddable-scripting-languages.md b/_posts/2020-09-16-survey-of-rust-embeddable-scripting-languages.md
index 27df9f3..c2214c0 100644
--- a/_posts/2020-09-16-survey-of-rust-embeddable-scripting-languages.md
+++ b/_posts/2020-09-16-survey-of-rust-embeddable-scripting-languages.md
@@ -275,7 +275,7 @@ As you may notice, we have to put the number into a string before we can add it
This is because all values in Duckscript are strings.
Well, now that we've got all the code to pass in variables and run it, let's write our event handler script:
-```
+```duckscript
if eq ${event.type} "number"
echo "number!" ${event.value}
else
@@ -332,7 +332,7 @@ impl ScriptHost for RhaiScriptHost {
That's all of it.
That's the whole damn thing.
Our script is pretty darn straightforward, too, unsurprisingly:
-```
+```rhai
fn handle_event(data) {
if type_of(data) == "i64" {
print("number! " + data);
@@ -392,7 +392,7 @@ impl ScriptHost for DyonScriptHost {
```
Our script is likewise pretty straightforward:
-```
+```dyon
fn handle_event(data) {
if typeof(data) == "number" {
println("number! " + str(data))
@@ -472,7 +472,7 @@ impl ScriptHost for KetosScriptHost {
```
Our script itself is... definitely Lisp-y.
-```
+```ketos
(define (handle-event event)
(do
(println "~a ~a" (type-of event) event)
@@ -529,7 +529,7 @@ impl ScriptHost for RuneScriptHost {
Again, we have zero glue required for our `print_fancy` function, which is nice.
Our script looks pretty decent too:
-```
+```rune
fn handle_event(event) {
match event {
n if n is int => println(`Number! {n}`),
@@ -622,7 +622,7 @@ impl ScriptHost for RuwrenScriptHost {
```
And our test script in Wren looks nice:
-```
+```wren
import "demo" for Demo
class EventHandler {
static handleEvent(data) {
diff --git a/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md b/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md
index 8a63947..9a825e3 100644
--- a/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md
+++ b/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md
@@ -2,7 +2,7 @@
title: "Crowbar: Simplifying C's type names"
---
-(Previously in Crowbar: [Defining a good C replacement]({% link _posts/2020-09-28-crowbar-1-defining-a-c-replacement.md %}).)
+(Previously in Crowbar: [Defining a good C replacement](/2020/09/28/crowbar-1-defining-a-c-replacement.md).)
I've been working intermittently on drawing up a specification for [Crowbar](https://sr.ht/~boringcactus/crowbar-lang/), a C replacement aiming to be both simpler and safer.
I'm still nowhere near done, but I'm proud of the concept I've reached for type names, and I want to explain it in depth here.
@@ -21,7 +21,7 @@ Ideally, we can preserve the syntax as is for simple cases, while cutting down o
As of right now, the Crowbar specification gives the syntax as a [parsing expression grammar](https://en.wikipedia.org/wiki/Parsing_expression_grammar), which I'll give an excerpt from here:
-```
+```peg
Type ← 'const' BasicType /
BasicType '*' /
BasicType '[' Expression ']' /
@@ -50,7 +50,7 @@ char *str[10];
Evidently this means "str is an array 10 of pointers to char".
How would we express that in Crowbar (as it hypothetically exists so far)?
-```
+```crowbar
(char *)[10] str;
```
@@ -58,7 +58,7 @@ Now that's more like it.
We can look at it and tell right away that the array is the outermost piece and so `str` is an array.
In C, I'm not sure how we'd express a pointer-to-arrays-of-10-chars, but in Crowbar it's also straightforward:
-```
+```crowbar
(char[10])* str;
```
@@ -72,7 +72,7 @@ char *(*fp)( int, float *);
which supposedly means "fp is a pointer to a function passing an int and a pointer to float returning a pointer to a char".
That's not extremely dreadful, merely somewhat off-putting, but let's see how it looks in Crowbar.
-```
+```crowbar
((char *) function(int, (float *),)* fp;
```
@@ -93,7 +93,7 @@ That fractal mess is "a function passing an int and a pointer to a function pass
My eyes glaze over reading that description even more than they do reading the original C.
Can we make this not look awful?
-```
+```crowbar
((void function(int,))*) signal(int, ((void function(int,))*),);
```
@@ -114,7 +114,7 @@ int * const const_pointer; // can never do const_pointer = &x;
You have to remember which is which.
And why memorize when you can read?
-```
+```crowbar
(const int)* points_to_const;
const (int *) const_pointer;
```
diff --git a/_posts/2020-10-19-crowbar-3-this-is-tough.md b/_posts/2020-10-19-crowbar-3-this-is-tough.md
index 85dd7bd..a499bc1 100644
--- a/_posts/2020-10-19-crowbar-3-this-is-tough.md
+++ b/_posts/2020-10-19-crowbar-3-this-is-tough.md
@@ -2,7 +2,7 @@
title: "Crowbar: Turns out, language development is hard"
---
-(Previously in Crowbar: [Defining a good C replacement]({% link _posts/2020-09-28-crowbar-1-defining-a-c-replacement.md %}), [Simplifying C's type names]({% link _posts/2020-10-13-crowbar-2-simplifying-c-type-names.md %}))
+(Previously in Crowbar: [Defining a good C replacement](/2020/09/28/crowbar-1-defining-a-c-replacement.md), [Simplifying C's type names](/2020/10/13/crowbar-2-simplifying-c-type-names.md))
Originally, I hadn't decided whether Crowbar should be designed with an eye towards compiling to C or with an eye towards compiling directly.
Compiling to C massively cuts down the scope of Crowbar as a project, but compiling directly gives me more comprehensive control over what all happens.
diff --git a/fuck-hn.js b/assets/fuck-hn.js
index 07ff942..07ff942 100644
--- a/fuck-hn.js
+++ b/assets/fuck-hn.js
diff --git a/site.css b/assets/site.css
index 5b6fa18..31bfa5c 100644
--- a/site.css
+++ b/assets/site.css
@@ -21,13 +21,13 @@ pre {
.highlight code {
background: unset;
}
-div.highlighter-rouge {
+div.highlight {
background: white;
padding: 1rem;
line-height: 1;
overflow-x: auto;
}
-div.highlighter-rouge pre {
+div.highlight pre {
padding: 0;
margin: 0;
}
diff --git a/feed.xml b/feed.xml
new file mode 100644
index 0000000..551c13e
--- /dev/null
+++ b/feed.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
+ <link href="/feed.xml" rel="self" type="application/atom+xml" />
+ <link href="{{ root }}/" rel="alternate" type="{{ mime }}" />
+ <updated>{{ now }}</updated>
+ <id>/feed.xml</id>
+ <title>boringcactus</title>
+ <subtitle>boringcactus's blog posts</subtitle>
+ <author>
+ <name>boringcactus / Melody Horn</name>
+ <uri>/</uri>
+ </author>
+ {% for post in posts %}
+ <entry>
+ <title>{{ post.title }}</title>
+ <link href="{{ root }}/{{ post.url }}.{{ ext }}" rel="alternate" type="{{ mime }}" title="{{ post.title }}" />
+ <published>{{ post.date }}T00:00:00Z</published>
+ <updated>{{ post.date }}T00:00:00Z</updated>
+ <id>{{ post.url }}</id>
+ <content type="{{ mime }}">{{ post | attr(content_attr) }}</content>
+ </entry>
+ {% endfor %}
+</feed>
diff --git a/index.md b/index.md
index af101da..27fb800 100644
--- a/index.md
+++ b/index.md
@@ -5,7 +5,7 @@ description: immortal programming goddess
---
i am an immortal programming goddess and a trans ≈woman.
-i've been programming for over a decade, and in that time i've worked on [a wide variety of projects]({% link projects.md %}).
+i've been programming for over a decade, and in that time i've worked on [a wide variety of projects](/projects/).
my pronouns, in descending order of preference, are [ze/hir, it/its, and she/her](https://pronoun.is/ze/hir?or=it&or=she).
i exist in a lot of places:
@@ -17,6 +17,6 @@ i exist in a lot of places:
every once in a very great while i write things here:
-{% for post in site.posts %}
-- [{{ post.title }} ({{ post.date | date_to_string }})]({{ post.url }})
+{% for post in posts %}
+- [{{ post.title }} ({{ post.date.strftime('%d %b %Y') }})](/{{ post.url }}.md)
{% endfor %}