SlideShare a Scribd company logo
1 of 16
INCREMENTAL DEVELOPMENT WITH LISP
       Building a Game and a Website




                                           @jlongster
                                       James Long
INCREMENTAL DEVELOPMENT

• “acyclic software development process developed in
 response to the weaknesses of the waterfall model”
 - Wikipedia

• Rapidly   evolving software by means of frequent small changes
CODING

• Let’s
      focus on PROGRAMMING, apply the same model to just
 the programmer

• Write   small pieces of code, run them, and repeat

• Tweak   and extend the program while it is running

• Advantages: instant   results, higher morale, less rabbit trails
WHY LISP?

• Lisp   is famous for embracing incremental development

• Very   expressive and dynamic

• Functional
           simplicity allows for “piece-by-piece” evaluation, or
 running small chunks of code quickly

• Thephilosophy of Lisp is built around incremental
 development
IN PRACTICE
• How    do you actually write code incrementally?

• REPL

• IDE

 • Emacs

   • SLIME

   • comint-mode
EXAMPLE #1
                                    VECTORS

• Goal: Write    a 3d vector library with support for addition

   (define-type v3
     x y z)

   EVAL

   (define (v3-add   v1 v2)
     (make-v3
      (+ (v3-x v1)   (v3-x v2))
      (+ (v3-y v1)   (v3-y v2))
      (+ (v3-z v1)   (v3-z v2))))

   EVAL




• Intimate   with what’s going on with the code
EXAMPLE #1
                                    VECTORS

