Mon, Sep 27, 2021Replit + Codex - Beta Release
Update: To stay up to date on Replit and AI, check out our Ghostwriter Beta & AI mode announcement. In it we discuss how we infused state-of-the-art intelligence into nearly all IDE features as well as the future of AI on Replit. At Replit, one of our fundamental goals is to make programming easier. When we got a first glimpse at OpenAI's new Codex model, our instinct was to think of how it could help people understand programs better—especially beginners. We've tested ideas before that used OpenAI's more general model, GPT-3, to ask questions about code. Amjad wrote about some of these explorations on our blog last year.
Mon, Sep 20, 2021A New Code Editor for Mobile - CodeMirror 6
Today, we are thrilled to announce CodeMirror as the new code editor on Replit for mobile devices. CodeMirror is a versatile code editor that has been specifically designed with mobile in mind, providing an excellent touchscreen experience. This change is the beginning of a focused effort on mobile development here at Replit; the editor is just the first step! The editor supports all the features you expect from a code editor, and we're working on making it even more powerful. We hope this update will be helpful for those of you who do not have access to a computer but still want to learn and create cool things. We are also working on bringing CodeMirror to the desktop to provide a consistent experience no matter what device you or your multiplayer partners are on. We will see many of the features that we currently have only on the desktop ported to mobile in the process. Keep an eye out for threads, debugger, and more on mobile. Watch this blog for a follow-up technical post on our experience with the editors of the web: Monaco, Ace, and CodeMirror. We've got a lot planned for mobile, we are so excited, and we hope you are too!
Fri, Sep 10, 2021Data Loss: a sad tale with a happy ending
Earlier this year, we discovered that we were losing data for some of our users. This manifested as either repls being completely empty after reloading, or some of the changes to files not being present after reloading. Obviously losing data is the worst we can do, so we had to fix this immediately. This blog post narrates the adventure of how we discovered this, how we fixed it, and the lessons we learned during the way. The discovery Throughout the year, we had had some worries about some theoretical cases in which users could lose data. We have had a few complaints from people that their code wasn't correctly saved, and since we weren't sure what caused them, we just tried to fix bugs here and there one at a time in an unstructured fashion. Around mid-July, we got an alarmingly large number of reports of people about their code not saving correctly in a short amount of time, ironically just after deploying one such fix. This meant two things: our intuition about folks losing data was correct, but the way we were fixing it was not! This led to the immediate discovery that there were months- or years-old bugs that were silently losing or corrupting data, and some of them turned out to be load-bearing bugs that couldn't be fixed in isolation (since fixing them triggered other kinds of data loss). This made us start a much larger project to have better guarantees and incrementally fix things without regressions. Homer Simpson doing a dramatic impression of this whole situation
Wed, Sep 8, 2021New Kaboom Workspace
We made a better kaboom workspace on replit.
Wed, Sep 1, 2021Making Replit Faster for Everyone
Replit's mission is to make programming accessible and provide computer superpowers. To achieve that goal, repls need to be fast. To that end we've been working on a number of improvements in our infrastructure and code to unlock faster repls. We constantly analyze the speed of our clusters and identify areas of improvement. Here are a few examples. Editing Code Just Got Faster We split repls woken up by hosting (repl.co, custom domains) to different VMs than repls that you access in the workspace. This makes editing code and interacting with your repl in the workspace faster by ensuring your usage isn't competing with nearly as many other repls. For repls being actively edited in the workspace, we've seen an average 10-20% improvement in speed from this change. This applies across all subscription types including free users. More CPU For Your Repl
Mon, Aug 23, 2021Replit Joins Google for Education Integrated Solutions Initiative
New Replit features, powered by Google Cloud, make it easier than ever for students to code. Replit is announcing it has joined the Google Cloud Partner Advantage Program, utilizing Google Cloud as part of its core infrastructure to create accessible coding opportunities for computer science educators and learners around the world. As a participant of the Google for Education Integrated Solutions Initiative, Replit offers customers the ability to collaborate on code from anywhere, on any device. Students and teachers can easily build on Replit from a Chromebook, download it from the Google Play Store to their device, and even integrate Replit Teams for Education into Google Classroom. With the new Google Classroom integration, teachers can bring collaborative coding into their classroom faster than before. They can quickly add every student in their Google Classroom to a Team, easily add Replit projects as Google Classroom assignments, and access time-saving features like autograding tools and an integrated gradebook. As one Replit teacher put it, “I can concentrate on giving more time to working with the children and helping them rather than on housekeeping stuff.” These tools allow educators to focus on the important things, and Replit has those values covered, too. First, Schools and parents can rest assured that their students’ privacy is protected. With the security of Google Cloud infrastructure and FERPA/COPPA compliance built into the product, students can participate freely within a Replit Team for Education. Additionally, Replit has an app in the Google Play Store and will be featured in the Chromebook App Hub, making it easy for students on any device to get started coding. A Replit Teams for Education user, Shane McReavey, shared that “not everyone has the funds to purchase a laptop, so to create that sense of equality, that everyone has an opportunity, that’s where Replit has been really beneficial.” Another member of our teacher community recently shared that “Coding online is the best option for students especially if there is another lockdown. Many of them only have Chromebooks at home.” When so many students are still learning from their computers and tablets at home and numerous schools have opted to distribute Chromebooks to their students, this makes an enormous difference.
Thu, Aug 5, 2021Replit²
Replit has many use cases and features, but one that's less talked about is its ability to serve as a secure compute environment for specialized apps. What if you want to build some tool that will generate code, then execute it for your users? Or maybe you are building a specialized online IDE that injects code for users, then executes the bundle? With Replit, you can start building those kinds of applications quickly without having to focus on building a fast and secure backend. Build the frontend, we'll provide the compute power. That's a great promise, but it's not one that is fully documented. Well, now that is a thing of the past! Let's explore how Replit can serve as your compute backend by building a very basic Replit clone. UPDATE 2021-08-16: Please check the section on Security at the end of this post, more details were added and the post was clarified thanks to the help of @AmazingMech2418. Building a compute node A compute node is a single unit (usually a single server, VM, container, or application) of computing power than can execute work. In our case, a compute node will be a single Repl that can execute arbitrary code using an API. We'll be using the Koa.js framework and python in this post. Let's start by creating a new Nix repl. Why Nix in particular? Nix allows us to install any package that can be found on the official Nix package registry. This give us the ability to install any language interpreter or binary we want, provided said language is able to execute arbitrary code. With minimal work, we'll be able to implement multiple languages in our compute backend and execute them through our API.
Sun, Aug 1, 2021Building Alexa Skills On Replit
At Replit, we want to give everyone in the world computer superpowers. We’re making it easy for anyone with a Replit account to seamlessly build and host Amazon Alexa Skills on Replit. This blogpost is a start-to-finish tutorial on making Alexa skills on Replit. Something important to note is that you don't need to have a physical Alexa-enabled device to build this. There is a great simulator in the developer console and a downloadable app on your phone. Overview Configure the Alexa skill in the Amazon Developer console Clone the "Replexa" template
Thu, Jul 15, 2021Building a web app with Nix (Because why not?)
Learning a new programming language can be a very difficult task. Where should you start? How do I improve my skills from "Hello, World!" to building complete applications? It helps to have a starter project. One of my favourites is building a web app. I have been learning the Nix package manager for a few weeks now - starting with creating a dynamic version system - and I think its the perfect time to write a web application with it (Even though I probably shouldn't). But wait, isn't Nix a package manager and reproducible build system? Am I going to write an entire post on how to package a PHP app with Nix and run it? Well, yes and no. Nix is indeed a build system, but Nix packages are configured using a functional programming language (also named Nix) created specifically for the Nix package manager. Since Nix is a complete programming language, this means we can execute it without building a package thanks to the interpreter built into the Nix package manager itself. Clearly, Nix was not built for web development, but let's see how far we can take it. Hello, World! In the long list of reasons why Nix was not created for building web applications, we have the reality that starting a web server that executes Nix code through Nix itself is not feasible at the moment. Nix is not the type of application that can be configured to wait for calls on some hostname/port and execute arbitrary code when a client connects. It is much easier to use something like nix eval through a more standard web server, so we'll do just that. Let's start by creating a mandatory "Hello, World!" example with Nix. For this post, I have created all the code inside of a Nix repl on replit.com. Feel free to follow along in that repl or to create your own. Create a new repl using the nix (beta) language to get started, click on the three dots icon next to the Files header in the filetree and select "Show config files". Once the config files are visible, open the replit.nix file and replace pkgs.cowsay with pkgs.python3, we will need python later. Now that the repl is configured, create a default.nix file inside of a directory named app and write the following code in it.
Thu, Jul 8, 2021Building the future of collaborative coding
One of the most powerful aspects of Replit is the ability to collaborate with friends and peers in real time. When we first added support for multiplayer, we set out to make it as easy as possible to code with others. Since then, collaboration has become an integral part of our product with the release of features like threads and draw. By continuing to improve the multiplayer experience on Replit, our goal is to dispel the myth that programming is a lonely activity. Instead, we aim to remove the barriers that impede the learning, creativity, and fun that collaboration often fosters. This is why we're excited to announce two new features that make collaborating on Replit even easier: Observation Mode and Filetree Presence! Observation Mode Oftentimes, when you're coding with someone, you might want to follow their progress more closely. Whether you're teaching a class, hacking with friends, or leading an interview, it can be useful to zoom in on a collaborator's activity to see what they're working on. Previously, you might have done this by hopping on a video call and sharing your screen, but that can be overkill in many scenarios. Luckily, there's now an even easier approach built right into Replit called Observation Mode! To start observing someone, simply click on their avatar in the header. If you're in a larger session (4+ people) and you don't see their avatar, you can click on the more users button and find them there like so:
Mon, Jul 5, 2021Our First Replit Ventures
Our first Replit Ventures was a tremendous success. Some of our teams were accepted into the best startup accelerators in the world while others had $1mm+ funding offers from top VCs. Before The Program Before joining Replit, I was working on my fintech startup, Blubbr. After a few small successes, Amjad reached out and asked me to write a guest blogpost (our product was built on Replit). We then started brainstorming ideas about how we can help other startups on Replit. After I told him I wanted to take a gap quarter (I hated online school), he asked me if I wanted to join the team and help other startups go to market. This is how Replit Ventures was born.
Fri, Jul 2, 2021Multiplayer Debugging Experience for Python, Node.js, Java, and C/C++
A couple of months ago, we announced our intention to create a new collaborative program comprehension experience for your repls. This project isn't just about figuring out what's wrong with your code, but really understanding what's going on, together with the people you work with. Today, we are happy to announce that we're releasing the first phase of this experience: a Replit-native, zero-configuration, multiplayer-friendly, interactive debugger for C, C++, Node.js, Python, and Java repls! Our main goal is to make it easier to understand what your code is doing, and why. Up until now, if your code wasn't working correctly, it was only possible to find the root cause by (brace yourselves) stopping the program, optimistically adding log statements around the suspicious areas, running again, and repeating that process hoping that printing out variables will reveal enough to figure out what's wrong (also known as printf() debugging). printf() debugging is a tool that's very easy to start with, but it gets tedious and unpredictable in the long run. Every time the code is changed to add a new log statement, new bugs may be introduced by accident (see Heisenbugs). Even though we firmly believe that the ultimate goal is to enable time-travel debugging for everyone (which prevents having to restart the debugging session if you accidentally skip the line you wanted to check!), having an interactive debugger available is still going to be useful for a lot of people. What has changed today? Now, repls for all the supported languages listed earlier will let you pause the execution of the program (breakpoints) and inspect program state (the values of variables) while the program is paused. No configuration needed, and no need for print statements to inspect the state of the program!
Thu, Jun 24, 2021Dynamic version for Nix derivations
UPDATE - 05/07/2021 Thanks to Travis Cardwell for letting us know that Nix requires the version part of the derivation name to start with a digit. The post has been upated from its original version to include this requirement. When you open a repl, we link it to a Docker container in the cloud. As we've started supporting more and more languages over the years, the size of that Docker image has exploded in size. It can take us up to a week to safely deploy! Any update, no matter the size, to our tooling can't be shipped to our users as fast as we'd like. This is where our migration to Nix comes in. We are now building these tools in our CI pipelines as Nix packages. We can reduce the size of our image to its minimum and provide all our tools and languages through Nix, on demand. One drawback of Nix for us is the need to specify the version in the derivation code (Like you would do in the package.json in NPM for example), rather than rely on image tagging. Before we could move forward, we had to solve one of the harder problems in computer science: versioning. We settled on using the commit short sha (first 7 characters of a commit's ID) as the version for our tools. However, we needed to go edit the default.nix file manually in the tool's repository every time we needed to publish a version. This wasn't providing us with the speed and flexibility we wanted, and we wondered if it was possible to generate the version automatically. After all, Nix is a fully fledged programming language, so that should be doable? It is, but it was not as easy as we thought. Starting with a Nix package One great thing about Nix is that its entire library of standard packages is available in a very easy to parse GitHub repository. A quick search led me to this package in particular. That code does almost the same thing we're hoping to do: call a runCommand function and execute git rev-parse --short there. With this in hand, I trimmed the code and wrote a quick function to get the short sha.
Wed, Jun 23, 2021[RV0] How a team of high schoolers built a tool to make machine learning easy
Hello! Today, we're announcing the beta launch of Kobra, a visual programming language for machine learning. A Kobra program using a machine learning model to diagnose breast cancer What are we doing? Why? Learning machine learning is hard. We're trying to fix that. Machine learning is playing an increasingly important role in our society, but very few people understand it. Even to programmers, it's portrayed as this super complicated wizardry that you need to have gone to graduate school to understand. However, we think that machine learning doesn't have to be incredibly complicated, and that it can be taught to anyone, even non-programmers.
Thu, Jun 10, 2021Lessons on CS Equity from the RESPECT Conference
I had the pleasure of attending the RESPECT conference last month, convening with and hearing from a number of CS educators and researchers throughout the week. The focus of the conference was on equity in CS education. Replit's own goal is to give people coding superpowers by providing them with a powerful and accessible tool for every step of their journey. Throughout the conference, speakers described tools and best practices to better engage and represent minoritized groups in CS. We, on the Replit team are constantly seeking to improve the experience for our users so they can feel comfortable to learn and share. A Vibrant Multiplicity of CS Cultures During her keynote, Dr. Amy J. Ko discussed the history of computing cultures and offered a vision of a vibrant multiplicity of CS cultures that engage with people with all kinds of interests and experiences. She mentioned that computing has historically been both a refuge for marginalized people as well as a magnet for power. Replit aims to create a welcoming community of creative developers and give this community opportunities to grow their businesses and even monetize their projects. Replit has and will continue to support all of our users by creating a dynamic platform that enables learners to become confident creators. It's not a simple task to increase access to coding education or to make the field more welcoming, but Dr. Ko's vision offers a solution: increase educational access to improve diversity within the field.

