+ All Categories
Home > Software > From Commodore 64 to the Cloud — Lessons from 30 years of programming

From Commodore 64 to the Cloud — Lessons from 30 years of programming

Date post: 10-Nov-2014
Category:
Upload: steven-shaw
View: 140 times
Download: 0 times
Share this document with a friend
Description:
Lessons about programming, programming languages, distributed systems, and operating systems from the perspective of a professional programmer with 30 years of programming experience.
Popular Tags:
23
From Commodore 64 to the Cloud Lessons from 30 years of programming
Transcript
Page 1: From Commodore 64 to the Cloud — Lessons from 30 years of programming

From Commodore 64 to the Cloud

Lessons from 30 years of programming

Page 2: From Commodore 64 to the Cloud — Lessons from 30 years of programming

!

Early 1980s

• Dick Smith Wizzard

• Commodore 64

• BASIC, peek/poke, machine code, assembly, graphics, games, electronic music, compilers.

Page 3: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Fun!Tell your kids to program games in JavaScript with

HTML5/Canvas/WebGL but ensure they understand that JavaScript is a low-level

assembly language of modern machines

Page 4: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Late 1980s / Early 1990s• QUT

• Modula-2 > Pascal

• VAX/VMS DCL

• Unix & C

• Gardens Point Beers Club

Page 5: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Modules are important

Modula-2 modules are simple but useful. Sooo much better than C “header files” and preprocessor directives!

Page 6: From Commodore 64 to the Cloud — Lessons from 30 years of programming

LessonBeer kills brain cells and lowers grades :)

Page 7: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Early 2000sPython Ruby

Smalltalk Scheme

Common Lisp Scheme

Dylan

Page 8: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - MacrosMacros are very useful for building extensible languages

Page 9: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Continuations

Scheme’s first-class continuations tickle your brain TODO: Read Oleg on why delimited continuations are

the thing

Page 10: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Mid 2000sXavier Leroy on compilers, Caml Light, Caml, Objective

Caml, OCaml

Page 11: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - High-level Programming Languages

can be very efficienti.e. OCaml is fast

but nag them about multicore ;)

Page 12: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Pattern Matching

Algebraic datatypes are great for compilers

Page 13: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Macros in ML family languages

camlp4 shows that macros aren’t just for lispers

Page 14: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Better Modules

Modula-2 modules are great and simple. ML modules have yet to be improved upon (but check out MixML).

Page 15: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Late 2000sHaskell, Laziness, Template Haskell

Page 16: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Laziness for Modularity

John Hughes on “Why FP” is “Why Laziness”

Page 17: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - ad-hoc overloading

Can use type classes for CLOS style ad-hoc overloading

Page 18: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Early 2010s• Proofs are programs • Coq, Agda, Epigram,

Cayenne, Ur, Idris • Inductive datatypes • Dependent types • Module Systems

Page 19: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - The future of programming is

dependently typed• No longer need to statically analyse (aka infer or guess) the properties of your

programs. Instead state them. • TDD: Test Driven Development → Type Driven Development. • Manuel Chakravarty calls for “Property Driven Development”. Yes, mathematical properties.

Page 20: From Commodore 64 to the Cloud — Lessons from 30 years of programming

“Cloud”i.e. Distributed Systems, Network Programming,

Software Defined Infrastructure

Page 21: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Reduce network hops

• A key lesson from distributed computing. • Also applies to optimising the user-space to kernel-space interactions.

Consider how the c10k problem is solved with libevent, libuv, NIO/NIO.2, over epoll, kqueue, AIO etc. This kind of efficient I/O system is baked into the runtime systems of Erlang, Haskell (via the Glorious GHC), Go, Rust, Java, Scala ε Node.js.

• Single address-space Operating Systems help solve a similar problem when switching between threads/processes after a time-slice.

• L4 microkernel implements efficient inter-process message passing using hardware memory remapping techniques.

• Operating Systems as libraries (aka exokernels): • Mirage is OCaml on virtual metal • HaLVM is Haskell (via the Glorious GHC) on virtual metal

Page 22: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Lesson - Everything fails, deal with it!

… and everything will be fine :D !

These things may help: Erlang, Raft, replicas, redundancy, PaaS, application containers with docker/

LXC (or maybe FreeBSD Jails or Solaris/SmartOS Zones)

Page 23: From Commodore 64 to the Cloud — Lessons from 30 years of programming

Questions?


Recommended