So Amazon Lambda has a 6 MB limit on request (and response) size. Binary files have to be Base64 encoded (LOL) which makes the limit even SMALLER! So my micropub media endpoint chokes on full DSLR resolution photos. Yeah the "right way" is to have the API Gateway endpoint upload to S3, and the upload event trigger the Lambda processing which would download from S3, and use a separate Lambda for authentication on that endpoint… but I need the processed URLs in the response body. I need everything to happen in one request! How did AWS engineers not see that use case coming?!
Since 2017-02-01 I've been working on a big change to Sweetroll, the engine that powers this website, and today it's finally live, right here! (Also it's now on my newer VPS, hosted at prgmr and running HardenedBSD 11. The old one was FreeBSD 10 at DigitalOcean.)
tl;dr about the change: from one Haskell app powered by a Git+JSON store and embedded Duktape templates (lol) to two services (Haskell + Node.js) backed by Postgres. It's really cool. I'll be writing more documentation for it soon.
This day in “computers are terrible”: Sweetroll crashes after a few requests to the HTTP proxy… on my laptop with FreeBSD 11-CURRENT… when compiled as a static binary. I don’t think the same static binary ever crashed on my server with 10-RELEASE though. Anyway, removed the
Now you can follow this website using an Atom feed reader. I guess that includes GNU social.
(And I can reply to tweets from this website.)
Updated the build of sweetroll on this website – now a better category system, a proxy for images in responses to avoid mixed content and prevent tracking, and a bunch of internal improvements are all LIVE!
(And right after I did this, an IndieWebCamp event live stream started! Seeing a lot of Windows 10 on the projector…)
(This post contains Haskell.)
Also, turns out highlighting-kate has a
pcre-light option, so now
regex-pcre-builtin isn’t compiled into
sweetroll as well. I wish pandoc had a build option to disable Lua script integration. Oh, and build options to disable formats! That would be great. I don’t need docx and epub support in my website.
Find-and-replace mistake I almost committed to Sweetroll: “category” → “dataegory” :D
Another facepalm moment: I didn’t verify the domain in Sweetroll’s token-endpoint. Fixed.
Facepalm moment: realizing that
flock(2) doesn’t block across threads inside of a process, only across multiple processes, and adding an MVar lock to Gitson about a year after writing the original code.
“Why is my app saying it can’t load my templates because it’s not valid UTF-8?!??!”
It’s been reading
Accidentally reposted something from Tantek using Monocle. Reposts aren’t supported in Sweetroll yet, so I deleted that post, but not before looking at the JSON and noticing that my parser didn’t understand the publishing date…
<span class="dt-published published dt-updated updated"> <time class="value" datetime="05:55-0700">05:55</time> on <time class="value">2015-08-28</time> </span>
Testing… this should work (Bridgy Publish for posting to Twitter from my website).
Also, Sweetroll now uses canonical microformats2 JSON for storage.
Webmention endpoint discovery in Haskell. Probably the best function ever written :-)
This is how I search for it in HTML.
listToMaybe $ unsafePerformIO $ runX $ htmlDoc //> hasAttrValue "rel" isWebmentionRel >>> getAttrValue "href"
unsafePerformIO? Because there’s no reason for HTML parsing to depend on IO, but they’ve implemented parsing strings as parsing files with the
So, notes on my website should be automatically posted on App.net and Twitter. Also, webmentions should be sent & webfinger works.
P.S. OAuth 1.0 is awful.