What this post is not about

This is not a post complaining about how bad Slack/Skype/YourFavoriteMessanger™ is compared to IRC and that we should continue using IRC instead of them. I'm a pragmatic person and that battle is lost. Having said that, those other tools have some interesting capabilities that IRC lack - like notifications and calling people. Yes, I know about XMPP and Matrix, but like I said, this is not a post for idiologists saying there's better ways - it is for pragmatists who have to use these proprietary tools for one reason or another.

What this post is about

This is a post is about the discrepancy that most work on the computer is based on either text processing or text consumption. Messengers tend to fall into this category. Not for everything, because they include other features like file sharing and calls. However, people tend to also type a lot of text into those messengers. My claim is: Not having a general text editor at your disposal for when you have to input/manage loads of text is like being a carpenter and only having a hammer in the toolbox. It'll get the job done, but it's going to be a painful, redundant and shitty job.

Just look at this LifeProTip on Reddit. Literally zillions of people figuring out the simplest of shortcuts. They learn that C-DEL deletes a word and start praying to the heavens how they could only have missed out on something so basic. The article has ~50k upvotes and ~1k comments. There's fun comments like "I don't understand how I can have spent the last two years working as an editor without telling me this. I'm off to cry in the toilets." And well, they are speaking about deleting words instead of characters. There's so much more to discover for them. I feel their pain.

These days, the basic notion of how you're supposed to enter text these days is to enter it into a text-area. It's the same for Slack, Skype, Web Mailers and so on and so forth. Personally, I strongly dislike typing text into text-areas. Maybe because I'm old and grumpy. But also because I'm typing text a lot. At the end of the day, typing text is my job. So it's only reasonable to want to be efficient at it.

Let's improve on the status quo

So let's do something about that! As I said, many messengers do a fine job at other stuff, but they don't shine at manipulating text. So, let's solve only this particular issue and happily use the messengers for the other stuff. I've been dreaming about this for a longer time, but it turns out: There's an easy solution for that. Let me draw a diagram:

There's a fantastic program called Bitlbee which is "an IRC to other chats gateway". Then, there is another fantastic library called libpurple which "is intended to be the core of an IM program". It has support for loads of messengers built in - and then there's plugins for others (like Slack and Skype). Bridging Bitlbee and libpurple is already built in to Bitlbee.

This means you can actually just use your favorite IRC client to access all those messengers. My favorite IRC client is built into Emacs and is called ERC. Having an IRC client run within Emacs is ideal for our proposition, because Emacs is pretty ideal for manipulating text. Of course, there's other good options and you can chose whatever your favorite is. As long as your IRC client has a better input method than a text-area😏

This is what a typical session might look like:

On the right you see Emacs with two open buffers - both are connected to Bitlbee/IRC and are a /query to phil (who is the co-founder of 200ok). One is connected to Slack, the other to Skype. On the left, you can see that the messages that I typed into Emacs on the right, actually appear in the native clients, too. Of course, it also works the other way around, for group chats, channels and so forth. This screenshot is just a glimpse.

So let's get on with setting this up for you. From the description above, this might look like a lot of work, but it's actually not. We're standing on the shoulders of giants here. I got this to work within 20min without having a clue on how it worked before. Writing this blog post and documenting what and why I did it takes me way longer (; Using this tutorial, you set everything up within just a few minutes.

Let's start with the Bitlbee and libpurple setup. You can install them yourself, of use a pre-configured Docker container. This tutorial uses the latter option.

Let's create a folder with sub-folders for the Bitlbee/libpurple configuration:

mkdir ~/src/bitlbee ~/src/bitlbee mkdir config etc config etc chown 777 config etc 777 config etc

Then let's create a docker-compose.yml file within that folder which will start Bitlbee/libpurple and all the messenger plugins:

version : "2.4" services : bitlbee : image : ezkrg/bitlbee-libpurple:201907221448 ports : - 6667:6667 volumes : - type : bind source : ./config target : /var/lib/bitlbee - type : bind source : ./etc target : /etc/bitlbee

Now, you can start the container. Then, you can log in using your favorite IRC client.

docker-compose up

Now, all that's left is to set accounts for the messengers that you want to proxy into IRC. Here's the quickstart documentation from Bitlbee. I'll show you how to set up one popular messenger: Slack.

Create a legacy Slack token. Connect to Bitlbee using your favorite IRC client. You're dropped into the &bitlbee channel. This is where you do all the Bitlbee configuration/administration. Register an account. Then your settings will be saved for this account

/OPER register [a_safe_password]

Set up your Slack account.

account add slack [username]@[your_team].slack.com [your_token] account on

Add all the channels you want to have linked.

chat add slack general

Save your configuration.

save

NB: If you're also using ERC, you can save that a_safe_password password by adding this line to your ~/.authinfo.gpg :

machine localhost login "[$USER]" password [a_safe_password]

Now, you're all set. You can use regular IRC commands like /query to DM a person or /join #[channelname] to join a channel.

Your settings are persisted through the mounted volume. On the next connect to Bitlbee via IRC, you'll be logged in and Bitlbee will automatically connect to Slack.

Now, what can you do about the apps of those messengers? Likely that depends on which ones you use and for what you're using them. Personally, I'm still running them in the background on my PC as well as on my phone and watch for the things that they do well: Notifications while I'm not on my PC, calls and file sharing. But for everything related to text, I'm using the new setup.

NB: Running the apps as next to this setup side-by works well - and having the docker container and Emacs open takes way less memory and CPU than just running Slack😏

If you're looking for an IRC channel to join - check out #organice on Freenode (bridged to #organice on Matrix). It's our new community chat for a free and open source implementation of Org mode without the dependency of Emacs - built for mobile and desktop browsers: https://github.com/200ok-ch/organice/

Enjoy and happy text processing!

If you liked this post and want to say 'thanks', please head over to our free/libre and open source software page - and if you like one of them, give it a star on Github or Gitlab.