jdev - 2022-08-04

  1. spiral

    hi! I want to implement a basic xmpp client as a learning project (just plain text chat for now), what docs / XEPs should I read for that? I expect to struggle with XML a bit since I've never used it

  2. Ge0rG

    spiral: do you want to learn the xmpp protocol or designing user-facing applications?

  3. spiral

    the xmpp protocol, I'll adapt a chat app I was working on already

  4. spiral

    I do want to actually use it as my primary xmpp client one day, but I'm very far from being able to do that

  5. Ge0rG

    spiral: I've learned the xmpp protocol by using and extending (a little bit) the smack xmpp library. I think it's always a good idea to look for an open-source library that you can use, and you'll still learn enough about the protocol itself without having a very hard time at the beginning

  6. Ge0rG

    implementing xmpp from scratch for a chat client is a long shot

  7. flow

    what Ge0rG said

  8. spiral

    I tried looking at that, but xmpp libraries for dart/flutter don't seem to be very maintained

  9. flow

    an no, not because he mentioned Smack, but I also believe that you learn XMPP best if you look at any reasonable XMPP client library

  10. spiral

    I might start in a different language just to learn the protocol, and then port to dart

  11. spiral

    is it really a lot of effort just to send plain text messages?

  12. flow

    spiral, yes

  13. Ge0rG

    spiral: maybe those libraries were developed by people like you, who wanted to learn xmpp by doing it all from scratch, and didn't complete the task?

  14. flow

    mostly because of the initial connection establishment

  15. spiral

    Ge0rG that makes sense

  16. flow

    you could take some shortcuts, e.g. by sacrificing security and only implementing SASL-PLAIN

  17. spiral

    I see

  18. flow

    spiral, you may want to look at https://datatracker.ietf.org/doc/html/rfc6120#section-9.1

  19. Ge0rG

    spiral: you need to establish an xml stream over a network socket, then establish encryption and restart the xml stream, then perform authentication and restart the xml stream etc etc.

  20. flow

    and there are some implementation pitfalls that the RFC does not mention (because the RFC describes the protocol and not the implementation)

  21. Ge0rG

    and for a mobile client you should also consider XEP-0198 from day 1

  22. spiral

    hm all of this seems more of a chore than anything that's really hard to do... but I guess I'll see when I try it

  23. Ge0rG

    the dart-xmpp library looks like it's a 20% solution

  24. Ge0rG

    https://github.com/vukoye/xmpp_dart seems like it's not completely abandoned

  25. Ge0rG

    also has XEP-0198 integrated

  26. spiral

    I'll look at that then

  27. spiral

    I'm reading through the rfc right now

  28. spiral

    thanks for the pointers

  29. MattJ

    Honestly, if you just want something working quickly, start with XMPP over websockets, or at least do direct TLS

  30. MattJ

    You won't be compatible with 100% of XMPP servers that way, but you'll be compatible with most of them with a lot less effort

  31. Ge0rG

    If the goal is to learn XMPP the (slightly less) hard way, and not to just implement a chat app

  32. MattJ

    Even if just implementing a chat app, if you ask me

  33. Zash

    I'd suggest looking at the XML console in e.g. Gajim. That was how I started anyway.

  34. moparisthebest

    I think a lot of you all use gitlab, heads up: https://www.theregister.com/2022/08/04/gitlab_data_retention_policy/

  35. pep.

    more "update copyright year" commits to come?

  36. pep.

    But yeah they're certainly right to be wary of the opposition

  37. Zash

    Obligatory Relevant XKCD: https://xkcd.com/1150/

  38. moparisthebest

    inactive accounts wouldn't be so bad, but how many repos do you have that you "finished" and no longer touch? I know I have a ton

  39. moparisthebest

    anyway, just your often-reminder to run your own services :D

  40. pep.


  41. pep.

    Zash, yes and no. They actually benefit from you having your stuff there

  42. pep.

    Unlike Chad

  43. pep.

    It's not just taking space

  44. pep.

    It's not just taking up space

  45. Zash

    Close Enough. https://xkcd.com/2347/ might be relevant too, except it being them kicking that brick out because the person from Nebraska has been busy with child care for the last year