SlideShare a Scribd company logo
1 of 51
Download to read offline
EMERGING
PROGRAMMING
LANGUAGES
A TOUR OF THE HORIZON




ALEX PAYNE
PHILLY ETE 2012
?  WHY
   NEW
LANGUAGES
?
WHAT'S
 NEXT
SCALA
CLOJURE
   F#
HASKELL
ERLANG
   …
R
GROOVY
   D
FANTOM
  LUA
   …
DIFFERENT
LANGUAGES
    FOR
DIFFERENT
   JOBS
JOB:
BETTER
 JAVA
KOTLIN
JAVA++ (OR SCALA--?) FROM JETBRAINS


fun main(args: Array<String>) {
  for (name in args)
   println("Hello, $name!")
}



  STATIC • OOP • GENERICS • CLOSURES
GOSU
"A PRAGMATIC LANGUAGE FOR THE JVM"
strings = {"this", "otter", "other"}

bigStrings   = strings
 .where(    s -> s.length() > 4 )
 .map(  s   -> s.toUpperCase() )
 .orderBy(    s -> s)

bigStrings // {"OTHER", "OTTER"}

   STATIC • OOP • GENERICS • CLOSURES
CEYLON
          REDHAT'S UPDATED JAVA

class Parent(String name) {
    shared String name = name;
    shared class Child(String name) {
        shared String name = outer.name + "/" + name;
        shared Parent parent { return outer; }
    }
}




  STATIC • OOP • GENERICS • INTERCEPTORS
JOB:
  BETTER
JAVASCRIPT
STRATIFIEDJS
 "JAVASCRIPT + STRUCTURED CONCURRENCY"
var response;

waitfor {
  response = http.get('http://bbc.com');
} or {
  response http.get('http://cnn.com');
}

display(response);

      CONCURRENT • ASYNCHRONOUS
COFFEESCRIPT
     JAVASCRIPT, THE GOOD PARTS

Account = (customer, cart) ->
 @customer = customer
 @cart = cart

 $('.shopping_cart').bind('click', (e) =>
   @customer.purchase @cart
 )


    SOURCE-TO-SOURCE TRANSLATION
OBJECTIVE-J
              OBJECTIVE-C → JAVASCRIPT
@import <Foundation/CPString.j>

@implementation CPString (Reversing)

- (CPString)reverse
{
    var reversedString = "",
        index = [self length];

       while(index--)
           reversedString += [self characterAtIndex:index];

       return reversedString;
}

@end


              DYNAMIC • OOP • CATEGORIES
CLOJURESCRIPT
             CLOJURE → JAVASCRIPT

(defmethod effect :swipe [element m]
  (let [{:keys [start end time accel]} (standardize element m)]
    (goog.fx.dom.Swipe. element
                        (apply array start)
                        (apply array end)
                        time
                        accel)))




           DYNAMIC • FUNCTIONAL • LISP
DART
  GOOGLE'S JAVASCRIPT REPLACEMENT

class Point {
  num x, y;
  Point(num this.x, num this.y);
  Point scale(num factor) => new Point(x*factor, y*factor);
  num distance() => Math.sqrt(x*x + y*y);
}

void main() {
  Point a = new Point(2,3).scale(10);
  print(a.distance());
}




   CLASSES • GENERICS • OPTIONAL TYPING
ROY
    FUNCTIONAL CODE INTO JAVASCRIPT
let traceMonad = {
  return: x ->
    console.log "Return:" x
    x
  bind: x f ->
    console.log "Binding:" x
    f x
}

console.log (do traceMonad
  w <- 1
  let x = 2
  y <- 3
  z <- 4
  return w + x + y + z
)



 MONADS • TYPE INFERENCE • PATTERN MATCHING
JOB:
    WEB
DEVELOPMENT
OPA
   "A UNIFIED PLATFORM FOR WEB APPS"

