Repla

Repla 0.6.3

  • Added a status bar that can be turned on to show the destination URL when hovering a link
  • Added a hover state to the window title that shows the current URL when the status bar is turned on

Repla 0.6.2

  • Updated the heuristic for whether to show plugin-related preference panes

Repla 0.6.1

  • The Jekyll Plugin is now bundled in the app
  • Fixed an issue where scrollbars could become visible on the Welcome page
  • Fixed an issue where clicking wouldn’t focus the log

Repla 0.6.0

  • The Markdown Plugin is now bundled in the app
  • External links are now opened in the default browser
  • Fixed an issue where closing a window could be delayed
  • Fixed an issue where some preferences were being reset
  • Fixed an issue with the command-line interface involving paths with spaces

Repla 0.5.1

  • HTML Plugin: Stopped the log from showing automatically

Repla 0.5.0

  • HTML files are now supported
  • Updated the welcome copy
  • Server Plugin: Improved home directory detection

Repla 0.4.5

  • Enabled the hardened runtime on dependency binaries

What is Repla?

Repla is now launched. So far we’ve released Repla Server, the first Repla plugin. If you know something about product development, you know the question is always “what problem does this solve?”. The problem that the Repla Server plugin solves is running a local web development server that refreshes automatically. Since that’s the only plugin that’s currently available, that’s all the Repla website talks about, because that’s the benefit you can get by downloading and using Repla today. But Repla itself wasn’t designed to solve any one problem. This blog post is about how it was designed, and explore the benefits you’ll be able to get from Repla tomorrow.

Trifecta

How was Repla designed? To answer this question, we’ll look at how web developers work today. When web developers talk about the tools they use, they commonly say “a terminal, a text editor, and a web browser”. None of those tools are designed to solve a specific problem either. Instead, they’re adaptable, shaping themselves to the problem at hand. However, one of those tools is not like the others: While terminals and text editors are specialized tools optimized for developers, developers are stuck using the same web browsers everyone else uses. So Repla is designed to replace the web browser, or, more accurately, sit alongside it.

Developers really use web browsers for two separate tasks. The first is researching the problem they’re working on. This is what most people (who, of course, aren’t developers) also use web browsers for, so they’re already pretty good at it, and Repla doesn’t try to replace that. The second task developers use web browsers for is running their projects. This is where Repla comes in. While browsers do have some built-in tools for developers, they aren’t developer tools the same way terminals and text editors are. This is how Repla was designed, as a web browser that’s a developer tool the same way that text editors and terminals are, and therefore can achieve the same adaptability as those tools.

What does it mean for a web browser to be a developer tool in the same way text editors and terminals are? It turns out that text editors and terminals achieve their adaptability in similar ways. They are extensible through package management, and extensions can run processes. Whether it’s downloading media, checking source code for common issues, performing compilation, or adding support for more programming languages, terminals and text editors achieve their adaptability through being extended by packages that run processes.

So what is Repla? Repla is a web browser that can be extended by packages that run processes, and therefore is as adaptable as text editors and terminals are. Repla shapes itself to the problem at hand, the same way those tools do. Repla Server, the first plugin for Repla, is a package that runs processes to manage a local web server. In our next post, Repla Use Cases, we explore some other use cases.

Repla Use Cases

In What is Repla?, we explained how Repla is designed to be adaptable, just like text editors and terminals are, by being extended with packages that run processes. This post is about some of the use cases that this enables. But before we get to those, we have to talk about how Repla is different from text editors and terminals, because it’s through the differences that the use cases emerge.

In addition to being extensible through packages that run processes, text editors and terminals share another similarity, one that’s not shared by Repla: They’re both focused on plain text, while Repla is instead focused on rendering web content.

There are a lot of things a web renderer can do that plain text cannot. Some examples include displaying media, such as pictures, video, and graphics; rendering rich text with different combinations of fonts and colors; and it can be interactive, responding to input in any manner it chooses, in particular by supporting hyperlinks. When talking about Repla use cases, we’re looking for situations where we can take advantage of these attributes.

