Hacker News new | past | comments | ask | show | jobs | submit login
Repl.it Multiplayer (repl.it)
473 points by rozhok 3 months ago | hide | past | web | favorite | 115 comments

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.

Thanks so much for the kind words! And apologies for said incident. I think you might've been caught in a recently deployed intrusion & spam detection systems.

We've been battling crypto miners, evil hackers trying to launch attacks, and other nasty stuff. Of course, this is nothing new and we know how to deal with it but I think we just reached a scale where no other truly open computing platform has ever reached and we had to clamp down harder on abuse. Unfortunately, the systems are not very well-tuned yet.

Can you please email me some more info (amjad@repl.it) so we can debug?

> The breadth of languages offered is surprising

Do you know Try it online?

Try it online: https://tio.run/ code: https://github.com/TryItOnline

Have you tried https://wandbox.org?

It’s consistent and Github login saves your code in one page.

Wow really cool, thanks for mentioning it :)

"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.)?

Nick Thieberger has a nice comic[1] which I think captures my sentiment about this.

I think techies like us severely underestimate how much of a turnoff it can be to begin someone's computer programming experience by making them schlep through an arduous installation and configuration process. You can promise them "really, we'll just get this right once, and it'll all be over", but that doesn't change the fact that this is their first encounter with programming, and that it will therefore have an incredibly disproportionate impact on how they conceive of the task and experience of programming.

On a first date, would you interrogate your date about their likes and dislikes, childhood trauma, and insecurities? It's probably not entirely wrong to claim that this would pay off in the long term, but there is a good chance that this would strike the wrong tone and prevent a second date.

