The RunKit Blog

RunKit is Joining TC39 to Focus on Interactive Programming

 

The RunKit team is incredibly excited to be representing Stripe at TC39! We hope to do our best to help JavaScript become an even better interactive programming experience.

At its core, RunKit is guided by the principle that the interactive programming models pioneered by environments like Smalltalk, Mathematica, and Jupyter offer an important path to making development truly accessible. Although this model has already proven itself in the data-science and prototyping spaces, we think it has tremendous potential for every-day programming as well. The REPL's that ship with most modern languages today give us a glimpse of this already, but we think they are just barely scratching the surface of what's possible.

Read More...

Introducing Custom Value Viewers

 

Since day one, RunKit has shipped with several fun ways to visualize your data including graphs, charts, and maps. Internally we call these "Value Viewers". As package maintainers you often know how to display your data better than we do. That's why today we're excited to announce we're opening up Value Viewers so developers can build their own!

This new API allows you to render any HTML for your viewer. To create a new viewer, simply require the ValueViewerSymbol from the @runkit/value-viewer package and use it to make a custom property on your objects. RunKit will look for this property and render a custom viewer if it's found. Here's an example we've created for displaying the weather in a more intuitive way than JSON (code available here):

Read More...

Bringing Documentation to Life on Expressjs.com

 

We're incredibly excited to have recently integrated RunKit directly into expressjs.com's Hello World tutorial. The sample code in the tutorial itself is completely unchanged, but it has one major enhancement: the code is now live! When we say live, we mean that every time you load the page we're actually spinning up a real Linux server that is running that sample code, and instantly updating in response to your edits:

An animated screen capture of the new expressjs.com Getting Started page showing the starter example running in as a RunKit embed endpoint
A server is started right on the expressjs.com Getting Started page!

Read More...

Stop Filing Bugs, File a Container!

 

RunKit notebooks are a great way to file bugs on GitHub. Since RunKit automatically packages your code with its entire environment in a Docker container, anyone can clone your bug and start investigating it live in seconds, without any setup or installation. Best of all, the bug will be completely reproducible and avoid the dreaded "works on my machine". Today we're excited to be improving this experience even further with a completely revamped UI for filing and analyzing issues on Node.js:

A screenshot of the new stack trace viewer of RunKit, specifically showing code from a stack frame inline in the viewer.
View code inline right in the stack frames

Read More...

Introducing DemoKit: Scriptable Product Demos

 

Today we're open sourcing and releasing DemoKit, our new Electron app for scripting product demos. Using the web technologies you're already familiar with, you can now record demos, tutorials, or any other videos that show off your products. Since the demos are scripted, you can check them into GitHub, incorporate feedback and changes, and even simply re-record them when your products visually change so they're never out of date. In order to help get you started, we're also open sourcing RunKit's demo that appears on our homepage.

Read More...

Tonic is now RunKit, a part of Stripe

 

For the past year we've been taking a radical approach to development tools here at Tonic. Instead of treating IDEs, frameworks, and even languages as the fundamental building blocks for development, we decided to explore what it would mean to attack these problems at the system level. Could we make progress on some long standing development headaches by essentially beginning to build a developer OS?

We started by buidling module-fs, a virtual filesystem capable of representing the entire state of npm at any particular microsecond. With module-fs we could make every version of the over 300,000 packages on npm available instantly. With truly immediate and frictionless access to any package, you could begin to think of npm as the global standard library, as essential to development tomorrow as built-in libraries are today.

Read More...

Two-Millionth Version

 

While querying our database to get exact numbers for RunKit's announcement of scoped package support, we realized npm recently passed an important milestone. So here's our belated card to celebrate the occasion.

Packages have multiple versions. npm currently has ~330,000 packages. Packages have, on average, 6.74 versions. Do the math, and that's over two million versions of packages.

Read More...

Scoped Package Support

 

We've just deployed support for scoped packages on RunKit! Practically, this means we've added around 75,000 versions of 11,800 packages.

If you're not familiar with scoped packages, they're just like normal packages except their name includes a namespace: require("@namespace/package-name"). This allows you to avoid collisions with existing packages. Although you may have never directly used one yourself, many are included as dependencies in other packages. Try it out right here:

