
Repl.it Multiplayer - rozhok
https://repl.it/site/blog/multi
======
lgessler
Really cool, Repl.it is the best online bite-sized programming platform I've
ever used. The breadth of languages offered is surprising (Brainfuck and
Scheme?!), and things I would have thought wouldn't be supported were
supported.

I say this in spite of an excruciating experience I had a few weeks ago where
I led a Python for absolute beginners day-long workshop. I had tried Repl.it
before writing the course materials and was mind-blown at how everything just
worked, including the filesystem, which I needed for downloading NLTK modules.
I decided to design the materials around Repl.it, letting me spare the class
the possibly excruciating and definitely not fun experience of downloading and
configuring Python and an IDE. Unfortunately, on the day of the workshop,
Repl.it just didn't work for half the class, and for most of the rest, it was
really, really slow. Hopefully this was just a hiccup.

~~~
piokoch
"letting me spare the class the possibly excruciating and definitely not fun
experience of downloading and configuring Python and an IDE"

Aren't you afraid that class participants will have a hard time configuring
later Python and IDE by themselves? Wouldn't be beneficial for them to spend
some time setting up their own environment during the class?

BTW I am curious in what way installing Anaconda and starting Jupyther
notebook is "excruciating". Last time I did that it went kind of smooth, but
maybe there are some gotchas I've missed (it was MS Windows machine, I had a
admin privileges, etc.)?

~~~
brownbat
For absolute beginners, I'd even prefer something like this:

1\. Hit install on Python and accept the defaults.

2\. Install a simple text editor with syntax highlighting.

3\. Open a file right on your desktop and type two commands in it and press F5
or something to run it.

Anaconda and Jupyter are great tools, but even they add complexity you don't
need when teaching absolute beginners how accessible this can be.

Here's Python. It's installed. Tell the computer what you want to do inside a
file. You understand text files and how to store them where you want, use your
own conventions for that. Shove it in documents or whatever. We'll learn about
project management and version control later, when you're writing programs
more than 20 lines long.

~~~
lgessler
Yes, that might be what I would do if I did the workshop again. I still like
Repl.it because I think the distinction between the REPL and the file/editor
is much easier to grasp there than with IDLE and IDLE's REPL, but running code
locally is necessarily going to be more reliable than running code on a remote
platform.

~~~
brownbat
Repl.it is a pretty neat solution too, don't get me wrong.

And IDLE has always left me unimpressed relative to the terminal... but using
Unicode on Windows, suddenly code pages get involved, which no one should ever
have to know. There is a long series of subtle, unpleasant tradeoffs.

Writing short Python scripts when I traveled with a Chromebook was messy, I
leaned on repl.it as one option... It was super easy to dive in.

------
sytse
I wonder what technology Repl.it is using for the multiplayer. VS code has a
live coding plugin, is this what is used?

Disclosure: I’m the CEO of GitLab and we’re looking at live coding ourselves
as well.

~~~
rlyshw
It looks like Repl.it is in this thread, they might provide an exact answer.

But, if they don’t, here’s my take. To me it seems like this is something that
would be built in-house with the ability to leverage repl.it’s existing
application infrastructure. I’d imagine this would simplify the development
compared to the vscode plugin. (stand-alone desktop app)

Also, long-time gitlab-CE user here. I’d love to see multiplayer as a feature.

~~~
dman
What would multiplayer look like in a gitlab like app?

~~~
rlyshw
I imagine I could edit a file in a web-based editor and my collaborators would
be able to see those edits in real time. Maybe it wouldn’t be a full-fledged
IDE, but I could imagine building development workflows into gitlab’s CI/CD
pipeline to facilitate semi-rapid pair-programming/prototyping.

~~~
lloeki
I can readily see how that would pan out in GitLab's Web IDE[0].

[https://about.gitlab.com/2018/04/22/gitlab-10-7-released/#we...](https://about.gitlab.com/2018/04/22/gitlab-10-7-released/#web-
ide-is-now-open-source)

