jdev - 2020-09-02


  1. eta

    wait, hang on

  2. eta

    a user just has one big MAM archive??

  3. eta

    it isn't per conversation??

  4. jonas’

    no

  5. jonas’

    just one archive, but you can filter

  6. eta

    oh yeah, filtering

  7. eta

    right

  8. eta

    was reviewing the Dino MAM code and it just pulls /everything/ from The Archive

  9. eta

    which is an interesting way of doing things

  10. flow

    eta, i'd assume most implementations do that

  11. eta

    hmm, reasonable

  12. flow

    just like mail clients sync their state of the imap server

  13. pep.

    Poezio doesn't, and tbh I'm not sure it will ever :/

  14. eta

    pep., does it only do MAM when you hit page-up

  15. flow

    just like mail clients sync their state with their imap server

  16. pep.

    On join also

  17. jonas’

    eta, does it handle gaps though?

  18. Zash

    And that's why, the first time you start those clients, it produces one bazillion notifications

  19. eta

    Zash, yeah, that dino behaviour is very stupid

  20. pep.

    The smart thing would really just be to fetch when you open a tab, or to have something (that Inbox is.. somewhat?) that says "You have to fetch MAM here, here, here and here"

  21. jonas’

    pep., also the annoying thing

  22. pep.

    Yeah well..

  23. eta

    pep., I thought conversations did the fetch-when-you-open-the-tab thing

  24. jonas’

    no, conversations does a full sync when it comes online

  25. jonas’

    I painfully notice that every single time

  26. eta

    oh

  27. eta

    disappointing

  28. Zash

    Sync 😞

  29. jonas’

    eta, why?

  30. jonas’

    it is the right thing to do

  31. jonas’

    otherwise you’re going to miss/delay messages

  32. eta

    jonas’, I can't do things like open an old conversation and have it load scrollback

  33. jonas’

    and users don’t like that

  34. jonas’

    eta, huh?

  35. jonas’

    it has the history locally

  36. pep.

    jonas’, I don't think it's the right thing to do as I said above :x

  37. pep.

    Or let's agree there are multiple rights

  38. jonas’

    pep., so you prefer to require manual user interaction to get notifications for messages which wree sent while you were out of network coverage?

  39. pep.

    "to have something (that Inbox is.. somewhat?) that says "You have to fetch MAM here, here, here and here""

  40. pep.

    You can hint the user that there are unread messages in other tabs and that they can go look at them

  41. eta

    jonas’, it doesn't, because I installed conversations after the time that this conversation happened

  42. lovetox

    to do it per contact, is unnecessary complex, you have to reliaze that there are almost no mam messages if you start your client

  43. jonas’

    eta, ah, AFAIK it’ll try to fetch stuff when you scroll beyond the local archive

  44. lovetox

    on a normal connection you can download 1000 messages in about 3 seconds

  45. pep.

    lovetox, and fetching all the world is painfully slow and annoying for most people

  46. lovetox

    there will never be 1000 messages waiting if you start your client

  47. jonas’

    lovetox, tell that to my conversations.

  48. jonas’

    and the gazillion of MUCs

  49. lovetox

    of course MUCs are only fetched if you join the muc

  50. eta

    ^

  51. eta

    the thing is, right

  52. eta

    I don't actually care about fetching the world

  53. pep.

    But you do join MUCs at startup :)

  54. pep.

    bookmarks etc.

  55. pep.

    poof 80 MUCs opened, MAM fetching, uuuuuuughhhh

  56. eta

    like you can totally do that in the background on a low-priority task or something

  57. jonas’

    pep., I am not

  58. pep.

    that

  59. jonas’

    I am in like five MUCs in C

  60. eta

    the thing which annoys me is when it makes the unread counts go to like 10000 on everything

  61. eta

    or generates notifications

  62. eta

    really, what we probably need is a XEP for read state sync

  63. pep.

    eta, agreed

  64. jonas’

    eta, agreed

  65. pep.

    Something that allows me to set the state in the past also plz

  66. eta

    it doesn't even have to be that hard

  67. eta

    an extra field in bookmarks + an extra field in roster

  68. lovetox

    there will not be many messages in MUCs

  69. lovetox

    you need a concept of a threshold

  70. eta

    lovetox, tell that to my high-velocity IRC channels

  71. pep.

    eta, so you only want to sync state in MUC? Not 1:1?

  72. lovetox

    up to you sync

  73. lovetox

    that means a public muc has a threshold of 1

  74. eta

    pep., and roster

  75. lovetox

    so you only sync one day

  76. pep.

    roster? :/

  77. lovetox

    a private muc has never many messages, so you sync everything

  78. pep.

    lovetox, that's your usage of private MUCs maybe

  79. pep.

    Not saying that I have, but I don't want to rule this out

  80. lovetox

    thats why you can change the thresold even for private mucs, if you have that one muc where 1000 messages a day are posted

  81. pep.

    If Snikket decides that their version of private MUCs will only have few messages and that's how they do MAM, then fine. But I don't want XMPP to decide that for me

  82. lovetox

    the one thing i learned is, you cant do this right without user interaction

  83. lovetox

    its impossible

  84. eta

    we need MUC categories!

  85. lovetox

    there is no magic algorythm that lets you do this in all circumstances right

  86. eta

    that way you can have a "low priority public MUCs" category

  87. lovetox

    you can simply choose the threshold per muc

  88. pep.

    eta, you don't exactly need to formalize that. Especially since they'll be different for different design guidelines

  89. eta

    true

  90. eta

    hmm, what would be the ideal primitive for read state sync though

  91. eta

    pubsub??

  92. pep.

    PEP probably

  93. lovetox

    and how do you store that

  94. lovetox

    on every received muc message update pep?

  95. lovetox

    and if multiple devices receive it

  96. lovetox

    all update it at the same time

  97. lovetox

    sounds not really nice

  98. Zash

    lovetox: > there will never be 1000 messages waiting if you start your client You haven't experienced infinitely persistent MAM, have you? It's super fun when your archive goes back to the beginning of MAM itself.

  99. lovetox

    does not mean you need to request it

  100. Zash

    But clients do this

  101. Zash

    And treats every message as new

  102. lovetox

    but i talked about your user archive

  103. lovetox

    not about mucs

  104. lovetox

    mucs you need to manage per muc

  105. Zash

    So was I (personal archive)

  106. lovetox

    in a user archive will not wait that many messages, that you have to manage it per contact

  107. pep.

    Well, start a new Dino profile and observe

  108. pep.

    Or maybe that got better lately? I don't remember

  109. eta

    nope

  110. lovetox

    thats why i sync only 7 days at first start

  111. lovetox

    if the user wants all his history he can click a button that downloads it once

  112. lovetox

    with a progress dialog

  113. pep.

    Yeah I'm not entirely fond of having arbitrary numbers like this. 7 days can still be empty and all of the chat happens on the 8th day or sth

  114. lovetox

    then hit the button :)

  115. pep.

    Weird UX :/

  116. lovetox

    not all, its easy to understand, and easy to implement

  117. edhelas

    Zash for the moment I never cleared MAM history on movim.eu :D

  118. lovetox

    its like whatsapp

  119. lovetox

    you set up a new device, and it will ask you if you want to sync your messages from google drive or something

  120. Zash

    I got the impression that Conversations fetches stuff per contact when you scroll up a bit

  121. pep.

    lovetox, who says whatsapp is good :p

  122. eta

    lovetox: the gajim history sync dialog is good, tbh

  123. pep.

    I haven't seen it in action, but from what I understand here, I'd rather fetch a set number of messages than a set number of days, at least

  124. pep.

    In poezio atm I try to have 2 pages of buffer at all times, so that I can display them instantly and only fetch previous to that

  125. Zash

    pep. here's an inbox prototype thing that's waiting for a client to prototype something against: https://modules.prosody.im/mod_map.html

  126. pep.

    k, I might have a look at some point

  127. pep.

    Slightly similar to Inbox right?

  128. pep.

    How do you count?

  129. Zash

    How how?

  130. pep.

    What's the count you're returning? What does it mean

  131. Zash

    Number of messages

  132. pep.

    what messages

  133. Zash

    All messages

  134. pep.

    All messages in the archive? All unfetched messages? All unfetched on this device?

  135. pep.

    All unread messages? (but fetched nonetheless)

  136. Zash

    It's essentially a MAM query that doesn't return the results, only a summary

  137. Zash

    It predates the whole notion of per-payload stuff that might be what people refer to as inbox

  138. pep.

    k

  139. pep.

    So it's all of the archive?

  140. pep.

    If I wanted to use this I'd mostly use @jid and <end/> I guess..

  141. pep.

    Maybe

  142. Zash

    Supposed to get you everything you need to show a "recent conversations" list

  143. eta

    so on top of this we just need a "recent mentions / notifications" thing

  144. pep.

    Zash, only for 1:1?

  145. Zash

    Yes

  146. Zash

    It's a MAM query that returns a summary. Not a thing that fixes MUC

  147. pep.

    :P

  148. Zash

    Best I can think for unaltered MUC (with MAM) is to join with history(maxstanzas=1), which gets you some of the same data

  149. eta

    reminds me to finish my protoXEP

  150. eta

    not that finishing the XEP will change anything though >_<

  151. lovetox

    i wonder how many people use Gajim

  152. lovetox

    i just checked chocolatey, we dont maintain the package there, but it has 7500 downloads Oo

  153. lovetox

    and thats a nerdy package manager for windows

  154. pep.

    Same person downloading it over and over again?

  155. pep.

    Or a single company downloading it for all their users? :P

  156. lovetox

    hm no its 7500 since existence, the last version has 300

  157. lovetox

    thats a bit more expected

  158. Zash

    lovetox: https://qa.debian.org/popcon.php?package=gajim might be of interest as well

  159. lovetox

    damn

  160. lovetox

    only rank 99700

  161. lovetox

    need to improve that

  162. Link Mauve

    “10:58:00 lovetox> there will never be 1000 messages waiting if you start your client”, tell that to my Dino, which I open maybe once a month, and is unresponsive for dozens of minutes while it fetches all of my pending messages.

  163. Link Mauve

    SQLite being the bottleneck here.

  164. Link Mauve

    Not XMPP or my ADSL connection.

  165. lovetox

    really? sounds weird

  166. lovetox

    did you ever google sqlite insert stats

  167. lovetox

    or you have a really slow harddisk

  168. lovetox

    https://stackoverflow.com/questions/1711631/improve-insert-per-second-performance-of-sqlite

  169. Link Mauve

    I have a fast SSD, it’s limited by sqlite on a single thread.

  170. lovetox

    there even the first try not optimized at all, insert 23000 records into a database

  171. lovetox

    per second

  172. Link Mauve

    lovetox, https://github.com/dino/dino/issues/853

  173. Ge0rG

    Link Mauve: sqlite is not the bottleneck, it's just incorrectly used.

  174. lovetox

    lets agree on, the bottleneck is probably how they use sqlite

  175. lovetox

    :)

  176. Ge0rG

    so far, 99% of problems with sqlite were at layer 8. It's one of the most robust pieces of software out there.

  177. Link Mauve

    I didn’t find anything obvious last time I looked at Dino’s usage, maybe you’ll have more luck.

  178. Link Mauve

    I’m… not very good at SQLy things.

  179. Link Mauve

    Zash, lovetox, Pidgin just recently got installed more times than Empathy in Debian! https://qa.debian.org/popcon-graph.php?packages=gajim%2C+dino-im%2C+pidgin%2C+empathy&show_installed=on&want_legend=on&want_ticks=on&from_date=&to_date=&hlght_date=&date_fmt=%25Y-%25m&beenhere=1

  180. lovetox

    never used empathy, seems it was pretty popular

  181. Link Mauve

    It was preinstalled with GNOME.

  182. Link Mauve

    But I’m sure most people just ignored it and installed Skype or whatever popular thing there was back then.

  183. lovetox

    ah

  184. Ge0rG

    Link Mauve: there are four indexes and four triggers on the `message` table. But maybe it's still accessing something index-less? dunno

  185. eta

    Link Mauve: put your sqlite in WAL mode

  186. eta

    will make Dino a lot faster