Read More...

Building "Interesting" Previews on Demand with RunKit Endpoint

 

When people share content on Facebook, they expect that the content will show up a certain way in the news feed: with their own title, description, and most importantly a relevant picture. Of course, RunKit is largely about text, whether in the form of source code or the properties in an object viewer, so we had to find a way to generate pictures that made sense. Building a prototype to do that with RunKit turned out to be so simple that we wanted to share the process.

What are we doing?

Read More...

Class Support

 

We've just added class support to RunKit! JavaScript classes are shorthand that make it easier to work with JavaScript's existing protoypal inheritance. As usual, RunKit is smart about the way it supports this feature, using Babel in earlier versions (like 0.12), but giving you full access to native classes in Node 4 and 5, even when not in strict mode. Give it a try:

class AbstractMockSingletonFactoryFactory { injectDependency() { console.log("Subclasser Responsibility"); } }
Read More...

Introducing JavaScript Office Hours

 

Have JavaScript questions? Want to discuss ES6, React, or Promises? Then why not bring your laptop over to the Haight to share a beer and some snacks. The RunKit team will be hosting a weekly JavaScript Office Hours, with the first one kicking off this Thursday from 4PM to 8PM. You can get up to date information each week on the website.

Read More...

Highlight: Slack Slash Commands

 

People have used RunKit to write tens of thousands of notebooks. We love calling attention to some of the cool ones that have been published. We'll kick off with a notebook that takes advantage of our latest feature, Endpoint.

Slack is a popular messaging app for teams. Slash Commands is a Slack app that will fetch an external URL when a "slash command" is matched (any message that begins with a slash).

Read More...

Introducing Endpoint and Literate APIs

 

We're excited to announce our latest feature: RunKit Endpoint. One thing we've always wanted is a great way to use RunKit to experiment with HTTP servers. Node is for servers, and now with Endpoint, RunKit is too.

Endpoint turns any RunKit Notebook into a server by exporting a single function, endpoint. This function takes a request and response, just like a typical http.listen handler. That's it: no deploying, no ports to worry about. Your function will be called anytime someone visits the corresponding url on the runkit.sh domain. Here's an example:

Read More...

Node 5 Support

 

RunKit now supports Node 5! Node 5 is part of the Stable release line, which means it focuses more on features, while Node 4 focuses on stability and security as part of the LTS release line. You can read about it more here, and you can try them both on any RunKit document:

A close up of node selection menu being changed to node 5
Select Node 5 from the Node selection menu

Read More...

npm + RunKit

 

We love npm. Having instant access to every package is one of the best parts of RunKit. That's why we're really excited about our latest update, which you might have already noticed:

A close up of the RunKit link on npm page.
Click the RunKit link on the right of the package page on npm

Read More...

Embed Node.js on Any Website

 

One of the coolest things about RunKit is the ability to run Node.js code, and even use any package on npm, without having to install anything at all. Once we had that working, we immediately knew that it could be useful in so many more ways than just powering runkit.com. That's why I'm excited to release the first embedded version of RunKit.

With one <script> tag, you can add a fully functional node environment to any web page. Your users can write and run code without leaving your website, complete with access to all of npm. Use it in your blog, or a presentation, or on any place else. Check it out!

Read More...

Time Traveling in Node.js Notebooks

 

As part of a two-post series, I'd like to share some in-depth details behind one of RunKit's most asked about features: time traveling. In this first installment I'll be focusing mainly on how the back-end works: specifically, how we're able to not only rewind the state of your code, but any changes to the filesystem and spawned subprocesses as well. From a high level, this allows for a lot of cool functionality like real undo in a REPL. However, we'll also see how time traveling is actually essential to the way notebooks fundamentally work in RunKit.

Why Time Traveling is Important

Read More...

What is RunKit?

  • RunKit is an interactive playground for running Node.js in the cloud.
  • RunKit offers serverless functions with zero deploy time — prototype code changes in real time!
  • RunKit can be embedded in your tutorials and docs to make them interactive as seen on lodash.com, expressjs.com, and stripe.com.
Follow RunKit Blog updates with the RSS Feed
Follow @runkitdev on Twitter for the latest updates from RunKit
© 2015–2018 Playground Theory, Inc.