SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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
 

Destacado (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 a Emerging Languages: A Tour of the Horizon

The Art Of Readable Code
The Art Of Readable CodeThe Art Of Readable Code
The Art Of Readable Code
Baidu, Inc.
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin
 

Similar a 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
 

Más de Alex Payne

The Interaction Design Of APIs
The Interaction Design Of APIsThe Interaction Design Of APIs
The Interaction Design Of APIs
Alex Payne
 

Más de 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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.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 …