Martin Odersky discusses the past, present, and future of Scala over the past 5 years and next 5 years. Key points include:
- Scala has grown significantly in usage and community over the past 6 years since its first release.
- Scala 2.8 will include improvements like new collections, package objects, named/default parameters, and better tool support.
- Over the next 5 years, Scala will focus on improving concurrency and parallelism through better abstractions, analyses, and static typing support.
Scala is a programming language that combines object-oriented and functional programming. It runs on the Java Virtual Machine and is designed to grow with user demands through libraries. Play 2.0 is a web application framework written in Scala that allows for rapid development through its Model-View-Controller architecture and local development server. Cloud Foundry is an open Platform as a Service that allows developers to easily deploy and scale applications, including those written in Scala and Play 2.0.
This document discusses the key building blocks that enable Scala to be a modular and growable language. It outlines seven simple parts of the Scala language itself that can be combined in flexible ways, including expressions, scopes, patterns, recursion, function values, collections, and vars. It also lists seven features of Scala's type system that support modular programming, such as static typing, objects, classes, traits, abstract types, parameterized types, and implicit parameters. The document argues that this combination of simple language parts and powerful type features allows Scala programs and libraries to be composed modularly and to grow in complexity in a manageable way.
These are the slides of the talk I gave on May 22, 2014 to the San Francisco Scala user group. Similar talks were given before at GOTO Chicago, keynote, at Gilt Groupe and Hunter College in New York, at JAX Mainz and at FlatMap Oslo.
Scala: functional programming for the imperative mind
Scala is a programming language that runs on the JVM and fuses functional and object-oriented paradigms. It aims to provide functional programming for programmers with an imperative mindset. Key features include functions as first-class values, pattern matching, traits for composition, and seamless interoperability with Java. While some features appear to be language features, many are actually implemented via libraries. The Scala community is growing with adoption by companies and increasing support in tools and publications.
Miles Sabin Introduction To Scala For Java Developers
Scala is a programming language that blends object-oriented and functional programming styles. It is designed to interoperate with Java code and runs on the Java Virtual Machine. Some key features of Scala include case classes, pattern matching, traits for mixing behavior, and immutable data structures. Scala code compiles to Java bytecode, allowing seamless use of Java libraries and tools.
Scala is a multi-paradigm programming language that runs on the Java Virtual Machine. It is intended to be both object-oriented and functional. Scala is compatible with Java and allows Java code to interoperate with Scala code. Some key features of Scala include type inference, lazy evaluation, treating methods as variables, and support for both object-oriented and functional programming paradigms.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Scala: Object-Oriented Meets Functional, by Iulian Dragos
A presentation from Iulian Dragos of Typesafe that gives an overview of the Scala programming language. The presentation was given at a Functional Angle conference in Timisoara, Romania sponsored by 3Pillar. Iulian Dragos has been working on Scala since 2004. He currently works for Typesafe, a start-up that was co-founded by Scala’s creator, Martin Odersky.
This document provides an overview of functional programming concepts like first-class functions, pure functions, and immutable data structures. It discusses functional programming languages like Haskell, Scala, and Clojure and provides examples of code in each. The document also covers core FP topics like avoiding side effects, persistent data structures, and functional patterns in Clojure like atoms for mutable state and macros.
- Scala originated from Martin Odersky's work on functional programming languages like OCaml in the 1980s and 1990s. It was designed to combine object-oriented and functional programming in a practical way.
- Key aspects of Scala include being statically typed while also being flexible, its unified object and module system, and treating libraries as primary over language features.
- Scala has grown into an large ecosystem centered around the JVM and also targets JavaScript via Scala.js. Tooling continues to improve with faster compilers and new IDE support.
- Future work includes establishing TASTY as a portable intermediate representation, connecting Scala to formal foundations through the DOT calculus, and exploring new type
An Introduction to Scala - Blending OO and Functional Paradigms
Scala is a programming language that blends object-oriented and functional programming. It is designed to be compatible with Java and runs on the JVM. Scala has features like functions as first-class values, pattern matching, and immutable data structures. It aims to improve on Java syntax and provides tools like case classes and for comprehensions. Scala sees growing adoption in companies like Twitter and LinkedIn and future releases will continue to explore new type systems and features.
The document summarizes the evolution of the Scala programming language from its origins to its present state and future directions. It discusses Scala's combination of object-oriented and functional programming, its type system, tooling improvements, and the emergent ecosystem around Scala. It also outlines plans to develop a Scala-specific platform called TASTY and explore new language concepts like effect systems to model side effects through capabilities.
- Scala is being adopted for web platforms, trading platforms, financial modeling, and simulation. Scala 2.9 includes improvements to parallel and concurrent computing libraries as well as faster compilation.
- Play Framework 2.0 will move to a Scala core while retaining Java support. The Scala Eclipse IDE has been reworked for better reliability and responsiveness.
- Scala 2.10 will include a new reflection framework and other IDE improvements. Avoiding mutable state enables functional and parallel programming. Scala supports both parallelism and concurrency through tools like parallel collections and actors.
- Future work includes distributed collections, parallel domain-specific languages, and unifying the Scala compiler and reflection APIs. Scal
My presentation at Sulake (www.sulake.com) about functional programming languages and how to adopt a functional-style in Java development. I argue that functional programs are more robust than imperative ones.
Scala is a multi-paradigm programming language that blends object-oriented and functional programming. It is designed to express common programming patterns in a concise, elegant, and type-safe way. Scala runs on the Java Virtual Machine and interoperates seamlessly with Java, but also integrates concepts from languages such as Haskell, ML and Ruby. Some key features of Scala include support for functional programming, a static type system with type inference, pattern matching, actors and immutable data structures.
Scala Next focused on the continued adoption and development of Scala. Key points included:
- Scala adoption has grown significantly in areas like web platforms, trading platforms, and financial modeling. The number of Scala jobs tripled in the last year.
- Recent Scala versions like 2.8 and 2.9 included improvements to collections, implicits, and tooling support.
- Scala 2.10 will focus on new reflection capabilities, reification, string interpolation, and continued IDE improvements.
- The Play Framework 2.0 will provide a Scala-centric web framework built on top of Akka and the Typesafe Stack.
This document discusses how the Scala programming language unifies functional programming and object-oriented programming concepts to better support component-based software development. It presents three ways Scala unifies previously separate concepts: 1) algebraic data types are implemented as class hierarchies, 2) functions are treated as objects, and 3) modules are implemented as objects. This allows Scala to leverage the strengths of both paradigms while removing limitations of existing languages for component programming.
Scala is a programming language for the Java Virtual Machine that combines object-oriented and functional programming concepts. It is fully interoperable with Java code and libraries. Scala aims to be more concise and expressive than Java by allowing both object-oriented and functional programming styles. Experts have praised Scala for its ability to solve many of Java's design issues like verbosity. Scala provides features like case classes, pattern matching, XML literals, and functional collections that reduce boilerplate code compared to Java.
A short introduction (with many examples) to the Scala programming language and also an introduction to using the Play! Framework for modern, safe, efffcient and reactive web applications.
Scala gives you awesome expressive power, but how to make best use of it? In my talk I will discuss the question what makes good Scala style. We will start with syntax and continue with how to name things, how to mix objects and functions, where (and where not) to use mutable state, and when to use which design pattern. As most questions of style, the discussion will be quite subjective, and some of it might be controversial. I am looking forward to discuss these topics with the conference attendees.
Scala aims to unify functional and object-oriented programming to better support component-based software development. It does this by (1) treating algebraic data types as extensible class hierarchies, (2) treating functions as objects with apply methods, and (3) allowing functions and modules to be specialized. This provides capabilities like partial functions and actor-based concurrency in a library rather than as language features. Event-based actors implemented as a library can outperform threaded actors for high numbers of actors.
Martin Odersky received his PhD in 1989 and began designing Scala in 2001 at EPFL. Scala is a functional and object-oriented programming language that runs on the Java Virtual Machine. It is concise, high-level, statically typed, and supports both immutable and mutable data structures. Many large companies use Scala including LinkedIn, Twitter, and Ebay. Scala supports both object-oriented programming with classes, traits, and objects as well as functional programming with immutable data, higher-order functions, and algebraic data types.
This document discusses the key building blocks that enable Scala to be a modular and growable language. It outlines seven simple parts of the Scala language itself that can be combined in flexible ways, including expressions, scopes, patterns, recursion, functions, collections, and variables. It also discusses seven library features like static types, objects, classes, traits, abstract types, type parameters, and implicit parameters that support modular programming. The document argues that this combination of simple language parts and library features allows Scala applications and libraries to smoothly grow from small to large systems.
Scala Intro training @ Lohika, Odessa, UA.
This is a basic Scala Programming Language overview intended to evangelize the language among any-language programmers.
This was a short introduction to Scala programming language.
me and my colleague lectured these slides in Programming Language Design and Implementation course in K.N. Toosi University of Technology.
Introduction to Functional Programming with Scalapramode_ce
The document provides an introduction to functional programming with Scala. It outlines the following topics that will be covered: learning Scala syntax and writing simple programs; important functional programming concepts like closures, higher-order functions, purity, lazy evaluation, currying, tail calls, immutability, and type inference; and understanding the functional programming paradigm through Scala. It also provides some background information on Scala and examples of Scala code demonstrating various concepts.
Scala is a programming language that combines object-oriented and functional programming. It runs on the Java Virtual Machine and is designed to grow with user demands through libraries. Play 2.0 is a web application framework written in Scala that allows for rapid development through its Model-View-Controller architecture and local development server. Cloud Foundry is an open Platform as a Service that allows developers to easily deploy and scale applications, including those written in Scala and Play 2.0.
This document discusses the key building blocks that enable Scala to be a modular and growable language. It outlines seven simple parts of the Scala language itself that can be combined in flexible ways, including expressions, scopes, patterns, recursion, function values, collections, and vars. It also lists seven features of Scala's type system that support modular programming, such as static typing, objects, classes, traits, abstract types, parameterized types, and implicit parameters. The document argues that this combination of simple language parts and powerful type features allows Scala programs and libraries to be composed modularly and to grow in complexity in a manageable way.
Scala - The Simple Parts, SFScala presentationMartin Odersky
These are the slides of the talk I gave on May 22, 2014 to the San Francisco Scala user group. Similar talks were given before at GOTO Chicago, keynote, at Gilt Groupe and Hunter College in New York, at JAX Mainz and at FlatMap Oslo.
Scala is a programming language that runs on the JVM and fuses functional and object-oriented paradigms. It aims to provide functional programming for programmers with an imperative mindset. Key features include functions as first-class values, pattern matching, traits for composition, and seamless interoperability with Java. While some features appear to be language features, many are actually implemented via libraries. The Scala community is growing with adoption by companies and increasing support in tools and publications.
Miles Sabin Introduction To Scala For Java DevelopersSkills Matter
Scala is a programming language that blends object-oriented and functional programming styles. It is designed to interoperate with Java code and runs on the Java Virtual Machine. Some key features of Scala include case classes, pattern matching, traits for mixing behavior, and immutable data structures. Scala code compiles to Java bytecode, allowing seamless use of Java libraries and tools.
Scala is a multi-paradigm programming language that runs on the Java Virtual Machine. It is intended to be both object-oriented and functional. Scala is compatible with Java and allows Java code to interoperate with Scala code. Some key features of Scala include type inference, lazy evaluation, treating methods as variables, and support for both object-oriented and functional programming paradigms.
Slides from my talk at the Feb 2011 Seattle Tech Startups meeting. More info here (along with powerpoint slides): http://www.startupmonkeys.com/2011/02/scala-frugal-mechanic/
Scala: Object-Oriented Meets Functional, by Iulian Dragos3Pillar Global
A presentation from Iulian Dragos of Typesafe that gives an overview of the Scala programming language. The presentation was given at a Functional Angle conference in Timisoara, Romania sponsored by 3Pillar. Iulian Dragos has been working on Scala since 2004. He currently works for Typesafe, a start-up that was co-founded by Scala’s creator, Martin Odersky.
This document provides an overview of functional programming concepts like first-class functions, pure functions, and immutable data structures. It discusses functional programming languages like Haskell, Scala, and Clojure and provides examples of code in each. The document also covers core FP topics like avoiding side effects, persistent data structures, and functional patterns in Clojure like atoms for mutable state and macros.
- Scala originated from Martin Odersky's work on functional programming languages like OCaml in the 1980s and 1990s. It was designed to combine object-oriented and functional programming in a practical way.
- Key aspects of Scala include being statically typed while also being flexible, its unified object and module system, and treating libraries as primary over language features.
- Scala has grown into an large ecosystem centered around the JVM and also targets JavaScript via Scala.js. Tooling continues to improve with faster compilers and new IDE support.
- Future work includes establishing TASTY as a portable intermediate representation, connecting Scala to formal foundations through the DOT calculus, and exploring new type
An Introduction to Scala - Blending OO and Functional ParadigmsMiles Sabin
Scala is a programming language that blends object-oriented and functional programming. It is designed to be compatible with Java and runs on the JVM. Scala has features like functions as first-class values, pattern matching, and immutable data structures. It aims to improve on Java syntax and provides tools like case classes and for comprehensions. Scala sees growing adoption in companies like Twitter and LinkedIn and future releases will continue to explore new type systems and features.
The document summarizes the evolution of the Scala programming language from its origins to its present state and future directions. It discusses Scala's combination of object-oriented and functional programming, its type system, tooling improvements, and the emergent ecosystem around Scala. It also outlines plans to develop a Scala-specific platform called TASTY and explore new language concepts like effect systems to model side effects through capabilities.
- Scala is being adopted for web platforms, trading platforms, financial modeling, and simulation. Scala 2.9 includes improvements to parallel and concurrent computing libraries as well as faster compilation.
- Play Framework 2.0 will move to a Scala core while retaining Java support. The Scala Eclipse IDE has been reworked for better reliability and responsiveness.
- Scala 2.10 will include a new reflection framework and other IDE improvements. Avoiding mutable state enables functional and parallel programming. Scala supports both parallelism and concurrency through tools like parallel collections and actors.
- Future work includes distributed collections, parallel domain-specific languages, and unifying the Scala compiler and reflection APIs. Scal
My presentation at Sulake (www.sulake.com) about functional programming languages and how to adopt a functional-style in Java development. I argue that functional programs are more robust than imperative ones.
Scala is a multi-paradigm programming language that blends object-oriented and functional programming. It is designed to express common programming patterns in a concise, elegant, and type-safe way. Scala runs on the Java Virtual Machine and interoperates seamlessly with Java, but also integrates concepts from languages such as Haskell, ML and Ruby. Some key features of Scala include support for functional programming, a static type system with type inference, pattern matching, actors and immutable data structures.
Scala Next focused on the continued adoption and development of Scala. Key points included:
- Scala adoption has grown significantly in areas like web platforms, trading platforms, and financial modeling. The number of Scala jobs tripled in the last year.
- Recent Scala versions like 2.8 and 2.9 included improvements to collections, implicits, and tooling support.
- Scala 2.10 will focus on new reflection capabilities, reification, string interpolation, and continued IDE improvements.
- The Play Framework 2.0 will provide a Scala-centric web framework built on top of Akka and the Typesafe Stack.
This document discusses how the Scala programming language unifies functional programming and object-oriented programming concepts to better support component-based software development. It presents three ways Scala unifies previously separate concepts: 1) algebraic data types are implemented as class hierarchies, 2) functions are treated as objects, and 3) modules are implemented as objects. This allows Scala to leverage the strengths of both paradigms while removing limitations of existing languages for component programming.
Scala and jvm_languages_praveen_technologistpmanvi
Scala is a programming language for the Java Virtual Machine that combines object-oriented and functional programming concepts. It is fully interoperable with Java code and libraries. Scala aims to be more concise and expressive than Java by allowing both object-oriented and functional programming styles. Experts have praised Scala for its ability to solve many of Java's design issues like verbosity. Scala provides features like case classes, pattern matching, XML literals, and functional collections that reduce boilerplate code compared to Java.
A short introduction (with many examples) to the Scala programming language and also an introduction to using the Play! Framework for modern, safe, efffcient and reactive web applications.
ScalaDays 2013 Keynote Speech by Martin OderskyTypesafe
Scala gives you awesome expressive power, but how to make best use of it? In my talk I will discuss the question what makes good Scala style. We will start with syntax and continue with how to name things, how to mix objects and functions, where (and where not) to use mutable state, and when to use which design pattern. As most questions of style, the discussion will be quite subjective, and some of it might be controversial. I am looking forward to discuss these topics with the conference attendees.
Scala aims to unify functional and object-oriented programming to better support component-based software development. It does this by (1) treating algebraic data types as extensible class hierarchies, (2) treating functions as objects with apply methods, and (3) allowing functions and modules to be specialized. This provides capabilities like partial functions and actor-based concurrency in a library rather than as language features. Event-based actors implemented as a library can outperform threaded actors for high numbers of actors.
Martin Odersky received his PhD in 1989 and began designing Scala in 2001 at EPFL. Scala is a functional and object-oriented programming language that runs on the Java Virtual Machine. It is concise, high-level, statically typed, and supports both immutable and mutable data structures. Many large companies use Scala including LinkedIn, Twitter, and Ebay. Scala supports both object-oriented programming with classes, traits, and objects as well as functional programming with immutable data, higher-order functions, and algebraic data types.
This document discusses the key building blocks that enable Scala to be a modular and growable language. It outlines seven simple parts of the Scala language itself that can be combined in flexible ways, including expressions, scopes, patterns, recursion, functions, collections, and variables. It also discusses seven library features like static types, objects, classes, traits, abstract types, type parameters, and implicit parameters that support modular programming. The document argues that this combination of simple language parts and library features allows Scala applications and libraries to smoothly grow from small to large systems.
Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It has established itself as one of the main alternative languages on the Java Virtual Machine, being used by companies like Twitter and LinkedIn. Scala fuses functional programming (from which it borrows higher-order functions and closures, generic typing and immutable data structures) and object-oriented programming programming (from which it takes inheritance and encapsulation). It interoperates fully with Java, allowing a smooth transition and access to all existing Java libraries.
Scala’s lightweight syntax makes it easy to extend the language through DSLs. In this talk we are going to have a quick overview of Scala’s main features (closures, higher-order functions, implicits), and collection classes in the standard library. We’ll see how a new concurrency model, such as actors, can be added to the language through a library.
Scala is a general purpose programming language that blends object-oriented and functional programming. It is designed to interoperate with Java code, as Scala compiles to Java bytecode. Scala incorporates features from functional programming like immutable variables and higher-order functions, as well as object-oriented features like classes and inheritance. Key differences from other languages include its support for features like pattern matching, traits, and type inference.
The document discusses Scala reflection, which provides a unified API to access information about a program at both compile-time and runtime. This reflection API exposes compiler trees, symbols, and types through universes, mirrors, and symbols. It allows programs to inspect and analyze themselves, defeat erasure, and even compile code at runtime or compile-time through macros. The reflection features are available in Scala 2.10 and aim to give programs almost as much insight into themselves as the compiler has.
The document discusses Scala reflection, which provides a unified API to access information about a program at both compile-time and runtime. This API allows programs to inspect their structure, types, and symbols using trees, mirrors, and universes. It facilitates tasks like runtime compilation, reifying types, and writing macros. The current implementation is available in Scala 2.10 M3, with runtime reflection improved for the upcoming M4 release.
This presentation was presented at OSS camp in New Delhi. It deals with the basics of Scala language and how we can use it to build scalable Applications
Some key features of Scala include:
1. It allows blending of functional programming and object-oriented programming for more concise and powerful code.
2. The static type system allows for type safety while maintaining expressiveness through type inference, implicits, and other features.
3. Scala code interoperates seamlessly with existing Java code and libraries due to its compatibility with the JVM.
This document provides an introduction to Scala for Java developers. It discusses that Scala is a hybrid object-oriented and functional language that runs on the JVM and interoperates well with Java. It highlights several features of Scala that allow for more concise code compared to Java, such as type inference, expressions instead of statements, higher-order functions, and case classes.
This document discusses event driven architecture (EDA) and domain driven design. It begins with an introduction to the speaker and an overview of EDA basics. It then describes problems with traditional SOA implementations, where domain logic gets split across many systems. The document proposes that exposing domain events on a shared event bus allows isolating cross-cutting functions to separate systems while keeping domain logic together. It provides examples of how this approach improves scalability and decouples systems. Finally, it outlines potential business benefits of using EDA like enabling complex event processing, business process management, and business activity monitoring on top of the domain events.
The document discusses trends and challenges facing information technology, including building a civic semantic web and waiving rights over linked data. It also discusses whether semantic technologies could permit meaningful brand relationships. The document contains a chart showing government department spending in the UK, with the Department of Health spending £105.7 billion, followed by local and regional government spending £34.3 billion, and the NHS spending £90.7 billion.
genpaxospublic-090703114743-phpapp01.pdfHiroshi Ono
This document summarizes an Erlang meeting held on July 3, 2009 in Tokyo. It discusses the gen_paxos Erlang module, which implements the Paxos consensus algorithm. Paxos is needed to solve problems like split-brains where data could become inconsistent without coordination between nodes. The document explains the key aspects of Paxos like its phases, data model in gen_paxos, and how nodes communicate through message passing in Erlang. It also provides references to related works and papers about Paxos.
pragmaticrealworldscalajfokus2009-1233251076441384-2.pdfHiroshi Ono
The document discusses Scala and functional programming concepts. It provides examples of building a chat application in 30 lines of code using Lift, defining case classes and actors for messages. It summarizes that Scala is a pragmatically oriented, statically typed language that runs on the JVM and has a unique blend of object-oriented and functional programming. Functional programming concepts like immutable data structures, functions as first-class values, and for-comprehensions are demonstrated with examples in Scala.
This document is the introduction to "The Little Book of Semaphores" by Allen B. Downey. It provides an overview of the book, which uses examples and puzzles to teach synchronization concepts and patterns. The book aims to give students more practice with these challenging concepts than a typical operating systems course allows. It also discusses the book's licensing as free and open source documentation.
This document provides style guidelines for Scala developers at Twitter. It outlines recommendations for imports, implicit usage, reflection, comments, whitespace, logging, project layout, variable naming conventions, and ends by thanking people for attending.
This document introduces developing a Scala DSL for Apache Camel. It discusses using Scala features like implicit conversions, passing functions as parameters, and by-name parameters to build a DSL. It provides examples of simple routes in the Scala DSL and compares them to Java. It also covers tooling for Scala in Maven and Eclipse and caveats like interacting with Java generics. The goal is to learn basic Scala concepts and syntax for building a Scala DSL, using Camel as an example.
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfHiroshi Ono
The document discusses alternative concurrency paradigms to shared-state concurrency for the JVM, including software transactional memory which allows transactions over shared memory, message passing concurrency using the actor model where actors communicate asynchronously via message passing, and dataflow concurrency where variables can only be assigned once. It provides examples of how these paradigms can be used to implement solutions like transferring funds between bank accounts more elegantly than with shared-state concurrency and locks.
This document discusses using TCP/IP for high performance computing (HPC) applications. It finds that while TCP/IP can achieve bandwidth of 1 Gbps over short distances with low latency, the bandwidth degrades significantly over wide area networks with higher latency. It investigates tuning TCP parameters like socket buffer sizes to improve performance over high latency networks.
Martin Odersky outlines the growth and adoption of Scala over the past 6 years and discusses Scala's future direction over the next 5 years. Key points include:
- Scala has grown from its first classroom use in 2003 to filling a full day of talks at JavaOne in 2009 and developing a large user community.
- Scala 2.8 will include new collections, package objects, named/default parameters, and improved tool support.
- Over the next 5 years, Scala will focus on concurrency and parallelism features at all levels from primitives to tools.
- Other areas of focus include extended libraries, performance improvements, and standardized compiler plugin architecture.
stateyouredoingitwrongjavaone2009-090617031310-phpapp02.pdfHiroshi Ono
This document discusses alternative concurrency paradigms for the Java Virtual Machine (JVM). It begins with an agenda and discusses how Moore's Law no longer solves concurrency problems as processors are becoming multi-core. It then discusses the problems with shared-state concurrency and how separating identity and value can help. The document introduces software transactional memory, message passing concurrency using actors, and dataflow concurrency as alternative paradigms. It uses examples of bank account transfers to demonstrate how these paradigms can be implemented and discusses their advantages over shared-state concurrency.
This document contains the schedule for a conference with sessions on various topics in natural language processing and computational linguistics. The conference will take place from September 14-16. Each day consists of morning and afternoon sessions split into parallel tracks (1a and 1b). Sessions cover areas like semantics, parsing, sentiment analysis, and more. Keynote speakers include Ricardo Baeza-Yates, Kevin Bretonnel Cohen, Mirella Lapata, Shalom Lappin, and Massimo Poesio. Presentations are 20 minutes each with coffee breaks in the mornings and poster sessions in the afternoons.
The article discusses the Guardian's Datastore project, which makes data of public interest freely available online for reuse. Some key points:
- The Datastore contains datasets on topics like MPs' expenses, carbon emissions, and public opinion polls. This data was previously hard to access but the web now allows easy access to billions of statistics.
- Making this data open and machine-readable supports the Guardian's tradition of fact-checking and transparency. It also encourages others to analyze and build upon the data in new ways.
- An early example involved crowdsourcing the review of 500,000 pages of MPs' expenses, revealing new insights. Other Guardian datasets like music recommendations and university rankings are now available for others
genpaxospublic-090703114743-phpapp01.pdfHiroshi Ono
This document summarizes a presentation on Paxos and gen_paxos. It introduces Paxos as a distributed consensus algorithm that is robust to network failures and allows data replication across multiple nodes. It then describes the gen_paxos Erlang implementation of Paxos, including its data model, state machine approach, and messaging between nodes. Key aspects of Paxos like the prepare and propose phases are explained through examples. The document also provides context on applications of Paxos and references for further reading.
3. The last 6 years
2003 Scala first used in classroom at EPFL.
2004 First public release,
Jamie & Jon at Sygneca are probably first
outside professional users.
2005 Scalable component abstractions paper.
2006 2.x version released, David Pollak
gets interested.
2007 First JavaOne talk.
2008 First Scala LiftOff Unconference.
2009 JavaOne talks on Scala almost fill a full day.
5. Even more rewarding:
We have a fantastic user community:
Friendly, helpful, and intelligent.
A big Thank You to our contributors. We could not have
done it without you.
7. A scripting language?
Scala is a regular contender at
JavaOne’s ScriptBowl. var capital = Map( "US" → "Washington",
"France" → "paris",
Syntax is lightweight "Japan" → "tokyo" )
and concise, due to:
capital += "Russia" → "Moskow"
– semicolon inference,
– type inference, for ( (country, city) ← capital )
– lightweight classes, capital += country → city.capitalize
– extensible API’s,
– closures as assert ( capital("Japan") == "Tokyo" )
control abstractions.
Average reduction in LOC wrt Java: ≥ 2
due to concise syntax and better abstraction capabilities.
Explorative programming with a read-eval-print-loop (REPL)
8. The Java of the future?
It has basically everything Java has now.
(sometimes in different form)
It has closures.
(proposed for Java 7, but rejected)
It has traits and pattern matching.
(I would not be surprised to see them in Java 8, 9 or 10)
It compiles to .class files, is completely interoperable and runs about as
fast as Java
object App {
def main(args: Array[String]) {
if (args exists (_.toLowerCase == "‐help"))
printUsage()
else
process(args)
}
}
9. A language for concurrent programming?
It has powerful concurrency
// asynchronous message send
abstractions such as actors.
actor ! message
It’s used in heavy duty
applications: kestrel message // message receive
queue, lift web framework. receive {
case msgpat1 => action1
It makes functional programming …
with immutable data easy.
case msgpatn => actionn
}
10. A composition language?
• New approach to module
systems: trait Analyzer { this: Backend =>
component = class or trait …
}
composition via mixins
• Components connect with trait Backend extends Analyzer
with Optimization
– parameters, with Generation {
– abstract members (both
val global: Main
types and values), import global._
– self types
type OutputMedium <: Writable
• gives dependency injection
for free }
11. How can it be all these things?
Q. Is there not a danger that a language being all of these
things becomes too complex?
A. Normally, yes. However, Scala is deep where other
languages are broad.
Cuts down on boilerplate.
Concentrates on powerful abstraction methods, so that
users can write powerful libraries.
12. The Essence of Scala
Key design principles of Scala:
1. Concentrate on scalability: The same constructions
should work for small as well as large programs.
2. Unify object-oriented and functional programming.
13. Where do we go from here?
• Summer/fall 2009: Scala 2.8, with:
– new collections
– package objects
– named and default parameters
– @specialized for faster generics
– improved tool support for IDEs and REPL.
• The next 5 years:
Concurrency // Parallelism
(on all levels: primitives, abstractions, types, tools)
14. Old Scala collections
• Pre 2.8 collections have grown gradually. They lack a uniform
structure.
• Examples:
scala.Seq
scala.RandomAccessSeq.Mutable
scala.collection.mutable.Set
• Operations like map need to be redefined for every collection type:
List(1, 2, 3).map(inc) : List[Int]
Array(1, 2, 3).map(inc): Array[Int]
Set(1, 2, 3).map(inc) : Set[Int]
15. New Scala collections
• Uniform structure:
scala.collection.immutableList
scala.collection.immutable.Set
scala.collection.mutable.Vector
• Every operation is implemented only once.
• Selection of building blocks in package
scala.collection.generic.
17. Package Objects
Problem: Everything has to live inside an object or class.
=> No top-level value definitions, type aliases, implicits.
Package objects make packages more like objects.
They also let you define your own ``Predefs’’.
package object scala {
type List[+T] = scala.collection.immutable.List
val List = scala.collection.immutable.List
...
}
18. Named and default arguments
def newTable(size: Int = 100, load: Float = 0.5f) =
new HashMap[String, String]{
override val initialSize = size
override val loadFactor = (load * 1000).toInt
}
}
newTable(50, 0.75f)
newTable()
newTable(load = 0.5f)
newTable(size = 20, load = 0.5f)
Defaults can be arbitrary expressions, not just constants.
Default evaluation is dynamic.
19. Copy method
Problem: Case classes are great for pattern matching,
but how do you transform data?
Often need to update (functionally) some specific field(s)
of a date structure defined by case classes.
Solution: Selective copy method.
case class Tree[+T](elem: T, left: Tree[T], right: Tree[T])
def incElem(t: Tree[Int]) = t copy (elem = t.elem + 1)
• Problem: How to define “copy”?
20. Defining copy
• Problem: A class with n parameters allows 2n possible
combinations of parameters to copy.
• Default parameters to the rescue.
case class Tree[+T](elem: T, left: Tree[T], right: Tree[T]) {
// generated automatically:
def copy[U](elem: U = this.elem,
left: Tree[U] = this.left,
right: Tree[U] = this.right) =
Branch(elem, left, right)
}
22. Faster Generics
• Problem: Generics cause a performance hit because
they require a uniform representation: everything needs
to be boxed.
trait Function1[‐T, +U] { def apply(x: T): U }
• Example:
def app(x: Int, fn: Int => Int) = fn(x)
app(7, x => x * x)
becomes: trait Function1 { def apply(x: Object): Object }
class anonfun extends Function1 {
def apply(x: Object): Object =
Int.box(apply(Int.unbox(x)))
def apply(x: Int): Int = x * x
}
def app(x: Int, fn: Function1) =
Int.unbox(fn(Int.box(x)))
app(7, new anonfun)
23. Solution: @specialized
• We should specialize functions that take primitive
parameter types.
• If we had the whole program at our disposal, this would
be easy: Just do it like C++ templates.
• The problem is that we don’t.
• Idea: specialize opportunistically, when types are known.
24. If Function1 is @specialized ...
trait Function1[@specialized ‐T, @specialized +U] {
def apply(x: T): U }
def app(x: Int, fn: Int => Int) = fn(x)
app(7, x => x * x)
... the compiler generates instead:
trait Function1 {
def apply(x: Object): Object
def applyIntInt(x: Int): Int =
Int.unbox(apply(Int.box(x)))
// specializations for other primitive types
} No boxing!
class anonfun extends (Int => Int) {
def apply(x: Object): Object =
Int.box(applyIntInt(Int.unbox(x)))
override def applyIntInt(x: Int): Int = x * x
}
def app(x: Int, fn: Function1) =
fn.applyIntInt(x)
app(7, anonfun)
25. Better tools
• REPL with command completion (courtesy Paul Phillips).
• Reworked IDE/compiler interface (Miles Sabin, Martin
Odersky, Iulian Dragos).
Developed originally for Eclipse, but should be reusable for
other IDEs such as Netbeans, VisualStudio.
26. New control abstractions:
• Continations plugin
– allow to unify receive and react in actors.
– give a clean basis for encpsulating nio.
– let you do lots of other control abstractions.
• Break (done in library)
• Trampolining tail calls (done in library)
import scala.util.control.Breaks._
breakable {
for (x <- elems) {
println(x * 2)
if (x > 0) break
}
}
28. More features
• Extended swing library.
• Performance improvements, among others for
– structural type dispatch,
– actors,
– vectors, sets and maps.
• Standardized compiler plugin architecture.
29. How to get 2.8
Can use trunk today (bleeding edge).
Stable preview planned for July.
Final version planned for September or October.
31. New challenges
Concurrency:
How to make concurrent activities play well together?
Parallelism:
How to extract better performance from today’s and
tomorrow’s parallel processors (multicores, gpus, etc).
The two do not necessarily have the same solutions!
32. What can be done?
(1) Better abstractions:
Actors
Transactions
Join patterns
Stream processing with single-assignment variables
Data parallelism
33. (2) Better Analyses. Distinguish between:
pure: no side effects
thread-local: no interaction
transactional: atomic interaction
unrestricted access (danger!)
Need alias tracking and effect systems.
Problem: can we make these lightweight enough?
34. (3) Better support for static types.
Need to overcome the “type wall”.
Static typing is a key ingredient for reliable concurrent
programs, yet programs are annoyingly hard to get right.
Need better tools: Type browsers, type debuggers.
Need better presentations: Users might not always want
to see the most general type!
35. Why Scala?
I believe Scala is well placed as a basis for concurrent
and parallel programming, because
– It runs natively on the JVM.
– It supports functional programming.
– It has great syntactic flexibility.
• Btw we are not the only ones to have recognized this:
– The X10, PPL, Fortress are al using Scala in some role or other.
36. Learning Scala
• To get started:
• First steps in Scala, by Bill Venners
published in Scalazine at
www.artima.com
• Scala for Java Refugees by Daniel
Spiewack (great blog series)
• To continue:
3+1 books published; more in the pipeline.
37. How to find out more
Track it on
scala-lang.org:
Thank You