I don't think I realized that all the major clients written in python seem to use different libraries. Debating whether it's most beneficial to test against nbxmpp (so that I effectively have integration tests with Gajim) or something else. What other popular clients is it most beneficial to ensure compatibility with?
9lakeshas left
Millesimushas left
moparisthebest
don't all non-trivial XMPP clients use their own libraries ?
Sam
It really does seem so
Sam
I guess I shouldn't have been suprised by this; I think I knew what all these used, it had never really hit me though.
moparisthebest
even if they don't start out that way, seems like they always end up that way...
Sam
I'd love to know why that is; I wonder if it's something about the protocol or something about the size of the community that uses it, or the type of people, etc.
Millesimushas joined
jubalhhas left
wurstsalathas left
marchas left
marchas joined
moparisthebest
I only have conjecture... almost all XMPP libraries seem massively over-engineered to the point that you can only use them in a very specific way
moparisthebest
making them unsuitable to use in a real non-trivial client with even slightly different needs
Sam
Oh, how so? I haven't found that to be the case with aioxmpp or slixmpp which are pretty much the only two I've used outside of my own thing or "libraries" that are built into clients and so are obviously tightly coupled
moparisthebest
a common pattern I've seen is needing to "register" another "class"+deserializer+serializer for every even slightly different stanza type that might exist
Sam
As opposed to just being handed a generic representation of the XML, you mean?
moparisthebest
because the library insists on being XML library independent, and/or pretending stanzas are objects and not XML, that kind of thing
moparisthebest
well, at least having that option yea
Sam
I dunno, it seems like you'd have to do that otherwise you'd have to dig into some arbitrary deeply nested thing and figure out what it is every time. Registering a callback for "normal message with body" or something seems like it would make the users life easier.
goffihas left
moparisthebest
right, it's always "well why would a user of a library ever need to do this? it would be so much easier to do it the-way-i-have-in-my-head" and that never ends up matching with someone's GUI library or whatever
Sam
Now that you say that, I did design Mellium specifically to allow "just give me a stream of XML and let me do things with it" too, specifically so that you could write your own router/handler thing. But it doesn't seem unreasonable to just require callback.s
moparisthebest
yea, I really think the solution is layers, where the library user gets to pick which layers they want
moparisthebest
1. connect TLS 2. raw stream 3. separate xml stanzas 4. objects or whatever 5. some type of state management
moparisthebest
the XML libs I've seen don't let you go lower than 4 ever, and normally not 5
Sam
That's exactly how Mellium works, but FWIW it doesn't always end well either. I can't think what off the top of my head, but I know we've had a few things where we want the connection dialer to know about TLS or something, but they're separate and it's a problem.
moparisthebest
it's certainly not an easy solution or it'd already be solved hehe
Sam
huh, even the javascript clients seem to use different libraries. Pretty sure this client and this other library are maintained by the same person and the client does its own thing and doesn't use the library (or I'm just misunderstanding JavaScripts many config files, which is more likely)
moparisthebest
the 3 problems of computer science, naming, cache invalidation, off by one errors, and the perfectly designed universally used XMPP library
Sam
Anyways, turns out it's harder than I expected to pick what the best thing to test compatibility with is. Also the situation in terms of re-usability is more dire than I thought. I am not sure if there are any useful conclusions to draw here or anything useful to do.
moparisthebest
unfortunately I think the conclusion is not what you want to hear
moparisthebest
it's "don't bother writing a generic XMPP library, no one will use it for anything non-trivial"
moparisthebest
useful for a sendxmpp clone or a bot, not for a client though
qwestionhas joined
Sam
I'm not sure that's the conclusion; I think the conclusion is "do write a generic XMPP library if one doesn't already exist in your ecosystem of choice, but if one does exist use and improve it in your client instead of writing a builtin tightly coupled one"
moparisthebest
could be, but then you'll end up maintaining it, that seems to be what happened with nbxmpp and gajim
Sam
If you follow the advise then hopefully other clients show up to help you maintain it though, even if it becomes abandoned and one of the client devs has to pick it up.
Sam
But yah, I really don't know how to encourage that kind of participation.
qwestionhas left
qwestionhas joined
Sam
Maybe it's a problem of discoverability too. I probably wouldn't have started Mellium if I realized there was another library already in Go (not counting the one that most people use which is little more than a Google Talk bot framework, you can't use it for serious work). I looked and never found the FluxxIO one and it was a few years before I realized that it had already been a thing.
debaclehas left
Zashhas left
marc0shas left
marc0shas joined
sonnyhas left
sonnyhas joined
moparisthebest
I really think it's just a GUI thing
moparisthebest
writing a GUI XMPP client is 9999x harder than writing a server or a library or a command line sendxmpp
moparisthebest
and the assumptions all of us who avoid GUI code like the plague make are just wrong when it comes to writing GUI code
Sam
I'm not sure that's true, but I definitely don't write a lot of GUI code, so it's quit possible that I'm doing exactly what you're describing. But I don't see why it would be any easier or harder to write Gui stuff with slixmpp vs. nbxmpp vs. aioxmpp, for example (other than difficulties that would apply to anything due to one or the other library generally being harder or easier to use for various reasons, but I don't see what would be specific to GUI stuff)
jgarthas left
moparisthebest
Sam, have you ever written GUI code and if so what kind?
moparisthebest
I have, but long ago, and Java Swing, and I still have nightmares haha
moparisthebest
I'm not counting html/javascript I guess...
Sam
Oh yah, I've done a decent bit of GTK, some Android stuff, a bit of web stuff, some immediate mode custom GUIs, some TUI stuff. I don't like it much, and avoid it, but I have done it.
Sam
I vaguely remember being forced to memorize various Swing APIs in some terrible intro to CS class in college, but I don't think I ever wrote anything with it after that.
moparisthebest
oh yea I've done some old android GUI too but also remember it being terrible
Sam
Yah, it's pretty bad.
Sam
I don't see how a specific library would necessarily be better or worse with it though.
lovetoxhas left
xnamedhas joined
qy
Android is nicer now. Try androidx compose
qy
No need even for xml
lovetoxhas joined
jgarthas joined
moparisthebest
but I like XML !
qy
Then you should try xmp-wait
qy
Xml i think is the wrong form for android uis, but meh, it does work
qy
Compose really is aeons better though, no wonder google absorbed it
dezanthas left
Vaulorhas joined
marc0shas left
marc0shas joined
dezanthas joined
SouLhas joined
alhas joined
huhnhas left
Apollohas left
Millesimushas left
xnamedhas left
machas joined
Apollohas joined
msavoritiashas joined
raghavgururajanhas joined
raghavgururajanhas left
Yagizаhas joined
raghavgururajanhas joined
machas left
raghavgururajanhas left
Yagizаhas left
Yagizаhas joined
jgarthas left
cedarhas left
Millesimushas joined
cedarhas joined
atomicwatchhas left
atomicwatchhas joined
rafasaurushas left
SouLhas left
SouLhas joined
machas joined
rafasaurushas joined
Stefan
Sam: I have been worked on a generic framework for XMPP. The biggest problem for me: it's not such easy. 😬
Lot of things you have to keep in mind to keep it reusable and flexible.
goffihas joined
tskhas left
tskhas joined
Yagizаhas left
Yagizаhas joined
qwestionhas left
alhas left
dezanthas left
jubalhhas joined
emushas joined
atomicwatchhas left
paulhas joined
Alexhas joined
abdullahihas left
abdullahihas joined
pulkomandyhas left
pulkomandyhas joined
marmistrzhas joined
goffihas left
goffihas joined
goffihas left
pasdesushihas joined
marmistrzhas left
abdullahihas left
goffihas joined
rafasaurushas left
rafasaurushas joined
machas left
COM8has joined
COM8has left
COM8has joined
COM8has left
selurveduhas joined
goffihas left
pulkomandyhas left
pulkomandyhas joined
nephelehas joined
9lakeshas joined
nephelehas left
wurstsalathas joined
machas joined
goffihas joined
abdullahihas joined
abdullahihas left
debaclehas joined
larmahas joined
TheCoffeMakerhas left
TheCoffeMakerhas joined
marc0shas left
marc0shas joined
marc0shas left
marc0shas joined
Syndacehas left
Syndacehas joined
marc0shas left
marc0shas joined
Yagizаhas left
marc0shas left
marc0shas joined
Laurahas left
Laurahas joined
marc0shas left
marc0shas joined
PapaTutuWawahas joined
marc0shas left
atomicwatchhas joined
marc0shas joined
marc0shas left
marc0shas joined
selurveduhas left
selurveduhas joined
selurveduhas left
selurveduhas joined
Yagizаhas joined
Syndacehas left
Syndacehas joined
abdullahihas joined
pulkomandyhas left
Mjolnir Archonhas left
Marandahas left
pulkomandyhas joined
abdullahihas left
rafasaurushas left
abdullahihas joined
Mjolnir Archonhas joined
Marandahas joined
rafasaurushas joined
homebeachhas left
Matrix Traveler (bot)has left
Matrix Traveler (bot)has joined
homebeachhas joined
nephelehas joined
debaclehas left
marc0shas left
marc0shas joined
goffihas left
goffihas joined
suohuahas joined
nephelehas left
nephelehas joined
syrupthinkerhas joined
syrupthinkerhas left
syrupthinkerhas joined
rafasaurushas left
suohuahas left
nephelehas left
nephelehas joined
goffihas left
rafasaurushas joined
nephelehas left
nephelehas joined
nephelehas left
nephelehas joined
nephelehas left
tskhas left
huhnhas joined
tskhas joined
huhnhas left
huhnhas joined
cedarhas left
Zashhas joined
nephelehas joined
cedarhas joined
marc0shas left
marc0shas joined
nephelehas left
machas left
Millesimushas left
Millesimushas joined
marc0shas left
marc0shas joined
nephelehas joined
xnamedhas joined
nephelehas left
nephelehas joined
nephelehas left
nephelehas joined
Apollohas left
nephelehas left
moparisthebesthas left
moparisthebesthas joined
goffihas joined
inkyhas left
atomicwatchhas left
atomicwatchhas joined
TheCoffeMakerhas left
xeckshas left
syrupthinkerhas left
nephelehas joined
nephelehas left
marmistrzhas joined
marmistrzhas left
nephelehas joined
nephelehas left
machas joined
Zashhas left
Zashhas joined
TheCoffeMakerhas joined
suohuahas joined
suohuahas left
suohuahas joined
xnamedhas left
machas left
machas joined
xnamedhas joined
machas left
machas joined
sonnyhas left
TheCoffeMakerhas left
xnamedhas left
goffihas left
goffihas joined
me9has joined
J Marinarohas left
J Marinarohas joined
inkyhas joined
TheCoffeMakerhas joined
debaclehas joined
larmahas left
qwestionhas joined
serge90has left
serge90has joined
machas left
machas joined
suohuahas left
xnamedhas joined
goffihas left
marc0shas left
marc0shas joined
xeckshas joined
nephelehas joined
nephelehas left
goffihas joined
marc0shas left
marc0shas joined
Apollohas joined
Millesimushas left
sonnyhas joined
Apollohas left
Millesimushas joined
PapaTutuWawahas left
goffihas left
jgarthas joined
Սամուէլhas joined
Yagizаhas left
larmahas joined
marmistrzhas joined
machas left
Սամուէլhas left
Millesimushas left
Apollohas joined
Millesimushas joined
rubihas left
rubihas joined
marc0shas left
marc0shas joined
COM8has joined
COM8has left
selurveduhas left
selurveduhas joined
marmistrzhas left
machas joined
larmahas left
Yagizаhas joined
PapaTutuWawahas joined
atomicwatchhas left
Millesimushas left
qwestionhas left
atomicwatchhas joined
Millesimushas joined
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
me9has left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
qwestionhas left
qwestionhas joined
Zash
It's almost like there are two kinds of libraries: Those used by exactly one client, and those used by random stuff but no clients.
qwestionhas left
qwestionhas joined
moparisthebest
Zash: exactly what it seems like yes
Zash
Smack might be the exception?
abdullahihas left
Zash
Unless whatever Yaxim uses counts as its own library by now 🙂
jubalhhas left
qy
Zash: libstrophe?
Zash
Which one? Which clients?
mathieui
Zash, slixmpp begs to differ :p
Zash
:doubt:
me9has joined
Zash
Make directed graph plz.
Syndacehas left
Syndacehas joined
machas left
COM8has joined
COM8has left
machas joined
qy
Libstrophe used by profanity, and my weechat client, as well as i think at least one other?