
Repl.it 1.0: IDE that Grows from Playgrounds to Fullstack Apps - dsr12
https://repl.it/site/blog/platform
======
amasad
Hey HN, author and Repl.it cofounder here. It's been a long journey to get to
what we're calling 1.0 and HN have been there on every step of the way. We
started working on what became Repl.it back in school where we were tired of
setting up the development environment on every machine we wanted to code on.
It was at a time where everything was moving to the cloud and we thought that,
naturally, coding would follow suit. We initially approached this problem
naively and started hand-writing interpreters in JavaScript so we can run them
in the browser but soon enough we've figured that it would take us years of
work to get to something usable.

At the time, Emscripten -- the predecessor to ASM.js that compiles native code
to JavaScript -- was coming on the scene so we tried using it to compile
Python, Ruby, and Lua and more to JavaScript. Much to our surprise it actually
worked and we became the first production app to use Emscripten. We launched
on HN in 2011
([https://news.ycombinator.com/item?id=3056490](https://news.ycombinator.com/item?id=3056490))
and the reception was nothing short of amazing. Programmers used Repl.it as a
portable repl and a bunch of learn-to-code and MOOC companies used our open-
source stuff to build interactive coding experiences in the browser.

Unfortunately soon after that, we got busy with work and life and the project
lingered for almost 5 years. I went to work at Codecademy as the #1 employee
(which at the time was using open-source parts of Repl.it) and then left for
Facebook where I worked on JavaScript Infrastructure and React Native. Around
2016 Haya (cofounder and wife) and I were looking for a new side-project but
then decided that since no-one really built our vision for what Repl.it could
become we decided to give it another shot. As soon as we started improving it
we started seeing growth, within a few months it got to a point where we were
spending a considerable sum just keeping the service up. We didn't want to
start a company but we were faced with the choice of either shutting down
something that users obviously love or we quit our jobs and start a startup.
We chose the latter.

One thing that's interesting about our small team is that we've built
expertise in both the frontend (IDE) and the infrastructure (container
management and remote development environment protocols). For the IDE, we
recently shipped a big rewrite that allowed us to do server-side rendering
(important since we're committed to speed) and a plugin architecture based on
the ideas behind Redux with a very small core
([https://repl.it/blog/ide](https://repl.it/blog/ide)). Everything in the IDE
is a plugin, which is simply a reducer, a receiver, and a React component. The
reducer builds up the state required for the plugin to work, the receiver
dispatches actions in response to other actions flowing through the system,
and the component renders. Even something as core to the IDE as the file tree
is built as a plugin with no privileged hooks into the core. For the backend,
we've designed a set of protocols and hooks for remote development. The
protocol can expand capabilities as you require them. For example, every
program starts out using the simple (loop (print (eval (read)))) protocol and
then if you decide to use files/modules then it will switch to something that
knows how to handle file manipulation and change events. The IDE can also
react to what you require, for example, if you open a port then it will open a
webview would pop open so you can see the result.

Last but not least, Repl.it has a growing community of aspiring programmers.
Some of our hardcore fans are teenage programmers and so we've built a place
for them to share, vote on, and discuss their projects
([https://repl.it/ibuiltthis?sort=top](https://repl.it/ibuiltthis?sort=top)).
One interesting thing that we've noticed about kids on our platform is that
they continue to build 90's-style website. I've commented on a recent HN
thread with links to some of their creations
([https://news.ycombinator.com/item?id=16506825](https://news.ycombinator.com/item?id=16506825)).

Happy to answer any questions.

~~~
joshuahutt
I've been using repl.it for a couple of (or more, I suppose) years now, and
it's been very helpful to have a simple, reliable REPL to jump into, test
things out, and to share code. I've turned students and colleagues to it, too.
I'm excited to see where you're taking it. I hope it continues to load and run
quickly.

Just wanted to say thanks for building it, and keep up the great work!

~~~
amasad
Yes we aim for 2 seconds loadtime irrespective of the environment (we maybe a
bit of the mark in some cases but not too far off) and part of the post was
about reassuring folks like you that although it will increase in power it
doesn't mean that it will be slower or more complex.

~~~
joshuahutt
That's great to hear! :)

------
EgoIncarnate
I may be misreading this, so please correct me.

It seems as if this project has gone from open source to a closed source
service ? [
[https://github.com/replit/jsrepl](https://github.com/replit/jsrepl) ]

Are Facebook, Google, and all the other name brands you are using to promote
your product using your proprietary service, or the older open source stuff?
If you have gone closed source, you should only be using names that are using
the proprietary product.

It seems like putting "Open Source" on your front page in a big headline is a
bit misleading if you are now a proprietary service. Labeling "Open Source" as
a key feature seems disingenuous if you used to be open source but are no
longer. If the case now is just that you use open source software, I don't
think "Open Source" as headline is appropriate, as that is true of almost any
company. The implication with listing "Open Source" as a headline is that your
product is open source.

~~~
amasad
Oh, I could see how this could be misleading. So the open-source tech you
linked to is outdated -- we moved everything from the client-side to our own
infra (because we wanted to do things like open a port). We intend to open
source the backend infra too but it takes time for the protocol to stabilize.

The "open-source" section on the homepage is intended to show that some open-
source projects (for example Jest
[https://facebook.github.io/jest/](https://facebook.github.io/jest/) were
repl.it is embedded on the homepage) use us as a playground, for bug reports
etc.

As for the logos they are either users or customers of the the Classroom
product: [https://repl.it/classroom](https://repl.it/classroom)

Google, for example, uses the Classroom product to spread programming
education. I think they have a program where they send teachers to schools to
teach computer science. And there teachers wanted to use Repl.it etc.

~~~
mimming
The teacher you're thinking of from last year is me :)

Thanks a lot for the great classroom product, and your support. It made my
work a lot easier.

~~~
amasad
Oh awesome, thanks! Glad we could help.

------
codecurve
I did last year's Advent of Code[1] using a different programming language for
each day of the month.

Repl.It was easily the best tool out there for quickly prototyping solutions
and testing them out for the languages that I don't use often and don't have a
dedicated environment set up for.

As part of that month, I started tracking each of the online REPLs I ended up
using and threw them all into a gist[2]. Turns out you can do a lot of
programming from the browser these days.

[1]: [http://adventofcode.com/2017](http://adventofcode.com/2017)

[2]:
[https://gist.github.com/danprince/0f4a200319c95209c9c028b296...](https://gist.github.com/danprince/0f4a200319c95209c9c028b2968847df)

------
mshenfield
Github seems like they're gearing up to offer a similar service [0]. Cloud9,
and notably Glitch [1] offer similar and well executed services.

[0] [https://github.com/atom/xray#web-
compatibility](https://github.com/atom/xray#web-compatibility) [1]
[http://glitch.com/](http://glitch.com/)

~~~
lucasverra
Just for the sake of listing, what "alternatives" are available today ? I can
think of

1\. Codepen (pure HTML+CSS+JS+frameworks)

2\. jsfiddle.net/ (pure HTML+CSS+JS+frameworks)

3\. Cloud 9 (full ide?)

4\. [https://anvil.works/](https://anvil.works/) (pure Python)

5\. CaptainDuckDuck ?

6\. Repl.It

7\. [https://glitch.com/](https://glitch.com/)

8\. Runkit.io (pure node.js)

Other ?

~~~
p1esk
Is there a cloud (browser) based IDE that allows to run code on a server I
specify?

Right now I'm using the remote deployment feature of PyCharm to run tensorflow
code on different remote GPU servers, but I'd like to uncouple the IDE from my
local machine.

Ideally, I'd like Github to offer such service, so that I can edit the code in
my repo right on github.com, specify a remote server to run it on, and
seamlessly transfer/run it on that server with a click of a button.

~~~
atoko
You could set up a CI server that watches commits, and then commit to a
branch, have it deploy automatically.

------
vosper
I'm not sure I'll use repl.it as an IDE (I'm quite attached to my Jetbrains
products) but I use it all the time for quickly prototyping bits of Javascript
code. It's been incredibly useful for me. Congrats on reaching 1.0!

~~~
amasad
I'm not sure I would either and I'm the CEO. I love Emacs. I'll work to
convince myself to use it as my primary IDE and if I did maybe then others
would. For now, I'll use it for launching microservices, quick experiments,
prototyping, side-projects etc.

However, fun thing to share is that a lot of kids get started programming on
Repl.it and continue to use it as their IDE.

------
AcerbicZero
I was a huge fan of Repl.it while I was learning Ruby, but I was never able to
leverage it into anything other than self-teaching. I have however, wasted
many hours trying to get various local IDEs to replicate the experience of
Repl.it, so that's gotta count for something.

In the end, I transitioned to Visual Studio Code, but VS Code doesn't have the
same inline repl (or I've yet to get it to work correctly). It sucks by
comparison, but it has the advantage of actually working locally.

~~~
amasad
Thanks for the lovely comment. Hopefully you can come back and use us at least
for side-projects. Then maybe as you we get better and expand to service all
your IDE needs you'll stick around to use it as a primary IDE. We're in it for
the long haul and we'll get there.

------
adpirz
I used to teach an AP CS class and we used repl.it extensively, kudos to
amasad and crew for a great product that just works.

------
finalfantasia
My favorite online REPL for Clojure.

It would be great if Parinfer [0] were integrated into the Clojure (and
Scheme?) REPL.

[0]
[https://shaunlebron.github.io/parinfer/](https://shaunlebron.github.io/parinfer/)

~~~
amasad
Thanks! Ooooh TIL re parinfer. I'll look into it. Will check it out. Also,
look forward to on-the-fly package installation for Clojure!

~~~
finalfantasia
Wow, that was a lightning-fast response!

Thank you very much!

------
petergatsby
Repl.it is amazing -- my company builds software for higher-ed and repl.it is
consistently the most oft-requested integration, in CS classes but also in
STEM more broadly.

------
wuliwong
Forgive me, I'm sort of thinking out loud here.

I like the idea of trying out new languages/frameworks using this. I would be
concerned building any serious projects using Repl though. I'm worried about
how much 'lock in' there is at the moment. How difficult would it be to move
from Repl to AWS for example? My guess is that it would be significantly more
difficult than moving from AWS to Azure or something like that. If their
service is unique enough it will be a pain to move, I would imagine. But this
is obviously also their advantage. I bet this is similar to the when first
cloud hosting platform launched. You no longer had to rack the servers
yourself but if that company failed, you were screwed. :)

~~~
amasad
You can build your application in a way that doesn't depend on platform-
specific features. In fact most of the frameworks are setup in a generic way.
There is a download button, you can click that, get a zip file and you should
be able to run it locally.

For the setups that are using platform-specific features we'd like to also
minimize the fear of lock-in by open sourcing our development images and the
repl protocol.

------
voidhorse
Props. repl.it has often proven a handy substitute in situations in which I'm
otherwise stuck with Cygwin or Git Bash on Windows, which, while they are
great tools in their own right, can be a bit finicky when running repls.

------
twoquestions
This looks wonderful! I'd love to go through SICP or learn Haskell or
something with this!

Are there plans to include Erlang or Elixir or $your_favorite_language by
chance?

~~~
amasad
Incidentally the first interpreter on repl.it was scheme. I was going through
SICP and was tired of installing Dr Scheme everywhere.

Yes I love both these languages and will add support for them soon.

~~~
fenollp
I'll gladly help with that!

~~~
amasad
Pierre? Email me, interested in doing this

------
runevault
This sounds amazing. I don't know how much I would personally use it, but at a
minimum I'm going to keep it in mind for telling anyone wanting to learn and
do tutorials in anything this supports, as seems far and away the best way to
learn w/o fighting with environment. Huge Kudos.

------
ztratar
This. is. AWESOME.

Port listening -> auto-deploy?

So cool. Now all I need is for the code editor to feel more powerful.

~~~
amasad
Thanks, more editor power planned.

------
skybrian
I'm wondering why repls aren't expensive to host. Is there a virtual machine
running all the time for each repl? Do they swap out idle repls somehow?

~~~
amasad
Repls are container-based. We control how much resources each repl can use and
so we can control how it much it costs. We do swap out idle repls and wake
them up on the first request that comes in (heroku style).

~~~
sgslo
How do you start up these containers so quickly anyways? Do you keep some
running hot, or delegate the startup to something like amazon's ECS? I've long
wanted to run integration tests en masse in containers, but never figured out
how to solve issues around long startup times.

~~~
amasad
Yes we do container pooling. We do all the container manaegment ourselves.
Using services like ECS will generally be slower.

------
moflome
Congratulations, Amasad, really nice work. I was glad to see the inclusion of
Web Frameworks, and tried to set up a Classroom for Rails instruction but have
a basic question: how are students able to execute rails commands in the IDE?
How do you switch between the REPL and console? Thanks!

~~~
amasad
Hey for now rails is only available in the rails interface because it just
came out today. We're adding it to classrooms very soon. BTW feel free to
email contact@repl.it and will happily answer all your questions.

------
sandGorgon
is it possible to export the final repl as a docker image and run it locally ?

~~~
amasad
Yes, eventually. As I said in a sibling thread, we intend to open-source our
protocol/images so that we can do things like, use your own editor/local setup
with Repl.it. Or eject completely from the platform.

~~~
sandGorgon
this is killer!

Goodbye Jupyter notebooks pretty much

------
andybak
Thought I'd try this out for some Django evangelism but:

How do I get to a bash shell? I know how to work around the inability to run
management commands but I want to show a noob the normal way to do things.

~~~
tchened
Incorporating bash access is our next step. :) We know a lot of seasoned users
will want to use it as part of their dev setup.

~~~
andybak
It's more that it's awfully tortuous to use Django without it. The syntax for
creating and running migrations inside a Python shell isn't very pleasant and
all the documentation assumes you're doing all this from a bash shell.

> We know a lot of seasoned users

It's actually the other way around. Seasoned users can work out how to get
round the lack of a shell. Beginners will be thoroughly confused.

------
nicodjimenez
Repl.it rocks. My girlfriend is using it for learning javascript, it's by far
the best tool out there for learning how to code. Great product by a
passionate team.

------
farhanhubble
I used Repl.it for learning Scheme around 2014. Sadly my company blocked the
site thereafter. I'd love to try it again for teaching machine learning.

~~~
amasad
Why did your company block Repl.it? That's strange.

~~~
tedmiston
Just a guess — enterprise firewalls commonly block "remote code execution" as
a category.

------
aantix
Good work.

Just as a possible user.. I use Rubymine for my Ruby on Rails development. Not
only does it give me autocomplete on my application specific methods, it
understands RVM (Ruby Version Manager) and understands where all of the
dependencies are locations and has indexed those as well.

I can jump into an ActiveRecord definition as easily as my own methods. And it
does this when I simply open the project directory.

Sublime Text 3 and some of the other editors can do the autocomplete/inspect
method for full project and dependencies, but not without manual config
changes (and some googling).

------
artursapek
Good work, Amjad. Fun to see this project evolving.

------
gigatexal
I use repl.it a lot but the python autocompleter is seriously lacking.

~~~
amasad
Yes, we're on it. We're implementing a language-server-protocol LSP for Python
and most of our languages. Coming out soon.

~~~
akkartik
How much of a priority is supporting automated tests? I'm trying to think
about how a repl would interact with a test runner.

~~~
amasad
We do support that in our Classroom product
([https://repl.it/classroom](https://repl.it/classroom)) so it'd be pretty
easy to expose that in our repl interface. Might be able to knock this out in
an afternoon. (For NodeJS developers we support Jest out of the box:
[https://repl.it/@amasad/try-jest](https://repl.it/@amasad/try-jest)).

~~~
akkartik
Thanks!

This example always runs the tests when you hit cmd-enter. I was wondering how
you would have a running program with tests.

I looked in [https://repl.it/ibuiltthis](https://repl.it/ibuiltthis) but
couldn't easily find examples of NodeJS projects. Could you point me at one?
(Feel free to point me at a better forum for these noob questions.)

~~~
amasad
Fullstack apps support was just released to do so not many examples on our
forum. If you go to
[https://repl.it/languages/express](https://repl.it/languages/express) you'll
see a simple scaffold for ExpressJS.

I started moving my blog to Repl.it, can be found here:
[https://repl.it/@amasad/blog](https://repl.it/@amasad/blog)

~~~
gigatexal
holy crap -- that's really neat. Being able to run and tinker with code
snippets in a blog like that is a killer feature.

Being hosted on Repl.it -- can you still SEO things for google?

~~~
amasad
Yeah I don't see why not. We're planning on creating a page for websites
hosted on Repl.it.

------
aminethedream
you are making great strides in bringing programming closer to students and
demystifying it! Times up for all the obfuscations. Congrats

------
_sword
Looks awesome Amjad, keep up the great momentum!

------
Double_a_92
Any plans for Laravel?

------
deboboy
Any plans to add Solidity?

~~~
amasad
Mind posting to our language request board?
[https://replit.canny.io/languages-
requests](https://replit.canny.io/languages-requests)

