-
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
-
Ge0rG
spiral: do you want to learn the xmpp protocol or designing user-facing applications?
-
spiral
the xmpp protocol, I'll adapt a chat app I was working on already
-
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
-
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
-
Ge0rG
implementing xmpp from scratch for a chat client is a long shot
-
flow
what Ge0rG said
-
spiral
I tried looking at that, but xmpp libraries for dart/flutter don't seem to be very maintained
-
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
-
spiral
I might start in a different language just to learn the protocol, and then port to dart
-
spiral
is it really a lot of effort just to send plain text messages?
-
flow
spiral, yes
-
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?
-
flow
mostly because of the initial connection establishment
-
spiral
Ge0rG that makes sense
-
flow
you could take some shortcuts, e.g. by sacrificing security and only implementing SASL-PLAIN
-
spiral
I see
-
flow
spiral, you may want to look at https://datatracker.ietf.org/doc/html/rfc6120#section-9.1
-
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.
-
flow
and there are some implementation pitfalls that the RFC does not mention (because the RFC describes the protocol and not the implementation)
-
Ge0rG
and for a mobile client you should also consider XEP-0198 from day 1
-
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
-
Ge0rG
the dart-xmpp library looks like it's a 20% solution
-
Ge0rG
https://github.com/vukoye/xmpp_dart seems like it's not completely abandoned
-
Ge0rG
also has XEP-0198 integrated
-
spiral
I'll look at that then
-
spiral
I'm reading through the rfc right now
-
spiral
thanks for the pointers
-
MattJ
Honestly, if you just want something working quickly, start with XMPP over websockets, or at least do direct TLS
-
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
-
Ge0rG
If the goal is to learn XMPP the (slightly less) hard way, and not to just implement a chat app
-
MattJ
Even if just implementing a chat app, if you ask me
-
Zash
I'd suggest looking at the XML console in e.g. Gajim. That was how I started anyway.
-
moparisthebest
I think a lot of you all use gitlab, heads up: https://www.theregister.com/2022/08/04/gitlab_data_retention_policy/
-
pep.
more "update copyright year" commits to come?
-
pep.
But yeah they're certainly right to be wary of the opposition
-
Zash
Obligatory Relevant XKCD: https://xkcd.com/1150/
-
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
-
moparisthebest
anyway, just your often-reminder to run your own services :D
-
pep.
^
-
pep.
Zash, yes and no. They actually benefit from you having your stuff there
-
pep.
Unlike Chad
-
pep.
It's not just taking space✎ -
pep.
It's not just taking up space ✏
-
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