The first use case we’ll look at is the prototype Search plugin. This plugin makes the output of the grep commad-line tool interactive. Often considered the canonical Unix tool, grep searches files for a regular expression, and prints the matching lines. Here’s what its output looks like searching Ruby files recursively for the search term class:

$ grep -rn class *.rb
tc_controller.rb:19:class TestDependencies < Minitest::Test
tc_controller.rb:27:class TestController < Minitest::Test
tc_javascript.rb:17:class TestDependencies < Minitest::Test
tc_javascript.rb:25:class TestJavaScript < Minitest::Test
tc_parser.rb:17:class TestDependencies < Minitest::Test
tc_parser.rb:25:class TestParser < Minitest::Test
tc_search.rb:19:class TestDependencies < Minitest::Test
tc_search.rb:27:class TestSearch < Minitest::Test

So the second line of output says the first match is in file tc_controller.rb on line 19. While the output of grep is quite useful on its own, it’s not interactive.

Search

The Repla Search plugin displays the results of a grep search rendered as HTML with the matching filenames as hyperlinks. Following a link for a filename opens that file in the default app for that file type. More interactive features can be added later, such as outliner functionality allowing each file’s matches to be collapsed, for example to only see the list of filenames with matches, or only leave the files you’re interested in expanded.

Markdown

Markdown

The prototype Markdown plugin is a natural match for Repla’s features, taking advantage of web rendering to display rich text and inline images, as well as being able to follow links.

Diagramming

Mermaid

There are already some great apps that do Markdown rendering, but the flexibility of Repla’s package model means similar plugins can be made for formats that aren’t yet supported by any existing apps. For example, a plugin for the Mermaid diagramming language would allow developers to track class and control-flow diagrams in version control alongside source code, just like Markdown files are today.

REPL

The REPL, or read–eval–print loop, is an environment where you enter source code and see the result of it being evaluated instantly. REPLs are an underutilized programming tool today, partially because using them usually requires writing source code at a plain command prompt, whereas most developers are accustomed to writing code in their own text editor, an environment that provides important features for programming such as syntax highlighting, autocomplete, and automatically checking for common issues.

IRB

The prototype IRB plugin for Ruby’s REPL, irb, solves these problems by allowing text editors to send the selected source code to the REPL to be evaluated.

Live Coding

Live Coding

Taking the REPL plugin one step further, the planned live coding plugins will execute an entire document through a REPL automatically, allowing you to see the results of your code executing live as you write it.

Summary

These are just a few use cases for Repla, a web renderer that can be extended with packages that can run processes, and there are many more. The real goal is to provide a new place where developers can solve their own problems by writing their own plugins for Repla, and then sharing them, the same way they do for text editors and terminals today.



Repla 0.4.3

  • Fixed a problem where continuous log output would freeze the app
  • Links can now open new browser windows
  • Server plugin: File-system watching is now automatically disabled in the home and Library directories
  • Server plugin: Automatic configuration based on the server command was tweaked slightly

Repla 0.4.2

  • Removed automatic support for Express from the Server plugin in order to improve support for React

Repla 0.4.1

  • Changed the Server plugin to only automatically open localhost URLs

Repla 0.4.0

  • Added a welcome window
  • Added quickstart window
  • Added buttons to install and uninstall the command-line interface
  • Added automatic refresh when files change to the Server plugin
  • Added a message when the command-line interface doesn’t have access to control Repla
  • Fixed a preferences related crash

Repla 0.3.0

  • Ruby version 2.4.1 is now bundled instead of using the system Ruby
  • macOS Catalina is now supported

Repla 0.2.4

  • Added analytics and crash log reporting
  • Added opening files to the Server plugin

Repla 0.2.3

  • Fixed passing a file to the command-line interface
  • Added support for toggling extensions

Repla 0.2.2

  • Fixed passing a file to the command-line interface
  • Fixed a bug where extensions would appear twice
  • Disabled save menu items for extension documents

Repla 0.2.1

  • Added support for file extensions and plugins

Repla 0.2.0

  • Added support for saving a Repla run as a document