function user_update(message x) {
    line = <div class="row line">
              <div class="span1 columns userpic" />
              <div class="span2 columns user">{x.author}:</div>
              <div class="span13 columns message">{x.text}</div>
            </div>;
    #conversation =+ line;
    Dom.scroll_to_bottom(#conversation);
}




     SOURCE-TO-SOURCE • OOP • METACLASSES
UR/WEB
          "A DSL FOR WEB APPLICATIONS"

and imHere () =
    userO <- getCookie username;
    case userO of
        None => return <xml>You don't have a cookie set!</xml>
      | Some user =>
        dml (DELETE FROM lastVisit WHERE User = {[user]});
        dml (INSERT INTO lastVisit (User, When) VALUES ({[user]}, CURRENT_TIMESTAMP));
        main ()




     FUNCTIONAL • STATIC • METAPROGRAMMING
JOB:
  SYSTEMS
PROGRAMMING
GO
             REVENGE OF THE 1970s!
var sem = make(chan int, MaxOutstanding)

func handle(r *Request) {
    sem <- 1    // Wait for active queue to drain.
    process(r) // May take a long time.
    <-sem       // Done; enable next request to run.
}

func Serve(queue chan *Request) {
    for {
        req := <-queue
        go handle(req) // Don't wait for handle to finish.
    }
}


COMPILED • CONCURRENT • GARBAGE COLLECTED
RUST
      "SAFE, CONCURRENT, PRACTICAL"

fn stringifier(from_parent: comm::port<uint>,
               to_parent: comm::chan<str>) {
    let mut value: uint;

    do {
        value = comm::recv(from_parent);
        comm::send(to_parent, uint::to_str(value, 10u));
    } while value != 0u;
}




      COMPILED • OOP • FUNCTIONAL • STATIC
OOC
 C + OBJECTS + MORE, COMPILING TO C99
main: func {
  number := 42 // alloc an int on the stack
  printf("number is %dn", number)
  add(number&, 3)
  printf("number is now %dn", number)
}

add: func (ptr: Int@, value: Int) {
  ptr += value
}


    SOURCE-TO-SOURCE • OOP • METACLASSES
JOB:
  DYNAMIC
PROGRAMMING
FANCY
  A DYNAMIC LANGUAGE ON RUBINIUS VM
require: "sinatra.fy"

configure: 'production with: {
  disable: 'show_errors
  enable: 'logging
}

before: {
  "incoming request: #{request inspect}" println
}

def page: text {
  """
  <h1>#{text}</h1>
  """
}

get: "/:p" do: |param| {
  page: "Fancy web page: #{param}"
}


                        DYNAMIC • OOP • ACTORS
SLATE
                     A MODERN SMALLTALK


s@(Sequence traits) isPalindrome
[
   s isEmpty
     ifTrue: [True]
     ifFalse: [(s first = s last) / [(s sliceFrom: 1 to: s indexLast - 1) isPalindrome]]
].




    DYNAMIC • PROTOTYPES • STREAMS • MACROS
ELIXIR
 "MODERN PROGRAMMING FOR THE ERLANG VM"
defmodule Hygiene do
  defmacro interference do
    quote do: var!(a) = 1
  end
end

defmodule HygieneTest do
  def go do
    require Hygiene
    a = 13
    Hygiene.interference
    a
  end
end


   DYNAMIC • PROTOCOLS • RECORDS • MACROS
JOB:
TECHNICAL
COMPUTING
FRINK
"MAKE PHYSICAL CALCULATIONS SIMPLE"
earthpower = sunpower / (4 pi sundist^2)

chargerate = earthpower 12 ft^2
chargerate -> watts
1530.1602

2 ton 7 feet gravity / chargerate -> sec
24.80975

(225 + 135) pounds 15000 feet gravity / chargerate -> minutes
59.809235




            EMBEDDABLE • OOP • UNICODE
JULIA
"HIGH-LEVEL, HIGH-PERFORMANCE TECHNICAL COMPUTING"




       DYNAMIC • COMPILED • PARALLEL
FAUST
            A LANGUAGE FOR DSP AND SYNTHESIS


import["math.lib"];

delay[n,d,x] = x@(int(d)&(n=1));
msec = SR/1000.0;

duration = hslider("millisecond", 0, 0, 1000, 0.10) * msec : int;
feedback = [hslider("feedback", 0, 0, 100, 0.1) / 100.0];

echo = vgroup("echo", +-(delay(SR, duration) * feedback));

process = vgroup["stereo echo", [echo, echo]);




   FUNCTIONAL • SOURCE-TO-SOURCE COMPILED
JOB:
QUERYING
  DATA
BANDICOOT
         A LANGUAGE FOR SET ALGEBRA
# selects fiction books from the input
fn Fiction(b: Books): Books
{
    return b select(genre == "Fiction");
}

