SlideShare a Scribd company logo
Intro to Io



Wednesday, 28 November, 12
Intro to Io
                                * Not really an Intro




Wednesday, 28 November, 12
Me
               • Jeremy Tregunna

               • iOS & Mac developer
               • Aspiring hardware designer (FPGAs, etc)

               • Twitter: @jtregunna
               • App.net: @jtregunna
               • GitHub: @jeremytregunna




Wednesday, 28 November, 12
Slideshare
               • Small fonts, check this out to follow along better:

                             http://www.slideshare.net/jtregunna/intro-to-io


                                                Github

               • Code!

                             https://github.com/jeremytregunna/intro-to-io




Wednesday, 28 November, 12
What is it?
               • Object-oriented
               • Classless design (based on Prototypes)




Wednesday, 28 November, 12
What is it?
               • Object-oriented
               • Classless design (based on Prototypes)
               1    Elephant := Object clone do(
               2      earSize := “medium”
               3      height := “big”
               4      color := Color greyColor
               5    )
               6
               7    Dumbo := Elephant clone do(
               8      earSize = “large”
               9      canFly := true
               10     height := “short”
               11     wearsBowtie := true
               12   )




Wednesday, 28 November, 12
What is it?
               • Object-oriented
               • Classless design (based on Prototypes)
               1    Elephant := Object clone do(
               2      earSize := “medium”
               3      height := “big”
               4      color := Color greyColor
               5    )
               6
               7    Dumbo := Elephant clone do(
               8      earSize = “large”
               9      canFly := true
               10     height := “short”
               11     wearsBowtie := true
               12   )


               • Open Source
               • Magical tool belt
               • Slow




Wednesday, 28 November, 12
Fundamentals
               • Objects receive messages
               • Messages are first class entities
               1 msg := message(+ 2 * 5)
               2 1 doMessage(msg) == 11 # same as: 1 + 2 * 5


               • Objects are unavoidable
                             Every message send is received by some object, 100% of the time.

               • Operators are implemented as methods
               1 1 + 2 * 5 # is really: 1 +(2) *(5)
               2 foo := 42 # is really: setSlot(“foo”, 42)


               • Concurrency first class
                             Cooperative threading




Wednesday, 28 November, 12
Operators
               • Operators are messages, they have a precedence.
               • Precedence is defined in the OperatorTable
               • Two types of operators, binary and assignment.
               1 /* Binary */ 1 + 2
               2 /* Assign */ foo := 42


               • You can define your own
               1   # operators.io
               2   OperatorTable addOperator("blah", 14)
               3   blah := method(x, "#{x}#{x}" interpolate println)
               4   doFile("opertest.io")

               1 # opertest.io
               2 message(blah "bar") println
               3 blah "bar"


               • All operators must be defined before the parser
               parses code that uses them!!!