• Goal: Write    a 3d vector library with support for addition
                                     (define-type v3
   (define-type v3                     constructor: really-make-vec3d
     x y z)                            x y z)
   EVAL                              EVAL
   (define (v3-add   v1 v2)          (define (make-v3 x y z #!key (scale 1.))
     (make-v3                          (really-make-vec3d (* x scale)
      (+ (v3-x v1)   (v3-x v2))                           (* y scale)
      (+ (v3-y v1)   (v3-y v2))                           (* z scale)))
      (+ (v3-z v1)   (v3-z v2))))
                                     EVAL
   EVAL
                                     v3-add is still available


• Intimate   with what’s going on with the code
EXAMPLE #2
                          RENDER QUEUE

• Goal: Write     a library which queues objects to render
    (define queue '())

    (define (queue-add obj)
      (set! queue (cons obj queue)))

    (define (queue-render-all)
      (for-each (lambda (obj)
                  (write obj))
                queue))

    EVAL-REGION


• Modify   a program while its running and never throw away
 state
EXAMPLE #2
                          RENDER QUEUE

• Goal: Write     a library which queues objects to render
    (define queue '())
                                       (define (queue-render-all)
    (define (queue-add obj)              (display "--- RENDERED OBJECTS ---n")
      (set! queue (cons obj queue)))     (for-each (lambda (obj)
                                                     (display obj)
    (define (queue-render-all)                       (newline))
      (for-each (lambda (obj)                      queue))
                  (write obj))
                queue))                queue and queue-add are the same as before

    EVAL-REGION


• Modify   a program while its running and never throw away
 state
INITIAL THOUGHTS?

• Emacs greatly enhances the ability for “live coding”, could be
 done in other editors though

• “Scratch   buffers” are commonly used to test the system

• Your “scratch   code” evolves into unit tests
REAL WORLD EXAMPLE #1
                            WEBSITE

• Clojure   is a Lisp dialect which runs on the JVM

• Compojure     is a web framework developed in Clojure

• jlongster.com

• Clojure
        supports SLIME, an incredible development
 environment fully embracing incremental development
REAL WORLD EXAMPLE #2
                           GAME

•Iused Gambit Scheme to make
 an iPhone game, Farmageddon

• Wrote  a tool that embeds
 “remote REPLs” in applications
 so that you can develop it
 SLIME-style

• Extended   Emacs keybindings
REAL WORLD EXAMPLE #2
                           GAME

•Iused Gambit Scheme to make
 an iPhone game, Farmageddon

• Wrote  a tool that embeds
 “remote REPLs” in applications
 so that you can develop it
 SLIME-style

• Extended   Emacs keybindings
PROBLEMS

• Youmust write your code in a way that allows incremental
 development

• Your   IDE must support it

• Sometimes    there’s a lot of overhead for little gain
WHAT ABOUT YOU?


• Most     of you don’t use Lisp, probably

• Python     and many other languages could support this too

• It’s   a different mindset that I challenge you to try
• Buymy game, available next week on the App Store for only
 $1.99

• @farmageddongame

• http://farmageddongame.com

More Related Content

What's hot

Scala Refactoring for Fun and Profit
Scala Refactoring for Fun and ProfitScala Refactoring for Fun and Profit
Scala Refactoring for Fun and ProfitTomer Gabel
 
Haskell - Being lazy with class
Haskell - Being lazy with classHaskell - Being lazy with class
Haskell - Being lazy with classTiago Babo
 
Triton and symbolic execution on gdb
Triton and symbolic execution on gdbTriton and symbolic execution on gdb
Triton and symbolic execution on gdbWei-Bo Chen
 
What make Swift Awesome
What make Swift AwesomeWhat make Swift Awesome
What make Swift AwesomeSokna Ly
 
Introduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformIntroduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformEastBanc Tachnologies
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and SimpleBen Mabey
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John StevensonJAX London
 
A Scala Corrections Library
A Scala Corrections LibraryA Scala Corrections Library
A Scala Corrections LibraryPaul Phillips
 
Start Wrap Episode 11: A New Rope
Start Wrap Episode 11: A New RopeStart Wrap Episode 11: A New Rope
Start Wrap Episode 11: A New RopeYung-Yu Chen
 
DConf 2016: Keynote by Walter Bright
DConf 2016: Keynote by Walter Bright DConf 2016: Keynote by Walter Bright
DConf 2016: Keynote by Walter Bright Andrei Alexandrescu
 
DevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programmingDevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programmingHenri Tremblay
 
Scala Refactoring for Fun and Profit (Japanese subtitles)
Scala Refactoring for Fun and Profit (Japanese subtitles)Scala Refactoring for Fun and Profit (Japanese subtitles)
Scala Refactoring for Fun and Profit (Japanese subtitles)Tomer Gabel
 
Clojure (and some lisp) in 10 mins for OO developers
Clojure (and some lisp) in 10 mins for OO developersClojure (and some lisp) in 10 mins for OO developers
Clojure (and some lisp) in 10 mins for OO developersChris F Carroll
 
Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013Charles Nutter
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationMartin Odersky
 
Let'swift "Concurrency in swift"
Let'swift "Concurrency in swift"Let'swift "Concurrency in swift"
Let'swift "Concurrency in swift"Hyuk Hur
 
Writing Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using ScaldingWriting Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using ScaldingToni Cebrián
 
Ruby on rails - Ruby Basics
Ruby on rails - Ruby BasicsRuby on rails - Ruby Basics
Ruby on rails - Ruby BasicsEmad Elsaid
 

What's hot (20)

iSoligorsk #3 2013
iSoligorsk #3 2013iSoligorsk #3 2013
iSoligorsk #3 2013
 
Scala Refactoring for Fun and Profit
Scala Refactoring for Fun and ProfitScala Refactoring for Fun and Profit
Scala Refactoring for Fun and Profit
 
Haskell - Being lazy with class
Haskell - Being lazy with classHaskell - Being lazy with class
Haskell - Being lazy with class
 
Triton and symbolic execution on gdb
Triton and symbolic execution on gdbTriton and symbolic execution on gdb
Triton and symbolic execution on gdb
 
What make Swift Awesome
What make Swift AwesomeWhat make Swift Awesome
What make Swift Awesome
 
Introduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platformIntroduction to Kotlin Language and its application to Android platform
Introduction to Kotlin Language and its application to Android platform
 
Klee and angr
Klee and angrKlee and angr
Klee and angr
 
Clojure, Plain and Simple
Clojure, Plain and SimpleClojure, Plain and Simple
Clojure, Plain and Simple
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
A Scala Corrections Library
A Scala Corrections LibraryA Scala Corrections Library
A Scala Corrections Library
 
Start Wrap Episode 11: A New Rope
Start Wrap Episode 11: A New RopeStart Wrap Episode 11: A New Rope
Start Wrap Episode 11: A New Rope
 
DConf 2016: Keynote by Walter Bright
DConf 2016: Keynote by Walter Bright DConf 2016: Keynote by Walter Bright
DConf 2016: Keynote by Walter Bright
 
DevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programmingDevNexus 2018: Learn Java 8, lambdas and functional programming
DevNexus 2018: Learn Java 8, lambdas and functional programming
 
Scala Refactoring for Fun and Profit (Japanese subtitles)
Scala Refactoring for Fun and Profit (Japanese subtitles)Scala Refactoring for Fun and Profit (Japanese subtitles)
Scala Refactoring for Fun and Profit (Japanese subtitles)
 
Clojure (and some lisp) in 10 mins for OO developers
Clojure (and some lisp) in 10 mins for OO developersClojure (and some lisp) in 10 mins for OO developers
Clojure (and some lisp) in 10 mins for OO developers
 
Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013Beyond JVM - YOW! Sydney 2013
Beyond JVM - YOW! Sydney 2013
 
Scala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentationScala - The Simple Parts, SFScala presentation
Scala - The Simple Parts, SFScala presentation
 
Let'swift "Concurrency in swift"
Let'swift "Concurrency in swift"Let'swift "Concurrency in swift"
Let'swift "Concurrency in swift"
 
Writing Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using ScaldingWriting Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using Scalding
 
Ruby on rails - Ruby Basics
Ruby on rails - Ruby BasicsRuby on rails - Ruby Basics
Ruby on rails - Ruby Basics
 

Similar to Incremental Development with Lisp: Building a Game and a Website

Exciting JavaScript - Part II
Exciting JavaScript - Part IIExciting JavaScript - Part II
Exciting JavaScript - Part IIEugene Lazutkin
 
Introduction to java 101
Introduction to java 101Introduction to java 101
Introduction to java 101kankemwa Ishaku
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"Gal Marder
 
Expert JavaScript Programming
Expert JavaScript ProgrammingExpert JavaScript Programming
Expert JavaScript ProgrammingYoshiki Shibukawa
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNManish Pandit
 
Java se-7-evolves-toulouse-jug-2001-09-14
Java se-7-evolves-toulouse-jug-2001-09-14Java se-7-evolves-toulouse-jug-2001-09-14
Java se-7-evolves-toulouse-jug-2001-09-14Baptiste Mathus
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureQAware GmbH
 
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLMario-Leander Reimer
 
JSLounge - TypeScript 소개
JSLounge - TypeScript 소개JSLounge - TypeScript 소개
JSLounge - TypeScript 소개Reagan Hwang
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Nilesh Panchal
 
Developer’s viewpoint on swift programming language
Developer’s viewpoint on swift programming languageDeveloper’s viewpoint on swift programming language
Developer’s viewpoint on swift programming languageAzilen Technologies Pvt. Ltd.
 
How to really obfuscate your pdf malware
How to really obfuscate   your pdf malwareHow to really obfuscate   your pdf malware
How to really obfuscate your pdf malwarezynamics GmbH
 
How to really obfuscate your pdf malware
How to really obfuscate your pdf malwareHow to really obfuscate your pdf malware
How to really obfuscate your pdf malwarezynamics GmbH
 
Java 101 intro to programming with java
Java 101  intro to programming with javaJava 101  intro to programming with java
Java 101 intro to programming with javaHawkman Academy
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programmingagorolabs
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele RialdiCodeFest
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Anton Arhipov
 

Similar to Incremental Development with Lisp: Building a Game and a Website (20)

Exciting JavaScript - Part II
Exciting JavaScript - Part IIExciting JavaScript - Part II
Exciting JavaScript - Part II
 
Coscup
CoscupCoscup
Coscup
 
Introduction to java 101
Introduction to java 101Introduction to java 101
Introduction to java 101
 
JVM languages "flame wars"
JVM languages "flame wars"JVM languages "flame wars"
JVM languages "flame wars"
 
Java 101
Java 101Java 101
Java 101
 
Expert JavaScript Programming
Expert JavaScript ProgrammingExpert JavaScript Programming
Expert JavaScript Programming
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
 
Java se-7-evolves-toulouse-jug-2001-09-14
Java se-7-evolves-toulouse-jug-2001-09-14Java se-7-evolves-toulouse-jug-2001-09-14
Java se-7-evolves-toulouse-jug-2001-09-14
 
Ropython-windbg-python-extensions
Ropython-windbg-python-extensionsRopython-windbg-python-extensions
Ropython-windbg-python-extensions
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
 
Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
 
JSLounge - TypeScript 소개
JSLounge - TypeScript 소개JSLounge - TypeScript 소개
JSLounge - TypeScript 소개
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
Developer’s viewpoint on swift programming language
Developer’s viewpoint on swift programming languageDeveloper’s viewpoint on swift programming language
Developer’s viewpoint on swift programming language
 
How to really obfuscate your pdf malware
How to really obfuscate   your pdf malwareHow to really obfuscate   your pdf malware
How to really obfuscate your pdf malware
 
How to really obfuscate your pdf malware
How to really obfuscate your pdf malwareHow to really obfuscate your pdf malware
How to really obfuscate your pdf malware
 
Java 101 intro to programming with java
Java 101  intro to programming with javaJava 101  intro to programming with java
Java 101 intro to programming with java
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programming
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012Jenkins Evolutions - JEEConf 2012
Jenkins Evolutions - JEEConf 2012
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Incremental Development with Lisp: Building a Game and a Website

  • 1. INCREMENTAL DEVELOPMENT WITH LISP Building a Game and a Website @jlongster James Long
  • 2. INCREMENTAL DEVELOPMENT • “acyclic software development process developed in response to the weaknesses of the waterfall model” - Wikipedia • Rapidly evolving software by means of frequent small changes
  • 3. CODING • Let’s focus on PROGRAMMING, apply the same model to just the programmer • Write small pieces of code, run them, and repeat • Tweak and extend the program while it is running • Advantages: instant results, higher morale, less rabbit trails
  • 4. WHY LISP? • Lisp is famous for embracing incremental development • Very expressive and dynamic • Functional simplicity allows for “piece-by-piece” evaluation, or running small chunks of code quickly • Thephilosophy of Lisp is built around incremental development
  • 5. IN PRACTICE • How do you actually write code incrementally? • REPL • IDE • Emacs • SLIME • comint-mode
  • 6. EXAMPLE #1 VECTORS • Goal: Write a 3d vector library with support for addition (define-type v3 x y z) EVAL (define (v3-add v1 v2) (make-v3 (+ (v3-x v1) (v3-x v2)) (+ (v3-y v1) (v3-y v2)) (+ (v3-z v1) (v3-z v2)))) EVAL • Intimate with what’s going on with the code
  • 7. EXAMPLE #1 VECTORS • Goal: Write a 3d vector library with support for addition (define-type v3 (define-type v3 constructor: really-make-vec3d x y z) x y z) EVAL EVAL (define (v3-add v1 v2) (define (make-v3 x y z #!key (scale 1.)) (make-v3 (really-make-vec3d (* x scale) (+ (v3-x v1) (v3-x v2)) (* y scale) (+ (v3-y v1) (v3-y v2)) (* z scale))) (+ (v3-z v1) (v3-z v2)))) EVAL EVAL v3-add is still available • Intimate with what’s going on with the code
  • 8. EXAMPLE #2 RENDER QUEUE • Goal: Write a library which queues objects to render (define queue '()) (define (queue-add obj) (set! queue (cons obj queue))) (define (queue-render-all) (for-each (lambda (obj) (write obj)) queue)) EVAL-REGION • Modify a program while its running and never throw away state
  • 9. EXAMPLE #2 RENDER QUEUE • Goal: Write a library which queues objects to render (define queue '()) (define (queue-render-all) (define (queue-add obj) (display "--- RENDERED OBJECTS ---n") (set! queue (cons obj queue))) (for-each (lambda (obj) (display obj) (define (queue-render-all) (newline)) (for-each (lambda (obj) queue)) (write obj)) queue)) queue and queue-add are the same as before EVAL-REGION • Modify a program while its running and never throw away state
  • 10. INITIAL THOUGHTS? • Emacs greatly enhances the ability for “live coding”, could be done in other editors though • “Scratch buffers” are commonly used to test the system • Your “scratch code” evolves into unit tests
  • 11. REAL WORLD EXAMPLE #1 WEBSITE • Clojure is a Lisp dialect which runs on the JVM • Compojure is a web framework developed in Clojure • jlongster.com • Clojure supports SLIME, an incredible development environment fully embracing incremental development
  • 12. REAL WORLD EXAMPLE #2 GAME •Iused Gambit Scheme to make an iPhone game, Farmageddon • Wrote a tool that embeds “remote REPLs” in applications so that you can develop it SLIME-style • Extended Emacs keybindings
  • 13. REAL WORLD EXAMPLE #2 GAME •Iused Gambit Scheme to make an iPhone game, Farmageddon • Wrote a tool that embeds “remote REPLs” in applications so that you can develop it SLIME-style • Extended Emacs keybindings
  • 14. PROBLEMS • Youmust write your code in a way that allows incremental development • Your IDE must support it • Sometimes there’s a lot of overhead for little gain
  • 15. WHAT ABOUT YOU? • Most of you don’t use Lisp, probably • Python and many other languages could support this too • It’s a different mindset that I challenge you to try
  • 16. • Buymy game, available next week on the App Store for only $1.99 • @farmageddongame • http://farmageddongame.com

Editor's Notes