#dev 2021-05-11
2021-05-11 UTC
[tw2113_Slack_] and [tantek] joined the channel
shoesNsocks, jackyalcine, [girrodocus], [tantek], KartikPrabhu, ShadowKyogre and [dianoetic_net] joined the channel; ShadowKyogre left the channel
#
[dianoetic_net] Yes I do
ShadowKyogre, [KevinMarks], jeremych_ and sparseMatrix joined the channel; ShadowKyogre left the channel
#
sparseMatrix haha all this discussion about http/https, and I decided I would take a break from dev and get a let's encrypt cert up for my domain
#
sparseMatrix it didn't go well, I have completely hosed my lighttpd installation
#
sparseMatrix I'm going to redo the machine anyway, it needs other work pretty badly. It wasn't really put together for this, so much as hijacked for it ;)
#
sparseMatrix the next incarnation will be rocking nginx instead
[KevinMarks] joined the channel
#
petermolnar sparseMatrix: if you're redoing it, take a look at https://caddyserver.com/
#
petermolnar if I were to restart from scratch, I'd probably replace nginx with caddy these days
#
petermolnar oh, that's disappointing
#
petermolnar truth to be told, nginx + certbot worked fine even with my definitely overcomplicated nginx.conf
#
petermolnar the part that certbot can give me a *.petermolnar.net because it can validate it using digitalocean's DNS api is wonderful
ShadowKyogre joined the channel; ShadowKyogre left the channel
#
petermolnar butbutbut... containers! istio! APIs! Microservices!
[dianoetic_net] joined the channel; ShadowKyogre left the channel
#
[dianoetic_net] Needs more kafka
ShadowKyogre joined the channel; ShadowKyogre left the channel
#
petermolnar you mean something like "a streaming solution for internet-scale webmentions support using microservices on a container based public cloud infrastructure backed by data warehouses" ?
shoesNsocks joined the channel
#
[KevinMarks] I mean, I have that, but that's because I wrote it on classic appengine
ShadowKyogre, KartikPrabhu, shoesNsocks1 and vikanezrimaya joined the channel; ShadowKyogre left the channel
#
vikanezrimaya good morning IndieWeb, long time no see
#
vikanezrimaya i might've gone insane in these long months but i'm rewriting my website once again in Rust. And almost succeeding...
#
vikanezrimaya Lack of an MF2 parser in Rust is the only thing that makes it hard, since I can't e.g. parse webmentions or provide rich reply contexts
#
vikanezrimaya but it's not like my current website does it... sooooo
#
vikanezrimaya who cares
#
vikanezrimaya it's blazing fast tho, just 7ms of roundtrip to fetch the homepage on localhost
[dianoetic_net] and jackyalcine joined the channel
#
jackyalcine vikanezrimaya: hey :)
#
jackyalcine I'm actually rewriting parts of my site in Rust too!
#
jackyalcine mainly things like indieauth and incoming webmentions - things that I'd want to have a very strict structure around. elixir's way better for things like microsub
#
jackyalcine I have the beginnings of a indieweb crate here: https://lib.rs/crates/indieweb
[Tim_Culverhous] joined the channel
#
[Tim_Culverhous] Hey! Don't mind me, just trying out the slack vs IRC
#
jackyalcine lemme know if there's things you'd want to see in that crate and I'll try to get to it - I'm optimizing it right now to have some shared functionality in a few projects
[chrisaldrich], [jacky], [fluffy] and [aciccarello] joined the channel
#
vikanezrimaya jackyalcine: if you have an MF2 parser there that would be as HTTP-client-agnostic as possible, I'd totally add this crate to my Cargo.toml right away! I'm using surf as my HTTP client right now and I hope to possibly reuse connections by owning a handle to surf::Client instead of creating a new one for every single request (i'm afraid it might
#
vikanezrimaya overhead too, and I need to keep the Micropub parts of my site blazing fast so I wouldn't feel a delay when posting! even though I'm currently sending webmentions from a background task)
#
vikanezrimaya I have a start at https://gitlab.com/vikanezrimaya/mf2-parser, but it's really janky and can't handle a lot of things... actually it can't handle anything other than parsing a simple h-entry
#
vikanezrimaya I'm a newbie Rustacean so please forgive me if my code looks like a bowl of noodles covered in hot sauce
#
vikanezrimaya never used it
#
vikanezrimaya i just... write code like i'm used to...
#
vikanezrimaya only occasionally calling clippy to help me clean up
#
[jacky] have you peeked at https://github.com/microformats/tests? you could make that into a subtree to the repo and use that for testing tbh
#
vikanezrimaya I did! it's a bit intimidating for now but I'm planning on making a test suite out of it
#
vikanezrimaya idea stolen from serde_json
#
vikanezrimaya I consider the Mf2Data struct my magnum opus in Rust
#
vikanezrimaya that's the biggest data structure I've ever made and I wish I could use it sooner in my code, it would help SO MUCH
#
vikanezrimaya Statically-typed Microformats2 documents would be so easy to handle in frontend for templating
#
vikanezrimaya I kinda hate JF2 but I understand that other people use it, so if you have any ideas or concepts, open an issue or a PR! I'm also considering disassembling one of the major MF2 parsers in other language to see how it works and possibly port it to Rust
#
vikanezrimaya just need to find something compatible in terms of the licensing...
#
vikanezrimaya Something I used in the past preferably, namely Python's mf2py or https://github.com/microformats/microformats-parser
#
vikanezrimaya Both are written in memory-safe languages I'm somewhat familiar with
#
vikanezrimaya looks like both are MIT-licensed which means if I'm gonna be going of these, my crate would also have to be MIT-only
#
vikanezrimaya if I understand those licensing things correctly which I am probably not!!
#
vikanezrimaya I fear only two things: unsafe code and licenses
#
vikanezrimaya yeah
#
vikanezrimaya it might but it'll make prototyping simpler
#
vikanezrimaya could always rewrite performance-critical sections or whatever later
#
vikanezrimaya Then probably keep an eye on that repo, it might start moving in the future when I run out of low-hanging fruit to implement in Kittybox-rs
#
vikanezrimaya for now it's mostly onboarding (which I'm trying to code probably for the third time already!) and indexing posts for ?q=source, ?q=geo, ?q=food and ?q=contacts
#
vikanezrimaya three rewrites of the website in a row and I've yet to do a single deploy
#
vikanezrimaya at this point i'm coding for the sake of coding
shoesNsocks1 joined the channel
[snarfed] joined the channel
#
[snarfed] vikanezrimaya feel free to use https://github.com/snarfed/granary/tree/master/granary/tests/testdata for mf2 test data too
ShadowKyogre, vikanezrimaya, mbouksim and jeremycherfas joined the channel; ShadowKyogre left the channel
#
vikanezrimaya is there a way to make, say, a fieldset <legend> only visible to screen-readers? it's in the way of my visual style but I'd like to leave it where it is for semantic purposes (since I use something like a progress-bar or breadcrumbs to track form progress and it's weird to have a section title be duplicated twice)
#
vikanezrimaya Or maybe hide it with JavaScript so it won't be visible unless JS isn't working OR screenreader is enabled
#
vikanezrimaya because when no JS is detected the progress bar is hidden and doesn't work at all (its driven by JS)
#
vikanezrimaya position: absolute feels hacky
geman- joined the channel
#
petermolnar hide it in normal css
#
petermolnar add a css for screenreaders only, and show it
#
petermolnar css @media has a speech option for "Used for screenreaders that "reads" the page out loud"
dianoetic[m], JackyAlcin[m], Salt[m] and gRegorLove joined the channel
#
vikanezrimaya petermolnar: just what I wanted!
#
vikanezrimaya except the no JS part isn't gonna be relevant anyway! The endpoint for which I'm building the form requires JSON and it'll be painful to use form-encoded for it... form-encoded is generally a pain for me
[jacky] joined the channel
#
vikanezrimaya form-encoded doesn't represent nested structures well and there's gonna be a lot of them, including lists containing structs in my form
#
vikanezrimaya and also the form will need buttons for adding more structs to the list
#
vikanezrimaya basically I have something like Vec<
{ slug: String, name: String }> in my form for creating feeds (mapped to Micropub channels - see extension) when onboarding Kittybox#
vikanezrimaya it'll allow me to pre-create custom feeds that will be then shown in ?q=channel
#
vikanezrimaya and then my Micropub client (including the one that will ship with the software - for now it also serves as a debugging instrument) will read those and allow me to either auto-detect channels based on post type (h-entry, h-card etc.) or post to custom channels
#
vikanezrimaya the last part is already implemented and working well
#
vikanezrimaya i even remember writing some tests for it...
#
vikanezrimaya wait, no, that was the autodetection part, but it should keep custom channels if they are defined without adding anything else
jeremycherfas joined the channel
#
[jacky] I'm using `warp` for my Web server needs so I can define basically _all_ of my Micropub handling needs with these lines (from the Web router level): https://git.jacky.wtf/indieweb/koype-next/src/branch/develop/web-server/src/web.rs#L210-L228
#
[jacky] I pack a _lot_ into concrete types to make it harder for random information to leak through (a big issue when I was doing it in Elixir and Python(!)) https://git.jacky.wtf/indieweb/koype-next/src/branch/develop/web-server/src/micropub/mod.rs#L87-L90
#
[jacky] like I can even do the pagination stuff in here https://git.jacky.wtf/indieweb/koype-next/src/branch/develop/web-server/src/micropub/mod.rs#L121-L135
#
[jacky] I think the most important thing is that I could use whichever Web server I want despite this being the business bits of it - if I can figure out how to extract some bits, I might even make the Micropub server logic into a library so anyone using Rust can just _get_ a Micropub server with a single import
reed, astrojl_matrix, forest[m], Paul[m]2, ytqb[m], smacko[m], VictoriaDrake[m], Ethan[m], drmr and edsu joined the channel
#
vikanezrimaya [jacky]: I'm using Tide and async-std instead of warp and Tokio. Again, mostly because of my personal preferences
#
vikanezrimaya I'm trying to make as much stuff as possible separated in functions, since they are easily unit-tested.
#
vikanezrimaya For example, separating the normalize_mf2 function that makes MF2 posts have consistent properties, type-checks some of them (especially datetimes!) and inserts default properties when they aren't defined - namely, `uid`, `published`, `url`, `author` and `channel` - was the best decision in the entire development cycle
[girrodocus] joined the channel
#
[girrodocus] I'm experimenting with a VPS for the first time (via digitalocean) and am wondering where to insert sorting out SSL certificates into this process: 1. Set up SSH keys. 2. Create the droplet (Ubuntu 20.04(LTS)x64). 3. Initial Ubuntu updates and set-up. 4. ufw firewall. 5. Install nginx
#
[girrodocus] I know I need to do these at some point: A: delegate domain from namecheap to digitalocean (done). B: Set up A and AAAA records pointing example.com and www.example.com to the relevant IP addresses (done but not working yet). C: Do something that I don't understand yet with CAA records, LetsEncrypt and cerbot (the mysterious aspect).
#
[girrodocus] I'll ultimately be running a tiddlywiki on node.js on a subdomain e.g. wiki.example.com
fredcy_ joined the channel
#
[girrodocus] I think I've accidentally registered for the LetsEncrypt thing about 4 times in the last couple days while I've tried to set up digitalocean droplets. I'm hoping this attempt will survive the getting-deleted-in-frustration test.
ShadowKyogre, Caleb[m]1, astralbijection[, jamietanna[m], JackyAlcin[m], Salt[m], dianoetic[m], smacko[m], VictoriaDrake[m], ytqb[m], astrojl_matrix, forest[m], Paul[m]2, drmr, edsu, reed, Ethan[m], KartikPrabhu and [dianoetic_net] joined the channel; ShadowKyogre left the channel
#
[dianoetic_net] girrodocus, if you want a self-signed cert with LetsEncrypt it should come down to running some shell commands. Have you seen this? https://letsencrypt.org/getting-started/
[snarfed] joined the channel
#
[dianoetic_net] Oopsie thank you!
KartikPrabhu, [jacky], ShadowKyogre, [tantek] and [KevinMarks] joined the channel; ShadowKyogre left the channel
