the case for (scheme)

46
The Case for (Scheme) Jason Felice @eraserhd http://maitria.com / Monday, May 6, 13

Upload: eraserhd

Post on 04-Jul-2015

290 views

Category:

Technology


0 download

DESCRIPTION

The mobile market explodes. I have an idea for this awesome app. It connects people together with their phones in a way nobody's thought of yet. Ok, so I'm going to write three native apps: one in Java, one in Objective-C, another in .Net. I need the same logic on my server, except, well, 64-bit enabled. I need the same validation logic there, oh no! Wait, I need a web version of the app, too? Business logic in the front end? How many times do I need to write this damned thing? This is not why I started programming. I wanted to by a sky pirate! There's got to be a better way… Wait. Hrmm. We could get Phone Gap or maybe use Flex. Ugh. That's sluggish and the app doesn't look right and, crap, I still can't run Flex on the server. Still no dice. If only there was a way to take my business logic with me, to whatever technology I needed… If only I could not decide right now all the technologies I'd ever support...

TRANSCRIPT

Page 1: The Case for (Scheme)

The Case for (Scheme) Jason Felice

@eraserhdhttp://maitria.com/

Monday, May 6, 13

Page 2: The Case for (Scheme)

A Mobile Platform

Walled Garden

A Proprietor

Monday, May 6, 13

Page 3: The Case for (Scheme)

A Mobile PlatformApple

Xcode

Google

Android SDK

Microsoft

Visual Studio

Blackberry ??

RIM

Monday, May 6, 13

Page 4: The Case for (Scheme)

Teams

Android

iOS

Windows

Web

Back-end

Monday, May 6, 13

Page 5: The Case for (Scheme)

Platform Teams

Monday, May 6, 13

Page 6: The Case for (Scheme)

Steering

Monday, May 6, 13

Page 7: The Case for (Scheme)

Monday, May 6, 13

Page 8: The Case for (Scheme)

Hrmm...

• One feature at a time.

• Implement on every platform.

• Simultaneously release them all.

Monday, May 6, 13

Page 9: The Case for (Scheme)

Work on ALL the Apps

Monday, May 6, 13

Page 10: The Case for (Scheme)

Monday, May 6, 13

Page 11: The Case for (Scheme)

(Scheme)Gambit

Kawa

Guile C

JVM

CLR

Javascript

IronScheme

Scheme2Js

FargoSpock

Bigloo

Monday, May 6, 13

Page 12: The Case for (Scheme)

SICP

Monday, May 6, 13

Page 13: The Case for (Scheme)

Structure

(Scheme)

Native Interface

Native Interface

Native Interface

Native Interface

Native Interface

Monday, May 6, 13

Page 14: The Case for (Scheme)

Monday, May 6, 13

Page 15: The Case for (Scheme)

Because����������� ������������������  we����������� ������������������  care����������� ������������������  about����������� ������������������  beautiful����������� ������������������  code

we����������� ������������������  hack����������� ������������������  with����������� ������������������  intention

Because����������� ������������������  we����������� ������������������  care����������� ������������������  about����������� ������������������  geek����������� ������������������  joy

we����������� ������������������  encourage����������� ������������������  geeks����������� ������������������  to����������� ������������������  code����������� ������������������  from����������� ������������������  the����������� ������������������  heart

Because����������� ������������������  we����������� ������������������  care����������� ������������������  about����������� ������������������  what's����������� ������������������  alive����������� ������������������  in����������� ������������������  the����������� ������������������  people����������� ������������������  we����������� ������������������  touch

we����������� ������������������  speak����������� ������������������  and����������� ������������������  listen����������� ������������������  with����������� ������������������  courageous����������� ������������������  curiosity

Because����������� ������������������  we����������� ������������������  care����������� ������������������  about����������� ������������������  what����������� ������������������  emerges����������� ������������������  when����������� ������������������  we����������� ������������������  collaborate

we����������� ������������������  show����������� ������������������  up����������� ������������������  with����������� ������������������  confident����������� ������������������  humility

maitria.com

Monday, May 6, 13

Page 16: The Case for (Scheme)

