-- Leo's gemini proxy

-- Connecting to sunshinegardens.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

/5/ a sed story


alie: a noodle sketch of a graffiti'd seawall holding back a flooded mountain range


spending some time on infrastructure projects again. i've spent the last year or two trying to put down my research and step away from the computer stuff for a while. i have a pretty good idea of what i want to do with cryptogen, but i want to give myself time to see the issue from a non-technical angle. i want to help and connect with people tangibly, i want to make music, and art. i'd like to be able to set and forget my network services. which means simplifying them. it'll be some work, but things have been increasingly hands-off so that's a good sign.


gemini × sed


gemini × sed was a really fun project that i started as a joke. really makes me feel those warm fuzzies when i can go from joke to production code in a few sessions of drunk or stoned coding. i'm really grateful to solderpunk for making gemini happen. i don't know what i did do deserve such a friend, but i'm grateful.


A Machine


# This is free and unencumbered software released into the public domain.
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
#     May you do good and not evil.
#     May you find forgiveness for yourself and forgive others.
#     May you share freely, never taking more than you give.

# inferno sed is not complete enough to execute this script

# escape html

s/&/\&/g
s/</\&lt;/g
s/>/\&gt;/g
s/\"/\&#34;/g
s/\'/\&#39;/g

# /A/,/B/ is sed syntax for "match a region marked by delimiters /A/
# and /B/ where A and B are regex expressions". working with delimiters
# is a little funky because sed normally only understands lines. symmetry
# breaking is really important to avoid weird behavior.
#
# {} applies a block of sed expressions to the selected pattern space, in
# this case, the region matched by the delimiters.

/^```/,/^```$/{
	s,^(.*)$,<code aria-hidden=true>\1</code>,g
}

s,^---+$,<hr />,g

# transform heading line types

s,^#[ 	]*?([^#].+)$,<a role=heading aria-level=1><span aria-hidden=true># </span>\1</a>,g
s,^##[ 	]*?([^#].+)$,<a role=heading aria-level=2><span aria-hidden=true>## </span>\1</a>,g
s,^###[ 	]*?([^#].+)$,<a role=heading aria-level=3><span aria-hidden=true>### </span>\1</a>,g

# transform link line types

s,^=&gt;[ 	]*?([^ 	]+)$,<a href="\1"><span aria-hidden=true>=\&gt; </span>\1</a>,g
s,^=&gt;[ 	]*?([^ 	]+?)[ 	]+(.+)$,<a href="\1"><span aria-hidden=true>=\&gt; </span>\2</a>,g

s,^<a (.+)>([0-9]+)-([0-9][0-9])-([0-9][0-9])[ 	]+-[ 	]+([^<]+)</a>$,<a role=link \1><time datetime=\2-\3-\4>\2-\3-\4</time> - \5</a>,g

# transform blockquote line type

s,^&gt;[ 	]*?(.+)$,<q>\1</q>,g

# transform list line type

s,^[*][ 	]*?(.+)$,<span role=listitem><span aria-hidden=true>\&#42; </span>\1</span>,g


B Machine


# HTML PLUS
# some alt texts create invalid markup :eyes:

s,<a href="([^ ]+?\.)(gif|jpe?g|png|svg|bmp)">.+</span>(.+)</a>,<img src="\1\2" alt="\3" title="\3">,g
s,<a href="([^ ]+?\.)(mp4|webm|ogv)">.+</span>(.+)</a>,<video controls src="\1\2" title="\3"></video>,g
s,<a href="([^ ]+?\.)(mp3|ogg|oga)">.+</span>(.+)</a>,<figure class=c-audio><audio controls src="\1\2"><a href="\1\2">download</a></audio><figcaption>\3</figcaption></figure>,g
s,<a href="https:\/\/youtube\.com\/watch\?v=([^ ]+?)">.+</span>(.+)</a>,<iframe class=c-youtube-frame frameborder=0 src=":invidious-domain/embed/\1" title="\2"></iframe>,g

/^<code aria-hidden=true>```[^`]+<\/code>$/,/^<code aria-hidden=true>```<\/code>$/{
	s,^<code aria-hidden=true>```([a-z0-9]+)</code>$,<code role=figure aria-label="lang: \1" aria-hidden=true class="language-\1">,g
	s,^<code aria-hidden=true>```([^`]+)</code>$,<code role=figure aria-label="\1" aria-hidden=true>,g
	s,^<code aria-hidden=true>(.*)</code>$,\1,g
	s,^```$,</code>,g
}


heavy, then it rains


but why?: blurred image, staring out a rainy window


musicwithfriends was the initial concept that brought me into p2p r&d, a mobile application that provides walkie-talkie and playlist/music replication and timesync capabilities to your smartphone. maybe a few other handy features for hanging out in nature, climbing on stuff, or just skating around industrial parks with bad cell reception. i know better now what i'm doing, but the inspiration to string it all together is lacking.. and its still very complicated. the friends i dreamed of hanging with have mostly vanished from my life. some in sad, but understandable and slightly dramatic ways, others painfully abrupt.


there has been a lot of heavy stuff in my life these past few years. i met my lovely wife in the midst of a lot of pain for both of us. the seas of life have rocked us hard, but we found each other anyway. 👭 there are many hard problems out there and i'm game to tackle them really, but i could use a little break from the r&d stuff i think. try to do some 太極拳, มวยไทย, and reconnect with the friends that i've been missing dearly for the last few years. see if i can manage a visit to el salvador to see my abuelo before he's gone. i'm working on publishing his biography in gempub and epub formats (spanish only, though i'll accept if anyone feels like translating it). my memory is hazy sometimes, but he's always been an important figure in my life. i hope he's proud of his weird gay nieta. ❤️


-- Response ended

-- Page fetched on Fri May 3 00:04:58 2024