#dev 2023-05-24

2023-05-24 UTC
pharonix71, [snarfed], gRegor and greglopez joined the channel; greglopez left the channel
#
IWDiscordRelay
<c​apjamesg#4492> This is cool: https://developer.chrome.com/blog/introducing-popover-api/
#
IWDiscordRelay
<c​apjamesg#4492> I wonder how this differs from the dialog element.
#
[KevinMarks]
I have a wrapper in mention.tech for internet archive too, which breaks relative links - that can sometimes be handy for sites that load annoying cruft, though it can sometimes lose the CSS too
gRegor and rocto joined the channel; kandr3s left the channel
rocto joined the channel
#
IWDiscordRelay
<c​apjamesg#4492> What could have happened?
#
IWDiscordRelay
<c​apjamesg#4492> [KevinMarks] rebooted.
#
IWDiscordRelay
<c​apjamesg#4492> Here was the error:
#
IWDiscordRelay
<c​apjamesg#4492> at Template.render (/home/james/bsky-link-preview/node_modules/nunjucks/src/environment.js:454:10) |
#
IWDiscordRelay
<c​apjamesg#4492> /home/james/bsky-link-preview/app.js:145 |
#
IWDiscordRelay
<c​apjamesg#4492> ^ |
#
IWDiscordRelay
<c​apjamesg#4492> if (reply.post.author.handle != author_handle) { |
#
IWDiscordRelay
<c​apjamesg#4492> |
#
IWDiscordRelay
<c​apjamesg#4492> TypeError: Cannot read properties of undefined (reading 'author')
#
vladimyr
Case of missing reply?
holiday_medley joined the channel
#
[KevinMarks]
Do you have the url that broke it?
#
IWDiscordRelay
<c​apjamesg#4492> No 😦
geoffo and greglopez joined the channel
#
[schmarty]
aaronpk: got a moment to peek at https://github.com/indieweb/representative-h-card-php/pull/6 and cut a representative-h-card-php minor revision? 😅
#
Loqi
[preview] [martymcguire] #6 build_url: treat empty fragment/query as absent
#
aaronpk
in about 15 minutes!
#
[schmarty]
amazing! aaronpk++
#
Loqi
aaronpk has 29 karma in this channel over the last year (91 in all channels)
#
[schmarty]
applied to the webring :}
#
Loqi
gRegor has 30 karma in this channel over the last year (90 in all channels)
#
[schmarty]
aaronpk++ thank you both gRegor++
#
[snarfed]
capjamesg you might consider wrapping your top level request handler in a try/except or something similar, maybe in your framework? ideally crashes like that wouldn't take down the entire app
gRegor joined the channel
#
[KevinMarks]
I think killing the whole app for an unhandled promise rejection is in a recent node version
#
aaronpk
see this is why i like php :P
#
rubenwardy
instead you get sql injection
#
aaronpk
lol that isn't really a thing anymore
#
[schmarty]
s/isn't really/doesn't have to be/
#
aaronpk
not since about... 2005
#
[schmarty]
plenty of ways not to wreck yourself with SQL in PHP but also plenty of "learn to PHP code" that's like `'INSERT ...' . $_POST['email_address'];`
#
aaronpk
true, but that isn't particularly the fault of the language, and is equally possible in other languages
#
gRegor
PDO++
#
Loqi
PDO has 1 karma over the last year
#
gRegor
Or more specifically, PDO::prepare++
mretka[p] joined the channel
#
IWDiscordRelay
<c​apjamesg#4492> PDO?
#
IWDiscordRelay
<c​apjamesg#4492> [KevinMarks] it feels brittle.
mretka[p] joined the channel; mretka[p] left the channel
#
[KevinMarks]
We need to add .`catch` after `.then`
[Ana_R] joined the channel
#
[tantek]
lol aaronpk yessss PHP++
#
Loqi
PHP has 1 karma in this channel over the last year (2 in all channels)
#
[tantek]
rubenwardy, SQL injection is a problem of using SQL, not PHP. No SQL, no problems. 😄
#
gRegor
capjamesg, PHP Data Objects, an interface for databases
sp1ff and KoolRocker12 joined the channel
#
vladimyr
Express doesn't play well with promises/async-await
#
vladimyr
You need to either manually wrap all your route handlers into try/catch blocks and propagate errors using next(err) invocations
#
Loqi
[preview] [davidbanham] express-async-errors: async/await support for ExpressJS
#
vladimyr
Under the hood it simply wraps all your handlers using https://github.com/davidbanham/express-async-errors/blob/master/index.js#L14-L26
#
vladimyr
Also these days it is preferable to use something platform agnostic like npm.im/hono or npm.im/h3 (that powers Nuxt)
geoffo joined the channel
#
gRegor
jamietanna, I listened to that podcast episode about stashpad via your post. Have you used that app? Seems interesting, not sure if it's worth the subscription, though.
geoffo joined the channel
#
[tantek]
!tell capjamesg during HWC you asked how I markup (or should) the virtual headings I have for Glossary and References and I noted they are plain text. The longer answer is, they’re a part of "block level" auto-markup (in contrast to inline level auto-linking etc.), and I have some ideas for that in the latter part of the table in https://tantek.com/w/Markdown#BeforeandAfter
#
Loqi
Ok, I'll tell them that when I see them next
#
bkil
[tantek]: After some more research I finally found a plausible explanation why _underscore_ is synonymous with emphasis and usually italicized in Markdown. Basically, emphasis is usually rendered in books in italics as it is easier to read and less obstructive, less harsh than underlines. At the same time, italics are much more difficult to reliably produce in handwriting and on early typewriters, hence why in the manuscript they just substituted underlines for
#
bkil
the editor.
#
bkil
After poking around some more on textfiles, I found some weird conventions, like *** WARNINGS *** that were capitalized and surrounded by one, two or three asterisk depending on how strong they should be taken. Note how the stars were separated by a space from the marked phrase itself. Kind of makes me want to bulk download the whole data set to do some stats on it, but probably wouldn't be worth the effort.
#
bkil
By the way, I also depict emphasis with underline on my Wiki viewer to make it compatible with Opera Mini as it can't render italic fonts. https://bkil.gitlab.io/static-wonders.js/userjs/wiki.c2.html