Damn Parentheses!(let loop ((i 0)) (cond ((= i 10) #f) (else (display i) (loop (+ i 1)))))

Monday, May 6, 13

Page 17: The Case for (Scheme)

Damn Parentheses!if ((self = [super initWithNibName:[[self class]

description]

bundle:[NSBundle

bundleForClass:[self class]]

])) {

...

}

Monday, May 6, 13

Page 18: The Case for (Scheme)

Hello, World!

(display "Hello, World!")(newline)

Monday, May 6, 13

Page 19: The Case for (Scheme)

Hello, World!(define (say-hello) (display "Hello, World!") (newline))

(say-hello)

Monday, May 6, 13

Page 20: The Case for (Scheme)

Hello, World!(define (say-hello) (display "Hello, World!") (newline))

(say-hello)

Monday, May 6, 13

Page 21: The Case for (Scheme)

Hello, World!(define (say-hello) (display "Hello, World!") (newline))

(say-hello)

Monday, May 6, 13

Page 22: The Case for (Scheme)

factorial5! =

5 * 4 * 3 * 2 * 1

n! =

n * (n - 1) * (n - 2) * ... * 1

Monday, May 6, 13

Page 23: The Case for (Scheme)

factorial

n! = { 1, n=1

n(n-1)!, n>1

1! = 15! = 5•4!

Monday, May 6, 13

Page 24: The Case for (Scheme)

Monday, May 6, 13

Page 25: The Case for (Scheme)

factorial

(define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1))))

Monday, May 6, 13

Page 26: The Case for (Scheme)

factorial

(define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1))))

Monday, May 6, 13

Page 27: The Case for (Scheme)

factorial

(define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1))))

Monday, May 6, 13

Page 28: The Case for (Scheme)

factorial

(define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1))))

Monday, May 6, 13

Page 29: The Case for (Scheme)

factorial

(define (factorial n) (if (= n 1) 1 (* n (factorial (- n 1))))

Monday, May 6, 13

Page 30: The Case for (Scheme)

Lists

(1 2 3)

Monday, May 6, 13

Page 31: The Case for (Scheme)

Lists

(1 2 3)

1 2 3

()

Monday, May 6, 13

Page 32: The Case for (Scheme)

Pairs

(1 . 2)

1

2

Monday, May 6, 13

Page 33: The Case for (Scheme)

Pairs

(1 . 2)

1

2

car

Monday, May 6, 13

Page 34: The Case for (Scheme)

Pairs

(1 . 2)

1

2

car

cdr

Monday, May 6, 13

Page 35: The Case for (Scheme)

Monday, May 6, 13

Page 36: The Case for (Scheme)

Lists

(1 . (2 . (3 . ())))

1 2 3

()

Monday, May 6, 13

Page 37: The Case for (Scheme)

Lists

(1 . (2 . (3 . ())))

1 2 3

()

Monday, May 6, 13

Page 38: The Case for (Scheme)

(1 . (2 . (3 . ())))

Lists

1 2 3

()

Monday, May 6, 13

Page 39: The Case for (Scheme)

Lists

(1 . (2 . (3 . ())))

1 2 3

()

Monday, May 6, 13

Page 40: The Case for (Scheme)

Code is Data(sqrt (+ (* x x) (* y y)))

Monday, May 6, 13

Page 41: The Case for (Scheme)

Code is Data(sqrt (+ (* x x) (* y y)))

sqrt()

+()

* x x()

* y y()

Monday, May 6, 13

Page 42: The Case for (Scheme)

Data is Code

(define x 7)(define y 4)(define x2 (list '* 'x 'x))(define y2 (list '* 'y 'y))(define x2+y2 (list '+ x2 y2))(define hypot (list 'sqrt x2+y2))(eval hypot) => 8.06225774829855

Monday, May 6, 13

Page 43: The Case for (Scheme)

Monday, May 6, 13

Page 44: The Case for (Scheme)

(on (collision (ice-block? b) (ice-hole? h))

(in-succession

(remove-object b)

(simultaneously

(play-sound "splunk")

(animate h "block-melts-into-ice-hole"))

(remove-object h)))

Monday, May 6, 13

Page 45: The Case for (Scheme)

(animation “helper-slides-south” (play-frames (1 .. 5) for: 0.3) (repeat (play-frames (6 7) for: 0.2) (play-frames (8 .. 10) for: 0.2))

Monday, May 6, 13

Page 46: The Case for (Scheme)

Monday, May 6, 13