#dev 2023-05-16
2023-05-16 UTC
[Tim_Nolte] joined the channel
# shreyanjain[m] wait, does marsedit support micropub in any form?
KMF joined the channel
# [tantek] it does not. there was a session about it in 2017 and the conclusion was that Micropub would need additional features (or a complementary spec) for MarsEdit to consider supporting it: https://indieweb.org/MarsEdit#IndieWeb_Support
geoffo joined the channel
[manton] joined the channel
epoch, [jeremycherfas] and gRegor joined the channel
# [KevinMarks] Looks like we need another pass at auth on bsky.link
angelo_ and [marksuth] joined the channel
# [KevinMarks] [capjamesg] OK, try that. I made it reauth if the refresh fails, and reset the timeout if we get a 401. There's probably a smarter logic along the lines Manton said using getSession, but this should get it out of the failed refresh without restarting.
# IWDiscordRelay <capjamesg#4492> Will review later.
# [KevinMarks] OK, but the sites down now, so at least restart it.
# [KevinMarks] also I found that resolveHandle doesn't need auth
# IWDiscordRelay <capjamesg#4492> Ah.
# IWDiscordRelay <capjamesg#4492> Deployed your fix.
# [KevinMarks] nice
# [KevinMarks] I left the logging on, so you may be able to see why if it fails again, unless there's some new reason
# [KevinMarks] [capjamesg] looks like it died again - can you check logs https://bsky.link/?show_thread=on&url=https://staging.bsky.app/profile/frazerbrown.bsky.social/post/3jvtlcwx4u62e
holiday_1 and bterry joined the channel
# [KevinMarks] Confirmed - the bluesky way of doing rich text is really annoying
# petermolnar "indices are UTF-8 bytes" 
# [snarfed] so startIndex/length in AS1/2, did they not exist? did I imagine them? I haven't found them in any of http://www.w3.org/TR/activitystreams-core/ http://www.w3.org/TR/activitystreams-vocabulary/ https://activitystrea.ms/specs/json/1.0/ https://activitystrea.ms/specs/json/schema/activity-schema.html . were they in some tag extension that I've forgotten about?
# IWDiscordRelay <capjamesg#4492> Did Twitter have an open source algorithm on how they counted characters?
# IWDiscordRelay <capjamesg#4492> I remember reading something about it.
# IWDiscordRelay <capjamesg#4492> What is a character count?
# IWDiscordRelay <capjamesg#4492> That’s what I read.
# IWDiscordRelay <capjamesg#4492> Yes indeed.
# bkil [snarfed]: As AP (and Fediverse protocols preceding it) are already working through HTML by default, adding an extension that decorated sections of the marked up HTML using byte offsets would sound a bit weird.
# bkil I think some widely used systems that were doing that were Java SWT StyledText, Apple NSTextView and some of Microsoft's widget toolkit, not sure which one https://github.com/bkil/wiki/blob/master/en/widget-toolkit-html-rich-text.md#user-content-java-swt-styledtext
# [KevinMarks] Also that can change with unicode releases.
# [KevinMarks] Anyway the link code I wrote this morning fails when there is an emoji before the link
# [KevinMarks] Also if you chop up utf8 at byte boundaries weird things happen
# bkil [KevinMarks]: Yeah, the Matterbridge bot transforms the whole message into garbage if the end is chopped off due to IRC limits in the middle of a multi-byte sequence.
[capjamesg], [Murray] and angelo joined the channel
# bkil [tantek]: So staying constructive, what syntax would you use to insert a multi-word phrase to a URL?
# bkil Adding parenthesis itself is extra cruft if you interpret it strictly. Shouldn't we then just anchor-link a URL to the preceding word everywhere where it is not on its own sentence or line?
# bkil "almost the same" vs. dogfooding - people had already been using Markdown for quite some time now and code talks.
# bkil If you want readability, adding ^ to footnotes is already cruft. Why not convert every inline URL to footnotes automatically when rendering? That would be a 0-syntax alternative.
# bkil self-evident vs. "just"
# bkil What is just?
# Loqi It looks like we don't have a page for "just" yet. Would you like to create it? (Or just say "just is ____", a sentence describing the term)
# [tantek] more on the footnotes syntax explorations is reasonably well documented in /footnotes
# bkil It is "self-evident" to me that a huge majority of sites worldwide not created using WYSIWYG are statically rendered or edited using mediawiki, CommonMark or RST, not some syntax that does not exist yet.
# bkil I also see that CMS the above markup types are way more popular than people editing HTML by hand.
# Loqi It looks like we don't have a page for "RST" yet. Would you like to create it? (Or just say "RST is ____", a sentence describing the term)
# bkil I'd love to look into your prior analysis on autolinking if you have it published anywhere.
# bkil RST is reStructuredText
# bkil [tantek]: Feel free to send me a URL or two if you find the analysis.
# bkil I would like to see your false positive and run it through my parser to see whether I made the same mistakes.
# [tantek] you may also be interested in the methodology of https://indieweb.org/text-first_design
# bkil Python Sphinx, Trac, GitHub, BitBucket, Distributed Proofreaders, Linux kernel, CMake is mentioned here https://en.wikipedia.org/wiki/ReStructuredText#Applications
# bkil There are more common ones than I remembered: https://en.wikipedia.org/wiki/Lightweight_markup_language#Comparison_of_lightweight_markup_language_syntax https://en.wikipedia.org/wiki/Comparison_of_document_markup_languages
# bkil '''Definitely'''
geoffo joined the channel
[chrisbergr] joined the channel
# [KevinMarks] Link offsets are bad, continued
geoffo joined the channel
[Caleb_Hearth] joined the channel
# bkil So, I don't think that CommonMark is the only way to go, neither do I think it is the way to go, but I've yet to see a competitor I could adapt.
# capjamesg The closest I can find is this: https://chat.indieweb.org/dev/2021-11-26/1637964078516600
# bkil I'd be happy to adopt anything for my needs. I would need an extension for gemini: something that is easy to reason about and easy to part, but with the basics also included (not the bare essentials that they have targeted)
# bkil easy to parse
# bkil Both
# bkil Easy to parse by both machine and humans. The CommonMark dialects handle subtle formatting with newlines differently and that confuses me as a reader as well.
# capjamesg Interestingly: https://chat.indieweb.org/dev/2021-06-26/1624719651804700
# bkil When I had to come up with a lightweight markup on my own way back, it was very similar to markdown (it was not widely know around then) At the same time, I would have never came up with the syntax oddness that we call mediawiki.
# bkil Looking the wiki chart posted earlier about alternatives, I can share a definite things about how things should not look like. At the same time, I could accept quite a few alternatives that I could happily adapt.
# capjamesg This was an interesting day in markdown: https://chat.indieweb.org/dev/2023-04-16
# bkil Yeah, I just added autolinking to my wiby chat client - it took just a few lines of code: https://bkil.gitlab.io/static-wonders.js/userjs/ghostchat-wiby.html
[schmarty] joined the channel
# [schmarty] enh, people are going to use whatever formats they feel like learning and sticking with. there are loads of reasons things "stick". generations of bbcode, incompatible wiki syntaxes, flavors of TeX and more have come and gone and will continue to do so.
# [tantek] capjamesg, which points in particular did you think were interesting? I feel all I got out of that discussion was encouragment to create a fragment permalink: https://tantek.com/w/Markdown#PrimeDirective
# [schmarty] i write a lot of markdown, mostly in whatever subset seems to work most places. i have to look up mediawiki syntax like 10x more often. 🙃
holiday_1 joined the channel
# [schmarty] tantek: as a counterpoint i struggle with my very own autolinking rules on my site all the time, both remembering (how) to use them and with making sure they don't break :zany_face:
# bkil I think BBCode was a hack for people too afraid to parse and sanitize HTML properly, but it's not very user friendly. Neither would I recommend LaTeX for normal people, although I did take all of my notes in it on my pocket computer on lectures!
# bkil Oh, autolinking just works is also a myth. Didn't I share the story about the Matrix client that "fixed" autolinking in a way that made Matrix room link break (because they include two hashmarks)? And the main developer was vehemently opposed to fixing it, despite me pointing to RFC text that clearly pointed at how it should be working.
# bkil Well, yes and no.
# bkil Let me find the references for you, back in 5.
# bkil TL;DR, if you don't break on spaces, you will have a bunch of ugly corner cases.
# [chrisbergr] Because I know html on an advanced level, I would always choose textile for my plaintext markup. https://textile-lang.com/
# [schmarty] tantek: whether footnote or bracket or dangling unicode superscript - i would argue that all linking (including autolinking) is a syntax and it must be learned and remembered
# [schmarty] fine goals to choose and aim for!
# [chrisbergr] tantek: As far as I get it you use plaintext for your website with autolinking, auto linebreak and so on. But without markdown? How do you do bold, italic, images on your site?
# [schmarty] in other news, i think i have just about finished porting the 🕸 from nodejs to PHP ??? a couple more tweaks to the gardening and then i'll need to decide how and when i am gonna roll it over.
# bkil https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 "If a reserved character is found in a URI component and no delimiting role is known for that character, then it must be interpreted as representing the data octet corresponding to that character's encoding in US-ASCII."
# bkil https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax - So basically yes, your URI can very well contain multiple hashmarks and a bunch of stuff that regularly breaks autolinkers that are too "smart"
# bkil [chrisbergr]: In my MVP social networking app, along with supporting HTML and a CommonMark subset, I have enhanced autolinking to also offer inlining images, videos and iframe'ing other rich external content based on the file extension, path, subdomain and domain. It could be further enhanced via OEmbed as many Fediverse servers are doing it. So basically, an author just posts a URL, while the reader will see an image (video player, shader animation, etc.) if
# bkil they have it enabled in their preferences.
# [tantek] bkil, you may want to instead reference the URL Living Standard https://url.spec.whatwg.org/
# bkil capjamesg: Yeah, something to think about. I sometimes feel that doubling characters for your markup is a bit of "cheating" and adds to the line noise.
# bkil See the charts of others who support your ways. I'm a bit disappointed that matrix chose to double stars for boldness https://en.wikipedia.org/wiki/Lightweight_markup_language#Comparison_of_lightweight_markup_language_syntax
# bkil (matrix as in the most commonly used matrix clients, of course the protocol itself uses HTML)
# [chrisbergr] bkil: That means if my image url does not contain the file extension for an image it would be displayed as an url, right?
# [chrisbergr] tantek: * makes so much more sense than **
# [tantek] [chrisbergr] yes. those two replacements are top of my replacements for Markdown table: https://tantek.pbworks.com/w/Markdown#BeforeandAfter
# bkil [chrisbergr]: Yes. Also assuming the domain or subdomain is not a well known one (can be edited by the user on a whitelist basis) I'm still playing with the UX concept of adding a "preview" button that would successively try to OEmbed/img/video/audio/iframe whatever the link points to in sequence for a few more round trips.
# bkil Could you perhaps share the use case where this would be a problem for you?
# [chrisbergr] You are using cassis for all of this, right? I just remember that I used it also many years ago before I dropped my self coded website for my wordpress site.
# bkil Even chat-uploads.iw adds an extension thankfully.
# bkil Yes, and it works just as I metnioned: it tries to generate a preview for it (server side) via OEmbed or fetching the resource directly.
# bkil At the same time, if you are working on a backend-optional app, the image is huge and the user would like to conserve bandwidth, this might not always be the best way to go.
# bkil If I'm producing rich content (i.e., a message akin to "HTML-email"), I sometimes desire to embed items into specific positions resized in specific ways. CSS selectors also allow you to load the version of the image that will result in the minimal amount of download as well via media queries.
# [chrisbergr] bkil atm I don't have a valid use case. I had issues with this using my own image uploader so I changed the urls providing a file extension https://images.cho.bz/uploads/1681858936.jpg?w=1280&fit=crop&q=100&sharp=10&dpr=1&s=f479fa32969398f8c253e96fee41ad84
# bkil Another thing about markup. I always found the concept of highlighting select parts of words fascinating, but the more content I generate the more I realize how useless this is. I.e., I can 100% live without such a feature and it makes the parser way simpler.
# [chrisbergr] tantek yes, visually this makes sense and it is easy to remember
# [chrisbergr] [snarfed] [] is for shortcodes
# [snarfed] https://codex.wordpress.org/Shortcode . also has a params syntax, but that's optional
# [tantek] I mean literally [https://example.com] means put an iframe here to http://example.com
# [tantek] this is not plain text: [embed width="123" height="456"]...[/embed] (from https://codex.wordpress.org/Embed_Shortcode)
# bkil Just looks like forked BBCode.
# Loqi It looks like we don't have a page for "bbcode" yet. Would you like to create it? (Or just say "bbcode is ____", a sentence describing the term)
# [tantek] capjamesg the usual, https://enwp.org/BBCode
# [chrisbergr] I'm thinking about implementing [spoiler]...[/spoiler] on my site 🙂
# [chrisbergr] And also I want some kind of trigger warning overly thingy... I also thought about some bbcode syntax for this.
# [chrisbergr] tantek: bbcode visible for me and for the readers this should be some expandable box
gRegor joined the channel
geoffo joined the channel
# Loqi spoiler post is a post that contains information that will spoil something such as a movie, in the IndieWeb this would be a post that communicated to a parser/reader that the content of the post might spoil info about a new book, tv show, movie, etc https://indieweb.org/spoiler
# Loqi content warning is a feature of a post create UI where an author can hide some or all of the primary content of a post due to concerns about negative impacts of the content upon viewers, and typically provide a text warning (eponymously named) with the nature of the concerns, which is initially displayed instead of the post content https://indieweb.org/content_warning
# [chrisbergr] Yes sure, if you can quickly create this page with the loqi promt I can edit the page with my plans/ideas 🙂
# bkil [chrisbergr]: See <details> and <summary> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
# [chrisbergr] I guess I need to learn how this wiki prompts work 🙂
# [chrisbergr] bkil oh thanks, that would be the perfect output for my implementation 🙂
# [tantek] here you go [chrisbergr]: https://indieweb.org/BBCode 🙂
# IWDiscordRelay <capjamesg#4492> ++
# bkil The markdown syntax leaves a lot to be desired and not many systems support it - StackExchange, Reddit ( >! ) https://meta.stackexchange.com/questions/1191/add-markdown-support-for-hidden-until-you-click-text-aka-spoilers/71396#71396 https://old.reddit.com/wiki/markdown
# bkil While Nheko uses: ||spoiler|spoiled|| https://github.com/Nheko-Reborn/nheko/blob/0839c641506c4624f392917c5c7ab278aa5a06ba/man/nheko.1.adoc#user-content-markdown-extensions
# bkil [tantek] [chrisbergr] : By the way, did you know Markdown already supports references via `whatever[1]` and then adding `[1]: http://example.com` at the end? It usually doesn't render as a subscript by default, but it's a trivial tweak to add. I also find it readable due to it occurring in free text a lot in scientific papers.
# bkil superscript
# bkil I've never encountered the alternative of whatever^1 in the rendered and printed form yet (thankfully), so that would probably surprise me.
# [tantek] bkil, I think you mentioned this previously https://chat.indieweb.org/dev/2023-05-03#t1683155013904700
# bkil I didn't get a response at that time. But I'm sure you've also shared your idea about the caret as well. Yes, and Haskell uses it for exponentiation.
# bkil I usually prefer the form whatever^
{1}
for clarity, though, but that actually results in worse results according to your taste.# bkil "Your" interpreted as in "IndieWeb" isn't that narrow in my opinion.
# bkil I don't have a strong opinion on this matter right now as nobody I interact with uses are prefers footnotes.
# bkil I'd like to add some more input then to the question. The Opera keyboard shows `[a-z./ ]`, backspace, cancel and enter by default, `[0-9()+*=&_'"@?!;:,%#-]` on the second page and can finally access`[][$<>{}^\\~|]` through another touch. That would make using / for /emphasis/ oddly easy. How does the layout of your on screen keyboard look like?
# [KevinMarks] As noted in https://indieweb.org/fragmention#rejected_double-hash_URL_style the URL spec doesn't allow # in fragments, expecting it to be escaped. Empirically we found some apps ended a URL at the 2nd # when inlining it.
# bkil A Blackberry seems to offer `[a-z$ ]` on touch, `[0-9()+*_'"@?!;:,#./-]` with `alt` and others through the `sym` button https://upload.wikimedia.org/wikipedia/commons/0/09/BlackBerryKey2LE3.png That would make utilizing $ in markup pretty convenient as well (along with coding in Bash, Perl or PHP). MathJax and Katex comes to mind.
# bkil Are any of you blogging about math topics or over a mobile phone?