#dev 2017-11-18

2017-11-18 UTC
eli_oat, [kevinmarks] and KartikPrabhu joined the channel
#
[kevinmarks]
Yaml started out simple, but the author was keen to make it flexible so he added most things people asked for.
#
[kevinmarks]
So it became powerful enough to inject objects into Ruby sites and took down RubyGems
#
loqi.me
edited /YAML (+137) "[kevinmarks] added "https://venturebeat.com/2013/01/30/rubygems-org-hacked-interrupting-heroku-services-and-putting-millions-of-sites-using-rails-at-risk/" to "See Also""
(view diff)
#
Loqi
ok, I added "https://venturebeat.com/2013/01/30/rubygems-org-hacked-interrupting-heroku-services-and-putting-millions-of-sites-using-rails-at-risk/" to the "See Also" section of /YAML
#
tantek
wow there's some sort of lesson there
[chrisaldrich], [mrkrndvs], renem-, renem, KartikPrabhu, snarfed and tantek joined the channel
#
tantek
alright, trying a slightly longer than 140c RSVP POSSE
#
tantek
let's see if this works
#
tantek
it worked!
tantek, KartikPrabhu, bengo and [jeremycherfas] joined the channel
tantek and [kevinmarks] joined the channel
#
loqi.me
edited /Reading.am (+118) "Zegnat added "https://github.com/reading-am/reading-extensions/pull/1#issuecomment-345412360 Fixed Firefox extension is en route." to "See Also""
(view diff)
#
loqi.me
created /Cross-posting (+476) "prompted by Zegnat and dfn added by jeremycherfas"
(view diff)
#
loqi.me
edited /Cross-posting (+32) "/* See Also */ new section"
(view diff)
[markmhendrickso joined the channel
#
sknebel
schmarty: is your webmention.io cache thing you mentioned a few days ago published somewhere?
#
schmarty
sknebel: not yet! I need to replace some hard coded bits, write a readme, and name it first.
[markmhendrickso and snarfed joined the channel
#
snarfed
looking at tantek's failed twitter POSSEs from last night: https://brid.gy/twitter/t#publishes
#
snarfed
two URLs and a photo. photos supposedly don't take up chars any more. counting the URLs as 23 each, it's exactly 280 chars...and yet twitter failed with "Tweet needs to be a bit shorter."
#
snarfed
interesting, when i paste it into twitter's UI, it says it's 3 chars over
#
snarfed
well one part is it counts the camera emoji as two chars. argh.
#
snarfed
...and the ellipsis emoji is also two chars
#
snarfed
seems like most emoji count as two chars. seems like that wasn't true before...?
#
snarfed
argh i so don't want to spend time on this ??
#
Zegnat
I seem to recall reading something about them going from unicode counting back to byte counting?
#
Zegnat
Let me see if I can find it snarfed.
#
Zegnat
That’s why e.g. Japanese characters now get counted for 2 again, because they wanted to normalise content length for all languages (or something like that)
#
snarfed
says they still count code points, not bytes
#
Zegnat
“A "max length" is no longer defined, and instead twitter-text uses a weighted scale specified by the Unicode code point ranges.” - https://developer.twitter.com/en/docs/developer-utilities/twitter-text.html
#
Zegnat
Yes, we really wanted to weigh unicode glyphs to determine their “length”. Ugh.
#
snarfed
uh...huh...
#
Zegnat
So I guess that is why they went for the little progress circle? Because they are using some weighting and comparing that to some sort of max permitted weight?
#
sknebel
and they ahven't even released the new version of the utility yet
#
sknebel
so even if I could just integrate their code... I can't cause it doesn't exist
#
Zegnat
Yep. And for PHP you will always be guessing because they simply refer to “third party libraries”. So there is that too.
#
Zegnat
pours snarfed a stiff drink
#
snarfed
where's kylewm when i need him. bridgy just uses https://github.com/kylewm/brevity
#
Loqi
[kylewm] brevity: A small utility to shorten posts to an acceptable tweet-length summary.
#
snarfed
7:30am here. i wish.
#
Loqi
[snarfed] #8 Recent Twitter char counting changes ?
#
Zegnat
Yeah, that one simply counts using Python’s len(). So it is correct in all situations where implementations use the same (logical IMHO) counting. Twitter just decided to go with something that sounds like their own counting invention
#
sknebel
so unless I'm missing something, they haven't published their weighting lists. so it's impossible right now to implement that right, without massive try and error
#
Zegnat
Unless UC somewhere defines these weights, but I have never seen it mentioned anywhere except for here
#
snarfed
thanks guys! i appreciate the help investigating. feel free to follow up on the issue
#
sknebel
" The algorithm for length calculation is as follows: ... It is important to remember that this length is not the absolute length of the Tweet" ...
#
sknebel
on https://developer.twitter.com/en/docs/developer-utilities/twitter-text.html they show some ranges, but the emoji clearly is not in there, so that's not the the full config
#
Zegnat
Hmm. Or that is the full config?
#
Zegnat
Note that default weight is x2
#
Zegnat
So the ranges they define are for characters that count as 1
#
Zegnat
Alright, so I guess we can start writing our own implementations then
#
Zegnat
But still. Yeesh
#
sknebel
... and tanteks tweet is 282 chars long according to that, not 283
#
sknebel
unless I lost a special char somewhere while copying
#
Zegnat
Yeah not sure what is going on there
#
sknebel
oh funny, python IDLE crashes when I try to paste an emoji
snarfed joined the channel
#
aaronpk
just caught up on that backscroll
#
aaronpk
what a nightmare
#
snarfed
yuuuup
#
snarfed
i get it now at least. details in the issue. still though.
#
sknebel
snarfed: when I tried to follow your steps the tweet seemed actually decode to one char shorter than it showed for you (I url-decoded the request to twitter)
#
sknebel
so I got 318 copdepoints, not 319
#
snarfed
huh ok
loicm joined the channel
#
sknebel
(I took the query to twitter from the first erroring one and urllib.parse.unquote.plus() it
#
sknebel
ah, you picked one with more newlines it seems. but 2 newlines added still doesn't give the same result. something wonky
snarfed, bengo, [miklb], loicm, KartikPrabhu, snarfed1, eli_oat, [eddie] and goodmode joined the channel
#
Zegnat
sknebel, seen snarfed’s update for tweet counting? Looks like he is treating char ranges as inclusive. Was that in the doc and did I miss it or did he figure that out himself?
#
sknebel
don't think that was documented what it means
#
sknebel
wondered about that, didn't test what it actually is
#
Loqi
misses it or did he figure that out himself too
#
Zegnat
Asked on the PR
[jeremycherfas] joined the channel
#
[jeremycherfas]
Loqi++ for sheer awesomeness.
#
Loqi
loqi has 5 karma in this channel (443 overall)
#
sknebel
Zegnat: tested it, is inclusive
#
Zegnat
That’s good
snarfed and [dgold] joined the channel
#
GWG
snarfed, I switched Bridgy Publish for WordPress over to query parameters for omit link and ignore formatting. Any ideas for other improvements?
#
snarfed
GWG: thanks! i don't use it, so i'm the wrong person to ask for itches
#
GWG
snarfed, you know more about Bridgy than anyone else
#
GWG
I found the query parameters option was more reliable than the classes because parsing WordPress themes with mf2 is inconsistent
#
snarfed
if i'm voting on your time, i vote for 1) nudging pfefferle to merge the two outstanding semantic-linkbacks PRs, and 2) drive everyone to figure out that mf2 plugin interaction standard
#
GWG
I missed the registration feature until you pointed it out
#
GWG
snarfed, I am in the midst of my update all plugins to declare 4.9 comparability before they scare people off
#
snarfed
hey yeah how do you do that?! i couldn't figure it out
#
GWG
Well, you upload a new readme without changing the version number is the easiest
#
snarfed
really?! that's...not obvious
#
GWG
But I am deploying my new testing environment to all plugins
#
GWG
The one that tests PHP compatibility
#
GWG
And text domain usage for i18n
#
GWG
So I am bumping up the version
#
snarfed
testing++
#
Loqi
testing has 2 karma in this channel (21 overall)
#
GWG
I have a PR to add it to Webmentions as well
#
GWG
It isn't unit testing, but I deployed my unit testing code to all plugins so I could add tests
#
GWG
The first test helped me find a bug in Post Kinds that I never noticed
#
GWG
snarfed, if you add any features to Bridgy that I can add to the plugin, tell me.
#
GWG
That's basically what I was asking
#
snarfed
GWG: bridgy is basically in maintenance mode
#
GWG
I may be contributing to Micropub again shortly.
#
GWG
I have been using it
snarfed and [miklb] joined the channel