Slide 1

Slide 1 text

A Simple Plan Building a small web API in something new

Slide 2

Slide 2 text

The Reason I'm hosting a get-together in a few weeks* for folks to experiment with non-typical programming languages. I wanted to experiment as well. * - More on this later.

Slide 3

Slide 3 text

The API GET /attendees - All the attendees POST /attendees - Create an attendee GET /attendee/:id - Get a single attendee GET /languages - Get all the languages GET /languages/:lang - All the attendees interested

Slide 4

Slide 4 text

The options » Crystal & Kemal » Rust & Iron » Swift & Vapor » A few other attempts in Elixir, Haskell ... but let's not talk about those

Slide 5

Slide 5 text

Crystal It's like compiled, statically-typed Ruby. With type- inference. Most Ruby exercism solutions can move over with just a few tweaks. Love. puts "Hello World!"

Slide 6

Slide 6 text

Kemal Sinatra, but in Crystal. require "kemal" get "/" do "Hello World!" end This might become a theme.

Slide 7

Slide 7 text

Downfall » This thing is young and everything is in a perpetual state of semi-broken right now. » As a Rubyist, writing it really isn't a stretch at all. » Did I mention everything is kinda broken?

Slide 8

Slide 8 text

Rust A systems programming language sponsored by Mozilla. Also statically-typed and compiled with type- inference. fn main() { println!("Hello World!"); }

Slide 9

Slide 9 text

Iron Um. Kinda Sinatra in Rust. extern crate iron; use iron::prelude::*; use iron::status; fn main() { fn hello_world(_: &mut Request) -> IronResult { Ok(Response::with((status::Ok, "Hello World!"))) } let _server = Iron::new(hello_world).http("localhost:3000").unwrap(); println!("On 3000"); }

Slide 10

Slide 10 text

Downfall » Docs. Ugh. Docs, man. » Big, big jump to persistence ... because, docs. » unwrap() literally everywhere.

Slide 11

Slide 11 text

Swift Not just for phones! Compiled, type-inference ... but closures! print("Hello, world!")

Slide 12

Slide 12 text

Vapor A web framework for running Swift on the server - including Linux servers. And Heroku! import Vapor import HTTP let drop = Droplet() drop.get("hello") { request in return "Hello, world!" } let port = drop.config["app", "port"]?.int ?? 80 drop.serve()

Slide 13

Slide 13 text

Bonuses » Better docs than most. » Built-in ORM - with relationships! » Built-in deployment pipeline to Heroku » Type-safe routing(!)

Slide 14

Slide 14 text

Downsides » Moving target » vapor new includes a lot of garbage » MySQL only at the moment (unless you roll your own)

Slide 15

Slide 15 text

The Plug

Slide 16

Slide 16 text

PLIBMTTBHGATY

Slide 17

Slide 17 text

Programming

Slide 18

Slide 18 text

Languages

Slide 19

Slide 19 text

I've

Slide 20

Slide 20 text

Been

Slide 21

Slide 21 text

Meaning

Slide 22

Slide 22 text

To

Slide 23

Slide 23 text

Try

Slide 24

Slide 24 text

But

Slide 25

Slide 25 text

Haven't

Slide 26

Slide 26 text

Gotten

Slide 27

Slide 27 text

Around

Slide 28

Slide 28 text

To

Slide 29

Slide 29 text

Yet.

Slide 30

Slide 30 text

September 24, 2016 The Iron Yard 475 East Market Street Lite Breakfast & Lunch provided

Slide 31

Slide 31 text

Slide 32

Slide 32 text

Thanks!