08

Run Swift code from within a browser? Julius Parishy:

I took some time off this week and built RunSwift from a hotel room down in Atlantic City! It’s something I’ve been thinking of doing since I first started playing with the language but hadn’t had the time.

RunSwift allows you to try Apple's Swift programming language from within the browser. While you cannot import abitrary modules, a small subset of Foundation is included.

And here’s the code that makes it possible:

The app itself is composed of a few parts, namely: 1) a user facing Sinatra app that’s hosted on Heroku (which made it really easy to keep up with the traffic it saw last night). This is what you see when you go to the site. And 2) a backend Sinatra app (running via thin in threaded mode) that runs on a Mac server with a suite of bash scripts for validating, compiling, and running your code.

Check it out for yourself: RunSwift.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>