#dev 2020-07-28
2020-07-28 UTC
# craftyphotons Hooray! Successfully created a note in Singulus which it pushed to my Hugo repo and published on the site :D https://github.com/craftyphotons/singulus/blob/main/app/controllers/notes_controller.rb#L17-L27 -> https://github.com/craftyphotons/tonyburns.net/commit/11203bab69114b901856eed4ba8a1a2ace36ce5b -> https://tonyburns.net/notes/de6a9e
[chrisaldrich] joined the channel
# [chrisaldrich] tantek, I'd used the pending review once or twice, more as an additional pseudo-staging thing rather than what it was "intended" for...
# [tantek] create post -> write a draft -> make visible to limited folks (or just /unlisted or /unindexed) -> ask for review -> do edits (maybe repeat ask/edit cycle) -> publish publicly -> POSSE
# [tantek] my posts are also not visible in my home page or feed until *after* the published date, so when I set a published date IN THE FUTURE, it acts like a /scheduled post
# [KevinMarks] What happens if its a bim boundary?
# @jackyalcine ↩️ It gives users a way to react and engage with the content they see in their feeds. Microsub also helps to simplify the act of fetching feeds from anywhere. I’m open to helping, I have comfort with C++ and have kdesrc setup. (https://v2.jacky.wtf/post/f78d457a-1f4a-4b69-a14b-fc2771e3d103) (twitter.com/_/status/1287933963005239296)
[fluffy], nickodd, [tw2113] and [chrisaldrich] joined the channel
# aaronpk This is some next level trickery https://simonwillison.net/2020/Jul/10/self-updating-profile-readme/
# [tw2113] Thinking this is probably the same thing https://css-tricks.com/the-github-profile-trick/
[tantek] joined the channel
KartikPrabhu joined the channel; nickodd left the channel
# @johanbove "Webmentions: Enabling Better Communication on the Internet" https://ift.tt/3f6X0wm #readinglist (twitter.com/_/status/1288014124178440192)
KartikPrabhu, swentel and [Chaitanya] joined the channel
# [Chaitanya] ↩️ Something like this?: https://github.com/muesli/markscribe
moppy, [grantcodes] and [Murray] joined the channel
# [Murray] Latest news from NextJS looks interesting. Too tired to really wrap my head around the whole "stable incremental static regeneration" thing (what a mouthful!) but the ability to rebuild static pages singularly could solve a few IndieWeb/SSG issues. Particularly once they add the webhook trigger that's promised 🙂 Will be interesting to see what people make https://nextjs.org/blog/next-9-5
[KevinMarks], KartikPrabhu, gRegorLove and jeremych_ joined the channel
# [grantcodes] I'm using this on my own site already. It's really cool!
# [grantcodes] Since I have like a billion pages it would take any static site generator an age to build them all. So with Next.js I say just statically generate the last 500, and the rest are dynamically generated
# [grantcodes] Also no need to do a build whenever I publish a new post
# [grantcodes] Yeah, it is more or less a well cached dynamic site 🤷
# [grantcodes] Although the fact that you can mix it up is really cool, like have pages that never change, others that change every minute, others every day etc.
gxt joined the channel
[Murray] joined the channel
# [grantcodes] Gatsby has or is getting incremental build though I think? Which are similar but different
KartikPrabhu joined the channel
# [Murray] Yeah, they have incremental builds (I have that running), but it's not particularly great. A simple use case would be webmentions. It would be great to rebuild a single page when a webmention comes in for it, rather than having to trigger a rebuild for _everything_. Incremental builds get you part way there, but it still requires a full cache diff, so it still takes 2-3 minutes. From what I understand about the new NextJS features, I would be
[jgmac1106] joined the channel
# [jgmac1106] kinda at a meh point with my website...work got too busy for my summer learning goals, so made little automation progress...may go back to trying Kirby again....may do a fresh version of Known...may gwg gets me back on team wordpress for a bit
# [jgmac1106] yeah takes me 7-10 minutes to publish a post on Known and every time I try to update I break so many things
# [grantcodes] That's harsh
# [grantcodes] WordPress++
# [jgmac1106] I love doing evertyhing hand rolled but didn't learn enough PHP yet to automate a few things....yeah and I am teaching 30 kids today to build SemPress sites so I will have a model
# [jgmac1106] that settles it...a good model. WordPress++ for a bit
# [jgmac1106] WordPress++
# [jgmac1106] and it will be interesting to see if I run into the same or new issues on name,com rather than reclaim....where webmentions don't really worked and made me leave wordpress
# [jgmac1106] [grantcodes] I keep meaning to dig into all of your toys but again time...
# [grantcodes] I mean they work, but pretty dev heavy.
# [jgmac1106] yeah grant waiting for the five glitch projects I just remix together with a hit of a button
# [jgmac1106] gwg the issue I was havign had nothing to do with code, but I have been watching the work you two are doing
# [jgmac1106] well off to get ready for camp, it is the day we start really building their sites, spent the first three weeks building up their why for a site
# jeremycherfas Noob question, to do with Known seeming to take a long time to do anything these days. If I have a PHP loop that sends more than one cURL to Known, how would I pause execution until I can check the response received without just setting an arbitrary timeout max?
# jeremycherfas Absolutely that is a great answer zegnat++
# jeremycherfas `set_time_limit(600)` ought to do it.
[LewisCowles] joined the channel
# [LewisCowles] Hello... Got a notification from slack but cannot find why or the message. Did someone use at here?
# jeremycherfas I did see you mentioned but cannot remember where. You can search at chat.indieweb.org
# [LewisCowles] nice tip dude. I hope there are more than 3 people interested
dckc, [MitchWagner], [jgmac1106] and leg joined the channel
# [LewisCowles] I see Loqi is as mad as ever
[schmarty], KartikPrabhu and [tw2113] joined the channel
[tantek] and nickodd joined the channel
# craftyphotons Moving my discussion about microformats over here — tantek was your question as to why I was trying to automatically determine post type?
[snarfed] and [tb] joined the channel
# [tb] My micropub endpoint feeds into a set of ActiveRecord models designed with single table inheritance and post type-specific behaviors in individual model classes (like Note, Article, etc.) — so I need the endpoint to be able to determine which model to use when it gets a create/update/delete request
# [tb] Good question! Hadn't actually given that case much thought yet, but the way that would work in ActiveRecord would be just changing the `type` column value to the new type
# [tb] Hrm I guess I'd need to make a call on that for my implementation here on whether to go all the way and re-validate the type each time an update happened
# [tb] Or just require it to be explicit for updates
# [tb] Ah I see your point there — suppose a lot of where I was originally coming from with this is just from how I wanted to separate behavioral concerns between types internally
# [tb] But maybe it would be easier to architect that in a different way instead of relying on ActiveRecord STI
# [tb] One reason for me to actually store the type though is for indexing in my database
# [tb] As well as elasticsearch once I start shoving content into there for search
# [tb] [tantek] Ah you know what for the most part the post type algorithm does seem like you could do that
# [tb] I think you all have me convinced lol
# [tantek] [tb] as you may have surmised from snarfed's questions, a lot of experience here has demonstrated that "types" of posts often morph into each other and change over time, there are fuzzy overlaps, and systems built on "last minute" inferring from the existence (or not) of specific properties are much more robust and better reflecting of user intention than "top down" explicit post typing
# [tb] I'm glad I can build on the shoulders of giants then! So I think I can see how this would work in my system for what we're talking about:
# [tb] I create a note via my micropub endpoint (a note because all I pass is a `content` property). So my endpoint:
# [tb] • Writes it with the appropriate template to my Hugo site under `content/notes/whatever-its-id.md`
# [tb] • Saves it to my generic `entries` table
# [tb] • Surmises it's a `note`
# [tb] Later on I update the note with a `name` property and lengthen the content, and so my endpoint then:
# [tb] • Stores the permalink that it got published at (e.g. https://tonyburns.net/notes/abc123) as like `current_permalink_url` or something
# [tb] • Updates the post in the `entries` table
# [tb] • Surmises that it's now an `article`
# [tb] • Writes it with the appropriate template to my Hugo site under `content/articles/abc123.md` and aliases the page to `content/notes/abc123`
# [tb] • Stores the new permalink that it got published to as `current_permalink_url`
# [tb] • Pushes the previous permalink into a `previous_permalink_urls` array column so that in the future if it changes again, the canonical page can have aliases for all previous incarnations
# [tb] tantek++ and snarfed++ thank you both!
# [tb] snarfed++ thank you 🙂
[Rose] and [grantcodes] joined the channel
# [grantcodes] We use crowdin at work. May be paid only though
[jgmac1106], KartikPrabhu, [fluffy], [schmarty] and [jeremycherfas] joined the channel
# [jeremycherfas] So close with my PESOS to WithKnown, but I am finding it incredibly hard to debug, not least because WithKnown sends back errors even when it seems to have done the job as requested.
# [jeremycherfas] There’s also an intermittent problem that some of the bibliogram instances seem to be blocked and others not, which makes life a little difficult during debugging.
# [jeremycherfas] One more try, and then I think I will focus on putting the variables into a config.php file so they are easier to adjust.
nickodd left the channel
# [jeremycherfas] I have indeed. But the only way I can test is to send the live cURL. And WithKnown is slow and often returns errors even though it has actually accepted the micropub request. Of course, sometimes it really does have errors too.
# [jeremycherfas] I was thinking, I could create an array of all the bibliogram instances that offer a feed and choose one at random until I get a positive result. I’m thinking of running this thing once a day, maybe twice at the most.
[KevinMarks] joined the channel
# [KevinMarks] [tb] with Hugo you may not need the type in the path, you can use front matter to put it in
# [jeremycherfas] Oh noes; absolute killer problem. The actual construction of the RSS feed differs from one instance to another. So in one, the photourl goes `src= width= alt=` and in the other it goes `src= alt= width=` and I had been counting on using `substr()` to extract the actual url. Now to see whether I can find the `"` at the end of `src=` rather than looking for `" width`
# [jeremycherfas] I suppose I should create an issue too.
# [jeremycherfas] Which means registering for sourcehut … or using email.
[manton] joined the channel
# [jeremycherfas] I haven’t tried that, ever.
# [jeremycherfas] I would really prefer to improve how I work with what I already know a little.
# [jeremycherfas] The data are embedded in the CDATA for description, as here https://gist.github.com/jeremycherfas/a692791941e49fe3166d9138ce8420c4
# [jeremycherfas] So I am using the simplest tools I know to extract them, and that discrepancy between twh two feeds threw me off.
jalcine[m] joined the channel
[chrisaldrich] and fredcy_ joined the channel
# [jeremycherfas] I think I solved it more easily by using offset in strpos() to find the 2nd occurrence of “.
# [jeremycherfas] But I need to check it works. Then I will call it a day and move to doing config.php tomorrow
# [jeremycherfas] Shazam! https://stream.jeremycherfas.net/content/photos/ top one sent live from a Bibliogram RSS feed. And I don’t care that the response from WithKnown was `Error: "" - Code: 0`
# [jeremycherfas] Yeah, ignore the unfurl here on Slack; anyway, to bed, a happy man.
# [jeremycherfas] Once I obscure all the personal details I will share the code for anyone to improve upon.
# [jgmac1106] jeremycherfas++
jamietanna joined the channel
# jamietanna !tell [tb] instead of having the `current_permalink_url` and `previous_permalink_urls` with Hugo, I've been using `slug` (to give me the current URL) and `aliases` to store the previous ones, as that'll allow for setting up redirects with Hugo, too!
[tantek] joined the channel
# [jgmac1106] snarfed any clue as to why this bridgy publishing failed https://brid.gy/log?start_time=1595974550&key=agdicmlkLWd5clELEg1QdWJsaXNoZWRQYWdlIipodHRwOi8vZHJtYWMudGVjaC00LXRlZW5zLmNsdWIvMjAyMC8wNy80Ny8MCxIHUHVibGlzaBiAgNDW_8WcCQw
[snarfed] joined the channel
# [snarfed] hi [jgmac1106]! yup, it says at the bottom. “Couldn’t find link to www.brid.gy/publish/twitter” . https://brid.gy/about#must+also+include
# [jgmac1106] okay so gwg is this a syndication links issue?
# [jgmac1106] no ^^ good idea
# [jgmac1106] I will just have to use the bird machine for a bit until I get things sorted..
[fluffy] joined the channel