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.
Wed, Jun 9, 2021[RVO] How Nisawa is Enabling Reliable Delivery in African Cities
Can you imagine how you’d get a package or meal delivered to you if your house did not have a physical address? Now imagine how that would work if your local food delivery, postal, or parcel services were also ineffective, lacked the technology, or didn't exist at all. This is the reality faced by most businesses operating in African cities. For them, these aren’t hypothetical questions. They have to rely on informal, unreliable, unprofessional, and oftentimes frustrating ways to send goods to customers who desperately need them delivered. They typically resort to using individual, independent motorbike taxi drivers. They’d stop a random driver on the street, hand him the package, provide rough verbal directions and a phone number of the customer to call when nearby. These hacks pose many challenges including the lack of trust and professionalism (motorbike drivers are just independent individuals unaffiliated with any company), slow delivery speed (need for additional directions over phone calls), lack of appropriate delivery tools, and inability to track deliveries. For businesses, these challenges frequently lead to stolen, lost, or damaged packages and frustrations due to inefficiencies, awful customer experience as well as limitations on the type and value of the package they’d be comfortable sending through this approach. Informal delivery in Kigali, Rwanda. Here, a motorbike taxi driver is being used to carry the two packages in blue and red. He has been given verbal directions and will be calling the sender and receiver to continuously receive directions to the drop-off location. After personally facing these challenges, we set out to create Nisawa, an on-demand, last-mile delivery service with the goal of enabling businesses in African cities to reliably deliver goods to their customers.
Tue, Jun 8, 2021[RV0] How we used focus and prioritization to transform our student-run startup
Running a successful startup is like driving a nail through a thick piece of wood. You can hammer as hard as you want, but without a sharp nail–extreme focus and a specific target–you’re not going anywhere. Coming into Replit Ventures (RV0), our situation mirrored the analogy above. We were wildly passionate and worked 24/7, but we found ourselves intrinsically limited by a lack of focus in our product. RV0 made us realize this, and radically transformed our startup into a hyper-focused business solving a clear pain point for a sizable market. What is our startup, PetCode? We’re a pet-tech company providing users with a smart pet tag for smarter pet care. With our QR tag and mobile app, we help owners keep their pets safer and streamline their pet management experience. PetCode was started in May 2020, when COVID-19 closed schools and forced us to transition to online learning. We didn’t do much learning at school, and instead spent our time looking for a business idea. As pet owners, we noticed that the metal tags our pets wear are surprisingly archaic. These tags rust, fade, and store just 50 characters of information–that’s less than one-fifth of a tweet. Even worse, the only way to change the information on a pet tag is to buy a new one–they’re not updateable.
Thu, Jun 3, 2021[RV0] How we gameified exploratory CS with Tech Roulette
We're Execute Big, a CS education non-profit org, and as three-person strong team, our mission is to give every student the chance to explore and experience CS education. We've been bringing unique programs to students across the country, and the move to virtual programs sparked a little creativity in us — after all, virtualization has made education more accessible than ever. That's why we've worked hard as a part of Replit Ventures to bring you Tech Roulette, a free game for the summer where you (and 500 students AKA new friends) get the chance to take a leap into fields of technology through a variety of random intro projects while earning rewards and prizes — all within your free time. Each week, you'll receive an email that your portal is ready, and you'll see three random projects for you to choose from for the week, ranging from hardware projects, like building a real-life "Simon Says" toy, to data science projects, like creating an algorithm to predict who'd survive on the Titanic. On top of weekly projects, you're welcome to join in on community-wide speaker sessions and coffee chats with industry professionals. Join the game and invite your friends (some friendly competition never hurt!) at techroulette.xyz. P.S. Are you a seasoned tech pro who wishes Tech Roulette was around when you were a kid? Sign up to mentor and chat with students here.
Mon, May 24, 2021How we went from supporting 50 languages to all of them
At Replit, we want to give our users the most powerful, flexible, and easy-to-get-started coding environment. However, it has been limiting because we only support a fixed set of languages and OS packages, some of which are outdated. Ideally, users should be able to use any language and install any package with minimal fuss. That's why today, we're announcing that we've incorporated Nix in our infrastructure to give users access to over 30,000 OS packages instantly. The environment repls run in has long been a static world. We build a pre-baked OS image to fit all our languages. This gives us a lot of leeway to make repls super fast, but the underlying operating system repls run in is completely immutable. To remedy the situation we've been maintaining an ever growing OS image, if users can't install any packages we'll just install every package! As awesome as this sounds it has become a huge burden to maintain. Every new package creates a new exciting way things can break. Over time, it became clear that maintaining a single, massive docker image was not sustainable. We came across Nix which is a declarative, reproducable OS package manager. Due to Nix's design its package store is highly cacheable and allows for building environments in a composable way. Using the Nix programming language you can specify the dependencies for your development environment and Nix will build the environment for you. We believe this is a great fit for Replit as it allows our users to build endless combinations of development environments without us having to maintain a monolithic docker image. With Nix on Replit, see how easily you can create a Zig environment in a few seconds. We create a replit.nix file to tell the repl which Nix packages should be available when we run. Then we use .replit to control what the run button does. And voila we have a new language: How it works
Wed, May 12, 2021Replit Apps
In a few years, you’ll be able to build your own operating system. You’ll have a place to browse the web, find people to hang out with, play games, learn, and do deep work. You’ll be able to discover apps from all over the world, modify them, and build your own with your friends– a true multiplayer computing experience that you can customize and call home. Today, the launch of Replit Apps marks the first step towards that future. Apps, right now, is a gallery to browse and discover new repls from the community. Everything from games, to generative art, to machine learning models are on here. We have a vibrant group of creators and we're directly trying to break down the walled gardens that we're so familiar with on mobile app stores. Even GPT-3 knows we're going in the right direction.
Tue, May 4, 2021How to send $ETH in 19 lines of Python
With the emergence of blockchain technology, people can get paid from anywhere in the world. This type of transaction is revolutionary because we are able to send value from one person to another with no bank. The day will come when it is cheaper and faster to send value (ETH, USDC, BTC, etc.) using blockchain than with the current payment system. This post This is a start-to-finish Python tutorial on how to send ETH from one wallet to another on Replit. At the time of writing, ETH is at an all-time-high (ATH) of $3,335. To do this, we are going to use infura.io. Infura is a service that allows users to easily interact with a live Ethereum node. A node is a computer that participates in the Ethereum network. Alternatively, you could spin up your own node. You can follow along with the code here.
Sun, May 2, 2021Replit Empowers Synctera to Find Hidden Talent
Talent is one of the most important factors in the success of a new business, and Synctera has been using Replit to run a technical interview process that effectively uncovers the best engineers, whether they have a stellar resume or a nontraditional background. Synctera is a new startup that connects FinTech companies to community banks. When a company wants to offer a new financial product, like a debit card or loan, to their customers, Synctera's marketplace and APIs make it easy for them to find the right bank with the right offering. As a result, Synctera's customers can move faster and build better products. Based on this vision, Synctera raised a $12 million dollar seed round in December 2020 from high profile investors, including the CEOs of Plaid, Affirm, and Carta. Now they're expanding (planning to go from 30 to 120 people) and already seeing strong early growth. We spoke to Kris Hansen, Synctera CTO, about how he's using Replit to build a world class engineering team.

