96 points · by susam · 4y ago · 79 comments
I spend a lot of time in Slack for work, and maybe half of that time is manually connecting pieces of data (who should I ping for a review on X? what's Y's email address or other contact information?) that I could trivially script with an IRC bot that listens for prefixed commands. I know I can do that with Slack Apps (or whatever else), but just looking at them gives me anxiety: there's tokens, and webhooks, and all kinds of ambiguously permanent or ephemeral state that's going to eventually break or expire. IRC bots, by contrast, have virtually no cognitive overhead: the only moving parts are the socket, and maybe a username and password for server authentication.
Ultimately, the tradeoffs are probably the right ones. But whenever I find myself chatting on IRC outside of work, I can't help but think of what would be possible if our "serious" chat services were just a little more hackable.
IRC is free, it will be there next year, doing the exact same thing.
If you just want to build a poc Slack won't keep you from creating an app manifest with all the permissions and be done with worrying about them. Also all those public APIs are designed to be fairly permanent. Can't compare it to IRC obviously but I wouldn't worry too much about stuff being deprecated all too quickly.
I work at Slack and frequently build automations for our customers so I'd love to hear about particular annoyances from the perspective of an old school IRC user.
I think my biggest gripe is just the amount of state I feel like I need to be aware of. With IRC, I can throw together a bot using either a raw socket or a mature bot framework in an hour or two because there's no real "remote" state for me to think about; I'm just in the flow of editing the source code. With Slack (or any chat app, really), I feel like I context switch much more frequently (more things are full-fledged APIs instead of just string munging, I missed a scope, etc.).
That said, depends on what you mean my hackable. Python and restful api can be much easier to work with and hack than IRC because with IRC if you don't use a library you still have to account for various scenarios and do quite a bit of parsing and server specific command handling.
$ telnet irc.libera.chat 6667
Trying 2a01:270:0:666f::1...
Connected to irc.libera.chat.
Escape character is '^]'.
:lead.libera.chat NOTICE * :*** Checking Ident
:lead.libera.chat NOTICE * :*** Looking up your hostname...
:lead.libera.chat NOTICE * :*** Couldn't look up your hostname
:lead.libera.chat NOTICE * :*** No Ident response
user ircuser host.example.com irc.libera.chat :ircuser anon2317
nick anon2317
:lead.libera.chat 001 anon2317 :Welcome to the Libera.Chat Internet Relay Chat Network anon2317
...
:lead.libera.chat 376 anon2317 :End of /MOTD command.
:anon2317 MODE anon2317 :+iw
join #matrix
:anon2317!~ircuser@2800:[censored] JOIN #matrix
:lead.libera.chat 332 anon2317 #matrix :The Official Matrix HQ - chat about Matrix here! | https://matrix.org/docs/spec | To support Matrix.org development: https://patreon.com/matrixdotorg | Looking for hosting? Check out https://upcloud.com/matrix! | Code of Conduct: https://matrix.org/legal/code-of-conduct/ | This is an English speaking room |
:lead.libera.chat 366 anon2317 #matrix :End of /NAMES list.
privmsg matrix :hello, I am using IRC with telnet
:lead.libera.chat 401 anon2317 matrix :No such nick/channel
privmsg #matrix :hello, I am using IRC with telnet
privmsg #matrix :this is probably a little harder than using Matrix with cURL?
privmsg anon2317 :hello myself
:anon2317!~ircuser@2800:[censored] PRIVMSG anon2317 :hello myself
privmsg anon2317 :the #matrix channel seems a bit quiet
:anon2317!~ircuser@2800:[censored] PRIVMSG anon2317 :the #matrix channel seems a bit quiet
list -min 300
:lead.libera.chat 321 anon2317 Channel :Users Name
:lead.libera.chat NOTICE anon2317 :Invalid parameters for /LIST
:lead.libera.chat 323 anon2317 :End of /LIST
list -minusers 300
:lead.libera.chat 263 anon2317 LIST :This command could not be completed because it has been used recently, and is rate-limited.
:lead.libera.chat 323 anon2317 :End of /LIST
:dsrt^!~dsrt@[censored].hsd1.ga.comcast.net JOIN #matrix
mode #matrix
:lead.libera.chat 324 anon2317 #matrix +Cnt
:lead.libera.chat 329 anon2317 #matrix 1621432229
privmsg #matrix :hi dsrt^, how are you?
privmsg alis :help list
:alis!alis@services.libera.chat NOTICE anon2317 :***** alis Help *****
:alis!alis@services.libera.chat NOTICE anon2317 :
:alis!alis@services.libera.chat NOTICE anon2317 :Help for LIST:
:alis!alis@services.libera.chat NOTICE anon2317 :
:alis!alis@services.libera.chat NOTICE anon2317 :LIST gives a list of channels matching the
...
:milkt!~debian@gateway/tor-sasl/milkt QUIT :Remote host closed the connection
privmsg alis :list * -min 300
:alis!alis@services.libera.chat NOTICE anon2317 :Returning maximum of 64 channel names matching '*'
:alis!alis@services.libera.chat NOTICE anon2317 :##chat 445 :Welcome to ##chat, a social and offtopic channel for sensible conversations. Mind the language. | THIS IS A POLITICS-FREE ZONE! You have been warned. | Rules: https://pastebin.com/raw/ntTcx2xb | We reserve the right to remove annoying people | Free Speech: https://xkcd.com/1357/ | In case of PM spam, '/mode your_nick_here +R'
:alis!alis@services.libera.chat NOTICE anon2317 :##electronics 484 :http://electronicschat.org | Introductory electronics eBook: http://www.ibiblio.org/kuphaldt/electricCircuits/ | Battery information: http://batteryuniversity.com/ | Soldering: http://tinyurl.com/y8p8lfp9 | Welcome to electronics! | <HexaCube> maybe i can afford a beard implant soon | tawr> oh no, i just found out how dumb i am
...
join #chat
:lead.libera.chat 470 anon2317 #chat ##chat-overflow :Forwarding to another channel
:anon2317!~ircuser@2800:810:473:10f1:711f:4bae:293e:3a03 JOIN ##chat-overflow
:lead.libera.chat 332 anon2317 ##chat-overflow :If you find yourself here trying to join ##chat, please identify and try joining ##chat again (reference '/msg nickserv help identify' and/or '/msg nickserv help register' for assistance). This is to help curtail spam, we apologize for the inconvenience | SASL is preferred https://libera.chat/guides/sasl
...
part ##chat-overflow
:anon2317!~ircuser@2800:810:473:10f1:711f:4bae:293e:3a03 PART ##chat-overflow
join ##electronics
:lead.libera.chat 477 anon2317 ##electronics :Cannot join channel (+r) - you need to be logged into your NickServ account
join #c
:anon2317!~ircuser@2800:810:473:10f1:711f:4bae:293e:3a03 JOIN #c
:lead.libera.chat 332 anon2317 #c :C Programming Community | Paste (>3 lines): https://bpa.st/ or http://sprunge.us/ | Wiki: http://www.iso-9899.info/ | Books: http://www.iso-9899.info/wiki/Books | C2X Charter: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2086.htm | Standard: http://iso-9899.info/wiki/The_Standard | Off-topic: #c-offtopic | C11 trivia game: #c-jeopardy
:lead.libera.chat 333 anon2317 #c pragma- 1634682891
...
:lead.libera.chat 366 anon2317 #c :End of /NAMES list.
privmsg #c :hi there. I wrote this Karplus-Strong string-instrument synthesizer in one line of C: s[72]={512};main(i){for(;;i%=72)s[i]+=s[(i+1)%72],putchar(s[i++]/=2);}
privmsg #c :is this valid in ANSI C?:twkm!twkm@rfc1459.net PRIVMSG #c :wow, 1 line!
privmsg #c :You can pipe :sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :i think i got it .... cmake -DWIN32=1
its output to aplay on Linux
:twkm!twkm@rfc1459.net PRIVMSG #c :not i.
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :.. /usr/bin/x86_64-w64-mingw32-ld: cannot find -ldl ?
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c ::(
:twkm!twkm@rfc1459.net PRIVMSG #c :you might need to compile it, or install it.
:progandy!~progandy@user/progandy JOIN #matrix
PING :lead.libera.chat
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :twkm: can you help me fix the error i posted above?
PONG :lead.libera.chat
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :i am trying to cross compile on linux to create a windows static library
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :using mingw ... but it looks like it's trying to use the linux dl library
privmsg #c :hmm, that sounds like it won't work :)
privmsg #c :I don't have any experience getting CMake to use mingw
:Viscometer!quassel@gateway/vpn/airvpn/viscometer JOIN #matrix
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :i am going to hate having to setup a windows computer to get this to build
privmsg #c :hmm, has nobody really ever gotten CMake to cross-compile things?
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :sure they have i am sure
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :the glfw even has a mention of it
:sysRPL!~sysRPL@[censored].res.spectrum.com PRIVMSG #c :unfortunately it's just a mention, not a guide
It's a little verbose, but the only really tricky part is that you need to answer pings within four minutes or you ping out, and other people's messages may appear in the middle of the line you're typing. (It's helpful to know that ^R redraws the line. Better still, use Emacs shell-mode.) And you need to know the USER and NICK commands, and type or paste them before the server times you out. Oh, and if you leave out the colon, only the first word of your message gets through, which is pretty confusing to figure out if you don't have another client on the same channel.What does it look like to have a Matrix conversation with curl in a terminal?
If I'm not present when friends are chatting I don't get to replay what they were saying before I arrived, or after I leave.
I think that is the fundamental disjoint - features are attributed to IRC that were not intended, and then attempts to bolt them on through services, bouncers, or whatever, is never going to create a seamless rich experience that many seem to want.
For me, IRC has always been the avenue for mostly throwaway, real-time at-this-moment off-the-top-of-my-head stream-of-consciousness discussion, with Usenet or forums and email mailing lists for more long-running considered and logged discussions.
I've never been impressed or attracted to products that try to force the two styles together.
More recently, I've contributed to a number of open source projects that have live chat meetings on IRC. We kept logs of those meetings, but live chat is totally the point.
Can't do that in voice chat.
In the usual case of IRC channels the contributors are in the minority and so it can take the form of a voyeuristic learning experience for the passive bystanders - and very highly educational most of the time.
Not necessarily.
An SMS, sure. Because that's more of a message than a chat.
IRC, that's strictly chat and that doesn't have to persist. I can duck into and out of it as I wish.
If you joined a server that was temporarily disconnected from a peer, you could get operator status on an empty channel that then carried over when the server reconnected to the larger network. Chanserv/Nickserv are bolted on solutions for any kind of permanence. Messages delivered late are not recognizably late. There’s no threading etc.
What I thought worked remarkably well, however, was the loose structure formed by students/employees who were in charge of their university or ISP hosted server. They weren’t given heavy scrutiny but still had some accountability to a larger organization. It somehow bridged the gap between complete independence and central control.
EDIT: Also, how does Matrix handle large communities? I'm interested not just in the user side but the moderator side of things.
Importantly it manages to do this while supporting end to end encryption giving you high privacy in DMs, and high anonymity Signal etc can not match due to phone and phone number requirements.
Also Matrix bridges well to other networks. I have several slacks bridged to mine so I only need to use Matrix. Think of a messenger and there are one or more bridges for it.
Supporting matrix also means supporting open software and networks, unlike proprietary walled gardens like Discord that can at any time leak or monetize your chatlogs.
That said, having set up self-hosted ZNC (the de facto IRC bouncer) last week, it's a damn PITA if you want the same experience as what you get with newer messaging stacks.
First, the default operation of ZNC is to replay the last lines from the client buffer regardless of whether your client already has them or not. To work around that, you have to install the non-built-in "playback" module. The OS I run ZNC on (Debian 11) doesn't package that, so it needs to be compiled from source with znc-buildmod, which means installing a C++ compiler. This also makes auto-updates harder because the module has to be recompiled out-of-band every time the ZNC package is updated by the package manager.
Second, the playback module uses a ZNC-specific capability which your client may not have support for, in which case you'd need a script to work with it.
Third, the playback module only operates in terms of server time. Your client asks the bouncer to replay all messages since timestamp T, where T is presumably the timestamp of the last message you received from the bouncer before the disconnect. But because of precision errors, this ends up replaying the message you received at time T, the one you already have, so your client ends up getting that message duplicated.
If you were to artificially add some milliseconds to T to work around that, you could miss out on any other messages that did occur in that time, so that's not a good solution. (Message loss is worse than duplicate messages, especially when the point of setting up a bouncer is to not have message loss.)
IRCv3 doesn't fix it either. The IRCv3 version of the CAP allows the server (bouncer) to implement either server time or "message IDs" or both. Message IDs would indeed solve this problem, but since server time is an option you can expect bouncers to only implement server time and not message IDs. Indeed, from a brief glance at the ZNC playback module code it seems ZNC itself makes it hard to add message ID support to that module, and even the new soju bouncer only supports server time.
Does Matrix have support for it then, or not?
Things IRC is better at:
– being light weight (both server and clients)
– being an open standard
– horizontal scaling
– simplicity (talk to it over telnet if you want)
Things every other modern messaging solution is better at:
– name and channel management
– permissions that are more granular than ability to access a channel or not
– non-textual content (images/video/emoji)
– rich text (HTML/markdown/syntax highlighting/typefaces/fonts)
– one to one/many to many calls and meetings in a world with everyone behind a NAT and middleboxes
– file transfers
– screen sharing
– mobile connectivity
– threading
– message history/ability to receive messages while not online
– aesthetics and UX (most IRC clients resemble TUI apps)
– accurate presence (whether a given person is actually available or not, attempts to paper over missing IRC features with things like bouncers usually break this and the offered features are usually more granular than connected or not connected)
– extensibility (/commands and "chatops")
– abuse control and prevention
Things that do not matter to the world at large:
– That you personally are not a fan of the modern solutions and/or find them distracting
– That modern messaging solutions are centralized rather than distributed
– That a new IRC standard is on the way that addresses most of IRC's deficiencies… Two decades too late.
– Privacy policies and TOSes that allow platform owners to target ads at users or "sell their data"
– That a variety of clients for each service is not available
– The availability of and license to the source code for the client and server
Reasons why (insert name of decentralized project) is unlikely to displace the centralized incumbents anytime soon:
– Their UX is worse or they are lacking a significant number of features
– Users don't want to run servers or deal with technical minutia, and the alternative requires these
– The problems this project solves are mostly on the list of things that do not matter to the world at large
I'd also add that IRC is very easy to write a client for, especially if you're in a language without too many niceties, like an HTTP client library. As long as you can open a TCP socket and read/write from it, you can make an IRC client.
I say all of these things as someone that generally likes IRC. I have lots of good memories of it. But I also like plenty of other retro things, and the list of things that IRC does worse than everything else is long, objectively definable, and worst of all: ever-growing.
Generally speaking, choosing IRC as your messaging tool is doing a disservice to both yourself and your users. There are better tools for nearly every use case.
But just to give you some kind of rebuttal (or mention some unmentioned points by you): IRC has native clients for many more operating systems than any alternatives (many don't even have any native clients at all!). IRC will still work when everything is very broken (DNS on fire, AWS having a moment, ..) and I think a fair few still use it for that reliability aspect. UX is very much in the eye of the beholder. Chatops is very much a thing in IRC as well as adding commands to it (just with ! instead of /).
For Matrix channels to succeed, they need a culture around them, and the semi-criminal world of hacking back in the day is what led to its growth, imo. I remember one day someone very smart said, "stop using silc," where the implication was it was compromised in a very intentional way, and a lot of people dropped it and went back to irc.
It's hard to think of a subculture now that would facilitate that. IRC was the effect of the internet being novel. If you have a subculture, the effort to prevent it from being brigaded is going to come at a cost of organic growth. To get Matrix off the ground, you would need new tech with a lot of upside in front of it, like blockchains, maybe CRISPR, drone racing, analog/quantum computing, day trading, maybe a new musical form, something with a physical competence as a bar. I don't think the gap is in the tech, it's in the lack of diversity in what people physically do anymore.
Candor?
any conclusions you can think to highlight given all that. for instance when would you choose one or the other?
If I actually cared about decentralization above other concerns, my next choice would be Matrix.
For literally all other use cases, I would be on Discord or Slack. Users are likely already familiar with it, likely already use one or both, and I'll have to answer a lot fewer technical questions.
My approach is irssi in tmux on a server. A full real client always running, used via ssh, same experience on a phone or computer. As a bonus I have a lot of power I wouldn't have in a separate phone app. I can search my logs at the source with less, grep, etc. I can copy lines of scrollback with tmux copy mode, I can use all my irssi aliases and scripts to do things like send delayed messages and set reminders or print out what song I'm playing or what the weather is. My email client and torrent client are accessible in the same tmux session. It all just works quite well no matter how I'm connected.
I hear a lot of bad things about configuring bouncers (mostly znc), and have been told before by a friend that he didn't get all the lines I sent while he was asleep because I sent too many or whatever other reason. Bouncers largely seem jank. My irssi + tmux setup makes sense to me and has no nasty surprises.
I get that to the average person this setup probably seems insane, but if you already have a computer locally or remotely that you leave on, I would recommend it. (optionally substitute irssi for weechat and/or tmux for gnu screen, I just use what I like)
Switching gears slightly, I just wanna say that I use IRC, XMPP, and Matrix on a daily basis. IRC continues to be my favorite overall, and has the best clients by far. XMPP and Matrix don't get logging right, don't get chat sorting right, don't get extensibility right, and they just actually crash on me more than most other software I use, oddly. I've heavily used Dino (past), Gajim, and Conversations for XMPP. For Matrix I've tried a lot, but mainly I now use nheko on my PC and element on my phone (I have fluffychat too, but it doesn't seem dramatically better).
Up until the late 2000s there were plenty of thirdparty clients in use and they could all interoperate reasonably well, although MS started turning later versions of the protocol towards a bloated XML-filled mess.
I really do miss the internet culture of that era.
I'm rooting for Matrix, personally.
For a minimalist client try weechat.