~~~
sytse
Yes, this is about live coding in the web IDE and I listed some technologies
to look at in [https://gitlab.com/gitlab-org/gitlab-
ce/issues/51116#note_12...](https://gitlab.com/gitlab-org/gitlab-
ce/issues/51116#note_123299057)

------
krrrh
This is really cool.

Bit of an aside: I used to take notes and share code using SubEthaEdit which
pioneered this sort of collaborative editing over a decade ago. While it’s now
pretty normal to see students taking collaborative notes in classes using
Google Docs (and etherpad before it was acquired by Google to improve the
experience in Docs), it was astonishing a decade ago. I recall spontaneously
loading it up at an early Rails conference and taking notes with a bunch of
strangers (it advertises open docs over the LAN). It was a noteworthy enough
experience that one of the collaborators blogged about it. [1]

It was heartening to learn that SubEthaEdit was made free and open-sourced a
week ago. [2]

[1] Alas, the coloured formatting didn’t survive the blogrot
[http://www.zenspider.com/ruby/2006/04/canadaonrails-
day-1-sh...](http://www.zenspider.com/ruby/2006/04/canadaonrails-day-1-shared-
notes.html)

[2] [https://subethaedit.net](https://subethaedit.net)

~~~
ghthor
There is also gobby and infinote that have been around for as long, if not
longer. I've used them to great effect to pair removing when teaching simple
softEng concepts.

~~~
ghthor
*remoting

------
evv
Way to go, repl.it team!

Hard to believe 7 months have already gone by since I was working with you on
this prototype! I took a peek at some of the websocket messages, and I'm glad
to see its come a long way since I last saw it :-D

This launch seems to perfectly cover the vision of collaborative coding that
the repl.it community has been clamoring for!

~~~
hayaodeh2
Hey Eric! I won't forget our brainstorming session. Multiplayer covers the
needs of repl cast, and man oh man we went through so many iterations!

I hope you like it and I hope it's helpful to you and to the people you teach.
Let us know if you have feedback or ideas, I would love to hear them.

------
dfcowell
> The fact that everyone shares the same compute infrastructure means they all
> see the same errors and the same output — this is crucial for collaboration
> and something that we've found to be lacking from existing IDE's that
> support "collaboration".

What does this do that VS Live Share [1] in VS Code doesn’t? Seems like port
sharing + tty sharing has this covered.

1\. [https://visualstudio.microsoft.com/services/live-
share/](https://visualstudio.microsoft.com/services/live-share/)

~~~
vorticalbox
Works in a browser and has the environment set up to run the thing you're
making.

If you go the vs coderoute everyone needs to set up there system to match.
Using node? Which version of node? Or which version of python.

And everyone sees the output of the program when anyone clicks play.

~~~
dfcowell
That’s not true. The only setup required is installing vscode and the live
share extension.

The host shares their TTY and ports, all the clients see everything that
happens in the host’s TTY (read-only) and ports (r/w on localhost.) Code
editing syncs in real-time to the host machine P2P.

------
kovek
Awesome! A few times I've had to code together with my girlfriend and went for
repl.it as a reflex, checked if it supported this feature or not because it
seemed like it could! (Great (free??) product!) We would then use cloud9, but
now it seems like that won't be necessary!!

~~~
ehsankia
Just as early as a year ago there was almost no good solution, but that's been
changing very quickly.

I really like Colab[0] by Google for a web based one, and if you have VSCode
installed, their Live Share extension is pretty solid [1]

[0] [https://colab.research.google.com](https://colab.research.google.com)

[1] [https://marketplace.visualstudio.com/items?itemName=MS-
vsliv...](https://marketplace.visualstudio.com/items?itemName=MS-
vsliveshare.vsliveshare)

------
filleokus
This is really cool! I oftentimes use repl.it to explain a concept or
something to friends learning programming, this will be really helpful!

Since people are recommending other multiplayer-stuff I'll recommend Live
Share for VS Code [0]. It is so useful that I've shifted to VS Code (with my
teammates) for some projects just for the live sharing. I've tried Floobits
(to be able too keep my regular editor), but that seems much more elaborate
with persistent "projects" which is not really a fit for my more casual use
case.

[0]: [https://visualstudio.microsoft.com/services/live-
share/](https://visualstudio.microsoft.com/services/live-share/)

------
abcdcba
Cool to see these pair programming products coming out recently. Party Reply
is very cool as well.

~~~
tejasmanohar
What's Party Reply? Is that another tool of Repl.it in autocorrect? Googled
but didn't find much

~~~
amasad
I think it's a reference to multi-player clojure REPL in Atom. I haven't
looked too deeply but from what I can gather it uses Atom Teletype for the
editing and they figured out how to connect to the same Clojure REPL server.

[https://news.ycombinator.com/item?id=18574284](https://news.ycombinator.com/item?id=18574284)

It's pretty cool and it addresses a need that we've found missing as well --
live code editing is half the feature, what's also important, is that the REPL
state be synced. It's a coincidence that we both picked the same name!

------
streulpita
This is really cool. I dreamed of something like this back when I first
started coding in college, but there wasn't really anything available that
could do the job.

~~~
klodolph
Well, you could always have multiple people connected to the same desktop with
VNC. If you prefer terminals, tmux and screen support multiple simultaneous
clients.

Obviously not quite as good for many reasons, but possible.

------
bwood
I just signed up because I wanted to be able to clone a git repo into a repl
and pair program as needed. There doesn't appear to be an easy way to do this,
I figured it would be the obvious feature especially with the GitHub login
option.

Apparently it is do-able with a little effort, but man I'd love for this to be
a standard feature. "Hey Jim, I just pushed to the funky-broken branch, can
you take a look and help me solve it?"

[https://tra38.github.io/blog/deploying-github-repos-onto-
rep...](https://tra38.github.io/blog/deploying-github-repos-onto-repl-it.html)

~~~
amasad
GitHub clone coming real soon. And a full-on GitHub integration will follow :)

~~~
bwood
Awesome, I can't wait!

------
orliesaurus
Been using repl.it for so many years, glad to see it's finally getting the
attention (and new features) it deserves!

~~~
hayaodeh2
Thank you for your support and kind words. We value our users and early
adopters. I would love to learn more about how you've been using Repl.it and
why? Please feel free to email me at haya@repl.it

~~~
orliesaurus
Mostly just running code on the fly, most times to show small snippets of code
to people over the shoulder. Nothing glorious

------
rozhok
This is super-cool tool for performing tech interviews. I've used a
coderpad.io in the past (as interviewer) but they have way too high prices for
the amount of interviews I've performed.

So when I've run out of free pads I've switched to repl.it + screen sharing,
but it's not the same as simultaneous editing.

Really happy with it.

~~~
amasad
Awesome! Thanks for the feedback. We've been using it for interviews for more
than a month and we've been really happy with it.

It's worth noting that excellent folks at Coderpad have a lot of features that
complements the editor too -- I've used it while at Facebook -- so we're not
trying to compete with that.

~~~
akanet
i can confirm that we are excellent

------
vram22
Here are some online programming sites similar to repl.it (not for the
multiplayer part though) that I had come across, blogged about, and mentioned
on HN some weeks ago:

[https://news.ycombinator.com/item?id=18277513](https://news.ycombinator.com/item?id=18277513)

------
Retroity
This is really cool! I've always dreamed of something like Google Docs for
programmers.

~~~
bloopernova
I remember a few years ago I shared a Google spreadsheet among a few coworkers
so we could all see and edit the same thing.

The amazing utility of being able to see the location of everyone's active
cell, and seeing each person as a different colour, was just wonderful.
Combined with a voice channel and it was more useful than a face to face
meeting in a conference room.

This inspires me to try to get the editor sharing running for my tiny DevOps
team.

------
anderspitman
Very cool. This looks almost perfect for having a shared environment for
teaching my nephews how to make browser games. Only issue is it appears the
multiplayer sessions are not persistent? ie what I really need is a shared
project where different participants can log in and hack on it as they have
time, but also pair if someone runs into a problem and needs realtime help
fixing it. I think cloud9 works this way. @amasad Any chance of repl.it
supporting this case in the future (or maybe it alread y does and I'm missing
it)? This is something I would gladly pay a subscription for.

------
HelloFellowDevs
It's funny that I had just used it in class 2 days ago. It's such a great way
to communicate and work on a project without actively disrupting a lecture
that is actually unrelated to the code we were writing.

~~~
hayaodeh2
How did you hear about Repl.it? how did you end up there?

~~~
HelloFellowDevs
I was giving a talk about Python at a club in school and I wouldn't be able to
have everyone install an IDE or Python on their computers at the moment. So in
the planning phase a fellow club member suggested Repl.it, so that they could
run and test the commands we showed. This was a few months ago and it didn't
have the multiplayer feature then. I found myself using it recently because I
wanted to help a friend with a program idea that was unrelated to the class we
were in, I remembered Repl.it and it turned out to have 'multiplayer' in beta,
making it easier to talk in class without repeatedly chatting though inline
comments.

------
abarrettwilsdon
Very cool to see this launch! I beta tested Multiplayer a few short weeks ago,
and it looks like it's improved quite a bit since then

~~~
hayaodeh2
Thanks for your support. Yes, we like to test and improve our features, and we
try our best to listen to our user's needs. Please keep us posted with your
feedback and if you have thoughts or ideas to improve Multiplayer.

------
arendtio
I wish there was a service which allowed collaborative code editing without
registration/an account. Some years ago I used Gobby/Sobby [0] for such use-
cases but using a website would make the whole thing much easier than having
to install some software first.

[0]: [https://gobby.github.io/](https://gobby.github.io/)

~~~
arendtio
I just created a repl.it account and tried the multiplayer feature. In fact,
not every participant requires an account, just the host. So not as bad I as I
expected and kinda reasonable. I am confident I will try that feature with
some friends in the future.

------
lerax
This is so good! Since codeshare turns too unstable and cloud9 it's a little
cumbersome to use, having this alternative is amazing.

~~~
hayaodeh2
Absolutely, making it easy to share and use is a core part of our mission. We
would love to see you around Repl.it and let us know if you have any feedback.

------
mihaifm
What is the text editor behind repl.it? Is it custom made or does it use any
open source browser editor? It’s really good.

------
petters
I got inconsistent state that never resolved: [https://user-
images.githubusercontent.com/772305/49634210-52...](https://user-
images.githubusercontent.com/772305/49634210-52bd1b80-f9fc-11e8-813c-1f3b362456e5.PNG)

This was on the first try. :-(

~~~
amasad
That's weird. We'll debug, but I think it might be that the right-hand side
isn't logged in. Try logging in with a different user.

~~~
petters
Thanks. It happened more than once in that session.

------
sathishmanohar
I am excited about all those bugs everyone will add in real time. This is
going to be fun.

------
Myrmornis
I wonder whether there's ever been much momentum within google to add
programming language modes to google docs. It must have been suggested plenty
of times internally. I mean, I hope not, for the sake of smaller companies
like repl.it.

~~~
hayaodeh2
We're really good friends with Google and they already use Repl.it. Thanks for
your kind words.

~~~
Myrmornis
Thus spake the lamb to the wolf.

------
JJseiko
I've been using Repl.it's Multiplayer to teach people Python, I recommend it!

~~~
hayaodeh2
Nice! We value the word of mouth so much! if you have feedback for us or
feature suggestions please let us know, we'd love to hear from you.

------
SquishyPanda23
Heh, I don't know how this keeps happening, but I literally just had this idea
today. I almost sent it to a friend who's looking for project ideas, but I'm
super glad repl.it is building it. This looks great.

~~~
MetalGuru
Same here! I love seeing ideas I’ve had independently being built by others
(although this idea is pretty obvious; hence, it being built by multiple
parties). It’s validating. I’m working on evolving from just ideating all the
time to actually building rapid prototypes. Dreaming up ideas is really fun,
but so is manifesting them (with the exception of tedious minutiae, but that’s
where most of the work occurs).

~~~
amasad
We're also hiring if you want to come work on it (and we're a pretty small
team -- 6 people -- so it's sorta in the founding stage)
[https://repl.it/jobs](https://repl.it/jobs)

------
joowani
This is cool. By the way I just tried it and ran a simple infinite loop (in
Python) and the whole page goes unresponsive and I don't seem to have a way to
terminate the process?

~~~
amasad
So it's not the loop -- it's the printing of a lot of data really fast. Here's
an infinite loop with a small sleep with no issue in it:
[https://repl.it/@amasad/forever](https://repl.it/@amasad/forever)

It's funny, it's both a regression and an improvement. We started using
XTerm.js with a PTY[1] and we stopped throttling output[2] which reintroduces
the "browser locking up from too much output" bug. We'll need to introduce
backpressure.

[1]: [https://repl.it/site/blog/stderr](https://repl.it/site/blog/stderr)

[2]: [https://repl.it/site/blog/infinite-
loops](https://repl.it/site/blog/infinite-loops)

------
kuu
I wanted to build something like this for a long time, but I never figured out
the best tech & architecture to make it. I'm looking forward for a technical
post :)

------
troynt
I like Repl.it, but recently some of my files got mixed/lost. Be sure to
backup. Would be cool if files were automatically mirrored to git.

------
jakeinspace
This seems like it might be useful for hackathons, especially when working
with team members who aren't well-versed in git or virtualenv.

~~~
hayaodeh2
Absolutely, it can be useful for online hackathons and irl hackathons. Do you
usually contribute to hackathons?

------
artursapek
Congrats, Amjad. I enjoy seeing Repl.it continue to pop up on HN years later.
Keep on keeping on.

------
adamnemecek
How is this implemented?

~~~
williamstein
Good question. I searched around, but could only find this about Repl.it being
closed source -- [https://repl.it/feedback/p/open-
source](https://repl.it/feedback/p/open-source)

~~~
amasad
That answer is a bit outdated because we open-sourced one of the core pieces
of our infra: Prybar
[https://github.com/replit/prybar](https://github.com/replit/prybar)

We'll be open-sourcing some more. As for how Multiplayer is implemented, we'll
be doing a blogpost on it soon.

~~~
latchkey
[https://github.com/replit/prybar/blob/master/languages/nodej...](https://github.com/replit/prybar/blob/master/languages/nodejs/repl.js#L4)

Sorry to be the license police, but I think that the attribution for embedding
another project like that is a little unfair to the original authors,
especially since this project is the more restrictive GPL 2.0.

[https://softwareengineering.stackexchange.com/questions/2183...](https://softwareengineering.stackexchange.com/questions/218331/what-
are-the-requirements-for-attribution-in-the-mit-license)

"The fourth paragraph says that the copyright notice in the second paragraph
must be reproduced. Users of the license [sic] substitute the [fullname] with
their actual name. That is what constitutes "proper attribution" in the mind
of the MIT: every user of the software can find out who wrote it if they want
to."

~~~
amasad
Thanks -- I'll make sure to let the team know to fix it.

------
deepu256
Super cool. Really wish Dart is supported on Repl.it

~~~
amasad
If you add it to Prybar[1] that's half the battle. We're also working on open-
sourcing more parts of the system to make it easier to contribute languages
etc.

[1]: [https://github.com/replit/prybar](https://github.com/replit/prybar)

------
avdemidov
Best app for private lessons ever!

------
deepnet
Can my team run Godot on this ?

~~~
amasad
What's Godot? Is it an ML thing?

~~~
deepnet
Godot is a FOSS IDE for making games

[https://godotengine.org/](https://godotengine.org/)

------
nhooyr
coder.com is a similar tool.

------
umen
what server architecture was used for the real time collaboration ?

------
black-tea
Cool. Something that has been possible with GNU screen for decades.

~~~
bloopernova
Yes, but the usability was pretty poor as it had very specific requirements
that far-flung people would have trouble meeting.

Needing SSH access, valid user accounts, and various permissions meant it was
always viewed as a hassle rather than benefit.

------
d2161
Fuck yeah

------
decebalus1
Cool. Most likely it will only be used for technical interviews.

~~~
amasad
How so? There are a bunch of anecdotes in the post beyond interviews and if
you go to our feedback boards you'll see that people are using it in schools
and all sorts of different scenarios.

