RunSwift

Try Swift in Your Browser

get it
#2 Product of the DaySeptember 07, 2014

Reviews

Discussion

Makers
You need to become a Contributor to join the discussion - Find out how.
Eric WillisHunter@erictwillis · Working on something new
RunSwift allows you to try Apple's Swift programming language from within the browser. While you cannot import arbitrary modules, a small subset of Foundation is included.
Ruairidh W McHardy@ruairidhwm · indie hacker
Pretty neat!
Eric WillisHunter@erictwillis · Working on something new
@ruairidhwm Definitely. Maybe @jparishy can come in and tell us more about it.
jpMaker@jparishy · Freelance iOS Developer
@erictwillis sure! 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. Swift is a big deal. It maintains a lot of the raw power of Objective-C while enforcing stricter standards on our code through a powerful type system. I think it'll lead to better code and better apps, and I wanted to let more people give it a try. Plus I needed to brush up on Ruby/Sass skills :) 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. Code is checked for a series of blacklisted APIs, prefixed with a template file that includes some select APIs from Foundation, compiled, and finally run via sandbox-exec. Each step has a timeout powered by the timeout function in coreutils. Finally, the results are relayed back to the frontend app and shown on screen. It was super fun to build and I'm glad you guys think it's cool, too!
Eric WillisHunter@erictwillis · Working on something new
@jparishy Thanks for the detailed post. I don't need to add a question because you already addressed it regarding the backend. Learning Swift is on my to-do list to complete the year. RunSwift rocks.
Lachlan Campbell@lachlanjc · Hack Club design/JS—HS 🎓—they/them—🌈
@jparishy Awesome! I just tried it on my Mac, and it’s pretty cool. Unfortunately, it doesn’t look so great on iPhone :(
jpMaker@jparishy · Freelance iOS Developer
@lachlanjc haha yes sorry about that! I didn't have time to really make the mobile view perfect. It does look a tiny bit better in landscape mode, though. If I have some free time this week I'll update the styles!
Santosh Sankar@santoshsankar · Cofounder, Director, Dynamo
This is awesome, been waiting for something like this. I have been tinkering with Swift and always find myself doing it between meetings or on-the-go.
tom meagher@tomfme · now is good.
@jparishy Great work! Any chance you can add a keyboard shortcut for the compile button?
jpMaker@jparishy · Freelance iOS Developer
@thomasmeagher CTRL/CMD+Enter :)
tom meagher@tomfme · now is good.
@jparishy You da man 👊 :)