SlideShare a Scribd company logo
1 of 117
Download to read offline
What I learned from
Seven Languages
in Seven Weeks
Kerry Buckley (@kerryb) – DevCon5 25/5/12
Twenty-
RubyIoProlog
ScalaErlang
ClojureHaskell
What is the typing model?
What is the programming model?
How will you interact with it?
What are the decision constructs
and core data structures?
What are the core features that
make the language unique?
Java was like having a rich lawyer as a brother. He was
fun when he was younger, but now he’s a black hole
that sucks away all the joy in a 100-mile radius.
RubyIoProlog
ScalaErlang
ClojureHaskell
Meet Ruby, one of my favorites. She’s sometimes quirky,
always beautiful, a little mysterious, and absolutely magical.
The irb console
>> puts "Hello world"
Hello world
=> nil

>> name = "Kerry"
=> "Kerry"

>> puts "Hello #{name}"
Hello Kerry
=> nil
Everything’s an object
>> 42.class
=> Fixnum

>> nil.class
=> NilClass

>> String.class
=> Class

> 42.methods
=> [:to_s, :+, :-, :*, :/, :abs, ...
Duck typing
def double(x)
  x * 2
end

>> double(2)
=> 4

>> double(2.5)
=> 5.0

>> double("foo")
=> "foofoo"

>> double(false)
NoMethodError: undefined method `*' for false:FalseClass
   from (irb):2:in `double'
Arrays, ranges & hashes
>> array = [1, 2.0, "three"]

>> array[0]
=> 1

>> array.reverse
=> ["three", 2.0, 1]

>> range = (1..10)

>> range.include? 5
=> true

>> hash = {:foo => 123, "bar" => "", 456 => [1, 2]}

>> hash[456]
=> [1, 2]
Blocks & yield
>> 3.times { puts "hello" }
hello
hello
hello

>> File.open "some-file", "w" do |f|
?>   f.write "some-data"
>> end

>> def delayed_by seconds
>>   sleep seconds
>>   yield
>> end

>> delayed_by 5 do
?>   puts "At last!"
>> end
At last!
Open classes
class NilClass
  def blank?
    true
  end
end

class String
  def blank?
    empty?
  end
end

>> [nil, "", "foo"].map &:blank?
=> [true, true, false]
Modules & mixins
module Debug
  def info
    "#{self.class}[#{object_id}]: #{to_s}"
  end
end

class Object
  include Debug
end

>> 2.info
=> "Fixnum[5]: 2"

>> "foo".info
=> "String[70107061928320]: foo"
Collections & Enumerable
 class MyCollection
   include Enumerable
   def each
     ...
   end
 end

 >> MyCollection.instance_methods.sort
 => [:all?, :any?, :chunk, :collect, :collect_concat,
 :count, :cycle, :detect, :drop, :drop_while, :each,
 :each_cons, :each_entry, :each_slice, :each_with_index,
 :each_with_object, :entries, :find, :find_all, :find_index,
 :first, :flat_map, :grep, :group_by, :include?, :inject,
 :map, :max, :max_by, :member?, :min, :min_by, :minmax,
 :minmax_by, :none?, :one?, :partition, :reduce, :reject,
 :reverse_each, :select, :slice_before, :sort, :sort_by,
 :take, :take_while, :to_a, :zip]
method_missing magic
class MyStruct
  def initialize values
    @values = values
  end

  def method_missing name, *args
    @values[name]
  end
end

>> struct = MyStruct.new foo: 123, bar: 456
=> #<MyStruct:0x007fc2c21433b8 @values={:foo=>123, :bar=>456}>

>> struct.foo
=> 123

>> struct.bar
=> 456
Dynamic definition
class MyStruct
  def initialize values
    @values = values
  end

  def method_missing name, *args
    puts "Defining method #{name}"
    self.class.class_eval do
      define_method(name) { @values[name] }
    end
    send(name, *args)
  end
end

>> struct.foo
Defining method foo
=> 123

>> struct.foo
=> 123
Pros

Power and flexibility
Developer productivity and fun
Raw execution speed
Limited concurrency support
Type-aware tool support
             Cons
RubyIoProlog
ScalaErlang
ClojureHaskell
Io is a rule bender. He’s young, wicked smart, and easy to
understand but hard to predict. He might give you the ride of
your life, wreck your dad’s car, or both.
Message passing
Io> "oI olleH" reverse
==> Hello Io

Io> list("iH", "oI") map(reverse)
==> list(Hi, Io)

Io> list(1, 2, 3) map(** 2) sum
==> 14
Objects & Slots
Io> Person := Object clone
==> Person_0x7f922c06ad00:
  type             = "Person"

Io>   Person firstName := "John"
==>   John
Io>   Person lastName := "Doe"
==>   Doe
Io>   Person firstName
==>   John
Defining methods
Io> Person name := method (
  firstName .. " " .. lastName
)

Io> Person name
==> John Doe
Prototypal inheritance
Io> Arthur := Person clone
==> Arthur_0x7fd5406cd860:
  type             = "Arthur"

Io> Arthur name
==> John Doe

Io>   Arthur   firstName = "Arthur"
Io>   Arthur   lastName = "Dent"
Io>   Arthur   name
==>   Arthur   Dent

Io> Arthur proto
==> Person_0x7fd540693ed0:
  firstName       = "John"
  lastName        = "Doe"
  name            = method(...)
  type            = "Person"
Control structures
Io> for(i, 1, 3, i println)
1
2
3
==> 3

Io> if(true,
        "Yes" println,
        "No" println)
Yes
==> Yes
Reflection
Io> foo := method(
  call sender println
  call message arguments println
)

Io> foo("bar", 42)
 Object_0x7fcf78418920:
  Lobby            = Object_0x7fcf78418920
  Protos           = Object_0x7fcf78417c00
  ...

list("bar", 42)
Coroutines
Io> Ping := Object clone
Io> Pong := Object clone

Io> Ping ping := method (
  2 repeat("Ping!" println; yield))

Io> Pong pong := method (
  2 repeat(yield; "Pong!" println))

Io> Ping @@ping; Pong @@pong
Io> Coroutine currentCoroutine pause
Ping!
Pong!
Ping!
Pong!
Actors
Io> Slow := Object clone
Io> Fast := Object clone

Io> Slow go := method(
  wait(1)
  "Slow" println
)

Io> Fast go := method(
  "Fast" println
)

Io> Slow @@go; Fast @@go; wait(2)
Fast
Slow
Futures
Io> page := URL with(
  "http://google.co.uk/") @fetch

Io> "I'm in the foreground" println
I'm in the foreground

Io> page size println
16906
Pros
Tiny – ideal for embedded systems
Prototypes and duck typing are very flexible

Concurrency support
Simple, consistent syntax
Raw execution speed
Small user community
                  Cons
RubyIoProlog
ScalaErlang
ClojureHaskell
Sometimes spectacularly smart, other times just as frustrating. You’ll
get astounding answers only if you know how to ask the question.
Simple facts
likes(wallace, cheese).
likes(gromit, cheese).
likes(wendolene, sheep).

?- likes(wallace, sheep).
false.
?- likes(gromit, cheese).
true.
?- likes(Who, cheese).
Who = wallace ;
Who = grommit.
Evaluating rules
friend(X, Y) :- +(X = Y),
  likes(X, Z), likes(Y, Z).

?- friend(wallace, wallace).
false.
?- friend(wendolene, gromit).
false.
?- friend(wallace, gromit).
true.
Recursive rules
father(grandpa, homer).
father(homer, bart).

ancestor(X, Y) :- father(X, Y).
ancestor(X, Y) :- father(X, Z),
  ancestor(Z, Y).

?- ancestor(Who, bart).
Who = homer ;
Who = grandpa ;
false.
Tuples
?- (X, Y, Z) = (1, 2, "foo").
X = 1,
Y = 2,
Z = [102, 111, 111].

?- (X, _, Z) = (1, 2, "foo").
X = 1,
Z = [102, 111, 111].
Calculation with lists
sum(0, []).
sum(Total, [Head|Tail]) :-
  sum(Sum, Tail),
  Total is Head + Sum.

?- sum(What, [1, 2, 3]).
What = 6.
Solving (4×4) sudoku
?- sudoku([_, _, 2, 3,
           _, _, _, _,
           _, _, _, _,
           3, 4, _, _],
          Solution).
Solution = [4,1,2,3,2,3,4,1,1,2,3,4,3,4,1,2].
Solving (4×4) sudoku
sudoku(Puzzle, Solution) :-
  Solution = Puzzle,
  Puzzle = [S11, S12, S13, S14,
            S21, S22, S23, S24,
            S31, S32, S33, S34,
            S41, S42, S43, S44],
  Solution ins 1..4,
  Row1 = [S11, S12, S13, S14], Row2 = [S21, S22, S23, S24],
  Row3 = [S31, S32, S33, S34], Row4 = [S41, S42, S43, S44],
  Col1 = [S11, S21, S31, S41], Col2 = [S12, S22, S32, S42],
  Col3 = [S13, S23, S33, S43], Col4 = [S14, S24, S34, S44],
  Square1 = [S11, S12, S21, S22], Square2 = [S13, S14, S23, S24],
  Square3 = [S31, S32, S41, S42], Square4 = [S33, S34, S43, S44],
  valid([Row1, Row2, Row3, Row4,
         Col1, Col2, Col3, Col4,
         Square1, Square2, Square3, Square4]).

valid([]).
valid([Head|Tail]) :-
  all_different(Head),
  valid(Tail).
Pros

Solving logical and scheduling problems
Natural language processing
Artificial intelligence
Scaling requires deep understanding
Not a general-purpose language
Simple procedural tasks are difficult
                Cons
RubyIoProlog
ScalaErlang
ClojureHaskell
He was often awkward, was sometimes amazing, but always had a
unique expression. Sometimes, his scissors let him do incredible things.
Other times, he was awkward and humiliated.
Type inference & coercion
 scala> "foo"
 res0: java.lang.String = foo

 scala> 123
 res1: Int = 123

 scala> 45.6
 res2: Double = 45.6

 scala> 1 + 2.3
 res3: Double = 3.3

 scala> "The answer is " + 42
 res4: java.lang.String = The answer is 42
var & val
scala> var a = 42
a: Int = 42

scala> a = a + 1
a: Int = 43

scala> val earth = "Harmless"
earth: java.lang.String = Harmless

scala> earth = "Mostly Harmless"
<console>:8: error: reassignment to val
       earth = "Mostly Harmless"
             ^
Ranges & tuples
scala> val range = 0 to 3
range: scala.collection.immutable.Range.Inclusive
  = Range(0, 1, 2, 3)

scala> val range = 0 to 5 by 2
range: scala.collection.immutable.Range
  = Range(0, 2, 4)

scala> val tuple = ("Kerry", 42)
tuple: (java.lang.String, Int) = (Kerry,42)

scala> val (name, age) = tuple
name: java.lang.String = Kerry
age: Int = 42
Lists, sets & maps
scala> val list = List(1, 2, 3)
list: List[Int] = List(1, 2, 3)

scala> list(1)
res0: Int = 2

scala> "zero"::list
res1: List[Any] = List(zero, 1, 2, 3)

scala> Set(1, 2, 3) ++ Set(2, 3, 4)
res2: scala.collection.immutable.Set[Int] = Set(1, 2, 3, 4)

scala> val map = Map(1 -> "One", 2 -> "Two")
map: scala.collection.immutable.Map[Int,java.lang.String] =
  Map(1 -> One, 2 -> Two)

scala> map(1)
res3: java.lang.String = One
Defining classes
class Person(firstName: String,
             lastName: String) {
  def greet(name: String) {
    println("Hello " + name +
      ", I'm " + firstName + ".")
  }
}

scala> val kerry = new Person("Kerry",
                              "Buckley")
kerry: Person = Person@276bab54

scala> kerry.greet("DevCon")
Hello DevCon, I'm Kerry.
Companion objects
class Person(firstName: String,
             lastName: String) {
  ...
}

object Person {
  def find(id: Int) {
    val (first, last) = DB.people.find(id)
    new Person(first, last
  }
}
Extending & traits
class Person(val name:String)

trait Nice {
  def greet() = println("Howdily doodily.")
}

class Character(override val name:String)
  extends Person(name) with Nice

scala> val flanders = new Character("Ned")
scala> flanders.greet
Howdily doodily.
List processing
scala> val jedi = List("Yoda", "Obiwan", "Luke")
jedi: List[java.lang.String] = List(Yoda, Obiwan, Luke)

scala> jedi.filter(name => name.size < 5)
res0: List[java.lang.String] = List(Yoda, Luke)

scala> jedi.map(name => name.size)
res1: List[Int] = List(4, 6, 4)

scala> val numbers = List(1, 2, 3)
numbers: List[Int] = List(1, 2, 3)

scala> numbers.foldLeft(0)((a, n) => a + n)
res2: Int = 6
Class hierarchy
                        Any

        AnyVal                       AnyRef

Float             Int    …       ScalaObject   …

                              List          Map

        Nothing
                                     Null
First-class XML
scala> val pets = <pets>
  <chicken>Babs</chicken>
  <chicken>Bunty</chicken>
  <chicken>Lily</chicken>
  <cat>Pebbles</cat>
  <chicken>Pepper</chicken>
  <cat>Twiglet</cat>
  <cat>Willow</cat>
  <cat>Zorro</cat>
</pets>

scala> pets  "cat"
res0: scala.xml.NodeSeq = NodeSeq(<cat>Twiglet</cat>,
  <cat>Pebbles</cat>, <cat>Willow</cat>,
  <cat>Zorro</cat>)
Pattern matching
scala> (pets  "_").foreach {pet =>
  pet match {
    case <cat>{name}</cat> =>
      println(name + " says 'meow'.")
    case <chicken>{name}</chicken> =
      println(name + " says 'cluck'.")
  }
}

Babs says 'cluck'.
Bunty says 'cluck'.
Lily says 'cluck'.
Pebbles says 'meow'.
Pepper says 'cluck'.
Twiglet says 'meow'.
Willow says 'meow'.
Zorro says 'meow'.
Concurrency with actors
case object Stroke
case object Feed

class Cat() extends Actor {
  def act() {
    loop {
      react {
        case Stroke => { println("Purr!") }
        case Feed => { println("Om nom nom") }
      }
    }
  }
}

scala> val cat = new Cat().start
scala> cat ! Stroke; cat ! Feed; println("Done.")
Done.
Purr!
Om nom nom
Pros

A modern version of Java
Mixins, pattern matching, blocks, XML
Concurrency with actors & immutability


Static typing
Compromises with mutable state
                Cons
RubyIoProlog
ScalaErlang
ClojureHaskell
Agent Smith was an artificial intelligence program in the matrix that
had an amazing ability to take any form and bend the rules of
reality to be in many places at once. He was unavoidable.
The usual types (mostly)
1> 2 + 2.
4

2> "Hello".
"Hello"

3> atom.
atom

4> {foo, 123, "bar"}.
{foo,123,"bar"}

5> [1, "one", two].
[1,"one", two]

6> [87, 84, 70, 63].
"WTF?"
Variables don’t change
1> Foo = 42.
42

2> Foo = Foo + 1.
** exception error: no match of right hand side value 43

3> Values = [1, 2, 3].
[1,2,3]

4> lists:append(Values, [4]).
[1,2,3,4]

5> Values.
[1,2,3]
Pattern matching
1> Pet = {{name, "Zorro"}, {type, "Cat"}}.
{{name,"Zorro"},{type,"Cat"}}

2> {{name, Name}, {type, Type}} = Pet.
{{name,"Zorro"},{type,"Cat"}}

3> Name.
"Zorro"

4> Type.
"Cat"

5> [Head|Tail] = [foo, bar, baz].
[foo,bar,baz]

6> {Head, Tail}.
{foo,[bar,baz]}
Bit matching
1> [A, B, C, D] = [1, 0, 50, 200].
[1,0,50,200]

2> Packed = <<A:1, B:1, C:6, D:8>>.
<<"²È">>

3> <<P:1, Q:1, R:6, S:8>> = Packed.
<<"²È">>

4> {P, Q, R, S}.
{1,0,50,200}
Basic functions
-module(demo).
-export([echo/1]).
echo(Value) -> Value.

1> c(demo).
{ok,demo}

5> demo:echo("Hello").
"Hello"

6> demo:echo(42).
42
Patterns in functions
-module(fact).
-export([fact/1]).

fact(0) -> 1;
fact(N) -> N * fact(N-1).

1> c(fact).
{ok,fact}

3> fact:fact(6).
720

4> fact:fact("foo").
** exception error: bad argument in an arithmetic
expression
     in function fact:fact/1 (fact.erl, line 5)

6> fact:fact(10000).
Patterns in functions
28462596809170545189064132121198688901480514017027992307941799942744113400
03764443772990786757784775815884062142317528830042339940153518739052421161
38271617481982419982759241828925978789812425312059465996259867065601615720
36032397926328736717055741975962099479720346153698119897092611277500484198
84541047554464244213657330307670362882580354896746111709736957860367019107
15127305872810411586405612811653853259684258259955846881464304255898366493
17059251717204276597407446133400054194052462303436869154059404066227828248
37151203832217864462718382292389963899282722187970245938769380309462733229
25705554596900278752822425443480211275590191694254290289169072190970836905
39873747452483372899521802363282741217040268086769210451555840567172555372
01585213282903427998981844931361064038148930449962159999935967089298019033
69984844046654192362584249471631789611920412331082686510713545168455409360
33009607210346944377982349430780626069422302681885227592057029230843126188
49760656074258627944882715595683153344053442544664841689458042570946167361
31876052349822863264529215294234798706033442907371586884991789325806914831
68854251956006172372636323974420786924642956012306288720122652952964091508
30133663098273380635397290150658182257429547589439976511386554120812578868
37042392087644847615690012648892715907063064096616280387840444851916437908
07186112370622133415415065991843875961023926713276546986163657706626438638
02984805195276953619525924093090861447190739076858575593478698172073437209
31048254756285677776940815640749622752549933841128092896375169902198704924
05617531786346939798024619737079041868329931016554150742308393176878366923
Patterns in functions
28462596809170545189064132121198688901480514017027992307941799942744113400037644437729907867577847758158840621423175288300423399401535187390524211613827161
74819824199827592418289259787898124253120594659962598670656016157203603239792632873671705574197596209947972034615369811989709261127750048419884541047554464
24421365733030767036288258035489674611170973695786036701910715127305872810411586405612811653853259684258259955846881464304255898366493170592517172042765974
07446133400054194052462303436869154059404066227828248371512038322178644627183822923899638992827221879702459387693803094627332292570555459690027875282242544
34802112755901916942542902891690721909708369053987374745248337289952180236328274121704026808676921045155584056717255537201585213282903427998981844931361064
03814893044996215999993596708929801903369984844046654192362584249471631789611920412331082686510713545168455409360330096072103469443779823494307806260694223
02681885227592057029230843126188497606560742586279448827155956831533440534425446648416894580425709461673613187605234982286326452921529423479870603344290737
15868849917893258069148316885425195600617237263632397442078692464295601230628872012265295296409150830133663098273380635397290150658182257429547589439976511
38655412081257886837042392087644847615690012648892715907063064096616280387840444851916437908071861123706221334154150659918438759610239267132765469861636577
06626438638029848051952769536195259240930908614471907390768585755934786981720734372093104825475628567777694081564074962275254993384112809289637516990219870
49240561753178634693979802461973707904186832993101655415074230839317687836692369484902599960772968429397742753626311982541668153189176323483919082100014717
89321842278051351817349219011462468757698353734414560131226152213911787596883673640872079370029920382791980387023720780391403123689976081528403060511167094
84722224870389199993442071395836983063962232079115624044250808919914319837120445598344047556759489212101498152454543594285414390843564419984224855478532163
62403009844285533182925315420655123707970581639346029624769701038874220644153662673371542870078912274934068433644288984710084064160009362393526124803797529
33439287643983163903127764507224792678517008266695983895261507590073492151975926591927088732025940663821188019888547482660483422564577057439731222597006719
36061763513579529821794290797705327283267501488024443528681645026165662837546519006171873442260438919298506071515390031106684727360135816706437861756757439
18437647965813610059963868955233464878174614324357322486432679848198145843270303589550842053478849336458248259203328808902578238823326577020524897093704721
02142484133424652682068067323142144838540741821396218468701083595829469652356327648704757183516168792350683662717437119157233611430701211207676086978515597
21846485985918643641716850899625516820910793570231118518174775010804622585521314764897490660752877082897667514951009682329689732000622392888056658036140311
28546592908407803397490066495320587316494809388381619865885082738246803489786475711667989042356801830350413387573197263089790943571068779730163391808786847
49436335338933735869064058484178280651962758264344292580584222129476494029486226707618329882290040723904037331682074174132516566884430793394470192089056207
88387585342512820957359307018197708340163817638278562539516825426644614941044711579533262372815468794080423718587423026200264221822694188626212107297776657
40101837618228013685758644218586301153984371229910701009406192941322320277319395946700671369537709789777811828824244292086481613417956201747183160968766104
31404979581982364458073682094040222111815300514333870766070631496161077711174480595527643483333857440402127570318515272983774359218785585527955910286644579
17362007221858143309977294778923720717942857756271300923982397921957581197264742642878266682353915687857271620146192244266266708400765665625807109474398740
11077281166991880626872662656558334566500789030905065607463307802715853081769122377281351058452732659162621964762057143488021563081525900534372114100030303
92428664572073284734817120341681863289688650482873679333984439712367350845273401963094276976526841701749907569479827578258352299943156333221074391315501244
59005324702680312912392297979030417587823398622373535054642646913502503951009239286585108682088070662734733200354995720397086488066040929854607006339409885
83634986546613672788074876470070245879011804651829611127709060901615202211146154315831766995706097461808535939040006789287854882785093863735370390404941268
46189912728715626550012708330399502578799317054318827526592258149489507466399760073169273108317358830566126147829976631880700630446324291122606919312788815
66221591523270457695867512821990938942686601963904489718918597472925310322480210543841044325828472830584297804162405108110326914001900568784396341502696521
04892027214023216023489858882737142869533968175510628747090747371818801422348724849855819843909465170836436899430618965024328835327966719018452762055108570
76262042445096233232047447078311904344993514426255017017710173795511247461594717318627015655712662958551250777117383382084197058933673237244532804565371785
14960308802580284067847809414641838659226652806867978843250660537943046250287105104929347267471267499892634627358167146935060495110340755404658170393481046
75848562596776795976829940933402638726937836532091228771807745115262264254877183546110888636084327280622777664309728387905672861803604863346489337143941525
02594596525015209595361579771355957949657297756509026944280884797612766648470036196489060437619346942704440702153179435838310514049154626087284866787505416
74146731648999356381312866931427616863537305634586626957894568275065810235950814888778955073939365341937365700848318504475682215444067599203138077073539978
03633926733454954929666875992253089389808643060653296179316402961249267308063803187391259615113189035935126648081856836677028653774239074658239091095551717
97705807977892897524902307378017531426803639142447202577288917849500781178893366297504368042146681978242729806975793917422294566831858156768162887978706245
31246651727622758295493421483658868919299587402095696000243560305289829866386892076992834030549710266514322306125231915131843876903823706205399206933943716
88046642971147674356448637502684769814885310535406332884506201217330263067648132293156104355194176105071244902487327727311209194586513749319096516249769165
75538121985664322079786663003989386602386073578581143947158728008933741650337929658326184360731333275260236051155242272284472514638632693697637625101967143
80125691227784428426999440829152215904694437282498658085205186576292992775508833128672638418713277780874446643875352644733562441139447628780974650683952982
10817496795883645227334469487379347179071006497823646601668057203429792920744682232284866583952221144685957285840386337727803022759153049786587391951365024
62741958990883743873315942873720297706202071202130385721759332111624133304227737424163535535879770653096476858860773014327782903288947958184043788585677729
32094476778669357537460048142376741194182671636870481056911156215614357516290527351224350080604653668917458196549482608612260750293062761478813268955280736
14902252581968281505103331813212965966495815903042123877564599097329672806668384916625794974792290536184556374103479143077156116865048429249028110299252967
87352987678292690407887784802624792227507359484058174390862518779468900459420601686051427722444862724699111462001498806627235388378093806285443847630532350
Patterns in functions
28462596809170545189064132121198688901480514017027992307941799942744113400037644437729907867577847758158840621423175288300423399401535187390524211613827161748198241998275924182892597878981242531205946599625986706560161572036032397926328736717055741975962099479720346153698119897092611277500484198845410475544642442136573303076703628825803548
96746111709736957860367019107151273058728104115864056128116538532596842582599558468814643042558983664931705925171720427659740744613340005419405246230343686915405940406622782824837151203832217864462718382292389963899282722187970245938769380309462733229257055545969002787528224254434802112755901916942542902891690721909708369053987374745248337
28995218023632827412170402680867692104515558405671725553720158521328290342799898184493136106403814893044996215999993596708929801903369984844046654192362584249471631789611920412331082686510713545168455409360330096072103469443779823494307806260694223026818852275920570292308431261884976065607425862794488271559568315334405344254466484168945804
25709461673613187605234982286326452921529423479870603344290737158688499178932580691483168854251956006172372636323974420786924642956012306288720122652952964091508301336630982733806353972901506581822574295475894399765113865541208125788683704239208764484761569001264889271590706306409661628038784044485191643790807186112370622133415415065991843
87596102392671327654698616365770662643863802984805195276953619525924093090861447190739076858575593478698172073437209310482547562856777769408156407496227525499338411280928963751699021987049240561753178634693979802461973707904186832993101655415074230839317687836692369484902599960772968429397742753626311982541668153189176323483919082100014717
89321842278051351817349219011462468757698353734414560131226152213911787596883673640872079370029920382791980387023720780391403123689976081528403060511167094847222248703891999934420713958369830639622320791156240442508089199143198371204455983440475567594892121014981524545435942854143908435644199842248554785321636240300984428553318292531542065
51237079705816393460296247697010388742206441536626733715428700789122749340684336442889847100840641600093623935261248037975293343928764398316390312776450722479267851700826669598389526150759007349215197592659192708873202594066382118801988854748266048342256457705743973122259700671936061763513579529821794290797705327283267501488024443528681645
02616566283754651900617187344226043891929850607151539003110668472736013581670643786175675743918437647965813610059963868955233464878174614324357322486432679848198145843270303589550842053478849336458248259203328808902578238823326577020524897093704721021424841334246526820680673231421448385407418213962184687010835958294696523563276487047571835
16168792350683662717437119157233611430701211207676086978515597218464859859186436417168508996255168209107935702311185181747750108046225855213147648974906607528770828976675149510096823296897320006223928880566580361403112854659290840780339749006649532058731649480938838161986588508273824680348978647571166798904235680183035041338757319726308979
09435710687797301633918087868474943633533893373586906405848417828065196275826434429258058422212947649402948622670761832988229004072390403733168207417413251656688443079339447019208905620788387585342512820957359307018197708340163817638278562539516825426644614941044711579533262372815468794080423718587423026200264221822694188626212107297776657
40101837618228013685758644218586301153984371229910701009406192941322320277319395946700671369537709789777811828824244292086481613417956201747183160968766104314049795819823644580736820940402221118153005143338707660706314961610777111744805955276434833338574404021275703185152729837743592187855855279559102866445791736200722185814330997729477892
37207179428577562713009239823979219575811972647426428782666823539156878572716201461922442662667084007656656258071094743987401107728116699188062687266265655833456650078903090506560746330780271585308176912237728135105845273265916262196476205714348802156308152590053437211410003030392428664572073284734817120341681863289688650482873679333984439
71236735084527340196309427697652684170174990756947982757825835229994315633322107439131550124459005324702680312912392297979030417587823398622373535054642646913502503951009239286585108682088070662734733200354995720397086488066040929854607006339409885836349865466136727880748764700702458790118046518296111277090609016152022111461543158317669957
06097461808535939040006789287854882785093863735370390404941268461899127287156265500127083303995025787993170543188275265922581494895074663997600731692731083173588305661261478299766318807006304463242911226069193127888156622159152327045769586751282199093894268660196390448971891859747292531032248021054384104432582847283058429780416240510811032
69140019005687843963415026965210489202721402321602348985888273714286953396817551062874709074737181880142234872484985581984390946517083643689943061896502432883532796671901845276205510857076262042445096233232047447078311904344993514426255017017710173795511247461594717318627015655712662958551250777117383382084197058933673237244532804565371785
14960308802580284067847809414641838659226652806867978843250660537943046250287105104929347267471267499892634627358167146935060495110340755404658170393481046758485625967767959768299409334026387269378365320912287718077451152622642548771835461108886360843272806227776643097283879056728618036048633464893371439415250259459652501520959536157977135
59579496572977565090269442808847976127666484700361964890604376193469427044407021531794358383105140491546260872848667875054167414673164899935638131286693142761686353730563458662695789456827506581023595081488877895507393936534193736570084831850447568221544406759920313807707353997803633926733454954929666875992253089389808643060653296179316402
96124926730806380318739125961511318903593512664808185683667702865377423907465823909109555171797705807977892897524902307378017531426803639142447202577288917849500781178893366297504368042146681978242729806975793917422294566831858156768162887978706245312466517276227582954934214836588689192995874020956960002435603052898298663868920769928340305
49710266514322306125231915131843876903823706205399206933943716880466429711476743564486375026847698148853105354063328845062012173302630676481322931561043551941761050712449024873277273112091945865137493190965162497691657553812198566432207978666300398938660238607357858114394715872800893374165033792965832618436073133327526023605115524227228447
25146386326936976376251019671438012569122778442842699944082915221590469443728249865808520518657629299277550883312867263841871327778087444664387535264473356244113944762878097465068395298210817496795883645227334469487379347179071006497823646601668057203429792920744682232284866583952221144685957285840386337727803022759153049786587391951365024
62741958990883743873315942873720297706202071202130385721759332111624133304227737424163535535879770653096476858860773014327782903288947958184043788585677729320944767786693575374600481423767411941826716368704810569111562156143575162905273512243500806046536689174581965494826086122607502930627614788132689552807361490225258196828150510333181321
29659664958159030421238775645990973296728066683849166257949747922905361845563741034791430771561168650484292490281102992529678735298767829269040788778480262479222750735948405817439086251877946890045942060168605142772244486272469911146200149880662723538837809380628544384763053235070132028029488392008132135446450056134987017834271106158177289
81929065649868808104556223370306725425127727733028349843359577257595622470370779338714659303308862969944031833266579751467650271734629888377739784821870071802674126599715872803544047843247867490712792167289852358848694354669225510133760637791516459725425711696847733995115899834908188828126398440050554621006698879261455821456531969690982725
39345157604086134762587781658672944107753588241623157790825380547469335405824697176743245234514984830271703965438877376373581917365824542733474904242629460112998819165637138471118491569150547681404117498014542657123942044254410280758060013881986506137592885390389226443229479902864828400995986759635809991126953676015271730868527565721475835
07122298296529564917835071750835741362282545055620270969417476799259229774888627411314587676147531456895328093117052696486410187407673296986649236437382565475022816471926815559883196629848307776666840622314315884384910519058281816740764463033300119710293036455866594651869074475250837841987622990415911793682799760654186088721626654886492344
39103092325691063377596973905178112276466848679173604940439370333935190060938726839729924647848372727477097746669359978485712015678900024194726922097498412732314740154998092038145982141648117635714780155423159966783853485448640693641055691353133523118405358134894093819182189869482538396098994282202759933963520621770534357207339625057421676
94651016084956014393032443042715760995273086846092044222261031542299844448021100981613338248273752189987382053151649271344981059501599748005715919122021544877487501034732461906339413030308923994119850062259021841644099881732143244221085542486208962502606043981801890263177811466174549997714406652328638463638470016556181538610981881111817341
91305505024860345856755585637511729774299329074944236579668332700918367338977347901759248885660379952771540569083017311723894140326159612292912225191095948743805673381278538616491842786938417556898047100859868372033615175158097022566275200160956192229925401759878522038545913771783976389811198485803291048751666921195104514896677761598249468
72742066343759320785261892268728552767132488326779415291283916540796834419023909480367668870783801136704275397139620142478493519673530144440403782352667443755674088302522574527380620998045123318810272901204299798900542312621796813523775804116251145917599327913417650729282676223689729196052828967522352142523421724784186931739746041187763460
46256371353098015906177367587153368039585590548273618761121513846734328843250900456453581866819051087317913462157303395405809871720138443770992795327976755310993813658404035567957318941419765114363255262706397431465263481200327200967556677019262425850577706178937982310969867884485466595273270616703089182772064325519193936735913460377570831
93180845929565158875244597601729455720505595085929175506510115665075521635142318153548176884196032085050871496270494017684183980582594038182593986461260275954247433376226256287153916069025098985070798660621732200163593938611475394561406635675718526617031471453516753007499213865207768523824884600623735896608054951652406480547295869918694358
81119783368014148807832121345715236012406592220850891295690783537057673467166786378090881128345039578481221210111725071838335908388618757466120131729821713107294473765626517231069488442549836951414738389247774232094020783120080723532628805390626601818605042493878867787249550325542428422659627105069264607176746750233780567189345011073737703
41193461133740338653646751367336613947315502114571046711614452533248501979010834316419899984140450449011301637595206757155675094852435802691040776372109986716242547953853128528899309565707292186735232166660978749896353626105298214725694827999962208257758409884584842503911894476087296851849839763679182422665711671665801579145008116571922002
33759765317495922397884982814705506190689275625210462185661305800255607974609726715033327032310025274640428755556546883765838802543227403507431684278620637697054791726484378174446361520570933228587284315690756255569305558818822603590006739339952504379887470935079276181116276309771257983975996526612120317495882059435754883862282508401408885
72058399240097121921254807409775297427877591256602644348271364723184912518086627870862611669998963481240580368479458736482012465366322888901163657227088775773615200345010226889018910167357205866141001172366476265783539636429781901164705617027963192233229422873930923333074825893762619899759653008413538324112589963962944512908280202322549893
66275064995308389256322467946959606690469066862926450062197401217828998729797048590217750600928933289572723920195899944719451473608507704007257174393181484619094062695452850305263410005650222261523093648828871220464542677005771489943351471625042523651737102660686472534581201866832739536825474565365535975466857887000569883602866864507402569
93087483441094086086303707908295240576731684941855810482475304758923392801571302824106234999945932390521409856559565661346003396150515164758852742214732517999548977992849522746029855666700811871200856155016457400484170210303038996339253337466556817824410737409336919294104632307731994759826307383499600770372410446285414648704116273895649834
55516216568511455138382204700548399667170624646756610129138204890912111722938624425315891306698746204558724480605282937814830262216454228042175776076236545982822307081550346940493831775505330509469899947611941923128072180721696437843331360676067696518713839433877248549368906184570057204369666646508073449581449596630624669867983287258630006
42152202101718139173252751736722626214549454685060063346927138383117158497530926432524869602200590998026637653862254632651684149633063695480865511012567577178906166947583440434862184853695916021720304561834975241620399264413316518847686068306420048585579244733402901425888764037125186422290163336915850632737271995963629127833447862188878710
09533753551054688980236378263714926913289564339440899470121452134572117715657591451734895195016800621353927175419843876163543479806920886666227099512371706241924914282576453125769939735341673046864585181979668232015693792684926999983992413571941496882273704022820805171808003400480615261792013978945186295290558440703738300533552421153903385
18582936677919061011630623367314441920289385720185556959633083361545029042482230929708712478800201738307206048268015667539759378993179351579995892956215630733841629459990027673083282771659506421796652319043925054322675373181175531547678073947033893118510729772431837897267495745577818334549594231735355829104696731539127597568728186169116108
31563372326399688814905439432611971822749967911766285534018601983158096299817911072088049922920160620590672712735994618716349457749958053379471871054564525793960242102591364155283983952017730127125148920510617082280083399856657866469207371142696823017704163248294794095586946990893791651910063051853521023451897981276191430618643627030819771
24992751056732909481202057747100687703379708934229207183903744167503493818836342229284946790660285674293251642569044363473087656797056595677285291081242733154406580199802711579126254172797452862574865921933293805915239524735518887119860391319654287576290190503964083560246277534314409155642181729459941596061979622633242715863425977947348682
07480202153873472970799975333298778553105382016216979188038075300633435076614773713593936265190522224252814108474704529568864775791350216092204034844914995077874310718965572549265128269348951579507548617234139461036517661675032994864224403965951188226498131592508018512638663530862222349109462905931782940819564048470245653830543205650692442
26718632553076407618720867803917113563635012695250912910204960428232326289965027589510528443681774157309418748944280654275614309758281276981249369933130289466705604140843089422311409127222381484703643410196304136307367710600381595908297464101144213583210425743583502207371732197450890355731873504458272387707282714061629979196293572241044771
55051652535867544109395079218369015261138440382680054150924346511711436477899444553993653667727589565713987505542990824585609510036934663100673714708029927656933435500927189854050109917474979991554392031908961967615444686048175400695689471463928245383807010444181045506171305160584355817521032338465829201071030061124283407458607006060194830
55136486702102036470847080742270437189370696568879561792871304522451684202740202196641560528033506129355873907939352440409258424838060717744460996403522189102296190903256904238137449249490689231433088422439963139639154585406528632646880758114874837140828417645522638631352026489401626249480238856823159910295262033712644927990193821113451844
63875445163912393779741905766499117642376377222828023184657380501212778096803156914772649102575035087587922481102235445244108724485657007551871321465920935485045528291707495967754044507794948363717560623269257574128131102419103733380804343253108846948315557294022653949729138175813386194570577995618087559514136449076131096171559283765858400
36489374076822257523935988731081689667688287403837192827690431514106997678303819085690713091931340846019511147482766350724676534922040058626677632935516631939622498979912708004465982264899125226813124300528104995058595676527123591494442612554437618645029202881358582871789577224116380815161831603129728796987480139828621645629196153096358337
31361972477333235302546657119690261123738062903024290427579454903002266084744651316174169191685174646494545969600533088525279208347249523547311067410909922354105550629968764215395124935598631134666172511689078563332893556915044948518911348830187636510063850256591643302192856559626391438289506832483872716561656011153151705522295576594497245
47888155323164174532671679788611411653555975883319796380709629988807673036169403177364481404278677842512324499746934213482171795951906982046029971720011748573038897192055974147424530111358697662566077709702256332617011084637847955552585045780588794407560649741279745309184184052075585264622088214836467546522376092107875391904546848523497599
86044943322828073120679922402477507514105890774627334319091255451352225329275913842047384603056163154236552935312278389759446515787337343463172280001031380425481404022090580405056003860937403435068863081434683848900708938565050027569059678069404698435184535134141031615133683043714786642925389717165978629010728400758939700388317742648163725
11327736992682770946534258359611188195509246206215397812119724476262377153445204806981908252494396396225111383117742897853582559083249048049751604710425756975344255151577981560037084723060348475397751368839040431601748624887133931181852302942542567620248568839397083674878845378917257414515591791903539853507720090059497935293945963121344550
33682606900598287177235333752219419155473037420623432628929683970150588921911120492498647920534108723491154309871821600557622090757323046261065977449476583463130255986363150299596723524769439754625302067881933043722848002093053541556406648385693781446031386975634592002334626069959555134847541478911808303298164215874529229526789379256477520
29052675349356673744293182673374571642465407748267901046778759085408130531447176455869894169668940436489952465247443988349583871206296485413357553813419500498743813369062703973874586604296871595820715766599826607317005624465541763024501349159567288942619746144496908671655859782729228702723774835097362901019130417812735773037781804081589136
00520731580694103430500318434934236026924473306001386111978177447266960892832105254311649603342010203260386367253288964833340586220484361657536200146840547664966647356697957295339480913826370332422093083936695498068824049162206314791149464204250002245041342555856193744290525725243632005448744152430730521507049102043407657247686509575117412
54137295316445217655772353486018215668333525205328300001083440087622668438170232356056451582569541773591978136499755596019125677449427179863600458474052092900893973152760243049516538644313881478769775414787574326101598797097588556258067661979730984724607694848211279484279765366070550516391044150225544203297212920330093533566872945959123279
65886376486894188433640548494009574965791657687213927330153555097865114767947399690623184878377515462613823651665956337209345708208301840482797005728071432925727577436229587047361641609731817241594204270366066404089740245521530725227388637241859646455223673260411164598464020010216920823315155388821071527191267876531795071908204525100447821
29131854405481449415186711420710369389112912501275085346633771774937601654345469639004271112982925509683042066572536427947220002083531388370878164995718971762933879485427127688265200376632592456161486874489747151936621927566585246211445740701067538042756418444083480520383826505260169858406008478842242188785692789775181044280547442722945516
74203356864606099779731249504333214252050536757904995207835976504153790011325795360406551726548790221735954441511394292316489506631778130390574620824491719213118641296337046614064569001789423567387755231309527859127745332418554424844844936642107313488191806401892223173021566458134731864499979057816620914698707180393888857812807402263636022
94114354869871402143572055947730892808653678920201935102605361567924483276749476117858316071865710310842200560259545115191391309119544447844361032741876102338843391687589233423790859841968266525610628751237572318491474951945985728897934981791761822652480408237128109790772638864286067917082288575852703470839714561619926247844794692794996845
94563238270229736417350343078319411569824782001329085120287847480586018896004590174597405563073271448767908528886797880997069524068100662561144001498341358088973724684406494885707416768791641322420537365406733018639249791091547478595916386559750709058117592489950221479925094563558251431581446406013428349042279835793965925898520076384564668
16407326819283460077672858762849000688745646392749644159040340336723378144915970329417872941550610541295154001593938516639293256774295575494800466582735796539909402335436446493768272725418736275475329768081903253361410864330842377717389952215367630953020459024386946327028952939944830135775890812148845584938198745059209140672095224690962630
76941753340983698859363700314973728977996360018626500174929290087931189997822963712306642297996163582572600112288983647651418045975770042120833949364659647336464289044499325396227091907373705772051322815957863227591912786054297862953188615559804728160710864132803585400160055575686855791785977899197902656592621283007225351401525973569300729
01539221111686850474040217217444205173800025136100049453411932433166834424312596309881239696220235885839558783168519483312665357735324437993568321526917704224903457453485891381258268136690892947680905263556063811966130606393693841181771354592988431723291223626245886839420288998169356116986542988477651311822766252673997880881601047065154233
50156713537448170862343146625311902910401522629271040992850724188433290072777947541116375521765635893163266360493812184018375128188847711689754794837676640848427536230740195421832179854962606665903479258163423926709478399070629231665350372850197513248138038370708946389254708870390857235810061306286466647100061043521157789266134322146553114
11882596942926284522109026688414975763341554921135581254616558078273470115814006008345762133130389987843270653719956709570847385786092649188858378739239165554263577301292243641604062551736892335636568854365851646207821875741724364525814143487632761341752707376754922276287782264765154315341585713773522730335403376364204258034257264749686217
82366695135341067737842113137113198737322289180527506281227771641249441240120712595431999174657474589258261371282555553508040414394455729599455463560848725133946293635894083209896480161958313042972096479412853938899626536892826380767716875958850221646458243094016500968879736615773356031683671038689522827094150954522274400273549925367021471
59940565448138421863801287999008209335763207363694059914242637182940006137419005795130962985453307481978025683010896728738022348204888629731303696898826406579047815623897784853650256910642317957360253309087632717849111897484322468680863403839641761276057886465744722848249326874430625512205069551684646694771836819114328735448158363505481464
11099960143390595799766290646881295025039150923633011076070632863317393378149693380247580035052789782755750928604039420506342939327064636161031822879248152679306862749237275631852225654266008556849497720285909150930495425967473648331437236349555448901598668408362176913559656039519670425368863482369587129462524759031776813184977588276576740
48255813650210364958550570325921995767533426422378372358605850940358397710347667064478864083110965030256521560746401965271699973237346523717345659551455949309816664400621159934913318013515052865184217882802634332593475585076116869770912558005618568371054085608124951940314806461871940257766328526701969838756756152469675902810686489686929331
59543520976875271372016161609311742501997092896849400346962423256884106651133043774122561762586589412367281711455264238945126317178347902769211714528873529550193367592189080060486337377867281806102547825704367884495035189257874998366947859086129755430841226770609543476121337174331567837901620123372370233383164147064285921859776101582327219
97915062871868186750981665537745013020880333904353639770263363809098526494532628146558065546504823486429495390613257400496912888340518222933644476683855037967975809619983575807027759535968788226194659612223044549275600274955168583542582295336042834426318478068825395450746691877897765406038432512843812811316856204608617289408229658626174420
76692029742793008812951985467871354862323661041321658127926715154596159435259345675744599230788920551954008231640971959125002545523750310673563974883554248044968138303067185193149133578920212360530819995202058450342349993215096263497781245665830468058182456352481462584933192619540688481844644524842948606301616947666324262523147632237110969
53694838244823164103962245076754056142874682678357237048956069906527926884558445120466548533785340266466450423396384882577198749536113004942155937355452119261867214782654168856040949282900566168838076376566905107408925105491652229688786769686316525149177014999000666373445461202627807019256987062255409289451947187780043061300218282874258670
48748480826948573444778244078734102710824870269523830804910960482013901294024631244800159336670212658317677879752965963472576894326540435889267293950687860830626266263287392087327302547910099932113388977807814336728791448768373686467748528777737403547472871644217767820712964506270880978637928144071192505141148004907055608097229299792441471
06285224702987069986922767634177351325860290890387570745436807787642238533370069208961635100923358730398654390607188095255755338036472589500730677212252807817947105648117137855745105769104432292542902414943358839609367932136169695425129973103103280443695450192984382084238312126582574059450942694277730712480217691578183572008717053877325601
79871330055059113778238417916402808414096238208476373930139307784285545452223675598246662506087542848761041456613622276424059143044555808563181809352304077938916149021162924005150749140684432032303656099548786209991943065644553325471355573653185160117003215506907877167520628815278858971494103209869840830489665243510305024446799317791476591
03428949129054120361601695671222140806369405940304552186212879933092856231022418446365289097444640151986623183881962444822590783585914043686193019041458962693878907034982169868696934448086213990534591792826654304798207219634134755646525483143771156678459077797196510772468000293581546267646310224279007313631352522067062951125935874473134186
49249728278479664458544896293290526205806524858870702087938913447608334465317093924240824932800891573131954134831182092775248688054873394331586756266612217935505119060999291137944563499562739189845902902171315570609626788167330294019846423739044509802803094897598125925205585097353743655682578031368190200715167569382728181882458754171072118
08065564480391225045370894226953583821925350756928340956398592655997403913167092900439962759768303752175033608790282956730688622630777297335338536826687345190357097096873223237383004940901232392743187590465263270951784062672648288936468965932191695211063617297570743761480616013311049116922713186094041450148428664236347169828924181804843652
30538864559809839273836490685480823014267803143937440431807822678779494006206489151248952516543005634448375046751754207043313372486870633237561645232360481932024377596890914783372179553676992603235715185513391098402739063753280702313301755754269396202629423910945323537910125948964941812563672992967084250667599803456273455598559628512281414
58255602484178330564524050845006598875598751860133586062493278448777200684229659194551653956298296059161004657890721484205486183041817560455981516808803178308026144599444467791801243214640098361067868341297487259672925878680622308011582202628901436445900230164582366670926557126455992579062230474523562557511177079151200278938097577546854612
10173075227992414070263081377929719094614131458020810877381216245398587696973714258818361526050693809269177120873219150058319771133227935723850719406127612918725720994049302502777481566140213274347438819664133300526342290829064009279449248085561311834401618048013570325078363239389215676431596204426128097009441077761306389090712944563940566
01559246025454204771186140420155233371270501377121034570009578009389265329385720478576508777149663403003562380595757191609382171312222810465858388943507176431939973012661591423837170284400120399485880996231859472474858776584355077006934099220340378772192728370301380838144394114984971730766162961342059105014814283949700695951676939041557902
85635691105554731268457149744963532055467794077518405666763722296909034612870682988710427876109009099916044382179451176362083537971616183312436443126785543555080050798612466439772413550212823802672671991498972724851298128728369748927642079286866697017725979440785815590933250855413129994658111852769165246479081911938423327589769957301209810
30091710016957187916169422700795289151919125210538918385389593151674005057238174010306210043802430111879777042523280732365751296093724560536800375165961642361477093303912244097528717320679761281204280267392565573056759315126457500478757565318548258214115740304731474925119108356157657320025461096867018903076485313738329126824817411813590328
26625082549313211431478953352317043989053928534946642886074268371824902498092479487226633686823799580875637040808655649321905489637785549531167397935270799470452399153297534358690514105864096534514182896474439367182852711843560799285895978176543950113088848419163516673213692860830956744502801800373716458009168082972708715609185038654053436
66004550498562468737602255704159580025017409536183928764345800367086495405794172008513635712716376832349313423070382127448450144052954169537438194545945653316514099099372272280101965465272622783151210346768616682613147184361002551786324795015002295369546631773958934413148148583469437452398115995466607120599779436344018507836089910894807341
96339392593189739409431100421167291201997226266098719270140241058055153151001098049960441472910394510303126641147267368399733150350367427415469926331652704329406752374490750567395089296747791158008643999925648172088474292508215462798560791277686119460862103494055358501344721902445438245210892844094981327170106739664711149318967899776615954
88186193176900175027901783824624387873831483279500879026433992577026588005849778984624295660321276945810824348129690840972550671054732471317254997191901039553305847040728081693158626093886019147689944137673621432083607375131574376316754666479186753896571555100850626810005119827486807780592667765654100834778571024250133253391587384761024129
79473675100116349897780374593002545760987067109215359711517825201428121664754303407512860024029703842861598428981660214342984908891735968219228446912303590432987723184330991418726467460755831872571313883235601580900959418253020779939764846259790188334179383092096584146357441198587829647585094305300814834182174782660377376225299770346875290
35173107920832200380808092121643465868179898105042743753857867891863505177175016065318264069288832501359195171785376878658817523664215340109612957630747626480703127573657877623528590571539324845765039443904966680877118991924989338965248523955367958275306141671317579157563866060048399941795487058682092011951549520312945624513154225065748586
29161606523796643010172693950282294667489681746821163996794950294284013099235901278250437428192557634533217576162292751110598368271567229778620053722932314082887058749444060116236521627717558503013451471452765841864277071769968435499620257547431811994883385806759692359580622165832464092095350648357935817742903018315351290014321495518177456
90838871932069776969565777175449914991143136895083616069253960646989337487094293321918560129910856447025625716350550862068924029758968471428367868473545553358347765253615657818999698306865467173644599634313646819542742049047243306467500144269750832236901308389549263706677840653132866488608012951377172084758115771949101234514177494148277358
00414326673323796177169656985827858323005052658835022478680506482014445705931973433829238600726016965109032589809099128376522753814935298450994149669338628155680313069810645251927038185158726486917625632394414252161184277691450677184117357143966810056154839524431549448642383842989003998261133224689633465221046925451379692760097196453389553
Higher order functions
1> Double = fun(X) -> X * 2 end.
#Fun<erl_eval.6.111823515>

2> Double(2).
4

3> List = [1, 2, 3].
[1,2,3]

4> lists:map(Double, List).
[2,4,6]

5> lists:map(fun(X) -> X + 1 end, List).
[2,3,4]

6> lists:foldl(fun(X, Sum) -> X + Sum end, 0, List).
6
List comprehensions
1> Numbers = [1, 2, 3, 4].
[1,2,3,4]

2> Double = fun(X) -> X * 2 end.
#Fun<erl_eval.6.111823515>

3> lists:map(Double, Numbers).
[2,4,6,8]

4> [Double(X) || X <- Numbers].
[2,4,6,8]

5> [X || X <- Numbers, X > 1, X < 4].
[2,3]

6> Basket = [{pencil, 4, 0.25}, {pen, 1, 1.20}, {paper, 2, 1.00}].
[{pencil,4,0.25},{pen,1,1.2},{paper,2,1.0}]

7> Totals = [{Item, Qty * Price} || {Item, Qty, Price} <- Basket].
[{pencil,1.0},{pen,1.2},{paper,2.0}]
Message loops
-module(doubler).
-export([loop/0]).

loop() ->
  receive
     N ->
       io:format("~b~n", [N * 2]),
       loop()
end.

18> Doubler = spawn(fun doubler:loop/0).
<0.87.0>

19> Doubler ! 2.
4
Synchronous messages
-module(doubler).
-export([loop/0, double/2]).

loop() ->
  receive
     {Pid, N} ->
       Pid ! (N * 2),
       loop()
end.

double(To, N) ->
  To ! {self(), N},
  receive
    Result -> Result
  end.

27> Doubler = spawn(fun doubler:loop/0).
<0.118.0>

28> doubler:double(Doubler, 3).
6
Monitor & restart
-module(monitor).
-export([loop/0, start/0]).

loop() ->
  process_flag(trap_exit, true),
  receive
     new ->
       register(doubler, spawn_link(fun doubler:loop/0)),
       loop();
     {'EXIT', From, Reason} ->
       io:format("~p exited: ~p.", [From, Reason]),
       monitor ! new,
       loop()
end.

start() ->
  register(monitor, spawn(fun monitor:loop/0)),
  monitor ! new.
Pros


Designed for concurrency & fault tolerance
Flexibility of dynamic typing
Lightweight processes with message passing & monitoring
Build scalable applications with the OTP library
Syntax sometimes a little clumsy
Integration with other languages

                       Cons
RubyIoProlog
ScalaErlang
ClojureHaskell
His communication style is often inverted and hard to understand.
He seems too small to make a difference, but it quickly becomes
apparent that there is more to Yoda than meets the eye.
Prefix notation
user=> (+ 2 2)
4

user=> (- 10 4 1)
5

user=> (/ 2.0 3)
0.6666666666666666

user=> (/ 2 3)
2/3

user=> (count "hello")
5

user=> (+ (count "hello") (count "clojure"))
12
Java hiding underneath
user=> (class 1)
java.lang.Integer

user=> (class "foo")
java.lang.String

user=> (class (= 2 2))
java.lang.Boolean

user=> (class (/ 1 2))
clojure.lang.Ratio
Data or code?
user=> (1 2 3)
java.lang.ClassCastException: java.lang.Integer cannot be
cast to clojure.lang.IFn (NO_SOURCE_FILE:0)

user=> (list 1 2 3)
(1 2 3)

user=> (class (list 1 2 3))
clojure.lang.PersistentList

user=> '(1 2 3)
(1 2 3)

user=> (class '(+ 2 2))
clojure.lang.PersistentList

user=> (eval '(+ 2 2))
4
Vectors, sets & maps
user=> (def numbers [1 2 3])
(1 2 3)

user=> (conj numbers "forty-two")
[1 2 3 "forty-two"]

user=> (def crew #{:zaphod :trillian :marvin})
#'user/crew

user=> (clojure.set/union crew #{:ford :zaphod :arthur})
#{:arthur :trillian :ford :zaphod :marvin}

user=> (def home {:arthur :earth, :ford :betelgeuse, :marvin :sirius})
#'user/home

user=> (home :arthur)
:earth

user=> (:arthur home)
:earth
Defining functions
user=> (defn answer [] 42)
#'user/answer

user=> (answer)
42

user=> (defn treble [a] (* 3 a))
#'user/treble

user=> (treble 20)
60
Destructuring params
user=> (def board [[:x :o :x]
                   [:o :x :o]
                   [:o :x :o]])
#'user/board

user=> (defn centre [[_ [_ c _] _]] c)
#'user/centre

user=> (centre board)
:x
Anonymous functions
user=> (defn treble [a] (* 3 a))
#'user/treble

user=> (def numbers [1 2 3])
#'user/numbers

user=> (map treble numbers)
(3 6 9)

user=> (map (fn [n] (* 3 n)) numbers)
(3 6 9)

user=> (map #(* 3 %) numbers)
(3 6 9)
Recursion: loop & recur
user=> (defn size [v]
         (if (empty? v)
            0
            (inc (size (rest v)))))
#'user/size

user=> (size [1 2 3])
3

user=> (defn size [v]
         (loop [l v, c 0]
         (if (empty? l)
           c
           (recur (rest l) (inc c)))))
Working with sequences
user=> (def numbers [1 2 3 4])
#'user/numbers

user=> (every? odd? numbers)
false

user=> (filter odd? numbers)
(1 3)

user=> (for [x numbers] (* 2 x))
(2 4 6 8)

user=> (for [x numbers, y numbers] (* x y))
(1 2 3 4 2 4 6 8 3 6 9 12 4 8 12 16)

user=> (for [x numbers, y numbers, :when (odd? x)]
         (* x y))
(1 2 3 4 3 6 9 12)
Lazy evaluation
user=> (take 5 (cycle ["I" "am" "what"]))
("I" "am" "what" "I" "am")

user=> (take 5 (drop 2 (cycle [1 2 3])))
(3 1 2 3 1)

user=> (->> [1 2 3] (cycle) (drop 2) (take 5))
(3 1 2 3 1)

user=> (take 5 (iterate inc 1))
(1 2 3 4 5)

user=> (defn factorial [n]
         (apply * (take n (iterate inc 1))))
#'user/factorial

user=> (factorial 5)
120
Records & protocols
user=> (defprotocol Shape
  (area [this]))
Shape

user=> (defrecord Square [width height]
  Shape
  (area [this] (* width height)))
user.Square

user=> (defrecord Circle [radius]
  Shape
  (area [this] (* (. Math PI) (* radius radius))))
user.Circle

user=> (area (Square. 2 3))
6

user=> (area (Circle. 4))
50.26548245743669
Macro expansion
user=> (defn unless [test body] (if (not test) body))
#'user/unless

user=> (unless true (println "It's a lie!"))
It's a lie!
nil

user=> (defmacro unless [test body]
        (list 'if (list 'not test) body))
#'user/unless

user=> (macroexpand '(unless condition body))
(if (not condition) body)

user=> (unless true (println "It's a lie!"))
nil

user=> (unless false (println "It's true!"))
It's true!
nil
Transactional memory
user=> (def ford (ref {:name "Ford Prefect", :from "Guildford"}))
#'user/ford

user=> (deref ford)
{:name "Ford Prefect", :from "Guildford"}

user=> @ford
{:name "Ford Prefect", :from "Guildford"}

user=> (alter ford assoc :from "Betelgeuse")
java.lang.IllegalStateException: No transaction running
(NO_SOURCE_FILE:0)

user=> (dosync (alter ford assoc :from "Betelgeuse"))
{:name "Ford Prefect", :from "Betelgeuse"}

user=> @ford
{:name "Ford Prefect", :from "Betelgeuse"}
Encapsulation with atoms
 user=> (def numbers (atom [1 2 3]))
 #'user/numbers

 user=> numbers
 #<Atom@7d98d9cf: [1 2 3]>

 user=> @numbers
 [1 2 3]

 user=> (reset! numbers [4 5 6])
 [4 5 6]

 user=> (swap! numbers conj 7)
 [4 5 6 7]
Agents in the background
 user=> (defn slow-twice [x]
          (do (Thread/sleep 5000) (* 2 x)))
 #'user/slow-twice

 user=> (def number (agent 2))
 #'user/number

 user=> number
 #<Agent@4c825cf3: 2>

 user=> @number
 2

 user=> (send number slow-twice)
 #<Agent@4c825cf3: 2>

 user=> @number
 2

 user=> @number
 4
Back to the futures
user=> (def ultimate-answer
         (future (do
           (Thread/sleep 2.4e17)
           42)))
#'user/ultimate-answer

user=> @ultimate-answer
42
Pros

A good lisp implementation
Access to Java ecosystem
Concurrency provided by STM
Prefix notation can be confusing
(((((and all those parens don’t help)))))
Some limitations compared to other lisps

                 Cons
RubyIoProlog
ScalaErlang
ClojureHaskell
Haskell represents purity and freedom, but the power comes at a
price. Think Spock from Star Trek. His character has a single-minded
purity that has endeared him to generations.
Type inference
Prelude> :set +t
Prelude> 42
42
it :: Integer

Prelude> "Mostly harmless"
"Mostly harmless"
it :: [Char]

Prelude> "black" == "white"
False
it :: Bool

Prelude> 1/2
0.5
it :: Double
Defining functions
Prelude> let double x = x * 2
double :: Num a => a -> a

Prelude> double 4
8

Prelude> double 2.5
5.0

Prelude> let times x y = x * y
times :: Num a => a -> a -> a

Prelude> times 5 6
30
Specifying function types
 module Main where

   double :: Integer -> Integer
   double x = 2 * x

 Prelude> :load main
 [1 of 1] Compiling Main   ( main.hs, interpreted )
 Ok, modules loaded: Main.

 *Main> double 2
 4

 *Main> double 2.5

 <interactive>:1:8:
     No instance for (Fractional Integer)
       arising from the literal `2.5'
Pattern matching & guards
 module Main where

   factorial :: Integer -> Integer
   factorial 0 = 1
   factorial x = x * factorial (x - 1)

   factorial2 :: Integer -> Integer
   factorial2 x
     | x > 1 = x * factorial2 (x - 1)
     | otherwise = 1
Tuples & lists
Prelude> let zaphod = ("Zaphod", "Beeblebrox", "Betelgeuse", 2)
Prelude> let (_, _, _, numberOfHeads) = zaphod

Prelude>   let numbers = [1, 2, 3, 4]
Prelude>   let (head:tail) = numbers
Prelude>   head
1
Prelude>   tail
[2,3,4]

Prelude> 1:[2, 3]
[1,2,3]

Prelude> [1, "two"]
<interactive>:1:2:
    No instance for (Num [Char])
      arising from the literal `1'
    Possible fix: add an instance declaration for (Num [Char])
    In the expression: 1
    In the expression: [1, "two"]
    In an equation for `it': it = [1, "two"]
Ranges & sequences
Prelude> [1..5]
[1,2,3,4,5]

Prelude> [2, 4 .. 10]
[2,4,6,8,10]

Prelude> [0, 0.5 .. 2]
[0.0,0.5,1.0,1.5,2.0]

Prelude> take 5 [1 ..]
[1,2,3,4,5]
List comprehensions
Prelude> let numbers = [1,2,3]

Prelude> [x * 2 | x <- [1, 2, 3]]
[2,4,6]

Prelude> [[x, y] | x <- numbers, y <- numbers]
[[1,1],[1,2],[1,3],[2,1],[2,2],[2,3],[3,1],[3,2],[3,3]]

Prelude> [[x, y] | x <- numbers, y <- numbers, x < y]
[[1,2],[1,3],[2,3]]

Prelude> let more_numbers = [4,5]

Prelude> [(x, y, x * y) | x <- numbers, y <- more_numbers, x < y]
[(1,4,4),(1,5,5),(2,4,8),(2,5,10),(3,4,12),(3,5,15)]
Function currying
Prelude> 4 * 5
20

Prelude> (*) 4 5
20

Prelude> :t (*)
(*) :: Num a => a -> a -> a

Prelude> let double = (* 2)
Prelude> :t double
double :: Integer -> Integer

Prelude> double 3
6
Higher order functions
Prelude> (x -> 2 * x) 5
10

Prelude> map (x -> 2 * x) [1, 2, 3]
[2,4,6]

Prelude> map (* 2) [1, 2, 3]
[2,4,6]

Prelude> filter odd [1, 2, 3, 4]
[1,3]

Prelude> foldl (+) 0 [1, 2, 3, 4]
10
Type classes
class Eq a where
  (==), (/=) :: a -> a -> Bool
    -- Minimal complete definition:
    -- x/=y x==y
  (==) or (/=)
  = not(x==y) = not(x/=y)

*Main> :info Integer
data Integer
  = integer-gmp:GHC.Integer.Type.S# GHC.Prim.Int#
  | integer-gmp:GHC.Integer.Type.J# GHC.Prim.Int#
GHC.Prim.ByteArray#
    -- Defined in integer-gmp:GHC.Integer.Type
instance Enum Integer -- Defined in GHC.Num
instance Eq Integer -- Defined in GHC.Classes
instance Integral Integer -- Defined in GHC.Real
instance Num Integer -- Defined in GHC.Num
instance Ord Integer -- Defined in GHC.Classes
instance Read Integer -- Defined in GHC.Read
instance Real Integer -- Defined in GHC.Real
instance Show Integer -- Defined in GHC.Num
User-defined types
module Main where
  data Shape = Circle Float | Rectangle Float Float
    deriving show
  area :: Shape -> Float
  area (Circle r) = pi * r ^ 2
  area (Rectangle x y) = x * y

*Main> let circle = Circle 10

*Main> let rect = Rectangle 6 7

*Main> area circle
314.15927

*Main> area rect
42.0

*Main> [circle, rect]
[Circle 10.0,Rectangle 6.0 7.0]
Record syntax
module Main where
  data Shape = Circle {radius :: Float}
             | Rectangle {width :: Float, height :: Float}
    deriving Show
  area :: Shape -> Float
  area (Circle r) = pi * r ^ 2
  area (Rectangle x y) = x * y

*Main> let circle = Circle 10

*Main> let rect = Rectangle 6 7

*Main> [circle, rect]
[Circle {radius = 10.0},Rectangle {width = 6.0, height = 7.0}]
Monads
A monad is a construction that, given an underlying type
system, embeds a corresponding type system (called
the monadic type system) into it (that is, each monadic
type acts as the underlying type). This monadic type
system preserves all significant aspects of the
underlying type system, while adding features particular
to the monad.
Monads must obey the following rules:
• (return x) >>= f ≡ f x
• m >>= return ≡ m
• (m >>= f) >>= g ≡ m >>= ( x -> (f x >>= g) )
Monads
A monad is a construction that, given an underlying type
system, embeds a corresponding type system (called
the monadic type system) into it (that is, each monadic
type acts as the underlying type). This monadic type
system preserves all significant aspects of the
underlying type system, while adding features particular
to the monad.
Monads must obey the following rules:
• (return x) >>= f ≡ f x
• m >>= return ≡ m
• (m >>= f) >>= g ≡ m >>= ( x -> (f x >>= g) )
The maybe monad
data Maybe a = Nothing | Just a

Prelude> case (html doc) of
           Nothing -> Nothing
           Just x -> case body x of
             Nothing -> Nothing
             Just y -> paragraph 2 y

instance Monad Maybe where
  return         = Just
  Nothing >>= f = Nothing
  (Just x) >>= f = f x

Prelude> Just someWebPage >>= html >>= body
           >>= paragraph >>= return
Pros

Pure functional language with no side effects
Strong typing with powerful type inference
Laziness reduces need for recursion
Ideal for learning the functional paradigm
 Inflexibility and lack of compromise
Small community outside academia
Steep learning curve (especially monads!)

                   Cons
What I learned from
Seven Languages
in Seven Weeks
Functional style
def total_price(widgets)
  total = 0

  widgets.each do |widget|
    if widget.red?
      total += widget.price
    end
  end
  total
end

def total_price(widgets)
  widgets.select{|w| w.red?}.map{|w| w.price}.reduce(&:+)
end
JVM or standalone?

• Access to Java libraries
• Deployment environments
• Escape route for Java developers
• Limitations (eg tail recursion)
Know what’s out there

• Languages
• Features
   • First-class functions
   • List comprehensions
   • Pattern matching
   • Lazy evaluation
Dealing with concurrency

  • Immutability
  • Coroutines
  • Actors
  • Futures
  • Software Transactional Memory
Credits


http://pragprog.com/book/btlang/seven-languages-in-seven-weeks

http://www.flickr.com/photos/oskay/472097903/

http://www.flickr.com/photos/clairedancer/273214248

More Related Content

What's hot

ZIO Prelude - ZIO World 2021
ZIO Prelude - ZIO World 2021ZIO Prelude - ZIO World 2021
ZIO Prelude - ZIO World 2021Jorge Vásquez
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to PythonUC San Diego
 
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
JDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation streamJDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation stream
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation streamRuslan Shevchenko
 
Haskell in the Real World
Haskell in the Real WorldHaskell in the Real World
Haskell in the Real Worldosfameron
 
ハイブリッド言語Scalaを使う
ハイブリッド言語Scalaを使うハイブリッド言語Scalaを使う
ハイブリッド言語Scalaを使うbpstudy
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick touraztack
 
groovy databases
groovy databasesgroovy databases
groovy databasesPaul King
 
Nik Graf - Get started with Reason and ReasonReact
Nik Graf - Get started with Reason and ReasonReactNik Graf - Get started with Reason and ReasonReact
Nik Graf - Get started with Reason and ReasonReactOdessaJS Conf
 
A Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsA Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsMichael Pirnat
 
dotSwift 2016 : Beyond Crusty - Real-World Protocols
dotSwift 2016 : Beyond Crusty - Real-World ProtocolsdotSwift 2016 : Beyond Crusty - Real-World Protocols
dotSwift 2016 : Beyond Crusty - Real-World ProtocolsRob Napier
 
Postobjektové programovanie v Ruby
Postobjektové programovanie v RubyPostobjektové programovanie v Ruby
Postobjektové programovanie v RubyJano Suchal
 
Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?osfameron
 

What's hot (20)

ZIO Prelude - ZIO World 2021
ZIO Prelude - ZIO World 2021ZIO Prelude - ZIO World 2021
ZIO Prelude - ZIO World 2021
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
JDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation streamJDays Lviv 2014:  Java8 vs Scala:  Difference points & innovation stream
JDays Lviv 2014: Java8 vs Scala: Difference points & innovation stream
 
Potential Friend Finder
Potential Friend FinderPotential Friend Finder
Potential Friend Finder
 
Haskell in the Real World
Haskell in the Real WorldHaskell in the Real World
Haskell in the Real World
 
ハイブリッド言語Scalaを使う
ハイブリッド言語Scalaを使うハイブリッド言語Scalaを使う
ハイブリッド言語Scalaを使う
 
Ruby Language - A quick tour
Ruby Language - A quick tourRuby Language - A quick tour
Ruby Language - A quick tour
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
groovy databases
groovy databasesgroovy databases
groovy databases
 
PubNative Tracker
PubNative TrackerPubNative Tracker
PubNative Tracker
 
Nik Graf - Get started with Reason and ReasonReact
Nik Graf - Get started with Reason and ReasonReactNik Graf - Get started with Reason and ReasonReact
Nik Graf - Get started with Reason and ReasonReact
 
Swift tips and tricks
Swift tips and tricksSwift tips and tricks
Swift tips and tricks
 
A Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsA Few of My Favorite (Python) Things
A Few of My Favorite (Python) Things
 
Why Learn Python?
Why Learn Python?Why Learn Python?
Why Learn Python?
 
dotSwift 2016 : Beyond Crusty - Real-World Protocols
dotSwift 2016 : Beyond Crusty - Real-World ProtocolsdotSwift 2016 : Beyond Crusty - Real-World Protocols
dotSwift 2016 : Beyond Crusty - Real-World Protocols
 
Scala vs java 8
Scala vs java 8Scala vs java 8
Scala vs java 8
 
Postobjektové programovanie v Ruby
Postobjektové programovanie v RubyPostobjektové programovanie v Ruby
Postobjektové programovanie v Ruby
 
Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?
 
Java VS Python
Java VS PythonJava VS Python
Java VS Python
 
Scala on Android
Scala on AndroidScala on Android
Scala on Android
 

Viewers also liked

Javasccript MV* frameworks
Javasccript MV* frameworksJavasccript MV* frameworks
Javasccript MV* frameworksKerry Buckley
 
Testing http calls with Webmock and VCR
Testing http calls with Webmock and VCRTesting http calls with Webmock and VCR
Testing http calls with Webmock and VCRKerry Buckley
 
Adastral Park code retreat introduction
Adastral Park code retreat introductionAdastral Park code retreat introduction
Adastral Park code retreat introductionKerry Buckley
 
Single Responsibility Principle @ Clean Code Alliance Meetup
Single Responsibility Principle @ Clean Code Alliance MeetupSingle Responsibility Principle @ Clean Code Alliance Meetup
Single Responsibility Principle @ Clean Code Alliance MeetupEyal Golan
 

Viewers also liked (7)

Javasccript MV* frameworks
Javasccript MV* frameworksJavasccript MV* frameworks
Javasccript MV* frameworks
 
BDD with cucumber
BDD with cucumberBDD with cucumber
BDD with cucumber
 
TDD refresher
TDD refresherTDD refresher
TDD refresher
 
Testing http calls with Webmock and VCR
Testing http calls with Webmock and VCRTesting http calls with Webmock and VCR
Testing http calls with Webmock and VCR
 
Adastral Park code retreat introduction
Adastral Park code retreat introductionAdastral Park code retreat introduction
Adastral Park code retreat introduction
 
Jasmine
JasmineJasmine
Jasmine
 
Single Responsibility Principle @ Clean Code Alliance Meetup
Single Responsibility Principle @ Clean Code Alliance MeetupSingle Responsibility Principle @ Clean Code Alliance Meetup
Single Responsibility Principle @ Clean Code Alliance Meetup
 

Similar to 7li7w devcon5

Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesMatt Harrison
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)Pavlo Baron
 
Thinking Functionally In Ruby
Thinking Functionally In RubyThinking Functionally In Ruby
Thinking Functionally In RubyRoss Lawley
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?Tomasz Wrobel
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghStuart Roebuck
 
Slides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersSlides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersGiovanni924
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfsagar414433
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfsagar414433
 
Pre-Bootcamp introduction to Elixir
Pre-Bootcamp introduction to ElixirPre-Bootcamp introduction to Elixir
Pre-Bootcamp introduction to ElixirPaweł Dawczak
 

Similar to 7li7w devcon5 (20)

An introduction to Ruby
An introduction to RubyAn introduction to Ruby
An introduction to Ruby
 
Elixir and OTP Apps introduction
Elixir and OTP Apps introductionElixir and OTP Apps introduction
Elixir and OTP Apps introduction
 
Learn 90% of Python in 90 Minutes
Learn 90% of Python in 90 MinutesLearn 90% of Python in 90 Minutes
Learn 90% of Python in 90 Minutes
 
Ruby basics
Ruby basicsRuby basics
Ruby basics
 
A bit about Scala
A bit about ScalaA bit about Scala
A bit about Scala
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 
Ruby
RubyRuby
Ruby
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 
Elm: give it a try
Elm: give it a tryElm: give it a try
Elm: give it a try
 
Thinking Functionally In Ruby
Thinking Functionally In RubyThinking Functionally In Ruby
Thinking Functionally In Ruby
 
(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?(How) can we benefit from adopting scala?
(How) can we benefit from adopting scala?
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup Edinburgh
 
Slides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersSlides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammers
 
Ruby 101
Ruby 101Ruby 101
Ruby 101
 
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
 
Python 101 1
Python 101   1Python 101   1
Python 101 1
 
Pre-Bootcamp introduction to Elixir
Pre-Bootcamp introduction to ElixirPre-Bootcamp introduction to Elixir
Pre-Bootcamp introduction to Elixir
 

More from Kerry Buckley

Ruby nooks & crannies
Ruby nooks & cranniesRuby nooks & crannies
Ruby nooks & cranniesKerry Buckley
 
Tdd for BT E2E test community
Tdd for BT E2E test communityTdd for BT E2E test community
Tdd for BT E2E test communityKerry Buckley
 
MongoMapper lightning talk
MongoMapper lightning talkMongoMapper lightning talk
MongoMapper lightning talkKerry Buckley
 
The secret life of bees
The secret life of beesThe secret life of bees
The secret life of beesKerry Buckley
 
Background processing
Background processingBackground processing
Background processingKerry Buckley
 
Katas, Contests and Coding Dojos
Katas, Contests and Coding DojosKatas, Contests and Coding Dojos
Katas, Contests and Coding DojosKerry Buckley
 
Kanban and Iterationless Working
Kanban and Iterationless WorkingKanban and Iterationless Working
Kanban and Iterationless WorkingKerry Buckley
 
Software Development Trends
Software Development TrendsSoftware Development Trends
Software Development TrendsKerry Buckley
 
Kanban and Iterationless Working
Kanban and Iterationless WorkingKanban and Iterationless Working
Kanban and Iterationless WorkingKerry Buckley
 
Behaviour-Driven Development
Behaviour-Driven DevelopmentBehaviour-Driven Development
Behaviour-Driven DevelopmentKerry Buckley
 
REST: putting the web back in to web services
REST: putting the web back in to web servicesREST: putting the web back in to web services
REST: putting the web back in to web servicesKerry Buckley
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with SeleniumKerry Buckley
 

More from Kerry Buckley (19)

Ruby nooks & crannies
Ruby nooks & cranniesRuby nooks & crannies
Ruby nooks & crannies
 
Tdd for BT E2E test community
Tdd for BT E2E test communityTdd for BT E2E test community
Tdd for BT E2E test community
 
Functional ruby
Functional rubyFunctional ruby
Functional ruby
 
MongoMapper lightning talk
MongoMapper lightning talkMongoMapper lightning talk
MongoMapper lightning talk
 
Cloud
CloudCloud
Cloud
 
The secret life of bees
The secret life of beesThe secret life of bees
The secret life of bees
 
Background processing
Background processingBackground processing
Background processing
 
Katas, Contests and Coding Dojos
Katas, Contests and Coding DojosKatas, Contests and Coding Dojos
Katas, Contests and Coding Dojos
 
Rack
RackRack
Rack
 
Doing REST Right
Doing REST RightDoing REST Right
Doing REST Right
 
Kanban and Iterationless Working
Kanban and Iterationless WorkingKanban and Iterationless Working
Kanban and Iterationless Working
 
Software Development Trends
Software Development TrendsSoftware Development Trends
Software Development Trends
 
TDD
TDDTDD
TDD
 
Kanban and Iterationless Working
Kanban and Iterationless WorkingKanban and Iterationless Working
Kanban and Iterationless Working
 
TDD, BDD and mocks
TDD, BDD and mocksTDD, BDD and mocks
TDD, BDD and mocks
 
Behaviour-Driven Development
Behaviour-Driven DevelopmentBehaviour-Driven Development
Behaviour-Driven Development
 
REST: putting the web back in to web services
REST: putting the web back in to web servicesREST: putting the web back in to web services
REST: putting the web back in to web services
 
Git
GitGit
Git
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 

Recently uploaded

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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

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?
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

7li7w devcon5