jdev - 2022-01-28


  1. sonny has left
  2. sonny has joined
  3. larma has left
  4. sonny has left
  5. sonny has joined
  6. syrupthinker has left
  7. al has left
  8. cdcode has left
  9. atomicwatch has left
  10. atomicwatch has joined
  11. jubalh has left
  12. emus has left
  13. xnamed has left
  14. wurstsalat has left
  15. Neustradamus has left
  16. sonny has left
  17. sonny has joined
  18. marc0s has left
  19. marc0s has joined
  20. doge has joined
  21. sonny has left
  22. doge has left
  23. SouL has left
  24. doge has joined
  25. dezant has left
  26. pulkomandy has left
  27. pulkomandy has joined
  28. qwestion has joined
  29. qwestion has left
  30. qwestion has joined
  31. qwestion has left
  32. qwestion has joined
  33. qwestion has left
  34. qwestion has joined
  35. qwestion has left
  36. qwestion has joined
  37. qwestion has left
  38. qwestion has joined
  39. qwestion has left
  40. qwestion has joined
  41. qwestion has left
  42. thomaslewis has joined
  43. thomaslewis has left
  44. jgart has left
  45. dezant has joined
  46. doge has left
  47. Kev has left
  48. Kev has joined
  49. qrpnxz has left
  50. qrpnxz has joined
  51. qrpnxz has left
  52. qrpnxz has joined
  53. kikuchiyo has left
  54. Umar has joined
  55. thomaslewis has joined
  56. Umar has left
  57. alacer has joined
  58. thomaslewis has left
  59. thomaslewis has joined
  60. alacer has left
  61. thomaslewis has left
  62. qwestion has joined
  63. qwestion has left
  64. qwestion has joined
  65. qwestion has left
  66. qwestion has joined
  67. qwestion has left
  68. qwestion has joined
  69. qwestion has left
  70. qwestion has joined
  71. qwestion has left
  72. Millesimus has joined
  73. qwestion has joined
  74. qwestion has left
  75. mac has left
  76. mac has joined
  77. Yagizа has joined
  78. serge90 has joined
  79. doge has joined
  80. doge has left
  81. doge has joined
  82. Millesimus has left
  83. Zash has left
  84. Zash has joined
  85. jgart has joined
  86. emus has joined
  87. Millesimus has joined
  88. SouL has joined
  89. paul has joined
  90. COM8 has joined
  91. COM8 has left
  92. COM8 has joined
  93. COM8 has left
  94. dezant has left
  95. mac has left
  96. mac has joined
  97. rafasaurus has left
  98. rafasaurus has joined
  99. wurstsalat has joined
  100. msavoritias has joined
  101. jubalh has joined
  102. rafasaurus has left
  103. Alex has left
  104. rafasaurus has joined
  105. qwe has joined
  106. rafasaurus has left
  107. rafasaurus has joined
  108. goffi has joined
  109. Alex has joined
  110. rafasaurus has left
  111. sonny has joined
  112. debacle has joined
  113. goffi has left
  114. goffi has joined
  115. drops has left
  116. drops has joined
  117. doge has left
  118. jubalh has left
  119. goffi has left
  120. qrpnxz has left
  121. qrpnxz has joined
  122. qrpnxz has left
  123. qrpnxz has joined
  124. qrpnxz has left
  125. qrpnxz has joined
  126. qrpnxz has left
  127. qrpnxz has joined
  128. doge has joined
  129. msavoritias has left
  130. goffi has joined
  131. homebeach has left
  132. Matrix Traveler (bot) has left
  133. Matrix Traveler (bot) has joined
  134. homebeach has joined
  135. msavoritias has joined
  136. rafasaurus has joined
  137. rubi has left
  138. rubi has joined
  139. nephele has joined
  140. nephele has left
  141. nephele has joined
  142. rafasaurus has left
  143. jgart has left
  144. jgart has joined
  145. jgart has left
  146. nephele has left
  147. doge has left
  148. Neustradamus has joined
  149. jubalh has joined
  150. jubalh has left
  151. larma has joined
  152. larma has left
  153. larma has joined
  154. xecks has left
  155. suohua has joined
  156. suohua has left
  157. suohua has joined
  158. Martin has left
  159. Martin has joined
  160. rafasaurus has joined
  161. suohua has left
  162. xecks has joined
  163. jubalh has joined
  164. suohua has joined
  165. doge has joined
  166. mac has left
  167. Millesimus has left
  168. mh has left
  169. mh has joined
  170. larma has left
  171. larma has joined
  172. debacle has left
  173. jubalh has left
  174. Millesimus has joined
  175. rafasaurus has left
  176. msavoritias has left
  177. msavoritias has joined
  178. Millesimus has left
  179. kikuchiyo has joined
  180. mac has joined
  181. suohua has left
  182. suohua has joined
  183. qrpnxz has left
  184. qrpnxz has joined
  185. qrpnxz has left
  186. qrpnxz has joined
  187. doge has left
  188. Vaulor has left
  189. qwe has left
  190. qwe has joined
  191. qwe has left
  192. Vaulor has joined
  193. Wojtek has joined
  194. Squeaky Latex Folf has left
  195. Squeaky Latex Folf has joined
  196. doge has joined
  197. kikuchiyo has left
  198. kikuchiyo has joined
  199. jubalh has joined
  200. jubalh has left
  201. xnamed has joined
  202. COM8 has joined
  203. COM8 has left
  204. ralphm has left
  205. rafasaurus has joined
  206. selurvedu has joined
  207. selurvedu has left
  208. spectrum has left
  209. nephele has joined
  210. nephele has left
  211. rafasaurus has left
  212. nephele has joined
  213. nephele has left
  214. Millesimus has joined
  215. rafasaurus has joined
  216. al has joined
  217. rafasaurus has left
  218. doge has left
  219. Millesimus has left
  220. Millesimus has joined
  221. xnamed has left
  222. mac has left
  223. dezant has joined
  224. doge has joined
  225. doge has left
  226. mac has joined
  227. doge has joined
  228. spectrum has joined
  229. nephele has joined
  230. nephele has left
  231. Millesimus has left
  232. nephele has joined
  233. Millesimus has joined
  234. Apollo has left
  235. Apollo has joined
  236. nephele has left
  237. mac has left
  238. mac has joined
  239. homebeach has left
  240. Matrix Traveler (bot) has left
  241. Matrix Traveler (bot) has joined
  242. homebeach has joined
  243. debacle has joined
  244. nephele has joined
  245. nephele has left
  246. mac has left
  247. mac has joined
  248. Wojtek has left
  249. Wojtek has joined
  250. rafasaurus has joined
  251. xnamed has joined
  252. Alex has left
  253. Alex has joined
  254. cdcode has joined
  255. al has left
  256. homebeach has left
  257. Matrix Traveler (bot) has left
  258. Matrix Traveler (bot) has joined
  259. homebeach has joined
  260. homebeach has left
  261. Matrix Traveler (bot) has left
  262. Matrix Traveler (bot) has joined
  263. homebeach has joined
  264. Wojtek has left
  265. Wojtek has joined
  266. me9 has joined
  267. pep. Can somebody crash course getting disco info from accounts in roster? Caps are sent in the directed presence and it's up to the client to iq/get the resource if it wants to know? (also valid for my own other resources?)
  268. Kev Correct. Get caps in presence, check against caps cache, if missing disco client, check and shove result in cache.
  269. pep. ta
  270. pep. What about people not in the roster? I can disco their barejid but I'm not given a fulljid unless they specifically put it in @from?
  271. Zash @from on a directed presence? that'll always have their full jid there
  272. jonas’ @from on any type="available" presence you receive, actually
  273. pep. Do I get a directed presence from somebody not in my roster?
  274. jonas’ only if they explicitly send it to you
  275. pep. Do clients do that?
  276. jonas’ probably not
  277. pep. Ok
  278. jonas’ fulljids are also found in the @from of IQs and messages though
  279. pep. So if I don't get a directed presence I'm likely not getting their device capabilities
  280. jonas’ correct
  281. jonas’ s/likely/at all/
  282. pep. Ok
  283. jonas’ you'll also never notice when a device goes offline or when their capabilities change
  284. Zash if you got directed presence? then the server should send you unavailable when they go offline
  285. jonas’ Zash, "if I don't get a directed presence"
  286. Zash ah
  287. Zash well then you are in the dark
  288. Millesimus has left
  289. mac has left
  290. larma has left
  291. Millesimus has joined
  292. doge has left
  293. ralphm has joined
  294. mac has joined
  295. suohua has left
  296. suohua has joined
  297. Millesimus has left
  298. goffi pep.: you can't disco bare jid if you're not in the roster (see my recent email on standard@ about that).
  299. rubi > s/likely/at all/ > I'm at all not getting :P
  300. mh has left
  301. mh has joined
  302. qrpnxz has left
  303. homebeach has left
  304. Matrix Traveler (bot) has left
  305. qrpnxz has joined
  306. Matrix Traveler (bot) has joined
  307. homebeach has joined
  308. doge has joined
  309. rafasaurus has left
  310. doge How do you usually go about parsing the xmpp stream? You can't just use regular DOM with it can you. Are you supposed to use SAX? But I never understood how people use SAX for anything but the simplest of documents, and from reading XEPs xmpp's structure seems to be far from simple. Any patterns/suggestions?
  311. jonas’ SAX, and it's not that tricky actually
  312. homebeach has left
  313. Matrix Traveler (bot) has left
  314. Matrix Traveler (bot) has joined
  315. homebeach has joined
  316. jonas’ so in aioxmpp, I structure the XML events directly into python objects representing the stanzas, according to the schema declared by the library and the application.
  317. homebeach has left
  318. Matrix Traveler (bot) has left
  319. Matrix Traveler (bot) has joined
  320. moparisthebest you *can* use a regular DOM parser, with some hax
  321. homebeach has joined
  322. jonas’ but there's also a mode where stanzas are written into a DOM
  323. jonas’ if you have a DOM thing which you can feed with SAX events (lxml has that, for instance; but it can also very easily be built from scratch if you have a DOM manipulation library), then you can use the SAX events to create an individual DOM for each stanza
  324. jonas’ if you're into the pain of using DOM
  325. moparisthebest regardless of parser the biggest thing to be aware of is needing to disable 90% of the things XML can do to just get to the subset XMPP uses
  326. jonas’ oh yes, ^
  327. jonas’ otherwise, happy billion laughs
  328. moparisthebest depends what you are doing too, I guess a client can probably get by not worrying about it and trusting their server to sanitize for them but meh
  329. Millesimus has joined
  330. rafasaurus has joined
  331. Kev I typically read with a stream parser, and then construct a pseudo-dom from it.
  332. Zash Pretty much how Prosody works too
  333. rafasaurus has left
  334. rafasaurus has joined
  335. doge Either way seems to take lots of code
  336. doge Especially "directly from sax" approach, looking at aioxmpp source
  337. qrpnxz has left
  338. qrpnxz has joined
  339. jonas’ the direct from sax magic is in aioxmpp/xso and aioxmpp/xml.py, everything else is then just schemas (which are really useful no matter which approach) and business logic
  340. jonas’ https://hg.prosody.im/trunk/file/tip/util/xml.lua this is a simple schema-less sax->dom approach
  341. jonas’ plus the DOM implementation in https://hg.prosody.im/trunk/file/tip/util/stanza.lua
  342. jonas’ wouldn't say that this is "a lot of code" :)
  343. qrpnxz has left
  344. qrpnxz has joined
  345. jonas’ (considering the amount of business logic involved with xmpp in general)
  346. Zash https://hg.prosody.im/trunk/file/tip/util/xmppstream.lua is the one actually used for parsing xmpp
  347. jonas’ oh yeah, I meant to link that
  348. Zash has some session related logic in there tho
  349. jonas’ my history failed me
  350. MattJ The extra stuff in xmppstream is mostly about stanza size accounting, and associating streams with XMPP sessions
  351. MattJ The DOM-building part is the same as util.xml in the first link (at least, it is since a couple of weeks ago... :) )
  352. MattJ and yes, it's quite straightforward and I've written equivalent code a bunch of times in a bunch of languages and environments
  353. MattJ It's definitely my preferred way of doing things
  354. qrpnxz has left
  355. qrpnxz has joined
  356. thomaslewis has joined
  357. doge has left
  358. thomaslewis has left
  359. emus has left
  360. drops has left
  361. drops has joined
  362. Wojtek has left
  363. Wojtek has joined
  364. PapaTutuWawa has joined
  365. drops has left
  366. drops has joined
  367. selurvedu has joined
  368. 9lakes has left
  369. selurvedu has left
  370. selurvedu has joined
  371. xnamed has left
  372. xnamed has joined
  373. dezant has left
  374. jubalh has joined
  375. pep. goffi: right, thanks
  376. emus has joined
  377. Millesimus has left
  378. Millesimus has joined
  379. 9lakes has joined
  380. rafasaurus has left
  381. mac has left
  382. rafasaurus has joined
  383. mac has joined
  384. jubalh has left
  385. COM8 has joined
  386. COM8 has left
  387. al has joined
  388. jubalh has joined
  389. spectrum has left
  390. jubalh has left
  391. drops has left
  392. drops has joined
  393. qwestion has joined
  394. jubalh has joined
  395. jubalh has left
  396. larma has joined
  397. kikuchiyo has left
  398. PapaTutuWawa has left
  399. selurvedu has left
  400. PapaTutuWawa has joined
  401. jgart has joined
  402. suohua has left
  403. jubalh has joined
  404. al has left
  405. thomaslewis has joined
  406. thomaslewis has left
  407. msavoritias has left
  408. drops has left
  409. drops has joined
  410. msavoritias has joined
  411. mac has left
  412. jubalh has left
  413. jubalh has joined
  414. jubalh has left
  415. drops has left
  416. drops has joined
  417. drops has left
  418. drops has joined
  419. spectrum has joined
  420. drops has left
  421. drops has joined
  422. Kiwi has left
  423. Kiwi has joined
  424. thomaslewis has joined
  425. COM8 has joined
  426. COM8 has left
  427. thomaslewis has left
  428. syrupthinker has joined
  429. drops has left
  430. drops has joined
  431. rom1dep has left
  432. rom1dep has joined
  433. syrupthinker has left
  434. al has joined
  435. Neustradamus has left
  436. me9 has left
  437. emus has left
  438. emus has joined
  439. Squeaky Latex Folf has left
  440. mh has left
  441. Squeaky Latex Folf has joined
  442. Millesimus has left
  443. mh has joined
  444. junaid has joined
  445. drops has left
  446. drops has joined
  447. drops has left
  448. drops has joined
  449. Millesimus has joined
  450. jubalh has joined
  451. qwestion has left
  452. mac has joined
  453. rom1dep has left
  454. Wojtek has left
  455. rom1dep has joined
  456. Kiwi has left
  457. drops has left
  458. drops has joined
  459. drops has left
  460. drops has joined
  461. drops has left
  462. drops has joined
  463. mh has left
  464. mh has joined
  465. Alacer_dsrt has joined
  466. Alacer_dsrt has left
  467. xnamed has left
  468. nephele has joined
  469. dezant has joined
  470. al has left
  471. drops has left
  472. drops has joined
  473. drops has left
  474. drops has joined
  475. drops has left
  476. mh has left
  477. mh has joined
  478. Kiwi has joined
  479. drops has joined
  480. drops has left
  481. drops has joined
  482. nephele has left
  483. drops has left
  484. drops has joined
  485. drops has left
  486. drops has joined
  487. drops has left
  488. drops has joined
  489. drops has left
  490. drops has joined
  491. drops has left
  492. drops has joined
  493. drops has left
  494. drops has joined
  495. Millesimus has left
  496. drops has left
  497. drops has joined
  498. drops has left
  499. drops has joined
  500. drops has left
  501. drops has joined
  502. xnamed has joined
  503. Millesimus has joined
  504. Yagizа has left
  505. emus has left
  506. Millesimus has left
  507. x51 has joined
  508. Squeaky Latex Folf has left
  509. Squeaky Latex Folf has joined
  510. drops has left
  511. drops has joined
  512. drops has left
  513. drops has joined
  514. thomaslewis has joined
  515. thomaslewis has left
  516. Millesimus has joined
  517. x51 has left
  518. goffi has left
  519. drops has left
  520. drops has joined
  521. drops has left
  522. drops has joined
  523. drops has left
  524. drops has joined
  525. Millesimus has left
  526. kikuchiyo has joined
  527. drops has left
  528. drops has joined
  529. drops has left
  530. drops has joined
  531. drops has left
  532. drops has joined
  533. drops has left
  534. drops has joined
  535. jubalh has left
  536. Millesimus has joined
  537. drops has left
  538. drops has joined
  539. nephele has joined
  540. Squeaky Latex Folf has left
  541. Squeaky Latex Folf has joined
  542. nephele has left
  543. Millesimus has left
  544. xecks has left
  545. xecks has joined
  546. Millesimus has joined
  547. marmistrz has joined
  548. PapaTutuWawa has left
  549. Millesimus has left
  550. emus has joined
  551. Squeaky Latex Folf has left
  552. Squeaky Latex Folf has joined
  553. spectrum has left
  554. antranigv has left
  555. Apollo has left
  556. rafasaurus has left
  557. inky has left
  558. SouL has left
  559. antranigv has joined
  560. inky has joined
  561. marc0s has left
  562. marc0s has joined
  563. jubalh has joined
  564. jubalh has left
  565. Millesimus has joined
  566. Neustradamus has joined
  567. mac has left
  568. contrapunctus has left
  569. 9lakes has left
  570. 9lakes has joined
  571. Millesimus has left
  572. jubalh has joined
  573. jgart has left
  574. dezant has left
  575. antranigv has left
  576. Millesimus has joined
  577. al has joined
  578. huhn has left
  579. sonny has left
  580. sonny has joined
  581. sonny has left
  582. sonny has joined
  583. Squeaky Latex Folf has left
  584. Squeaky Latex Folf has joined
  585. dezant has joined
  586. atomicwatch has left
  587. selurvedu has joined
  588. thomaslewis has joined
  589. selurvedu has left
  590. selurvedu has joined
  591. marc0s has left
  592. marc0s has joined
  593. msavoritias has left
  594. thomaslewis has left
  595. suohua has joined
  596. emus has left
  597. doge has joined
  598. suohua has left
  599. suohua has joined
  600. doge has left
  601. selurvedu has left
  602. selurvedu has joined