Wednesday, 28 November, 12
Conditionals
               • If statement isn’t a statement
               1 if := method(c,
               2   (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
               3 )




Wednesday, 28 November, 12
Conditionals
               • If statement isn’t a statement
               1 if := method(c,
               2   (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
               3 )

               • Only needs one primitive to implement.
               1   # Using “evalArgAt()” we can selectively evaluate an arbitrary argument
               2   true ifTrue := method(call evalArgAt(0); self)
               3   true ifFalse := true
               4   false ifTrue := false
               5   false ifFalse := method(call evalArgAt(0); self)




Wednesday, 28 November, 12
Conditionals
               • If statement isn’t a statement
               1 if := method(c,
               2   (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
               3 )

               • Only needs one primitive to implement.
               1   # Using “evalArgAt()” we can selectively evaluate an arbitrary argument
               2   true ifTrue := method(call evalArgAt(0); self)
               3   true ifFalse := true
               4   false ifTrue := false
               5   false ifFalse := method(call evalArgAt(0); self)


               • Full if() support?
               1    if := method(c,
               2      call argAt(1) isNil ifTrue(return (c != nil and c != false)) # if() then() ... form
               3      (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2))
               4    )
               5    Object then := nil
               6    Object else := nil
               7    true then := method(call evalArgAt(0); self)
               8    true else := true
               9    false then := false
               10   false else := method(call evalArgAt(0); self)

               • Looks familiar...




Wednesday, 28 November, 12
Metaprogramming
               • Here be dragons!




Wednesday, 28 November, 12
Metaprogramming
               • Here be dragons!
               • Higher order messaging
               • Messages are our AST
               • Messages are mutable at runtime
               1   Number add := method(n, self + n)
               2   5 add(2) == 7
               3   Number sub := Number getSlot(“add”) do(message next setName(“-”))
               4   5 sub(2) == 3
               5   5 add(2) == 3 # ???




Wednesday, 28 November, 12
Metaprogramming
               • Here be dragons!
               • Higher order messaging
               • Messages are our AST
               • Messages are mutable at runtime
               1   Number add := method(n, self + n)
               2   5 add(2) == 7
               3   Number sub := Number getSlot(“add”) do(message next setName(“-”))
               4   5 sub(2) == 3
               5   5 add(2) == 3 # ???


               • Don’t forget to clone




Wednesday, 28 November, 12
Metaprogramming
               • Here be dragons!
               • Higher order messaging
               • Messages are our AST
               • Messages are mutable at runtime
               1   Number add := method(n, self + n)
               2   5 add(2) == 7
               3   Number sub := Number getSlot(“add”) do(message next setName(“-”))
               4   5 sub(2) == 3
               5   5 add(2) == 3 # ???


               • Don’t forget to clone
               1 Number sub := Number getSlot(“add”) clone do(message next setName(“-”))
               2 5 sub(2) == 3
               3 5 add(2) == 7




Wednesday, 28 November, 12
Concurrency
               • Lightweight threading (coroutines)
               • Independent of the C Stack*
               • Cooperative scheduling of coroutines

               * - For pure Io code only.




Wednesday, 28 November, 12
Concurrency
               greeter := Object clone do(
                   newSlot("coro"); newSlot("waitingCoro")
                   run := method(
                       coro = coroDo(
                           pause
                           names := list("Fred", "Wilma", "Betty", "Barney")
                           names foreach(i, name,
                               if(i == names size - 1,
                                   "#{name}" interpolate println
                                   System exit
                               ,
                                   "#{name}, " interpolate print
                               )
                               waitingCoro resume
                           )
                       )
                   )
                   hello := method(
                       "Hello " print
                       setWaitingCoro := Coroutine currentCoro
                       coro resume
                   )
               )
               greeter run; greeter hello
               # Hello Fred, Wilma, Betty, Barney




Wednesday, 28 November, 12

More Related Content

What's hot

Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13
Jay Coskey
 
A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingGarth Gilmour
 
C# - What's next
C# - What's nextC# - What's next
C# - What's next
Christian Nagel
 
Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2
Jay Coskey
 
4java Basic Syntax
4java Basic Syntax4java Basic Syntax
4java Basic SyntaxAdil Jafri
 
SQL Server Select Topics
SQL Server Select TopicsSQL Server Select Topics
SQL Server Select Topics
Jay Coskey
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
Jonas Bonér
 
Introduction to Scala for JCConf Taiwan
Introduction to Scala for JCConf TaiwanIntroduction to Scala for JCConf Taiwan
Introduction to Scala for JCConf Taiwan
Jimin Hsieh
 
Metaprogramming in julia
Metaprogramming in juliaMetaprogramming in julia
Metaprogramming in julia
岳華 杜
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
Oswald Campesato
 
Kotlin decompiled
Kotlin decompiledKotlin decompiled
Kotlin decompiled
Ruslan Klymenko
 
All about scala
All about scalaAll about scala
All about scala
Yardena Meymann
 
Scala at HUJI PL Seminar 2008
Scala at HUJI PL Seminar 2008Scala at HUJI PL Seminar 2008
Scala at HUJI PL Seminar 2008Yardena Meymann
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developers
John Stevenson
 
Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?
Jesper Kamstrup Linnet
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
Scott Leberknight
 
Meet scala
Meet scalaMeet scala
Meet scala
Wojciech Pituła
 

What's hot (19)

Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13Introduction to Haskell: 2011-04-13
Introduction to Haskell: 2011-04-13
 
Lezione03
Lezione03Lezione03
Lezione03
 
A Sceptical Guide to Functional Programming
A Sceptical Guide to Functional ProgrammingA Sceptical Guide to Functional Programming
A Sceptical Guide to Functional Programming
 
C# - What's next
C# - What's nextC# - What's next
C# - What's next
 
Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2
 
4java Basic Syntax
4java Basic Syntax4java Basic Syntax
4java Basic Syntax
 
SQL Server Select Topics
SQL Server Select TopicsSQL Server Select Topics
SQL Server Select Topics
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 
Introduction to Scala for JCConf Taiwan
Introduction to Scala for JCConf TaiwanIntroduction to Scala for JCConf Taiwan
Introduction to Scala for JCConf Taiwan
 
Metaprogramming in julia
Metaprogramming in juliaMetaprogramming in julia
Metaprogramming in julia
 
Introduction to Kotlin
Introduction to KotlinIntroduction to Kotlin
Introduction to Kotlin
 
Kotlin decompiled
Kotlin decompiledKotlin decompiled
Kotlin decompiled
 
All about scala
All about scalaAll about scala
All about scala
 
Scala at HUJI PL Seminar 2008
Scala at HUJI PL Seminar 2008Scala at HUJI PL Seminar 2008
Scala at HUJI PL Seminar 2008
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developers
 
Clojure: a LISP for the JVM
Clojure: a LISP for the JVMClojure: a LISP for the JVM
Clojure: a LISP for the JVM
 
Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
 
Meet scala
Meet scalaMeet scala
Meet scala
 

Similar to Intro to io

Ruby Gotchas
Ruby GotchasRuby Gotchas
Ruby Gotchas
Dave Aronson
 
Ruby basics
Ruby basicsRuby basics
Ruby basics
Aditya Tiwari
 
Intro To Erlang
Intro To ErlangIntro To Erlang
Intro To Erlang
asceth
 
Thinking Functionally In Ruby
Thinking Functionally In RubyThinking Functionally In Ruby
Thinking Functionally In RubyRoss Lawley
 
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
Tech in Asia ID
 
BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...
BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...
BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...
Andrew Phillips
 
Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...
Simplilearn
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdf
sagar414433
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdf
sagar414433
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
Göktuğ Serez
 
Threequals - Case Equality in Ruby
Threequals - Case Equality in RubyThreequals - Case Equality in Ruby
Threequals - Case Equality in Ruby
Louis Scoras
 
7li7w devcon5
7li7w devcon57li7w devcon5
7li7w devcon5
Kerry Buckley
 
Recursion
RecursionRecursion
Recursion
Malainine Zaid
 
Ruby Gotchas
Ruby GotchasRuby Gotchas
Ruby Gotchas
Dave Aronson
 
Code Like Pythonista
Code Like PythonistaCode Like Pythonista
Code Like Pythonista
Chiyoung Song
 
An introduction to property based testing
An introduction to property based testingAn introduction to property based testing
An introduction to property based testing
Scott Wlaschin
 
Introduction to Ruby Programming Language
Introduction to Ruby Programming LanguageIntroduction to Ruby Programming Language
Introduction to Ruby Programming Language
Nicolò Calcavecchia
 
Machine Learning on Azure - AzureConf
Machine Learning on Azure - AzureConfMachine Learning on Azure - AzureConf
Machine Learning on Azure - AzureConf
Seth Juarez
 
Slides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersSlides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersGiovanni924
 
Computing on Encrypted Data
Computing on Encrypted DataComputing on Encrypted Data
Computing on Encrypted Data
New York Technology Council
 

Similar to Intro to io (20)

Ruby Gotchas
Ruby GotchasRuby Gotchas
Ruby Gotchas
 
Ruby basics
Ruby basicsRuby basics
Ruby basics
 
Intro To Erlang
Intro To ErlangIntro To Erlang
Intro To Erlang
 
Thinking Functionally In Ruby
Thinking Functionally In RubyThinking Functionally In Ruby
Thinking Functionally In Ruby
 
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
"Practical Machine Learning With Ruby" by Iqbal Farabi (ID Ruby Community)
 
BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...
BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...
BASE Meetup: "Analysing Scala Puzzlers: Essential and Accidental Complexity i...
 
Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...Python Interview Questions | Python Interview Questions And Answers | Python ...
Python Interview Questions | Python Interview Questions And Answers | Python ...
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdf
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdf
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
Threequals - Case Equality in Ruby
Threequals - Case Equality in RubyThreequals - Case Equality in Ruby
Threequals - Case Equality in Ruby
 
7li7w devcon5
7li7w devcon57li7w devcon5
7li7w devcon5
 
Recursion
RecursionRecursion
Recursion
 
Ruby Gotchas
Ruby GotchasRuby Gotchas
Ruby Gotchas
 
Code Like Pythonista
Code Like PythonistaCode Like Pythonista
Code Like Pythonista
 
An introduction to property based testing
An introduction to property based testingAn introduction to property based testing
An introduction to property based testing
 
Introduction to Ruby Programming Language
Introduction to Ruby Programming LanguageIntroduction to Ruby Programming Language
Introduction to Ruby Programming Language
 
Machine Learning on Azure - AzureConf
Machine Learning on Azure - AzureConfMachine Learning on Azure - AzureConf
Machine Learning on Azure - AzureConf
 
Slides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersSlides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammers
 
Computing on Encrypted Data
Computing on Encrypted DataComputing on Encrypted Data
Computing on Encrypted Data
 

Intro to io

  • 1. Intro to Io Wednesday, 28 November, 12
  • 2. Intro to Io * Not really an Intro Wednesday, 28 November, 12
  • 3. Me • Jeremy Tregunna • iOS & Mac developer • Aspiring hardware designer (FPGAs, etc) • Twitter: @jtregunna • App.net: @jtregunna • GitHub: @jeremytregunna Wednesday, 28 November, 12
  • 4. Slideshare • Small fonts, check this out to follow along better: http://www.slideshare.net/jtregunna/intro-to-io Github • Code! https://github.com/jeremytregunna/intro-to-io Wednesday, 28 November, 12
  • 5. What is it? • Object-oriented • Classless design (based on Prototypes) Wednesday, 28 November, 12
  • 6. What is it? • Object-oriented • Classless design (based on Prototypes) 1 Elephant := Object clone do( 2 earSize := “medium” 3 height := “big” 4 color := Color greyColor 5 ) 6 7 Dumbo := Elephant clone do( 8 earSize = “large” 9 canFly := true 10 height := “short” 11 wearsBowtie := true 12 ) Wednesday, 28 November, 12
  • 7. What is it? • Object-oriented • Classless design (based on Prototypes) 1 Elephant := Object clone do( 2 earSize := “medium” 3 height := “big” 4 color := Color greyColor 5 ) 6 7 Dumbo := Elephant clone do( 8 earSize = “large” 9 canFly := true 10 height := “short” 11 wearsBowtie := true 12 ) • Open Source • Magical tool belt • Slow Wednesday, 28 November, 12
  • 8. Fundamentals • Objects receive messages • Messages are first class entities 1 msg := message(+ 2 * 5) 2 1 doMessage(msg) == 11 # same as: 1 + 2 * 5 • Objects are unavoidable Every message send is received by some object, 100% of the time. • Operators are implemented as methods 1 1 + 2 * 5 # is really: 1 +(2) *(5) 2 foo := 42 # is really: setSlot(“foo”, 42) • Concurrency first class Cooperative threading Wednesday, 28 November, 12
  • 9. Operators • Operators are messages, they have a precedence. • Precedence is defined in the OperatorTable • Two types of operators, binary and assignment. 1 /* Binary */ 1 + 2 2 /* Assign */ foo := 42 • You can define your own 1 # operators.io 2 OperatorTable addOperator("blah", 14) 3 blah := method(x, "#{x}#{x}" interpolate println) 4 doFile("opertest.io") 1 # opertest.io 2 message(blah "bar") println 3 blah "bar" • All operators must be defined before the parser parses code that uses them!!! Wednesday, 28 November, 12
  • 10. Conditionals • If statement isn’t a statement 1 if := method(c, 2 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2)) 3 ) Wednesday, 28 November, 12
  • 11. Conditionals • If statement isn’t a statement 1 if := method(c, 2 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2)) 3 ) • Only needs one primitive to implement. 1 # Using “evalArgAt()” we can selectively evaluate an arbitrary argument 2 true ifTrue := method(call evalArgAt(0); self) 3 true ifFalse := true 4 false ifTrue := false 5 false ifFalse := method(call evalArgAt(0); self) Wednesday, 28 November, 12
  • 12. Conditionals • If statement isn’t a statement 1 if := method(c, 2 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2)) 3 ) • Only needs one primitive to implement. 1 # Using “evalArgAt()” we can selectively evaluate an arbitrary argument 2 true ifTrue := method(call evalArgAt(0); self) 3 true ifFalse := true 4 false ifTrue := false 5 false ifFalse := method(call evalArgAt(0); self) • Full if() support? 1 if := method(c, 2 call argAt(1) isNil ifTrue(return (c != nil and c != false)) # if() then() ... form 3 (c != nil and c != false) ifTrue(return call evalArgAt(1)) ifFalse(return call evalArgAt(2)) 4 ) 5 Object then := nil 6 Object else := nil 7 true then := method(call evalArgAt(0); self) 8 true else := true 9 false then := false 10 false else := method(call evalArgAt(0); self) • Looks familiar... Wednesday, 28 November, 12
  • 13. Metaprogramming • Here be dragons! Wednesday, 28 November, 12
  • 14. Metaprogramming • Here be dragons! • Higher order messaging • Messages are our AST • Messages are mutable at runtime 1 Number add := method(n, self + n) 2 5 add(2) == 7 3 Number sub := Number getSlot(“add”) do(message next setName(“-”)) 4 5 sub(2) == 3 5 5 add(2) == 3 # ??? Wednesday, 28 November, 12
  • 15. Metaprogramming • Here be dragons! • Higher order messaging • Messages are our AST • Messages are mutable at runtime 1 Number add := method(n, self + n) 2 5 add(2) == 7 3 Number sub := Number getSlot(“add”) do(message next setName(“-”)) 4 5 sub(2) == 3 5 5 add(2) == 3 # ??? • Don’t forget to clone Wednesday, 28 November, 12
  • 16. Metaprogramming • Here be dragons! • Higher order messaging • Messages are our AST • Messages are mutable at runtime 1 Number add := method(n, self + n) 2 5 add(2) == 7 3 Number sub := Number getSlot(“add”) do(message next setName(“-”)) 4 5 sub(2) == 3 5 5 add(2) == 3 # ??? • Don’t forget to clone 1 Number sub := Number getSlot(“add”) clone do(message next setName(“-”)) 2 5 sub(2) == 3 3 5 add(2) == 7 Wednesday, 28 November, 12
  • 17. Concurrency • Lightweight threading (coroutines) • Independent of the C Stack* • Cooperative scheduling of coroutines * - For pure Io code only. Wednesday, 28 November, 12
  • 18. Concurrency greeter := Object clone do( newSlot("coro"); newSlot("waitingCoro") run := method( coro = coroDo( pause names := list("Fred", "Wilma", "Betty", "Barney") names foreach(i, name, if(i == names size - 1, "#{name}" interpolate println System exit , "#{name}, " interpolate print ) waitingCoro resume ) ) ) hello := method( "Hello " print setWaitingCoro := Coroutine currentCoro coro resume ) ) greeter run; greeter hello # Hello Fred, Wilma, Betty, Barney Wednesday, 28 November, 12