Gajim - 2018-07-15

  1. Cal How do I merge chat history between two different XMPP accounts and two different versions of Gajim (one sandboxed)?
  2. lovetox that would be a lot of work
  3. lovetox probably not worth it
  4. rom1dep lovetox: messagewindow@803f0e8e6385 is really nice
  5. Daniel rom1dep, share the hype, post some screenshots ;)
  6. Maranda hmm Gajim sends so many chat states :O
  7. bot Philipp Hörist created an issue in _gajim_ < >: #9246: < Create Formular for Brew to install Gajim >
  8. bot Philipp Hörist pushed 2 commits to branch _refs/heads/master_ of _gajim_ < >:
  9. lovetox Yeah Maranda, i do a lot of refactoring right now, soon i will get to the Chatstates module
  10. lovetox then i will silence this a bit more
  11. zinid lovetox, do you have any eta to implement avatars inside the groupchat window? how high is it on your todo list? is there an opened issue?
  12. lovetox its already implemented in master
  13. lovetox zinid
  14. zinid really???
  15. lovetox maybe you should switch to nightlys or run from source
  16. zinid you told a few days ago it's only on your todo list ;)
  17. lovetox hm no, that must be something different
  18. lovetox its implemented for a month
  19. lovetox ahh
  20. zinid I mean rendering an avatar in front of a tex message in groupchat window
  21. lovetox you dont mean MUC avatars
  22. zinid *text
  23. lovetox its relatively high, first we want to get rid of the notebook tab style and provide a list with open chats on the side like in dino
  24. lovetox if this is finished then we can go and do a redesign of the textview
  25. zinid hum, why is it related? redesigning notebook into list is much more work, no?
  26. rom1dep
  27. rom1dep zinid: ↑
  28. zinid ah
  29. zinid got it
  30. rom1dep I'm not so much after less dense chat histories/the bubble style, but having the choice would be neat
  31. lovetox it has nothing to do with each other, but both things are the UI elements with the biggest codebase
  32. lovetox and to do both at the same time would be foolish
  33. marmistrz lovetox, IMO the benefits are:
  34. marmistrz Btw. lovetox, I'd like to get the xep 0184 markers saved in the db, where should I start hacking?
  35. marmistrz Btw. lovetox, I'd like to get the xep 0184 markers saved in the db (make a contribution), where should I start hacking?
  36. rom1dep marmistrz: are you debating type anotation?
  37. marmistrz rom1dep, yep :P
  38. rom1dep is anyone opposing that?
  39. marmistrz rom1dep,
  40. rom1dep ohh
  41. marmistrz lovetox, actually that's the point of pep484 annotations that they are not checked in runtime (that would be an extra performance penalty). If you want that, you can use enforce. But the whole idea is to validate *statically* what you can, and leave the rest.
  42. marmistrz mypy does a great job on "the type has no such method" mistakes (unless you start monkey-patching)
  43. marmistrz mypy does a great job on "the type has no such method" mistakes that are so common (unless you start monkey-patching)
  44. rom1dep I know jabbercat doesn't want type annotations, because they still target the current debian, which has only py35 (debian being legacy by definition…). Ironically, newdebian might be out before jabbercat is usable, but that's another point ^^
  45. marmistrz oh, and there's one more benefit: 5. you get nice editor autocompletion :)
  46. rom1dep I see no reason not to use type hints if one can get past py35, it really brings a QOL boost
  47. marmistrz rom1dep, py3.5 has only pep536 missing, which can be worked around in 3.5 (see the PEP to see how)
  48. marmistrz
  49. rom1dep with comments?
  50. marmistrz yes, unfortunately. but it's only for variable annotations, not for function annotations. And possibly it will all work (but be less accurate) if you just ignore those variable decls, which can't be deduced
  51. marmistrz 95% of use cases are function annotations
  52. rom1dep it's worthy to decorate class members
  53. Cal Gajim 1.0.3 ignores my IBus input methods.
  54. Daniel Cal, have you seen this issue? Do you also experience high cpu usage?
  55. Cal No. I'm on Trisquel (Ubuntu 16.04) and Gajim 1.0.3 has not froze in the two days I've been using it.
  56. Cal I installed it with Flatpak.
  57. lovetox but most methods should not return one type
  58. lovetox i know that you can also do that with anotations but then you have the same thing like now
  59. lovetox you can not fix `None has no such method` with annotations
  60. lovetox other then to show a developer what types a method can return, but you could show this with simple doc strings forever
  61. lovetox methods that only return one type is actually pretty rare, mostly helper functions
  62. lovetox its most often at least 2 types, None and the actual type we want
  63. marmistrz lovetox, you can always return a `Union[Type1, Type2, ..., TypeN]` or create a common base class (interface)
  64. lovetox yeah but what does that help?
  65. lovetox point is method can return None, and dev can forget that, and so get a Type error
  66. lovetox or "has no such method"
  67. marmistrz lovetox, so you should return Optional[Foo]
  68. marmistrz and use --strict-optional (iirc it's how it's called)
  69. marmistrz and use --strict-optional in mypy opts (iirc it's how it's called)
  70. lovetox and that does then what?
  71. lovetox my point is that error "None has no such method" is only avoidable with unittesting
  72. lovetox ecept for the obvious mistake that a dev calls a method with wrong types
  73. lovetox but thats not how these errors happen
  74. lovetox these errors happen because dev forgets that a method can return None
  75. lovetox like in C ofter people forget to build in NULL checks
  76. lovetox i find unittests much more helpful, but obviously harder to implement
  77. lovetox especially if your app was not designed with unittest in mind
  78. marmistrz lovetox, I'm currently a little busy, I'll reply later. But why don't you just try experiment with mypy yourself, try writing a method that returns Optional and there's no None check or that returns None from a not-optional
  79. marmistrz I have a feeling it would answer that very question
  80. lovetox i look into it if i have time
  81. Daniel Cal, which version of ibus do you have installed?
  82. Cal Daniel, I have whatever's in Trisquel 8 (Ubuntu 16.04).
  83. Cal IBus 1.5.11
  84. Daniel you can read a bit in this issue. As far as I read this needs 1.5.17 to work with flatpak
  85. Daniel Cal ^
  86. Cal Daniel, thanks. Maybe I should just stick to old Gajim...
  87. Cal Wait, but that version gives me errors all the time about some Python thing missing.
  88. Daniel Hm?
  89. marmistrz lovetox: I'll try making some minimal example for you if I have a while tomorrow (there's a good chance I will)
  90. lovetox yes would be appreaciated
  91. rom1dep lovetox: type hints is good doc, it doesn't change the world, but it lets you have to guess less → less friction
  92. marmistrz lovetox, where should I start hacking to implement persistence of the xep 0184 receipts?
  93. marmistrz could you point me to the relevant modules?
  94. Zash Whyyyyy does Gajim try TLS on the normal port?
  95. Zash It breaks my debugging
  96. Semperverus wait... are you asking why a function is functioning properly?
  97. Zash What?
  98. Semperverus why would gajim use tls on the port it's designed to be used on
  99. Zash It's not
  100. Semperverus im confused
  101. Semperverus 443 is the default tls port, what are you expecting it to use?
  102. Zash What
  103. Zash It's doing TLS on 5222
  104. Semperverus oh that one
  105. Zash Without doing STARTTLS first
  106. Semperverus sorry im thinking ssh
  107. Semperverus er
  108. Semperverus ssl
  109. Semperverus i need coffee...
  110. Zash And then my debugging throws the TLS handshake all over my terminal and it messed up
  111. Semperverus that's odd
  112. Zash Terminals don't like random binary
  113. lovetox marmistrz, there is no module for it right now, it would really be a hack, im refactoring code into modules right now, after i did 184 i ping you, then you can add the stuff
  114. lovetox Zash must be some fallback thing, does your server has setup 0368?
  115. Zash lovetox: nope
  116. Zash I don't like 368
  117. lovetox im not saying you should do that
  118. lovetox im just figuring out in which path this happens
  119. lovetox so what does gajim do
  120. lovetox from the code i see it should do STARTTLS on 5222
  121. lovetox and TLS on 5223
  122. Zash 2018-07-15T20:06:46Z socket debug server.lua: accepted new client connection from ::1:43454 to 5222 2018-07-15T20:06:46Z c2s55bfa9cd43a0 info Client connected 2018-07-15T20:06:46Z c2s55bfa9cd43a0 debug RECV(240): ^V^C^A^@<EB>^A^@^@<E7>^C^C<97>T^S^Uc<C6><FB><ED>
  123. Zash It does that twice
  124. Zash and the 3rd time it speaks normal XMPP and does <starttls> and so on
  125. marmistrz lovetox, kthx
  126. Zash And this is with a fairly clean setup, pretty much only changed the windowing mode to all-in-one and disabled notification sounds
  127. lovetox it has nothing to do with settings, could be a bug, wait im looking into it
  128. lovetox do you have setup a srv record?
  129. lovetox could you log with -l gajim.c.resolver=DEBUG
  130. lovetox and tell me the result it prints
  131. Semperverus would this help lovetox? (the IM observatory tls testing kit)
  132. lovetox i dont think so
  133. Zash lovetox:
  134. lovetox k thanks i take a look later
  135. Zash thanks
  136. Zash > (W) gajim.c.m.pubsub Error: item-not-found What's this?
  137. Semperverus so one fun bug i just found, if I drag my contacts around but just set them back down (not in a new group or anything), they disappear
  138. Semperverus restarting gajim brings them back
  139. lovetox yes roster has many such bugs right now
  140. lovetox you can change groups if you right click the contact and click manage
  141. lovetox Zash probably bookmarks not found
  142. Semperverus oh, this is more just me accidentally dragging contacts instead of clicking them (which is more my fault)
  143. lovetox Zash can you please log with gajim -l gajim.c.connection=DEBUG
  144. lovetox this should show if gajim really does more than one connection attempt
  145. Zash .. but now it didn't
  146. lovetox ok thats good
  147. Zash reset config and tried again:
  148. lovetox that means its probably a problem with reconnecting
  149. lovetox rather than connecting on the first start
  150. lovetox did you also check on the server?
  151. Zash ... now it doesn't do the TLS thing
  152. lovetox ok when it happens again please check what in gajim did trigger the connect, was it a connection loss, or did you switch the status from off to on etc
  153. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _python-nbxmpp_ < >: *7bccbcba* < > Add more debug output for handlers
  154. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ < >: *8fbafcd8* < > Register mam handler correctly