A coarse metaphor perhaps, but there are some parallels. Imagine hearing someone tell you "You, too, can be a digital magician, and bend computers to your will", and then spending 1 hour bashing your head your keyboard trying to figure out how this Anaconda thing works (I thought I was using Python? What's Anaconda? Is it like Python but different?). If I were in that position again, I think I'd begin to wonder whether this is what programming is always like, and probably wonder if I want to do this after all.

Certainly, as we all know, programming does always involve a great deal of resilience in the face of unsexy unfamiliarity, but there are transcendental moments when you look at what you just brought into the terminal and marvel at how this ever came to be possible, and I think trying to give a taste of that to people in a first encounter with programming with a minimum of pain leading up to it is the best way to make them so excited about programming they'll be willing to continue learning, and yes, set up an IDE and Python installation.

[1]: http://www.nthieberger.net/phantom.jpg

I'm a high school computer science teacher (who has also taught middle and elementary school students) and would like to absolutely echo this.

As folks who are fairly proficient in programming, our scales for what constitutes as a "difficult task" can be wildly different from beginners to the field. They haven't built the knowledge, experience and mental representations to accurately determine whether something is hard or easy (case in point: my 9th graders will often propose final projects that would take a group of seasoned engineers months to complete).

After CS classes in college and working in the field, I kinda forgot about the initial setup barriers that I first encountered (and was much more patient to battle through); but after just teaching a single class of middle school students (a) not knowing how to properly install software and (b) as a result, getting into the state of "This is boring ... so I'm going to entertain myself by socializing, distracting my friends, or goofing around" I quickly realized how important it was for these kids' first experience with programming to be painless ... otherwise they would also make my life as a teacher a difficult one.

There's definitely a lot of benefit to ensuring that students are able to set up their own environment, but also a non-zero risk that front-loading this would put them off / distract them. Also, for short courses particularly, there's a danger that a significant proportion of time (especially for the instructor) is spent futzing around trying to fix broken environments.

In my mind, something like repl.it would be ideal for getting through enough material such that the course participants were motivated and knowledgable enough to setup their own environments at a later stage in the course.

It's not a distraction. Sadly it's a big part of Python development. :(

It's a distraction when you're learning. And even now, I do Python all the time and setting up any sort of environment is something I do _very_ infrequently.

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.

This is how I use Python. I'm not very proficient in Python, but it's amazing how quickly I can build simple services with it, despite it being a language I only use occasionally.

There's so much stuff included in the basic installation from python.org. And it all just works.

The only thing missing from the basic installation is psycopg2 for talking with PostgreSQL.

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.

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.

Thanks for your feedback and for your kind words. I'm deeply sorry that you have experienced that. I can talk on behalf of the team and say that it should not be the case. Repl.it should work at any given time and definitely should not be slow, and the fact that you experienced that sounds like there must have been something wrong. if that ever happened to you please let us know ASAP.

I hope. If you need redundancy, I would consider setting a parallel setup with glitch.com which to my surprise also supports python and is battle-tested. No affiliation, just a happy user (of both repl.it and glitch)

neat! I didn't know there were so many options in this space!

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.

You know you're on HN when the CEO of Gitlab replies on your thread

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.

What would multiplayer look like in a gitlab like app?

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.

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


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...

Did you see this Clojure Conj talk about party repl?


Maybe a CRDT or Operational Transform?

It's OT -- we'll write a technical blog soon :)

Looking forward to it!

I've been evaluating ShareDB[1] for a Google Docs-like and it seems promising.

The OT space is really interesting. For those wanting to read more about it, check out the paper: "Operational transformation in real-time group editors: issues, algorithms, and achievements"[2]

[1] https://github.com/share/sharedb

[2] http://citeseerx.ist.psu.edu/viewdoc/download?doi=

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...

[2] https://subethaedit.net

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.


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!

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.

> 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/

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.

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.

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!!

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

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

of course, it's free. Enjoy Multiplayer and build awesome programs together. Please keep us posted with your feedback!

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/

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

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

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.


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!

Party REPL is a multi-party Clojure REPL. The authors just gave a great talk on it last week at Clojure/Conj: https://www.youtube.com/watch?v=AJING0Vigpg Even if you're not into Clojure, it has a lot on the internals of a multi-party REPL and VS Code.

In addition to sharing code and a REPL, it also allows you to collaboratively edit HTML, CSS, web pages, etc. Really cool talk!

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.

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.

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?"


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

Awesome, I can't wait!

It's coming very soon we promise. Gitgub integration is planned and will be in progress very soon. To keep an eye on that feature request click on this link https://replit.canny.io/feedback/p/github-integration

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

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

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

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.

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.

i can confirm that we are excellent

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:


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

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.

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.

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.

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

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.

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

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.

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/

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.

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

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.

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.

I got inconsistent state that never resolved: https://user-images.githubusercontent.com/772305/49634210-52...

This was on the first try. :-(

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.

Thanks. It happened more than once in that session.

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

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.

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

Thus spake the lamb to the wolf.

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

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.

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.

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).

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

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?

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

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

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

Works for me in Firefox. Doesn't lock up, just gets a bit less responsive, but I can still press the stop button and it reacts fairly quickly.

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 :)

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.

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

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

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

How is this implemented?

Not sure how they did it, but I created an online Elm Repl couple of years back http://elmrepl.cuberoot.in/, Sources: https://github.com/girishso/elm-repl-in-browser

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

That answer is a bit outdated because we open-sourced one of the core pieces of our infra: 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.


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.


"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."

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

Is it CRDT?

It's OT right now. But we're looking at CRDT too.

Check out y.js


All the examples are synched

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

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

Best app for private lessons ever!

Can my team run Godot on this ?

What's Godot? Is it an ML thing?

Godot is a FOSS IDE for making games


coder.com is a similar tool.

what server architecture was used for the real time collaboration ?

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

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.

Maybe possible, but certainly not easily usable. Especially not if you would need this for tutoring beginners.

Fuck yeah

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

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.

interviews are one of the use cases. But there are so many other use cases, especially in Repl.it. The blog https://repl.it/site/blog/multi covered a lot of the use case that we know about for sure. And I'm confident there will other use cases that we'll learn about soon.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact