Gajim - 2016-12-19

  1. lovetox hm to get this information out of gajim
  2. lovetox could be tricky
  3. lovetox never done it :)
  4. lovetox because we dont save disco results for different resources
  5. lovetox acutally i dont know what we do in this case
  6. lovetox hm never mind its no problem :D
  7. fm hey guys! a while ago i wrote a small syntax highlighting plugin for gajim. have been testing it with some friends since then and just fixed a minor bug. i think, it can be considered working now ;) if you are interested, I would be happy to add it to the plugin repo
  8. andrey.g That's good. I've relied on the existing omemo discovery mechanism.
  9. lovetox yeah though its more difficult with chat messages, because i cant really care about what resource is online
  10. lovetox only because a resource is online that doesnt support omemo, doesnt mean the user wants to send the next message unencrypted
  11. lovetox hey fm
  12. lovetox thanks :)
  13. lovetox could you make a merge request on
  14. fm np ;)
  15. lovetox could you tell me your username
  16. fm just signed up ;)
  17. lovetox i have to add you to the member list of the project
  18. lovetox ah found you
  19. fm lol :D
  20. fm thx
  21. fm gitlab is complaining when i try forking: Limit reached Personal project creation is not allowed. Please contact your administrator with questions
  22. lovetox ah one moment
  23. lovetox does it work now?
  24. fm nope
  25. lovetox now
  26. fm ok, looks better
  27. fm thx
  28. fm yap, worked
  29. andrey.g lovetox: do you plan to allow forking freely for all (like on github)?
  30. andrey.g And the merge request is ready.
  31. lovetox am yes but only for gajim projects
  32. lovetox so no private projects that are not related to gajim
  33. lovetox users who register a own account on gajim, can already fork 3 projects
  34. lovetox but there is some restriction on people who login with github accounts
  35. andrey.g Yes, of course. I'm asking, because Asterix had to allow me explicitly to fork gajim and now it seems the same issue with gajim-plugins by fm
  36. lovetox so we have to manually update these profiles
  37. andrey.g Aha, now I see.
  38. lovetox yeah we talked recently about this and we set a default of 3 projects for new members
  39. lovetox its not a problem to up that, but we fear spammers
  40. lovetox a bit so we see how it goes
  41. andrey.g Since there are gajim, plugins and nbxmpp, it is exactly what one would need maximum.
  42. lovetox hey i give you a 100 if you are motivated :D
  43. lovetox whoa
  44. andrey.g No-no, no need
  45. lovetox what does this
  46. lovetox plaintext, _, _ = state.decrypt_msg(msg_dict)
  47. lovetox i never saw something like that
  48. andrey.g this is used often in Golang. If you don't need all the results, you emphasize this by using _ instead of variable names
  49. lovetox niicee i needed this a few days ago
  50. lovetox and thought what a waste to have to use the vars
  51. lovetox andrey.g, another inconveinience with the plugin repo
  52. lovetox if i merge this, its like
  53. lovetox if i merge this, its live
  54. lovetox people will not get a update message because you didnt modify the version number in manifest.ini
  55. lovetox but if someone downloads the plugin he will get this
  56. andrey.g Oh, haven't thought about this. 1.0.1?
  57. lovetox question is
  58. lovetox do you need it live?
  59. lovetox because i wouldnt want to bother the people with update notes if there is not something that actually changes for them
  60. andrey.g No, I don't need it right now as release, if you mean this.
  61. lovetox ok, so we will merge it at a later point when you have all together so we could add it as a beta test
  62. andrey.g If I'd had already support for download resuming...
  63. andrey.g Unfortunately I've received no feedback on yet. Implementing this would require also changes in Conversations. Much work.
  64. fm lovetox, am done importing the plugin from github
  65. fm merge request is open ;)
  66. lovetox fm, looks great, i hope i have time tomorrow for a test
  67. lovetox could you squash all the commits into a single one?
  68. fm no hurry ;)
  69. fm if you prefer ;)
  70. lovetox for a initial commit i think its the best
  71. fm ok
  72. lovetox thanks
  73. lovetox have to go, have a good night all :)
  74. andrey.g good night
  75. fm gn8
  76. lovetox andrey.g i will write daniel tomorrow and ask him if he can comment again on the issue :)
  77. andrey.g lovetox: Thanks!
  78. andrey.g fm: If you allow me to make a suggestion, a good git practice is for every big feature to start a new branch, commit there and push this branch (never commit over master).
  79. fm well, i developed on github, so, i just merged in the code from there
  80. fm but yeah, i agree, better to use branches
  81. fm ;)
  82. andrey.g The mentioned suggestion is what one can find in github git flow.
  83. andrey.g OK ;)
  84. fm lol, i forgot to push the branch i used to import from github :D
  85. fm andrey.g, do you know whats prefered? should i just start the merge request from the branch or should i still squash the commits into one?
  86. fm ok, tomorrow then ;)
  87. fm good night
  88. andrey.g I'd say, if you already have splitted commits, it is very nice and in a separate branch they look as something distinct. For me personally splitted commits are useful, if changes are made at many places to have a better overview, what is related to what. Since your plugin is new, it might be not such relevant, as lovetox mentioned. (For history preservation and learn purposes I'd like the original.)
  89. andrey.g Good night.
  90. fm that was my intention, to preserve the history of the github repo
  91. fm even though the history in this case is realy not that important ;)
  92. fm anyway, tomorrow...
  93. linus Fwiw I find the practice of squashing commits with nontrivial changes together terrible :p
  94. fm agreed
  95. linus Like at work, I worked on porting our huge application from django 1.6 to 1.7. All of that work got squashed into one commit when it was merged in. That was later regretted.
  96. SaltyBones Anybody know what happened to this conversations muc?
  97. SaltyBones s/this/the/
  98. linus It's still there...
  99. linus
  100. SaltyBones Gajim tells me "group chat does not exist"
  101. SaltyBones Maybe it's an s2s problem.
  102. linus Or a gajim problem. Those aren't unheard of either :p
  103. SaltyBones true but I have the same problem with conversations itself
  104. lovetox fm no you should not merge your PR yourself as it would be defeat the purpose of a PR so that people can test it before it goes live
  105. lovetox and every push to the plugin repo is instantly available to all users, there are no releases
  106. lovetox also i would say to squash trivial commits, which are almost all your commits
  107. lovetox that you moved files into a subdir, or how you build up the Readme file over months i would say has no real value for us later
  108. fm lovetox, I will open a new merge request later with all the commits sqashed and the fixes for the instructions proposed by Asterix (they were still for my github version...)
  109. fm "you should not merge your PR yourself" did not intent to do so ;)
  110. fm got a little late yesterday....
  111. lovetox thanks, i tested the plugin
  112. lovetox and its an amazing contribution, love it :)
  113. fm cool :)
  114. lovetox i said this about merge yourself, because you could do it, gitlab doesnt give us much choice with permissions
  115. fm will see if i can find time to port it to gtk3, bt probably not before new year....
  116. lovetox gtk3 is in no hurry
  117. fm ok
  118. fm can I update prs in gitlab? or should i close and reopen it?
  119. lovetox no you can update
  120. lovetox just do your changes, afterwards i push with git push -f
  121. lovetox and overwrite my repo
  122. lovetox the mergerequest will always only show the difference between your branch and master
  123. fm ok, thougth it kind of stores the commits/diffs
  124. lovetox it works a bit of different in gitlab than on github
  125. lovetox i like it more on github
  126. lovetox we have gitlab not for long
  127. lovetox so just do it, and see how it goes, we can close and reopen later anyway if we want
  128. fm yap, gitlab seems to be even to new for google ;)
  129. fm ok, i will do it when i'm back home later
  130. fm got to go, later!
  131. lovetox fm i looked into your issue with message correction
  132. lovetox with the way you modify now the textview its probably never going to work
  133. lovetox in gajim we have extension points
  134. lovetox means, gajim detects a pattern in a message
  135. lovetox like a http link or some other formatting
  136. lovetox and before it prints this special text to the textview, it hands it off to an extension point
  137. lovetox you can hook this extension point, and get from it the iter where we at in the textview, and the special text that was matched
  138. lovetox from there you just have to hand the special text to your encoding method and then insert the whole text at the iter which was also handed by the extension point
  139. lovetox i think we can save much code here in your plugin, and addtionel make all the other features like message correction work
  140. lovetox the problem why you couldnt do this from the start is, that gajim doesnt matches your chosen pattern @@ as special text of course
  141. lovetox but i think we will add this and with the next release of gajim we can do this more efficient
  142. lovetox but message correction for now not working with the syntax highlight i consider a minor issue, so lets get this released :)
  143. fm hi again
  144. fm lovetox, I have to confess, I did not dig into gajims plugin system very much. I wanted to get it to work asap, so I just took the latex plugin, which obviously also is the foundation of the @@-wrapping ^^
  145. fm the latex plugin probably also requires this fix then
  146. arune fm: which plugin have you developed?
  147. fm syntax highlighting for source code
  148. fm not yet in the official repo, got to fix the pr first ;)
  149. fm hm... for some reason I can't squash the initial commit (a56f5f7). anybody knows why?
  150. arune fm: right, nice
  151. lovetox hm in which direction do we squash
  152. lovetox older into newer
  153. lovetox or newer into older
  154. lovetox probably everything has to go into the inital commit
  155. lovetox yes newer into older
  156. lovetox so you can squash your first commit, because there is no older comit
  157. lovetox so you cant squash your first commit, because there is no older comit
  158. lovetox fm
  159. fm yeah, trying it that way
  160. lovetox so set squash on everything that is not the initial
  161. fm arune, thx, I am happy, people like it
  162. fm error: could not apply a56f5f7... Initial commit
  163. fm -.-
  164. lovetox hm i will try
  165. fm lovetox, I could remove all the commits and start afresh
  166. lovetox wait a moment
  167. fm just playing around locally so far ;)
  168. lovetox no i think its because
  169. lovetox of this merge commit
  170. lovetox the last from github
  171. lovetox that is weird
  172. lovetox do we need this commit?
  173. lovetox does it add something?
  174. lovetox or better do we need all the other ones before?
  175. lovetox ah no thats not it
  176. lovetox hm
  177. fm as i said, guess its best I drop the whole thing (last 11 commits, 10 on the branch, one merge) and add it again
  178. fm i think its because i added a unrelated history
  179. fm so git *maybe* treats the first commit in this bunch different from the rest?!
  180. lovetox i think it has to do with the folders maybe
  181. lovetox because you didnt originally clone the repo
  182. lovetox you had a own
  183. fm any reasons to research it further? will removing all my commits brake something in gitlab?
  184. lovetox no, but try this
  185. lovetox i think i have it
  186. lovetox drop all commits except the merge one from github
  187. lovetox the last one
  188. lovetox and check if everything is here
  189. fm with "the merge one from github" you refere to a56f5f7 or to 5c125d6 (just to be sure ;) )
  190. lovetox 5c125d6
  191. lovetox but this doesnt show up
  192. lovetox nah do it as you wish
  193. lovetox i just thought there is something to learn here
  194. lovetox :D
  195. lovetox you cant break anything if you operate only with merge requests
  196. lovetox i think the problem is definitly the folder structure
  197. lovetox you had in the first commits no syntax highligte folder
  198. fm well, think I learned not to start this in the night after some hot wine ;)
  199. fm i can squash the commits before the creation of the folder with the one that created it
  200. fm just not with the very first one in the history
  201. lovetox so whats now
  202. lovetox did you lose your commits?
  203. lovetox because there are not anymore in your repo
  204. lovetox i think i know what was needed
  205. lovetox skip all commits in the rebase
  206. lovetox then at the end it will pull this merge github commit into it
  207. lovetox which is not listed as a normal commit in my log
  208. fm i cleaned up (aka deleted) everything, now I will just cleanly add everything again and also already fix what Asterix and you proposed
  209. fm its still weird, never had an issue like that with git
  210. lovetox its defintily because of the folder
  211. lovetox you made the correct folder structure in the last commit
  212. fm maybe you're right...
  213. lovetox ah damn, i wanted to play around with that
  214. lovetox but now your repo is empty :(
  215. fm well, i still have a copy of the repo ^^
  216. fm
  217. fm can put it in an archive for you to play with it ;)
  218. lovetox haha
  219. lovetox :D
  220. lovetox thats so true :D
  221. fm definitely
  222. fm hm, i had a look into gitlabs pr edit page. seems i cant change the source branch of the request. should i push everything to master to reuse the pr or just open a new one?
  223. fm lovetox, question about your comment to add self.activatable: is there a reason you used __import__ in the "test" if axolotl/protobuf are available?
  224. fm or just because you don't realy need the import in this place?
  225. lovetox there is something horrible called in gajim
  226. lovetox it delays imports of modules
  227. lovetox which breaks als most modules
  228. lovetox with __import__ demandimport cant delay the import
  229. fm lol.
  230. lovetox but i would only use it at the start for the external module
  231. fm yeah, i think i will just stick with "normal" imports and surround them with a try-except block
  232. lovetox but test it at the end
  233. lovetox uninstall the pygments
  234. lovetox and try if the plugin loads
  235. fm i will.
  236. lovetox and only to say it again, you need this only for pygements, we can safely assume the rest of the libs are there
  237. fm sure
  238. fm damn, removing the commits broke the comments in gitlab
  239. lovetox you have it as email or
  240. fm what was the unused import you have been talking about?
  241. fm yeah, but the context is missing (if there was any)
  242. lovetox most of the pygments
  243. lovetox nbxmpp
  244. lovetox gobject
  245. lovetox what editor do you use?
  246. fm vim
  247. lovetox install pylint
  248. lovetox it will show you all the errors
  249. lovetox
  250. fm i use syntastic, but it does not complain about unused imports
  251. johannes I can also recommend IntelliJ or PyCharm very much in this case
  252. johannes Their community edition probably suffice
  253. johannes s
  254. fm I even have pycharm installed, just don't like IDEs in general ;)
  255. lovetox i use sublime :)
  256. fm nice, syntastic can be configured to use pylint let g:syntastic_python_checkers = ['pylint']