tait.tech

A Libre Solution to Live Sharing


Nothing irritates me more than when a relatively simple thing is not possible with free (libre) software. Such is the case with sharing code with others, live.

The Problem

Here is what I want: I’d like to open a share session in a directory on my machine, have others be able to join it from their editor (via a plugin). When you are logged in and connected to a session a user may be put in RO or RW mode to allow them permission to read and write. Finally, a .live file should be produced using a similar format to asciinema, except slightly simplified. This file will show the progression of the directory over time. It shows everything from every character typed, deleted, retyped, files created, removed, all with timestamps as to when each action occurred.

Why?

Everyone has different preferences and needs, including but not limited to: editor complexity (and ability), color scheme, internet speed caps, accessibility needs, etc. While everyone can generally accommodate themselves on their own project, or when collaborating with others over a longer period of time (see: git). However, these preferences and needs are not met when it comes to live sharing code.

Existing Options

There are many existing programs, plugins and websites dedicated to sharing code on the fly. Most of these offer a similar level of functionality whereby one person can share their code, and others can see what they’re working on as the presenter changes the code. However, if you’ve ever tried to use these systems, you may have noticed something: They don’t work cross-editor, nearly every single code-sharing platform I can find only allows you to share code if everyone is using the same editor. “But Tait! What about CodeTogether? That’s cross-editor!” you might say. Unfortunately, it only supports cross-IDE development: Eclipse, VS Code, and IntelliJ. “But Tait! What about Floobits? It’s cross-editor, supports Emacs and Neovim, and it’s open-source!” Sadly, no. It does support the various editors, and that is by far and away it’s most exciting feature! But it still isn’t fully open-source. Only the plugins are open, the server and deployment techniques are hidden from view.

Technically speaking, this is a simple problem to solve:

Use Case 1

RANT SECTION

Why isn’t it possible to share my code repo live? Or, why are there so many restrictions on how it works? Yes, you can share a folder via FTP(S), but you can’t have multiple editors in one file. Yes, you could share using VSCode code share, but now you can’t use a different editor, or maybe you can’t join the session at all due to performance issues. Yes, you could use something like CodeTogether, which does allow cross-editor manipulation, but it only supports 3 major IDEs: VSCode, IntelliJ, and Eclipse (and a web version).

Why is there no option for me, a Vim user, to share code with an Emacs user, and a VSCode user? Why is there no libre, easy-to-use, cross-editor, simple to setup and use, live code sharing solution? Why can’t I record all the changes in my workspace and save it for later as a “live directory”?

Wouldn’t this be the ideal way to do code tutorials? Granted, it’s not as accessible as a YouTube video for a newbie, and it is clearly should be reserved for