jdev - 2024-05-17


  1. wrath

    > yeah, its just easier to understand > > but for machines its harder to process Maybe for machines from the 1970s But we have webpages that take up more ram than Prosody now so that's not really a valid argument imo

  2. nicoco

    > ... copy paste from xsf@ ... > Hi. A question about avatar conversion (xep-398). > What's going to happen if I publish my vcard without photo? Will it reset avatar in pubsub? > > XEP says "A service MAY support conversion from vCard to PEP in order to display avatars in clients that only support XEP-0084.". > I assume it means if two clients are connected (one publishing vcard and second one supporting just xep-84, then the second one MAY receive pubsub update). and that's all. > From other side the xep insist all the control to be done via pubsub. So it's no clear should I always add an avatar to the publishing vcard or not. rion: I am not entirely sure, but I think the current "standard" behaviour is for clients to only use XEP-0084, then servers to support XEP-0398 because that's how we have avatars in groupchats, and finally there's XEP-0292 where you're not really supposed to put a photo, although it's technically supported but since it lacks the "hash update" mechanism of XEP-0084, it's not used in practice.

  3. nicoco

    I mean, clients should support xep-0153 if they want to display avatars in MUCs too, but AFAIK modern clients don't use it to set avatars. A useful resource? https://docs.modernxmpp.org/client/protocol/#avatars

  4. MSavoritias (fae,ve)

    and thats not even half the xeps mentioned there oO

  5. MSavoritias (fae,ve)

    this needs cleaning up

  6. MSavoritias (fae,ve)

    this -> xeps

  7. rion

    nicoco: 🙏

  8. rion

    Is there gpl2 compatible C/C++ implementation of emoji detector/extractor in text? I mean some sort of lib capable to detect where an emoji begins for example in utf16 encoded string and where it ends. Or maybe somebody has some good implementation in mind in some other language which I can port to C++.

  9. singpolyma

    rion: https://unicode-org.github.io/icu/userguide/strings/regexp.html

  10. singpolyma

    I use this regex: (\p{Emoji}.*\p{Me})|\p{Emoji_Presentation}|\65039

  11. singpolyma

    on individual grapheme clusters

  12. singpolyma

    which libicu can also break apart for you: ICU.brkBreak $ headZ $ ICU.breaks (ICU.breakCharacter ICU.Root) string

  13. rion

    singpolyma: does it consider zero-width-joiners, qualification and bunch of various modifiers?

  14. rion

    For example will it match this? 1F469 1F3FB 200D 2764 FE0F 200D 1F48B 200D 1F468 1F3FC ; fully-qualified # 👩🏻‍❤️‍💋‍👨🏼 E13.1 kiss: woman, man, light skin tone, medium-light skin tone Yes, there is one single picture after "#". If somebody sees many pictures, it's because of bad unicode of fonts support.

  15. rion

    For example will it match this? 1F469 1F3FB 200D 2764 FE0F 200D 1F48B 200D 1F468 1F3FC ; fully-qualified # 👩🏻‍❤️‍💋‍👨🏼 E13.1 kiss: woman, man, light skin tone, medium-light skin tone Yes, there is one single picture after "#". If somebody sees many pictures, it's because of bad unicode or fonts support.

  16. singpolyma

    Yes. If you grapheme segment that's all handled

  17. lovetox

    Fun with reactions, we just discovered that the GTK Emoji picker produces invalid emoji presentation sequences

  18. lovetox

    it adds a emoji variant selector on any emoji

  19. singpolyma

    That's not invalid

  20. singpolyma

    It's just not required

  21. lovetox

    im reading this differently

  22. lovetox

    https://www.unicode.org/reports/tr51/proposed.html#Emoji_Implementation_Notes

  23. lovetox

    > may have an emoji or text presentation selector added if the result is a valid emoji presentation sequence or text presentation sequence

  24. lovetox

    *if the result is valid*

  25. lovetox

    and its not valid

  26. singpolyma

    Why is it not?

  27. singpolyma

    Is the result not an emoji?

  28. lovetox

    because emoji presentation sequence is a defind set of emojis

  29. lovetox

    and this is not in there

  30. singpolyma

    Or text presentation sequence

  31. lovetox

    https://www.unicode.org/Public/draft/UCD/ucd/emoji/emoji-variation-sequences.txt

  32. lovetox

    every sequence thats not in that list is by definition not a valid emoji presentation sequence

  33. singpolyma

    It's somehow an emoji sequence that is neither an emoji sequence nor a text sequence?

  34. lovetox

    i dont know what it is, its a combination of codepoints not defined anywhere

  35. lovetox

    at least thats how i read the implementation notes

  36. singpolyma

    So you pick an emoji from the picker but the sequence you picked is an undefined sequence and then they add the selector to this undefined sequence?

  37. singpolyma

    Seems strange that an valid emoji gjyph would be an undefined sequence

  38. lovetox

    no, 📯️ for example, it has no defined emoji presentation sequence

  39. lovetox

    because its clear how this codepoint is to be displayed, no need to add any variation selector

  40. lovetox

    hence adding to this a selector is not defined anywhere

  41. singpolyma

    So that's not an emoji?

  42. lovetox

    depends, a font can simply render the first codepoint

  43. lovetox

    and ignore the second

  44. lovetox

    if you pass the whole string to a library

  45. lovetox

    and ask "is this string an emoji"

  46. lovetox

    it should say no

  47. singpolyma

    What are the two codepoints in this context?

  48. lovetox

    128239 and 65039 for this example

  49. lovetox

    65039 (U+FE0F) is the emoji variant selecotr

  50. lovetox

    it makes sense for receivers like fonts, to not fail on this

  51. singpolyma

    So is 128239 a valid emoji sequence by itself or not?

  52. lovetox

    thats on codepoint, and not a sequence

  53. lovetox

    a sequence are multiple codepoints

  54. lovetox

    yes of course the horn emoji is a valid emoji character

  55. lovetox

    but adding the emoji variant selector makes it not a valid sequence

  56. lovetox

    the same as you cant add a skin tone color modifier on the copyright emoji

  57. lovetox

    and say thats a valid sequence

  58. singpolyma

    I thought the thing you quoted said emiji selector could be added to any valid text or emoji sequence?

  59. lovetox

    > may have an emoji or text presentation selector added if the result is a valid emoji presentation sequence or text presentation sequence

  60. lovetox

    this sentence?

  61. singpolyma

    Ah, hmm. If the result is. I see it now. Odd way to define it but i guuss this is a gtk bug then technically

  62. singpolyma

    Probably not one that really matters, but yeah

  63. lovetox

    i just mention it here, because all people that now implement reactions, search for libs that check if something *is* an emoji

  64. lovetox

    and i think this will lead to funny problems

  65. singpolyma

    All my emoji code says if a graphene cluster contains emoji selector then the cluster is an emoji. But I realize now I developed this testing against gajim and Dino which is probably why i saw that so often

  66. lovetox

    haha bingo

  67. singpolyma

    I think thats still a correct thing, but yeah someone might hardcode a list or something and have problems

  68. singpolyma

    Though for reaction probably shouldn't care if it's an emoji orknot

  69. lovetox

    yeah? you will display any string i send you?

  70. singpolyma

    Why not?

  71. singpolyma

    The hard part is deciding two emoji with and without selector are "the same" for counting. Or the two kinds of red heart etc. if one wants to do that

  72. lovetox

    for one i dont design a reaction presentation bar, to contain any kind of string length

  73. lovetox

    second, it creates abuse potential

  74. lovetox

    as you cant moderate reactions for example

  75. singpolyma

    > as you cant moderate reactions for example Why not?

  76. lovetox

    ok technically

  77. lovetox

    ok technically maybe thats possible

  78. lovetox

    practically, building a gui for that sounds challenging, and finding support in other clients probably also

  79. lovetox

    and all for what? to let people say "fuck you" in a reaction?

  80. singpolyma

    Well new emoji get added so hard coding a list is asking for trouble

  81. lovetox

    i dont have that opinion, there are > 4000 emojis

  82. lovetox

    and like 10 of them are used most of the time

  83. singpolyma

    So if I send a new one to an older gajim as reaction it just won't show it?

  84. lovetox

    i guess so, you are right thats a downside

  85. lovetox

    not convinced its a downside enough to let everything through

  86. lovetox

    i mean the first gajim version with reactions will support 4000 emojis

  87. lovetox

    i think its pretty safe to say that holds for many years

  88. lovetox

    on that topic, will you add a fallback text to reactions?

  89. lovetox

    *

  90. singpolyma

    Yes

  91. lovetox

    and how do you reference the message which the reaction belongs to

  92. lovetox

    with a quote?

  93. singpolyma

    Yes, quote/reply as fallback

  94. singpolyma

    > and how do you reference the message which the reaction belongs to You mean which id do I use? Just as per xep I think

  95. lovetox

    no i meant in the fallback

  96. lovetox

    but you answered the question

  97. singpolyma

    Ah, yeah. Quote

  98. lovetox

    not sure i want to do that .. :/ on one side yeah can be useful, on the other side in MUCs where many clients have reactions, this probably floods the chat with quotes and reaction text

  99. singpolyma

    The alternative is thrt people are replying and it's invisible to some users

  100. lovetox

    yeah .. its probably the responsible thing to add the fallback text

  101. singpolyma

    If you don't like seeing 100 replies get a client with summary UI 😉

  102. chud

    Hello

  103. moparisthebest

    > and all for what? to let people say "fuck you" in a reaction? Well it's better than them replying "fuck you" :)

  104. lovetox

    no its not, because if they reply in a message, i can easily moderate it in many clients who support message moderation

  105. moparisthebest

    Can't those same clients moderate reactions?

  106. moparisthebest

    They'll even see it as a message until they implement it no? Should work out of the box

  107. lovetox

    i dont plan to moderate reactions

  108. lovetox

    but i also dont play to let people write messages as reactions

  109. lovetox

    but i also dont plan to let people write messages as reactions

  110. moparisthebest

    Why not? You can't whitelist reactions to prevent offensive ones...

  111. lovetox

    not that i did plan this, but why do you think there cant be a whitelist?

  112. lovetox

    i gave the reasons above, its not a easy task GUI wise to provide a UI to reatract reactions

  113. lovetox

    of course its relatively easy if there is *one* reaction

  114. lovetox

    hmm but probably i dont care by who, i only care about the image, so i could retract all

  115. moparisthebest

    I'm saying it's not like blocking "bad" reactions like 🖕 can prevent inappropriate reactions, imagine someone posts: > My mom just died And someone reacts: 😁🤣🎉🥳

  116. moparisthebest

    Yea I'd imagine you'd moderate all of that image

  117. lovetox

    yeah you can always be sarcastic ..

  118. lovetox

    true

  119. lovetox

    ... ok i guess its not that hard to do it in the gui if you retract all of one kind

  120. lovetox

    i think you convinced me, to look into moderation

  121. lovetox

    still dont want text as reaction

  122. lovetox

    we have messages for text .. no need to abuse reactions for it

  123. singpolyma

    Agreed that it's not something tibspend effort trying to support

  124. singpolyma

    But I probably won't spend a lot of effort to prevent it either

  125. lovetox

    but you provide no ui to make a text reaction or?

  126. lovetox

    which client would do this? how would a text reaction even be a thing

  127. lovetox

    maybe thats a good argument for not testing for emojis, because no client will offer text reactions anyway

  128. lovetox

    so that leaves nerds who send custom stanzas

  129. singpolyma

    Exactly

  130. lovetox

    still we will need somekind of emoji normalisation

  131. lovetox

    because dino will send always with a emoji variant selector, and conversation maybe without

  132. lovetox

    so 2 different strings, you want to count as one

  133. singpolyma

    yes. This is something one might want

  134. singpolyma

    also are ❤️ and ♥️ the same?

  135. singpolyma

    Or skin tones on thumbs up, count together or no?

  136. lovetox

    this are different hearts with different codepoints

  137. lovetox

    so no they are not the same

  138. lovetox

    i dont understand your skin tone question, its a different topic

  139. lovetox

    ah or you mean if you should add different skin tone variations of the same thumbs up

  140. lovetox

    yeah valid question

  141. lovetox

    i wouldnt to be honest

  142. lovetox

    different skin tones are different emojis

  143. lovetox

    the problem with the variant selectors is, they are not different emojis

  144. lovetox

    you could simply strip all selectors for counting

  145. lovetox

    i think i will strip them before putting them in the database

  146. lovetox

    presentation selectors is just about presentation in the gui

  147. lovetox

    as i already know how i want them to be presented, i can simply strip them on all incoming stuff, and this normalises it