#dev 2023-05-28
2023-05-28 UTC
gxt__, gRegor, cdravcte, KMF and oizys joined the channel
# [KevinMarks] [capjamesg] any luck working out why bsky.link keeps dying?
# [KevinMarks] gemini << discussion of the spec by the curl author https://daniel.haxx.se/blog/2023/05/28/the-gemini-protocol-seen-by-this-http-client-person/
# Loqi ok, I added "discussion of the spec by the curl author https://daniel.haxx.se/blog/2023/05/28/the-gemini-protocol-seen-by-this-http-client-person/" to the "See Also" section of /Gemini https://indieweb.org/wiki/index.php?diff=88033&oldid=87132
gRegor, bterry and pharonix71 joined the channel
# IWDiscordRelay <capjamesg#4492> > if (reply.post.author && reply.post.author.handle != author_handle) {
# IWDiscordRelay <capjamesg#4492> > ^
# IWDiscordRelay <capjamesg#4492> >
# IWDiscordRelay <capjamesg#4492> > TypeError: Cannot read properties of undefined (reading 'author')
# IWDiscordRelay <capjamesg#4492> Maybe if author doesn't exist we should raise an error?
# [KevinMarks] that means post is undefined?
# IWDiscordRelay <capjamesg#4492> Yep. I misread the error.
# [KevinMarks] so how do we have a reply without a post?
# [KevinMarks] shouldn't that have been caught by the outer catch?
# [KevinMarks] can a reply be a like?
# [KevinMarks] quite, newer languages have a ? dreference
# [KevinMarks] My js knowledge is a bit retro
# [KevinMarks] node 14 - we should be OK
# Zegnat These days I just validate every object I ever get into my JS with something like https://zod.dev/. I would much rather error out when an external API gives me an unexpected body, then to hope my code is doing the correct thing
# [KevinMarks] I think james said 16
# [KevinMarks] one nice thing about nunjucks is that it is sensible about undefineds at the template level which makes showing nested things easier
# Zegnat For future me, non-Slack version of the link to what capjamesg said: https://chat.indieweb.org/dev/2023-05-20/1684620880432900
# [KevinMarks] OK [capjamesg], try that version
geoffo joined the channel
# [KevinMarks] Express should have that, yes.
# [KevinMarks] Maybe this is the promise handling problem
geoffo joined the channel
# [KevinMarks] Huh, I thought that was the point of using return when you call a nested promise so the resolves queue up. I'll have to look at this again.
# [KevinMarks] Async is harder than Promises because there is not a clear way to handle failure because you abstracted away the dual path stuff.
# [KevinMarks] We really need a new paradigm for writing these kinds of nested asynchronous things that can partially fail, because an async keyword that lets you pretend things are linear isn't really helping. Is this the universes way of telling me to learn elixir?
# Zegnat Some people are doing that in JS too. E.g. fp-ts has the concept of returning "Either"s from functions: https://gcanti.github.io/fp-ts/modules/Either.ts.html
# [KevinMarks] That's the point of a promise too though, except the value and the error are functions.
# [KevinMarks] you need a bsky account and (app) password, yes
# [KevinMarks] you can't do things like Promise.all([]) with await though
# [KevinMarks] OK, that works, though you still need a catch (and you might want allSettled)
[fluffy] joined the channel
# IWDiscordRelay <capjamesg#4492> Zegnat I can DM you an app password for an account if you want to play around.
# IWDiscordRelay <capjamesg#4492> Will DM.
gRegor joined the channel
# IWDiscordRelay <capjamesg#4492> https://xkcd.com/1174/
# Loqi [preview] [XKCD] App https://imgs.xkcd.com/comics/app_2x.png
# Gorro_Rojo[theyi <IWDiscordRelay> "<capjamesg#4492> https://xkcd...." <- i should be able to zoom in any app tbh
geoffo joined the channel