#dev 2020-07-28

2020-07-28 UTC
[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]
[chrisaldrich] I'm interested in the "workflow" of a post in that regard and how "post status" may reflect it e.g.
#
[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]
wondering if documenting that kind of a "work flow" or lifecycle of a post might make sense on the "post status" page. GWG WDYT?
#
[tantek]
(I've certainly done that kind of a life cycle with some of my posts)
#
[tantek]
and a while ago I realized I consider making a post publicly viewable AND POSSEING (or at least including it in "feeds" for trad readers) the act of "publishing", though my "published" datetime often reflects when I *started* writing a post. Still not sure of the specifics of that one
#
[tantek]
would be curious what action / state others associate in their head with the act of publishing / status of "published"
#
aaronpk
so i've had this problem
#
aaronpk
i start writing a post in quill, post it as a draft to my website, where it gets marked with a datetime. then hours (or a day) later I actually publish it, and I have gone in and changed the date to reflect the time it went public
#
[tantek]
I really think this is a problem worth talking about
#
[tantek]
I kind of want to add "dt-created" as an experimental property to get myself unstuck from this
#
[tantek]
and then I can use "dt-published" to accurately reflect what I think "published" means to me.
#
aaronpk
one way it actually affects my post more than just deciding what to show is that my URLs are based on the published date
#
aaronpk
so if I publish it the next day, the URL would change
#
[tantek]
well, same same, and if publish it the "next day" (after I've slept), then I update the date of the URL before I publish it
#
aaronpk
right, so that implies posting a draft with a dt-created would give it an initial URL based on that date, then if the actual published date would cause the URL to change, actually go move the post
#
aaronpk
(and set redirects in case you've shared the draft with someone)
#
[tantek]
if it's just "after midnight" I don't care, I leave the "published" date as the created date
#
[tantek]
I have lots of 23:5x posts because of this lol
#
[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
#
[tantek]
actually my feed has a 10minute "post delay" as well, so stuff shows up sooner on my home page than my legacy sidefile feed 😛
#
[tantek]
because I can update my home page, whereas as soon as some legacy reader has cached my Atom feed post, it rarely updates it when I fix typos, links etc.
#
[tantek]
anyway I'd like to document these somewhere somehow (post status feels like only part of the question), and see if there is some "overall model" of the "life cycle of a post" that accurately reflects how maybe 80/20 of us deal with posts (especially longer posts where we ask for reviews)
#
[tantek]
it feels really close (especially the request review / do more edits steps)
#
[KevinMarks]
What happens if its a bim boundary?
#
GWG
dt-created is also a photo thing, by the way
#
@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
#
[tw2113]
Thinking this is probably the same thing https://css-tricks.com/the-github-profile-trick/
#
aaronpk
It's a liiiitle more than that ;-)
#
[tw2113]
i have both open to read shortly
[tantek] joined the channel
#
[tantek]
for extra credit I'd like to consider how close this is to how "pull requests" and reviews on them work, even (especially?) pull requests "on your own project"
#
[tantek]
[KevinMarks], bim boundary means it gets moved to a new storage file too
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
#
Loqi
[muesli] markscribe: Your personal markdown scribe with template-engine and Git(Hub) & RSS powers 📜
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
#
Zegnat
I have heard talk of this at work. It seems interesting. But I do wonder at what point this will turn into reinventing something like [insert name of favourite WordPress cache plugin here].
#
Zegnat
Ie. are you really tunning a static site, or are you running a dynamic site with a prewarmed static cache
#
[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
#
Zegnat
Oh, yeah, definitely not knocking the idea!
[Murray] joined the channel
#
[Murray]
Nice to know it's already out there! Keep wondering if I should bother going through the hassle of switching from Gatsby, this might be the feature that tips me over that edge...
#
[grantcodes]
Gatsby has or is getting incremental build though I think? Which are similar but different
KartikPrabhu joined the channel
#
jacky
[Murray]: if you're with Gatsby tbh, stick with it
#
[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
#
[Murray]
able to just rebuild that specified page dynamically, which should take seconds
[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
#
GWG
Team WordPress++
#
Loqi
WordPress has 0 karma over the last year
#
[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++
#
Loqi
WordPress has 1 karma over the last year
#
[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++
#
Loqi
WordPress has 2 karma over the last year
#
[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.
#
GWG
We are working on new webmention code
#
[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
#
GWG
[jgmac1106]: Just trying to move forward on that
#
[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
#
Zegnat
!tell [jgmac1106] you ever document ReclaimHosting issues on the wiki page? Might be a good one to do, as that would be important for people looking at hosting on indieweb.org
#
Loqi
Ok, I'll tell them that when I see them next
#
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?
#
Zegnat
curl by default, in PHP, will halt until it resolves. so unless you are using multicurl to fire multiple requests they are going in sequence and not in paralel.
#
Zegnat
That is to say, you should not have to worry about it.
#
Zegnat
If known is slow, the only thing you need to worry about is PHP iself timing out by hitting its own max execution time of a script. In case curl is waiting too long for Known.
#
Zegnat
… was that the answer you were looking for, jeremycherfas? Hard to be more specific without knowing more specifics about the thing you are running
#
jeremycherfas
Absolutely that is a great answer zegnat++
#
Loqi
zegnat has 23 karma in this channel over the last year (65 in all channels)
#
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
#
Zegnat
[LewisCowles]: I mentioned you in #indieweb-chat earlier today
#
[LewisCowles]
nice tip dude. I hope there are more than 3 people interested
#
Zegnat
Hahaha, those were just the people I remembered from previous conversations on the subject :D Wanted to drop it in chat when I read about it
#
Loqi
ahahahaha
dckc, [MitchWagner], [jgmac1106] and leg joined the channel
#
[LewisCowles]
I see Loqi is as mad as ever
[schmarty], KartikPrabhu and [tw2113] joined the channel
#
[tw2113]
and he’s not going to take it any more?
[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
#
[snarfed]
what happens when an update changes a post’s type?
#
[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
#
[snarfed]
what if an update changes a post’s mf2 properties such that it’s effectively different type, but the update doesn’t explicitly change its 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
#
[snarfed]
the big picture point is that type can be derived, so it’s much easier and more effective to just do that when you need to, and not explicitly store it at all
#
[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
#
[tantek]
indexing by existence (perhaps ordinality even) of properties would provide more insight than top level "types"
#
[tantek]
snarfed++ thank you for that line of questions, need to document that somewhere
#
Loqi
snarfed has 50 karma in this channel over the last year (88 in all channels)
#
[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
#
[tantek]
This is hard thing to properly explain / walk through, and so the best we've come up with is lines of questions like what snarfed asked
#
[tantek]
a lot of us built our early tools with top down typing assumptions, some even in the URLs we used for posts, and found over time that they were inaccurate in practice or actual obstacles for making things work better.
#
[tantek]
some of us have made better progress with the necessary rewriting / restructuring than others 🙂
#
[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!
#
Loqi
tantek has 22 karma in this channel over the last year (124 in all channels)
#
[tb]
snarfed++ thank you 🙂
#
Loqi
snarfed has 51 karma in this channel over the last year (89 in all channels)
#
[snarfed]
welcome! good luck!
#
swentel
does anyone know of an online platform tool for managing string translations, where people can collaborate ?
#
swentel
hmm actually, just bumped into POEditor, looks interesting
#
swentel
just need to count the amount of strings I have in Indigenous :)
#
swentel
oh and they have an open source option too
#
sknebel
swentel: seen some open projects use a service called transifex, but no experience with it
#
swentel
yeah, that one came up a lot too
[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
#
Zegnat
Sounds like you have made a lot of progres then, [jeremycherfas]!
#
Zegnat
Yeah, bibliogram has the same problem as all others, in that Instagram could try and block them. Hopefully the hydra effect will mean there are always more instances up than blocked (unlike, say, OYG which was very much SPOA).
#
[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
#
Zegnat
[jeremycherfas]: is it an option to use an HTML parser instead? So you can getAttribute('src') on it?
#
[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.
#
Zegnat
You could always cheat a little, use strpos() to find the to get the location of both alt= and width=. Then use min() to get the one that occurs first, and feed that right into your substr().
#
Zegnat
That would introduce the least "new tech"
jalcine[m] joined the channel
#
Zegnat
To really parse that one correctly you would first want to use the XML parser to find the <description> element, and then reparse the content of the <description> element so you can get at the <img>. That adds a lot more complexity, for what is probably only limited extra stability.
[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++
#
Loqi
jeremycherfas has 8 karma in this channel over the last year (36 in all channels)
#
Zegnat
[jeremycherfas]++ for figuring out Instagram PESOS straight onto his stream!
#
Loqi
[jeremycherfas] has 9 karma in this channel over the last year (37 in all channels)
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!
#
Loqi
Ok, I'll tell them that when I see them next
[tantek] joined the channel
[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
#
[snarfed]
looks like you triggered that via webmention, not interactive? was that from inside wordpress? GWG when a bridgy publish wm fails, do you show the HTTP response body to the user? it includes the explanation, like this one ^
#
[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..
#
[snarfed]
[jgmac1106] you can fix this for now by just adding <a href=“httpsbrid.gy/publish/twitter”></a> to your post(s) manually
#
[snarfed]
(er, sorry, missing a :// )
#
[snarfed]
ah nm i see you already figured that out in #indieweb-wordpress
#
GWG
[snarfed]: It's on my list to do
[fluffy] joined the channel