# calculates an average price of fiction books
fn FictionPrice(b: Books): rel {avgPrice: real}
{
    # use of a temporary variable and a chained statement
    res := b select(genre == "Fiction")
             summary(avgPrice = avg(price, 0.0));

    return res;
}


     RELATIONAL • PERSISTENCY • DISTRIBUTED
QUIRREL
          A LANGUAGE FOR ANALYTICS

clicks := load(//clicks)
views := load(//views)
clickthroughRate('page) :=
  {page: 'page, ctr: count(clicks where clicks.pageId = 'page) /
                     count(views where views.pageId = 'page)}
clickthroughRate

[{"page":"page-4","ctr":0.5555555555555555555555555555555556},
 {"page":"page-1","ctr":2.076923076923076923076923076923077}, ...]




    DECLARATIVE • FUNCTIONAL • COMPOSABLE
JOB:
MAKE
 YOU
THINK
WHEELER
                   "DIFFERENT"
transition (pattern print (string)) (action STDOUT)
print "Hello, world!"
// Hello World
"Hello, world!" print
// Hello World

transition (pattern fast car) (action print "ZOOM ZOOM")
fast car
// ZOOM ZOOM
car fast
// ZOOM ZOOM



   NO VARIABLES • NO FUNCTIONS • NO OBJECTS
KODU
PROGRAMMING FOR KIDS, ON XBOX




  VISUAL • INTERACTIVE • ITERATIVE
WHEW!
JOBS:
     BETTER JAVA
  BETTER JAVASCRIPT
  WEB DEVELOPMENT
SYSTEMS PROGRAMMING
DYNAMIC PROGRAMMING
TECHNICAL COMPUTING
    QUERYING DATA
  MAKING YOU THINK
          …
PLATFORMS:
       JVM
        CLR
JAVASCRIPT (V8, ETC.)
     RUBINIUS
       LLVM
    ERLANG VM
       PHP
       XBOX
         …
EXPLORE.
EXPERIMENT.
  COMMIT.
   LOOP.
FIN.
EMERGINGLANGS.COM
@EMERGINGLANGS

More Related Content

What's hot

RxJS Evolved
RxJS EvolvedRxJS Evolved
RxJS Evolvedtrxcllnt
 
Aplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & JetpackAplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & JetpackNelson Glauber Leal
 
Atomically { Delete Your Actors }
Atomically { Delete Your Actors }Atomically { Delete Your Actors }
Atomically { Delete Your Actors }John De Goes
 
The basics and design of lua table
The basics and design of lua tableThe basics and design of lua table
The basics and design of lua tableShuai Yuan
 
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...Philip Schwarz
 
Talk KVO with rac by Philippe Converset
Talk KVO with rac by Philippe ConversetTalk KVO with rac by Philippe Converset
Talk KVO with rac by Philippe ConversetCocoaHeads France
 
Aplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & JetpackAplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & JetpackNelson Glauber Leal
 
Utilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and OperationsUtilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and OperationsNeo4j
 
Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio
 
GPars For Beginners
GPars For BeginnersGPars For Beginners
GPars For BeginnersMatt Passell
 
Time Series Meetup: Virtual Edition | July 2020
Time Series Meetup: Virtual Edition | July 2020Time Series Meetup: Virtual Edition | July 2020
Time Series Meetup: Virtual Edition | July 2020InfluxData
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinAndrey Breslav
 
Learn JavaScript by modeling Rubik Cube
Learn JavaScript by modeling Rubik CubeLearn JavaScript by modeling Rubik Cube
Learn JavaScript by modeling Rubik CubeManoj Kumar
 
ZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaWiem Zine Elabidine
 

What's hot (20)

RxJS Evolved
RxJS EvolvedRxJS Evolved
RxJS Evolved
 
Aplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & JetpackAplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & Jetpack
 
Hands on lua
Hands on luaHands on lua
Hands on lua
 
Atomically { Delete Your Actors }
Atomically { Delete Your Actors }Atomically { Delete Your Actors }
Atomically { Delete Your Actors }
 
Lua first steps
Lua first stepsLua first steps
Lua first steps
 
The basics and design of lua table
The basics and design of lua tableThe basics and design of lua table
The basics and design of lua table
 
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
 
ES6: Features + Rails
ES6: Features + RailsES6: Features + Rails
ES6: Features + Rails
 
Your JavaScript Library
Your JavaScript LibraryYour JavaScript Library
Your JavaScript Library
 
Talk KVO with rac by Philippe Converset
Talk KVO with rac by Philippe ConversetTalk KVO with rac by Philippe Converset
Talk KVO with rac by Philippe Converset
 
ZIO Queue
ZIO QueueZIO Queue
ZIO Queue
 
Aplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & JetpackAplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & Jetpack
 
Utilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and OperationsUtilizing Powerful Extensions for Analytics and Operations
Utilizing Powerful Extensions for Analytics and Operations
 
Luis Atencio on RxJS
Luis Atencio on RxJSLuis Atencio on RxJS
Luis Atencio on RxJS
 
GPars For Beginners
GPars For BeginnersGPars For Beginners
GPars For Beginners
 
Map kit light
Map kit lightMap kit light
Map kit light
 
Time Series Meetup: Virtual Edition | July 2020
Time Series Meetup: Virtual Edition | July 2020Time Series Meetup: Virtual Edition | July 2020
Time Series Meetup: Virtual Edition | July 2020
 
JVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in KotlinJVMLS 2016. Coroutines in Kotlin
JVMLS 2016. Coroutines in Kotlin
 
Learn JavaScript by modeling Rubik Cube
Learn JavaScript by modeling Rubik CubeLearn JavaScript by modeling Rubik Cube
Learn JavaScript by modeling Rubik Cube
 
ZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in ScalaZIO: Powerful and Principled Functional Programming in Scala
ZIO: Powerful and Principled Functional Programming in Scala
 

Viewers also liked

The perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that mattersThe perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that mattersAlex Payne
 
Splitting up your web app
Splitting up your web appSplitting up your web app
Splitting up your web appAlex Payne
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at TwitterAlex Payne
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scalapramode_ce
 

Viewers also liked (6)

The perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that mattersThe perils and rewards of working on stuff that matters
The perils and rewards of working on stuff that matters
 
Splitting up your web app
Splitting up your web appSplitting up your web app
Splitting up your web app
 
Power of data
Power of dataPower of data
Power of data
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Why Scala?
Why Scala?Why Scala?
Why Scala?
 
Introduction to Functional Programming with Scala
Introduction to Functional Programming with ScalaIntroduction to Functional Programming with Scala
Introduction to Functional Programming with Scala
 

Similar to Emerging Languages: A Tour of the Horizon

Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...GeeksLab Odessa
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and MonoidsHugo Gävert
 
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsPlaying With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsMike Hagedorn
 
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiMonitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiInfluxData
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable CodeBaidu, Inc.
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016Ben Lesh
 
CS101- Introduction to Computing- Lecture 35
CS101- Introduction to Computing- Lecture 35CS101- Introduction to Computing- Lecture 35
CS101- Introduction to Computing- Lecture 35Bilal Ahmed
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: ServersidenessWebExpo
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghStuart Roebuck
 
Aplicações assíncronas no Android com Coroutines & Jetpack
Aplicações assíncronas no Android com Coroutines & JetpackAplicações assíncronas no Android com Coroutines & Jetpack
Aplicações assíncronas no Android com Coroutines & JetpackNelson Glauber Leal
 
Programming the cloud with Skywriting
Programming the cloud with SkywritingProgramming the cloud with Skywriting
Programming the cloud with SkywritingDerek Murray
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloadingkinan keshkeh
 
Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...
Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...
Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...Víctor Bolinches
 
Extreme Swift
Extreme SwiftExtreme Swift
Extreme SwiftMovel
 

Similar to Emerging Languages: A Tour of the Horizon (20)

Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
 
Introduction to Scalding and Monoids
Introduction to Scalding and MonoidsIntroduction to Scalding and Monoids
Introduction to Scalding and Monoids
 
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsPlaying With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
 
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiMonitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable Code
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
CppTutorial.ppt
CppTutorial.pptCppTutorial.ppt
CppTutorial.ppt
 
Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016Async Redux Actions With RxJS - React Rally 2016
Async Redux Actions With RxJS - React Rally 2016
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
ES6: The Awesome Parts
ES6: The Awesome PartsES6: The Awesome Parts
ES6: The Awesome Parts
 
CS101- Introduction to Computing- Lecture 35
CS101- Introduction to Computing- Lecture 35CS101- Introduction to Computing- Lecture 35
CS101- Introduction to Computing- Lecture 35
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: Serversideness
 
Scala @ TechMeetup Edinburgh
Scala @ TechMeetup EdinburghScala @ TechMeetup Edinburgh
Scala @ TechMeetup Edinburgh
 
Aplicações assíncronas no Android com Coroutines & Jetpack
Aplicações assíncronas no Android com Coroutines & JetpackAplicações assíncronas no Android com Coroutines & Jetpack
Aplicações assíncronas no Android com Coroutines & Jetpack
 
Programming the cloud with Skywriting
Programming the cloud with SkywritingProgramming the cloud with Skywriting
Programming the cloud with Skywriting
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
 
Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...
Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...
Paradigma FP y OOP usando técnicas avanzadas de Programación | Programacion A...
 
Extreme Swift
Extreme SwiftExtreme Swift
Extreme Swift
 
mobl
moblmobl
mobl
 

More from Alex Payne

Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in ScalaAlex Payne
 
Speedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional LanguagesSpeedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional LanguagesAlex Payne
 
Mind The Tools
Mind The ToolsMind The Tools
Mind The ToolsAlex Payne
 
Strange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in ComputingStrange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in ComputingAlex Payne
 
The Business Value of Twitter
The Business Value of TwitterThe Business Value of Twitter
The Business Value of TwitterAlex Payne
 
Twitter API 2.0
Twitter API 2.0Twitter API 2.0
Twitter API 2.0Alex Payne
 
The Interaction Design Of APIs
The Interaction Design Of APIsThe Interaction Design Of APIs
The Interaction Design Of APIsAlex Payne
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?Alex Payne
 
The Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to AdobeThe Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to AdobeAlex Payne
 
Protecting Public Hotspots
Protecting Public HotspotsProtecting Public Hotspots
Protecting Public HotspotsAlex Payne
 
Twitter at BarCamp 2008
Twitter at BarCamp 2008Twitter at BarCamp 2008
Twitter at BarCamp 2008Alex Payne
 
Securing Rails
Securing RailsSecuring Rails
Securing RailsAlex Payne
 
Designing Your API
Designing Your APIDesigning Your API
Designing Your APIAlex Payne
 
Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007Alex Payne
 

More from Alex Payne (14)

Building Distributed Systems in Scala
Building Distributed Systems in ScalaBuilding Distributed Systems in Scala
Building Distributed Systems in Scala
 
Speedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional LanguagesSpeedy, Stable, and Secure: Better Web Apps Through Functional Languages
Speedy, Stable, and Secure: Better Web Apps Through Functional Languages
 
Mind The Tools
Mind The ToolsMind The Tools
Mind The Tools
 
Strange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in ComputingStrange Loop 2009 Keynote: Minimalism in Computing
Strange Loop 2009 Keynote: Minimalism in Computing
 
The Business Value of Twitter
The Business Value of TwitterThe Business Value of Twitter
The Business Value of Twitter
 
Twitter API 2.0
Twitter API 2.0Twitter API 2.0
Twitter API 2.0
 
The Interaction Design Of APIs
The Interaction Design Of APIsThe Interaction Design Of APIs
The Interaction Design Of APIs
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
 
The Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to AdobeThe Twitter API: A Presentation to Adobe
The Twitter API: A Presentation to Adobe
 
Protecting Public Hotspots
Protecting Public HotspotsProtecting Public Hotspots
Protecting Public Hotspots
 
Twitter at BarCamp 2008
Twitter at BarCamp 2008Twitter at BarCamp 2008
Twitter at BarCamp 2008
 
Securing Rails
Securing RailsSecuring Rails
Securing Rails
 
Designing Your API
Designing Your APIDesigning Your API
Designing Your API
 
Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007Scaling Twitter - Railsconf 2007
Scaling Twitter - Railsconf 2007
 

Recently uploaded

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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Recently uploaded (20)

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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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?
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

Emerging Languages: A Tour of the Horizon

  • 1. EMERGING PROGRAMMING LANGUAGES A TOUR OF THE HORIZON ALEX PAYNE PHILLY ETE 2012
  • 2.
  • 3. ? WHY NEW LANGUAGES
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 12. SCALA CLOJURE F# HASKELL ERLANG …
  • 13. R GROOVY D FANTOM LUA …
  • 14. DIFFERENT LANGUAGES FOR DIFFERENT JOBS
  • 16. KOTLIN JAVA++ (OR SCALA--?) FROM JETBRAINS fun main(args: Array<String>) { for (name in args) println("Hello, $name!") } STATIC • OOP • GENERICS • CLOSURES
  • 17. GOSU "A PRAGMATIC LANGUAGE FOR THE JVM" strings = {"this", "otter", "other"} bigStrings = strings .where( s -> s.length() > 4 ) .map( s -> s.toUpperCase() ) .orderBy( s -> s) bigStrings // {"OTHER", "OTTER"} STATIC • OOP • GENERICS • CLOSURES
  • 18. CEYLON REDHAT'S UPDATED JAVA class Parent(String name) {     shared String name = name;     shared class Child(String name) {         shared String name = outer.name + "/" + name;         shared Parent parent { return outer; }     } } STATIC • OOP • GENERICS • INTERCEPTORS
  • 20. STRATIFIEDJS "JAVASCRIPT + STRUCTURED CONCURRENCY" var response; waitfor { response = http.get('http://bbc.com'); } or { response http.get('http://cnn.com'); } display(response); CONCURRENT • ASYNCHRONOUS
  • 21. COFFEESCRIPT JAVASCRIPT, THE GOOD PARTS Account = (customer, cart) -> @customer = customer @cart = cart $('.shopping_cart').bind('click', (e) => @customer.purchase @cart ) SOURCE-TO-SOURCE TRANSLATION
  • 22. OBJECTIVE-J OBJECTIVE-C → JAVASCRIPT @import <Foundation/CPString.j> @implementation CPString (Reversing) - (CPString)reverse { var reversedString = "", index = [self length]; while(index--) reversedString += [self characterAtIndex:index]; return reversedString; } @end DYNAMIC • OOP • CATEGORIES
  • 23. CLOJURESCRIPT CLOJURE → JAVASCRIPT (defmethod effect :swipe [element m]   (let [{:keys [start end time accel]} (standardize element m)]     (goog.fx.dom.Swipe. element                         (apply array start)                         (apply array end)                         time                         accel))) DYNAMIC • FUNCTIONAL • LISP
  • 24. DART GOOGLE'S JAVASCRIPT REPLACEMENT class Point { num x, y; Point(num this.x, num this.y); Point scale(num factor) => new Point(x*factor, y*factor); num distance() => Math.sqrt(x*x + y*y); } void main() { Point a = new Point(2,3).scale(10); print(a.distance()); } CLASSES • GENERICS • OPTIONAL TYPING
  • 25. ROY FUNCTIONAL CODE INTO JAVASCRIPT let traceMonad = { return: x -> console.log "Return:" x x bind: x f -> console.log "Binding:" x f x } console.log (do traceMonad w <- 1 let x = 2 y <- 3 z <- 4 return w + x + y + z ) MONADS • TYPE INFERENCE • PATTERN MATCHING
  • 26. JOB: WEB DEVELOPMENT
  • 27. OPA "A UNIFIED PLATFORM FOR WEB APPS" function user_update(message x) { line = <div class="row line"> <div class="span1 columns userpic" /> <div class="span2 columns user">{x.author}:</div> <div class="span13 columns message">{x.text}</div> </div>; #conversation =+ line; Dom.scroll_to_bottom(#conversation); } SOURCE-TO-SOURCE • OOP • METACLASSES
  • 28. UR/WEB "A DSL FOR WEB APPLICATIONS" and imHere () = userO <- getCookie username; case userO of None => return <xml>You don't have a cookie set!</xml> | Some user => dml (DELETE FROM lastVisit WHERE User = {[user]}); dml (INSERT INTO lastVisit (User, When) VALUES ({[user]}, CURRENT_TIMESTAMP)); main () FUNCTIONAL • STATIC • METAPROGRAMMING
  • 30. GO REVENGE OF THE 1970s! var sem = make(chan int, MaxOutstanding) func handle(r *Request) { sem <- 1 // Wait for active queue to drain. process(r) // May take a long time. <-sem // Done; enable next request to run. } func Serve(queue chan *Request) { for { req := <-queue go handle(req) // Don't wait for handle to finish. } } COMPILED • CONCURRENT • GARBAGE COLLECTED
  • 31. RUST "SAFE, CONCURRENT, PRACTICAL" fn stringifier(from_parent: comm::port<uint>, to_parent: comm::chan<str>) { let mut value: uint; do { value = comm::recv(from_parent); comm::send(to_parent, uint::to_str(value, 10u)); } while value != 0u; } COMPILED • OOP • FUNCTIONAL • STATIC
  • 32. OOC C + OBJECTS + MORE, COMPILING TO C99 main: func { number := 42 // alloc an int on the stack printf("number is %dn", number) add(number&, 3) printf("number is now %dn", number) } add: func (ptr: Int@, value: Int) { ptr += value } SOURCE-TO-SOURCE • OOP • METACLASSES
  • 34. FANCY A DYNAMIC LANGUAGE ON RUBINIUS VM require: "sinatra.fy" configure: 'production with: { disable: 'show_errors enable: 'logging } before: { "incoming request: #{request inspect}" println } def page: text { """ <h1>#{text}</h1> """ } get: "/:p" do: |param| { page: "Fancy web page: #{param}" } DYNAMIC • OOP • ACTORS
  • 35. SLATE A MODERN SMALLTALK s@(Sequence traits) isPalindrome [ s isEmpty ifTrue: [True] ifFalse: [(s first = s last) / [(s sliceFrom: 1 to: s indexLast - 1) isPalindrome]] ]. DYNAMIC • PROTOTYPES • STREAMS • MACROS
  • 36. ELIXIR "MODERN PROGRAMMING FOR THE ERLANG VM" defmodule Hygiene do defmacro interference do quote do: var!(a) = 1 end end defmodule HygieneTest do def go do require Hygiene a = 13 Hygiene.interference a end end DYNAMIC • PROTOCOLS • RECORDS • MACROS
  • 38. FRINK "MAKE PHYSICAL CALCULATIONS SIMPLE" earthpower = sunpower / (4 pi sundist^2) chargerate = earthpower 12 ft^2 chargerate -> watts 1530.1602 2 ton 7 feet gravity / chargerate -> sec 24.80975 (225 + 135) pounds 15000 feet gravity / chargerate -> minutes 59.809235 EMBEDDABLE • OOP • UNICODE
  • 39. JULIA "HIGH-LEVEL, HIGH-PERFORMANCE TECHNICAL COMPUTING" DYNAMIC • COMPILED • PARALLEL
  • 40. FAUST A LANGUAGE FOR DSP AND SYNTHESIS import["math.lib"]; delay[n,d,x] = x@(int(d)&(n=1)); msec = SR/1000.0; duration = hslider("millisecond", 0, 0, 1000, 0.10) * msec : int; feedback = [hslider("feedback", 0, 0, 100, 0.1) / 100.0]; echo = vgroup("echo", +-(delay(SR, duration) * feedback)); process = vgroup["stereo echo", [echo, echo]); FUNCTIONAL • SOURCE-TO-SOURCE COMPILED
  • 42. BANDICOOT A LANGUAGE FOR SET ALGEBRA # selects fiction books from the input fn Fiction(b: Books): Books { return b select(genre == "Fiction"); } # calculates an average price of fiction books fn FictionPrice(b: Books): rel {avgPrice: real} { # use of a temporary variable and a chained statement res := b select(genre == "Fiction") summary(avgPrice = avg(price, 0.0)); return res; } RELATIONAL • PERSISTENCY • DISTRIBUTED
  • 43. QUIRREL A LANGUAGE FOR ANALYTICS clicks := load(//clicks) views := load(//views) clickthroughRate('page) := {page: 'page, ctr: count(clicks where clicks.pageId = 'page) / count(views where views.pageId = 'page)} clickthroughRate [{"page":"page-4","ctr":0.5555555555555555555555555555555556}, {"page":"page-1","ctr":2.076923076923076923076923076923077}, ...] DECLARATIVE • FUNCTIONAL • COMPOSABLE
  • 45. WHEELER "DIFFERENT" transition (pattern print (string)) (action STDOUT) print "Hello, world!" // Hello World "Hello, world!" print // Hello World transition (pattern fast car) (action print "ZOOM ZOOM") fast car // ZOOM ZOOM car fast // ZOOM ZOOM NO VARIABLES • NO FUNCTIONS • NO OBJECTS
  • 46. KODU PROGRAMMING FOR KIDS, ON XBOX VISUAL • INTERACTIVE • ITERATIVE
  • 47. WHEW!
  • 48. JOBS: BETTER JAVA BETTER JAVASCRIPT WEB DEVELOPMENT SYSTEMS PROGRAMMING DYNAMIC PROGRAMMING TECHNICAL COMPUTING QUERYING DATA MAKING YOU THINK …
  • 49. PLATFORMS: JVM CLR JAVASCRIPT (V8, ETC.) RUBINIUS LLVM ERLANG VM PHP XBOX …