cat engineering.log

Engineering Blog

Technical insights from the people building Replit.

/
202216 entries
Cover artwork for the article “Revamping the GitHub Import Flow”.

Revamping the GitHub Import Flow

Early last year, we made the announcement that our infrastructure and Repls now had Nix baked in. Just a few months ago, we announced all new Repls would be Nix-based. And today, we're happy to announce that our GitHub imports flow is now also powered by Nix!

Cover artwork for the article “Leaky UIs”.

Leaky UIs

Building a robust and powerful UI without compromising on simplicity is complicated, and we're always exploring solutions that alleviate that problem. A few years ago, we rewrote our workspace architecture, and Amjad gave a talk about it. We're about to add a lot of firepower to our layout system (stay tuned!), but we noticed significant shortcomings in our abstractions. This blog post will outline the flaws and how the underlying data structure hurt the interactions. To keep this post concise, I will defer the reasoning behind the UI and UX to a future post.

World map with a network route between two locations and a 253 millisecond latency label.

Worldwide Repls, part 1: The Control Plane

During the ReplCon 2022 keynote, we announced that we were going to geo-distribute our infrastructure so that your Repls are much faster when accessed outside of the United States. The speed of electrons / light in a medium is a fundamental speed limit. Most of our users are several thousand kilometers away from the data centers where we host Repls (currently limited to the United States), so the round trip from them to the users' homes is going to necessarily take several hundred milliseconds just to traverse the series of tubes that is the Internet. Today, we have finished the first milestone to make this a reality, and that comes with some pretty neat side-effects!

Cover artwork for the article “Improving Domain Linking for Repls”.

Improving Domain Linking for Repls

For some time now, it's been possible to link your custom domain to your Repl. You buy that perfect domain name, connect it to your website hosted on Replit, and you're good to go! Custom domains help you create a unique home on the internet - for your blog, a product you're launching, or just a space to try new ideas.

Cover artwork for the article “Escaping Dirty Pipe (a.k.a. CVE-2022-0847), mostly unscathed”.

Escaping Dirty Pipe (a.k.a. CVE-2022-0847), mostly unscathed

You may have heard that there was a very critical Linux kernel vulnerability making the rounds. As with all important enough vulnerabilities, this one has a catchy name: Dirty Pipe (no logo, though). This blogpost attempts to explain how that vulnerability impacted Replit. The good news is that as far as we know, there weren't any successful exploitations of it!

Cover artwork for the article “Betting on CodeMirror”.

Betting on CodeMirror

At Replit, our mission is to bring the next billion software creators online. In order to achieve that ambitious goal, we need to make sure that the experience of writing, running, and sharing code is as seamless as possible. At the heart of that experience is the editor itself. As a result, we dedicate a huge amount of time and energy to improving the stability, performance, and accessibility of our editor.

Cover artwork for the article “All New Repls are Powered By Nix”.

All New Repls are Powered By Nix

For the past year we have been working hard to integrate Nix into our platform and rebuild our existing language experiences with package from Nix. We are excited to announce that all new repls are now powered by Nix. In this post we'll talk about what this means for the future of the platform and all the work that it took to get here.

Cover artwork for the article “Announcing File Persistence in Hosted Apps… for Everyone!”.

Announcing File Persistence in Hosted Apps… for Everyone!

Replit is your computer — for whatever you need to do. We announced last year that Hackers would be able to have their hosted apps be able to persist file changes since that made it possible to build a lot more apps. But we were not quite satisfied that only Hackers were going to get this new feature.

Cover artwork for the article “Making new Python repls 100x faster to start up”.

Making new Python repls 100x faster to start up

Python is currently the world's (and Replit's) most popular programming language. We've improved the Python experience during last year, with a Python package cache to make installs faster, and an integrated, multiplayer debugger to increase the understanding of what programs do. But there are still a few problems with Python. Packages are often very space-consuming, so they are installed into an ephemeral 2 GiB scratch disk to avoid filling up repl directories. Unfortunately this means that every time a Python repl starts, a lengthy package installation process must happen. This makes some Python repls take forever to start! Some other packages that have a large number of dependencies (like TensorFlow and Torch) were completely unusable because they don't even fit on the scratch directory.

20219 entries
Cover artwork for the article “Implementing RUI, Replit's Design System”.

Implementing RUI, Replit's Design System

At Replit, we have a small engineering and design team supporting millions of users. Our secret is investing in good tools that make us more productive. In this blog post we'll give you an insider look into how we implemented one such tool - the Replit design system (or RUI for short).

Cover artwork for the article “Repl Space and Templates”.

Repl Space and Templates

When we want to support a new technology, we're faced with the question: "Do we (the Replit team) build this capability into the Replit directly, or can our users add it themselves?". Usually, we want the answer to be the latter. Repls are like personal computers for your projects. And the more these personal computers can be customized, the more they'll be used in creative, unexpected ways.

Cover artwork for the article “Will Nix Overtake Docker?”.

Will Nix Overtake Docker?

In many discussions about Nix, the comparison of Nix and Docker comes up frequently. This question could be dismissed by saying that Nix and Docker are different tools that solve different problems. One is a toolkit for building and deploying containers and the other is a package and configuration manager. However, these tools do have some overlap: they can both be used to create reproducible environments. A reproducible environment is one that can be recreated from scratch in an identical way (ideally bit-for-bit). Practically, this means having the same tools, versions, and configuration between the environments.

Cover artwork for the article “Announcing File Persistence in Hosted Apps for Hackers”.

Announcing File Persistence in Hosted Apps for Hackers

We mostly think of repls as being full computers in the cloud, and one of the goals of the platform team at Replit is to enable people to build almost anything in replspace. In the past, when a file was stored in a repl, it would only be saved when the editor was opened. This went against our goal and made it impossible to write certain servers that changed files at runtime. This was especially hard for newcomers, because that's the easiest way to persist information. Starting today, Hacker and Teams subscribers will be able to write services that accept file uploads or store data in a local database (think SQLite) or text file, regardless of how the repl was started.

Cover artwork for the article “Betting on Nix: donating $25K to the NixOS Foundation”.

Betting on Nix: donating $25K to the NixOS Foundation

As building software grows more like snapping Legos together, how people find and use those Legos becomes more important. That's why we are donating $25,000 to the NixOS Foundation and betting on Nix as the future of software distribution.

Cover artwork for the article “Solidity on Replit: Diving into Web3”.

Solidity on Replit: Diving into Web3

Today, we're announcing our official Solidity development template. Solidity is the language used to create smart contracts, which are programs that run on the Ethereum blockchain. This is important for the Web3 commmunity because there's finally an accessible and collaborative way to learn Solidity, which will unlock thousands of new developers in the decentralized web.

Cover artwork for the article “A New Code Editor for Mobile - CodeMirror 6”.

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