Scala Course Program and Materials
- Tutorial
Good day.
My name is Golovach Ivan, I am a Java Tech Lead practitioner with 10+ years of programming experience (Java EE, J2ME, C, C ++, M-language, Delphi) who switched to Scala.
I prepared and read both regular programming courses ( Java Core + Junior Java Developer ) and special courses (Multicore Programming for JVM ( one and two )).
At the moment I am starting a special course on Scala and in this topic I want to share the materials that I found the most interesting / informative (the course was prepared for more than a year).
Course Program
Materials: Miscellaneous
Materials: Object Oriented Programming in Scala
Materials: Functional Programming in Scala
Materials: Higher kinded types
Materials: Parser combinators
Materials: Metaprogramming / Reflection
Materials: Metaprogramming / Macroses
Materials: Scalaz
Materials: Netty
Materials: Akka
Materials: Finagle
Materials: Zookeeper
Materials: Using FP in the financial industry
The Scala special course aims at
1. Deeply learning the language, including such “dark corners” as macroses, path dependent types, generics of higher kind. Learn how to create internal and external DSL. to understand why functional programming languages are so popular in the financial industry.
2. Understand why when writing code in functional programming languages (and Scala in particular), mathematical libraries that refer to algebra and category theory are often used.
3. See why modern startups (like Twitter and LinkedIn) often write their infrastructure on Scala.
The special course starts on February 27, 2015 and consists of 16 webinars for 2-2.5 hours. Duration 3 months (1-2 lessons per week). All lectures are recorded on video and provided to students. All necessary literature is provided in electronic form. I answer questions both during webinars and the rest of the time. You have the opportunity to communicate with 15-20 other students who are learning Scala in parallel.
These articles are brief overviews of the language (15-20 pages). They are more likely to be ideological / historical - as the author himself (Odersky) sees his brainchild, which he considers the most important / distinctive / characteristic.
These articles illuminate and clarify the basic characteristics of the language.
Reaching material for a small book, but not books. From the "classics".
Yes, Coursera itself is written in Scala .
There are a large number of books on the market (about 20) on Scala, but I liked the following 4 most
Functional Programming in Scala is a powerful book from one of the contributors at Scalaz.
Scala includes a package ( scala.util.parsing ) that provides tools for describing Scala External DSL grammar in a format close to EBNF. Those. it is an “internal DSL” for creating “external DSLs”.
In Scala, parsers are implemented as monads - hence defining combinators for parsers are just monadic transformations implementing sequencing, alternation or any other composition operations.
In a number of subject areas, you can build an API in the form of some primitive elements (in this case, parsers) and ways to combine these elements in a certain way (combinators). In this case, the core of the language has everything you need to build external DSLs.
A particularly interesting aspect of macros is that they are based on the same API used also for Scala's runtime reflection, provided in package scala.reflect.api. This enables the sharing of generic code between macros and implementations that utilize runtime reflection.
Until 2.10, Scala has not had any reflection capabilities of its own. Instead, one could use part of the Java reflection API, namely that dealing with providing the ability to dynamically inspect classes and objects and access their members. However, many Scala-specific elements are unrecoverable under standalone Java reflection, which only exposes Java elements (no functions, no traits) and types (no existential, higher-kinded, path-dependent and abstract types). In addition, Java reflection is also unable to recover runtime type info of Java types that are generic at compile-time; a restriction that carried through to runtime reflection on generic types in Scala.
In Scala 2.10, a new reflection library was introduced not only to address the shortcomings of Java's runtime reflection on Scala-specific and generic types, but to also add a more powerful toolkit of general reflective capabilities to Scala. ... with full-featured runtime reflection for Scala types and generics ...
A particularly interesting aspect of macros is that they are based on the same API used also for Scala's runtime reflection, provided in package scala.reflect.api. This enables the sharing of generic code between macros and implementations that utilize runtime reflection.
Our flavor of macros is reminiscent of Lisp macros, adapted to incorporate type safety and rich syntax. Unlike infamous C / C ++ preprocessor macros, Scala macros: 1) are written in full-fledged Scala, 2) work with expression trees, not with raw strings, 3) cannot change syntax of Scala. [ here ]
Macros are functions that are called by the compiler during compilation. Within these functions the programmer has access to compiler APIs. For example, it is possible to generate, analyze and typecheck code. You can learn more about macros from documentation. [ here ]
Def macros are shipped as an experimental feature of Scala since version 2.10.0 . A subset of def macros, pending a thorough specification, is tentatively scheduled to become stable in one of the future versions of Scala.
Experimental feature- Also note that macros are considered an experimental and advanced feature, so in order to write macros you need to enable them. Do that either with import scala.language.experimental.macros on per-file basis or with -language: experimental.macros (providing a compiler switch) on per-compilation basis. Your users, however, don't need to enable anything - macros look like normal methods and can be used as normal methods, without any compiler switches or additional configurations.
Netty - an asynchronious and event-driven network application framework for rapid development of maintanable high performance protocol servers and clients. Netty is the de fakto standard for using java.net. *, NIO and NIO.2 (Akka and Finagle use Netty, Zookeeper directly under NIO / NIO.2 "under the hood"). Although it is possible to directly implement Reactor / Proactor / Asynchronous Completion Token / Acceptor-Connector asynchronous message processing templates,however, this involves a lot of template code and obscuring the functionality of the subject area. Netty's advantage is both declarative code and the fact that the library is a protocol constructor (http, ftp, smtp, websockets, ...).
Akka is the de facto standard framework for multi-threaded and distributed actor-based architectures for the JVM. Starting with Scala version 2.10.0, Akka has superseded the native implementation of actors .
Finagle - A Protocol-Agnostic extensible RPC System for the JVM, used to construct high-concurrency servers. Written and used on twitter.com. The basic principle is “We must program locally, communicate globally” . Part of the Twitter stack (along with Ostrich, Zipkin, Mesos, Iago, ZooKeeper, Scalding). Finagle includes load balancing, connection pooling, call with timeout, monitoring, statistics collection.
Zookeeper is a fail-safe centralized service for managing configuration information, naming, distributed synchronization and other group services, part of the Twitter stack . It can be used to create basic data structures (cluster) - queues, locks, barriers. Suitable for distributed algorithms such as two-phase-commit, leader election and others.
For a number of reasons (the ability to describe a subject area in the language of combinators) they like to use functional programming languages in the financial industry, which creates a demand for “functionaries” in New York and London.
PS We are happy to answer any questions via
skype: GolovachCourses
email: GolovachCourses@gmail.com
My name is Golovach Ivan, I am a Java Tech Lead practitioner with 10+ years of programming experience (Java EE, J2ME, C, C ++, M-language, Delphi) who switched to Scala.
I prepared and read both regular programming courses ( Java Core + Junior Java Developer ) and special courses (Multicore Programming for JVM ( one and two )).
At the moment I am starting a special course on Scala and in this topic I want to share the materials that I found the most interesting / informative (the course was prepared for more than a year).
Course Program
Materials: Miscellaneous
Materials: Object Oriented Programming in Scala
Materials: Functional Programming in Scala
Materials: Higher kinded types
Materials: Parser combinators
Materials: Metaprogramming / Reflection
Materials: Metaprogramming / Macroses
Materials: Scalaz
Materials: Netty
Materials: Akka
Materials: Finagle
Materials: Zookeeper
Materials: Using FP in the financial industry
Course program
The Scala special course aims at
1. Deeply learning the language, including such “dark corners” as macroses, path dependent types, generics of higher kind. Learn how to create internal and external DSL. to understand why functional programming languages are so popular in the financial industry.
2. Understand why when writing code in functional programming languages (and Scala in particular), mathematical libraries that refer to algebra and category theory are often used.
3. See why modern startups (like Twitter and LinkedIn) often write their infrastructure on Scala.
The special course starts on February 27, 2015 and consists of 16 webinars for 2-2.5 hours. Duration 3 months (1-2 lessons per week). All lectures are recorded on video and provided to students. All necessary literature is provided in electronic form. I answer questions both during webinars and the rest of the time. You have the opportunity to communicate with 15-20 other students who are learning Scala in parallel.
- Module # 1 (4 lectures): Basic Scala
The task of the module is to consider the syntax and ways of solving "everyday" problems on Scala- "Miscellanea"
- Local Type Inference, unified types
- Structural types, tuples
- Generics: variance, upper / lower bounds, existential types
- Lazy values, DelayedInit trait, App / Application
- Implicits, view, view bounds
- Sequence comprehensions
- Annotations, Exceptions
- Work with XML
- Scala's Collections Library, Arrays
- Object Oriented Programming
- Classes, objects, traits
- Type members, abstract types
- Explicitly Typed Self References
- Mixin class composition, compound types, hierarchy linearization
- Cake pattern
- Functional programming
- Functional types, anonymous functions, nested functions, curring, partial application
- Methods / Functions, Operators (prefix, infix, postfix; associativity), zero-bit + no-bit-write
- Call-by-name / call-by-value, named and default params
- Pattern matching, case classes, extractor objects
- "Miscellanea"
- Module # 2 (4 lectures): Advanced Scala
The task of the module is to examine in detail the capabilities of Scala that are not in Java.- Dependent types
- Higher kinded types
- Parser combinators
- Metaprogramming = Reflection + Macros
- Module # 3 (4 lectures): Type-acrobatic libraries in Scala
The task of the module is to consider the most advanced libraries (in the sense of using the system of types and language features), how they are written, what can be done on them.- Scalaz - a bit of category theory (monad, applicative functor, catamorphism, ...)
- Shapeless - a type class and dependent type based generic programming library
- Algebird - or how Twitter uses algebra (monoid, group, half ring, ...)
- Module # 4 (4 lectures): Multithreaded, network and distributed programming
The task of the module is to consider the most popular network libraries for JVM, which are most often the “building blocks” of large distributed systems. Understand why Twitter is written on Scala.- Netty
- Aka
- Finagle
- Zookeeper
Materials: "Miscellaneous"
Scala Introductory Articles
These articles are brief overviews of the language (15-20 pages). They are more likely to be ideological / historical - as the author himself (Odersky) sees his brainchild, which he considers the most important / distinctive / characteristic.
- A Tour of the Scala Programming Language " , Odersky + ...
- "An Overview of the Scala Programming Language" , 2ed, Odersky + ...
- “A Scala Tutorial for Java programmers” , Michel Schinz, Philipp Haller
Scala style guide
Key Scala Articles
These articles illuminate and clarify the basic characteristics of the language.
- Scalable Component Abstractions , Odersky + .... We identify three programming language abstractions for the construction of reusable components: abstract type members , explicit selftypes and modular mixin composition . Together, these abstractions enable us to transform an arbitrary assembly of static program parts with hard references between them into a system of reusable components. ... We demonstrate this approach in two case studies, a subject / observer framework and a compiler front-end.
- “Type classes as objects and implicits” , Odersky + ..., Type classes were originally developed in Haskell as a disciplined alternative to ad-hoc polymorphism. Type classes have been shown to provide a type-safe solution to important challenges in software engineering and programming languages such as, for example, retroactive extension of programs. They are also recognized as a good mechanism for concept-based generic programming and, more recently, have evolved into a mechanism for type-level computation . This paper presents a lightweight approach to type classes in object-oriented (OO) languages with generics using the CONCEPT pattern and implicits (a type-directed implicit parameter passing mechanism).
- “Matching Objects With Patterns” , Odersky + ..., Pattern Matching in all its glory with Case classes / Extractors + comparison with more classical solutions ( Visitor , Type-Test / Type-Cast , ...)
Scala Courses / Collections
Reaching material for a small book, but not books. From the "classics".
- Learning Scala
- Learning Scala in Small Bites
- Twitter.com: Scala School!
- Odersky + Coursera = "Functional Programming Principles in Scala"
- Odersky + Coursera = "Principles of Reactive Programming"
Yes, Coursera itself is written in Scala .
Books
There are a large number of books on the market (about 20) on Scala, but I liked the following 4 most
- "Programming in Scala. 2ed " - a book from Odersky, a classic, must read
- "Scala for the Impatient" - Comrade Horstman, and then managed. If you liked his two-volume Java book, it might be worth a try.
- Scala in Depth - Good coverage: from the basics to advanced points
- “DSLs in Action” - How to Implement Your DSL on Scala
Materials: Object Oriented Programming in Scala
- "Independently Extensible Solutions to the Expression Problem" , Odersky + .... A Scala solution for the “classic” Expression Problem is proposed. Part of the solutions to this problem are inheritance (extension of entities) and the Visitor template (extension of operations), however Odersky solves a more interesting problem - arranging independent extensions and entities and operations at the same time.
- "Scala's Selfless Trait Pattern" , Bill Venners - just a named template for working with inheritance in Scala
- "Scala's Stackable Trait Pattern" , Bill Venners - just a named Scala inheritance pattern
Materials: Functional Programming in Scala
Functional Programming in Scala is a powerful book from one of the contributors at Scalaz.
Materials: Higher kinded types
- “Fighting Bit Rot with Types” , Odersky + ... - described the refactoring of Scala collections for version 2.8 with good immersion in higher-kind types , implicit parameters and implicit conversions
Materials: Parser combinators
Scala includes a package ( scala.util.parsing ) that provides tools for describing Scala External DSL grammar in a format close to EBNF. Those. it is an “internal DSL” for creating “external DSLs”.
In Scala, parsers are implemented as monads - hence defining combinators for parsers are just monadic transformations implementing sequencing, alternation or any other composition operations.
In a number of subject areas, you can build an API in the form of some primitive elements (in this case, parsers) and ways to combine these elements in a certain way (combinators). In this case, the core of the language has everything you need to build external DSLs.
- “Parser Combinators in Scala” , Odersky + ..., - the article gradually writes its own library Parser Combinators and compares it with scala.util.parsing. Parsers for simple arithmetic expressions, xml, lambda calculus that tracks variable binding are built
- “Combinator Parsing, Chapter 31 of Programming in Scala, First Edition” is a basic tutorial from Martin Odersky, Lex Spoon, and Bill Venners. Parsers for arithmetic expressions, json, are built. There is a second edition, but it is not available in the public domain.
- “Monadic Parser Combinators” , Hutton + Meijer
- one of the articles that Odersky and his colleagues relied on when designing parser combinators for Scala - "How to replace failure by a list of successes: A method for exception handling, backtracking, and pattern matching in lazy functional languages , Wadler
- »Higher-order functions for parsing" , Hutton
- Functional parsers , Fokker
- “Deterministic, Error-Correcting Combinator Parsers” , Swierstra + Duponcheel
- "Parsec: Direct Style Monadic Parser Combinators: For The Real World"
- "Packrat Parsing: Simple, Powerful, Lazy, Linear Time"
- "Monadic Parsing in Haskell"
- “Pickler Combinators (functional Pearl)” - Haskell's picklers call it “serializers,” specialized functions for converting objects in memory into byte arrays. It is proposed to build picklers for complex data structures to receive as combinations of picklers for basic types. This pearl was practically motivated: an SML version of the pickler library is used inside the SML.NET compiler. The essential new ingredient of pickler combinators is the tying together of the pickling and unpickling actions in a single value.
- “Instant Pickles: Generating Object-Oriented Pickler Combinators for Fast and Extensible Serialization” Miller, Haller, Burmako, Odersky - a similar approach (previous article) for Scala
- “Even Higher-Order Functions for Parsing or Why Would Anyone Ever Want To Use a Sixth-Order Function? (functional pearl) ” , Chris Okasaki - a parser is a first-order function that takes input and returns the result of parsing to some format. Parser combinators are second-order functions that take first-order functions (parsers) and return first-order functions (parsers). Chris Okasaki was able to find a reasonable sixth-order function !!! associated with parsers.
Materials: Metaprogramming / Reflection
A particularly interesting aspect of macros is that they are based on the same API used also for Scala's runtime reflection, provided in package scala.reflect.api. This enables the sharing of generic code between macros and implementations that utilize runtime reflection.
Until 2.10, Scala has not had any reflection capabilities of its own. Instead, one could use part of the Java reflection API, namely that dealing with providing the ability to dynamically inspect classes and objects and access their members. However, many Scala-specific elements are unrecoverable under standalone Java reflection, which only exposes Java elements (no functions, no traits) and types (no existential, higher-kinded, path-dependent and abstract types). In addition, Java reflection is also unable to recover runtime type info of Java types that are generic at compile-time; a restriction that carried through to runtime reflection on generic types in Scala.
In Scala 2.10, a new reflection library was introduced not only to address the shortcomings of Java's runtime reflection on Scala-specific and generic types, but to also add a more powerful toolkit of general reflective capabilities to Scala. ... with full-featured runtime reflection for Scala types and generics ...
- “Scala-lang.org: Reflection: Overview” Miller, Burmako, Haller
- "Scala-lang.org: Reflection: Environment, Universes, and Mirrors" Miller, Burmako, Haller
- “Scala-lang.org: Reflection: Symbols, Trees, and Types” Miller, Burmako, Haller
- “Scala-lang.org: Reflection: Annotations, Names, Scopes, and More” Miller, Burmako, Haller
- "Scala-lang.org: Reflection: TypeTags and Manifests" Miller, Burmako, Haller
Materials: Metaprogramming / Macroses
A particularly interesting aspect of macros is that they are based on the same API used also for Scala's runtime reflection, provided in package scala.reflect.api. This enables the sharing of generic code between macros and implementations that utilize runtime reflection.
Our flavor of macros is reminiscent of Lisp macros, adapted to incorporate type safety and rich syntax. Unlike infamous C / C ++ preprocessor macros, Scala macros: 1) are written in full-fledged Scala, 2) work with expression trees, not with raw strings, 3) cannot change syntax of Scala. [ here ]
Macros are functions that are called by the compiler during compilation. Within these functions the programmer has access to compiler APIs. For example, it is possible to generate, analyze and typecheck code. You can learn more about macros from documentation. [ here ]
Def macros are shipped as an experimental feature of Scala since version 2.10.0 . A subset of def macros, pending a thorough specification, is tentatively scheduled to become stable in one of the future versions of Scala.
Experimental feature- Also note that macros are considered an experimental and advanced feature, so in order to write macros you need to enable them. Do that either with import scala.language.experimental.macros on per-file basis or with -language: experimental.macros (providing a compiler switch) on per-compilation basis. Your users, however, don't need to enable anything - macros look like normal methods and can be used as normal methods, without any compiler switches or additional configurations.
- "Scala-lang.org: Def Macros" Burmako - macro overview on scala-lang.org
- “Scala-lang.org: Quasiquotes” Shabalin - quasi-citat review
- "Scala-lang.org: Macro Bundles" Burmako - macro bundles overview
- Scala Macros, a Technical Report , Burmako + Odersky
- “What Are Macros Good For?” , Burmako - Macros Are Good For Code generation, Static checks, Domain-specific languages
- "Scala Macros: Let Our Powers Combine! On How Rich Syntax and Static Types Work with Metaprogramming » Burmako
- Scala Macros, a Technical Report Burmako, Odersky
- “Quasiquotes for Scala, a Technical Report” Shabalin, Burmako, Odersky - introduce quasiquotes for the Scala programming language, which solve the problem of manual tree construction and deconstruction. Included case studies show that quasiquotes indeed are easier to work with than existing tools for tree construction. When limitations of current implementation are lifted quasiquotes will become the ultimate tool for the tree manipulation.
- “Yin-Yang: Concealing the Deep Embedding of DSLs” Jovanovic, Shaikhha, Stucki, Koch, Odersky, Nikolaev - a description of the Yin-Yang library, which is a tool for building “deeply embedded domain-specific languages” through the use of macros
Materials: Scalaz
- Learning Scalaz is an excellent online tutorial of 22 lessons.
- Scalaz - Resources For Beginners - a large selection of Scalaz links
- "Introduction to Category Theory in Scala"
- "Applicatives are generalized functors"
- Apocalisp blog - OLD blog of "Functional Programming Scala" author
- Higher Order. Philosophy and functional programming. - NEW blog of "Functional Programming Scala" author
- “Scalaz: For the Rest of Us” - what can you do on Scalaz WITHOUT understanding the theory of categories
Materials: Netty
Netty - an asynchronious and event-driven network application framework for rapid development of maintanable high performance protocol servers and clients. Netty is the de fakto standard for using java.net. *, NIO and NIO.2 (Akka and Finagle use Netty, Zookeeper directly under NIO / NIO.2 "under the hood"). Although it is possible to directly implement Reactor / Proactor / Asynchronous Completion Token / Acceptor-Connector asynchronous message processing templates,however, this involves a lot of template code and obscuring the functionality of the subject area. Netty's advantage is both declarative code and the fact that the library is a protocol constructor (http, ftp, smtp, websockets, ...).
- Full code of example: io.netty.example.echo. * - simple echo client and echo server on Netty
- Full code of example: io.netty.example.telnet. * - simple telnet client and telnet server on Netty
- Full code of example: io.netty.example.factorial. *
- Full code of example: io.netty.example.http. * - simple http client and http server on Netty
- Full code of example: io.netty.example.socksproxy. * - simple SOCKS5 proxy on Netty
- Netty Best Practices - Tips from the author of Netty in Action
- Netty 4 at Twitter: Reduced GC Overhead
- Related articles - A list of over 100 articles recommended by Netty.
Materials: Akka
Akka is the de facto standard framework for multi-threaded and distributed actor-based architectures for the JVM. Starting with Scala version 2.10.0, Akka has superseded the native implementation of actors .
- Terminology, Concepts - Concurrency vs. Parallelism, Asynchronous vs. Synchronous, Non-blocking vs. Blocking, Deadlock vs. Starvation vs. Live-lock, Race Condition, Non-blocking guarantees (Progress Conditions)
- Actor Systems - Hierarchical Structure, Configuration Container, Actor Best Practices
- What is an actor? - Actor Reference, State, Behavior, Mailbox, Children, Supervisor Strategy
- Supervisor and monitoring
- Actor References, Paths and Addresses
- Akka and the Java Memory Model - The Java Memory Model, Actors and the Java Memory Model, Futures and the Java Memory Model, STM and the Java Memory Model, Actors and shared mutable state
- Message delivery delivery
- Scala API: Actors
- Scala API: Typed Actors
- Scala API: Event Bus
- Scala API: Scheduler
- Scala API: Futures
- Scala API: Dataflow Concurrency
- Scala API: Fault Tolerance
Materials: Finagle
Finagle - A Protocol-Agnostic extensible RPC System for the JVM, used to construct high-concurrency servers. Written and used on twitter.com. The basic principle is “We must program locally, communicate globally” . Part of the Twitter stack (along with Ostrich, Zipkin, Mesos, Iago, ZooKeeper, Scalding). Finagle includes load balancing, connection pooling, call with timeout, monitoring, statistics collection.
- A brief description of the Finagle components: - Protocols , Futures , Services & Filters , Servers , Clients , Names , Metrics
- Finagle: A Protocol-Agnostic RPC System - Twitter post from Finagle
- "How to build a simple distributed search engine using Scala and Finagle framework" - a lecture in the framework of the project Twitter.com / Scala school.
- “Thrift: Scalable Cross-Language Services Implementation” is a reference article on the Thrift protocol. This protocol is the most popular “carrier protocol” for Finagle.
Materials: Zookeeper
Zookeeper is a fail-safe centralized service for managing configuration information, naming, distributed synchronization and other group services, part of the Twitter stack . It can be used to create basic data structures (cluster) - queues, locks, barriers. Suitable for distributed algorithms such as two-phase-commit, leader election and others.
- “ZooKeeper Programmer's Guide” is a good description (Data Model, Sessions, Watches, access control, Consistency guarantees, Common Problems and Troubleshooting).
- "Programming with ZooKeeper - A basic tutorial" - examples of the implementation of barriers and manufacturer-consumer architecture.
- ZooKeeper Internals - Atomic Broadcast, Leader Activation, Quorums
- “ZooKeeper Recipes and Solutions” - create a distributed barrier, queue, lock based on Zookeeper. We do two-phase-commit and leader election.
- "The Chubby lock service for loosely coupled distributed systems" - a description of the library from Google. Zookeeper was made based on its architecture, gleaned, including from this article.
- “Zab: High-performance broadcast for primary-backup systems” is a description of the Zab protocol that underlies Zookeeper.
- “ZooKeeper: Wait-free Coordination for Internet-scale Systems.” Is a basic article from Yahoo (and Zookeeper was designed there to coordinate the HDFS / Hadoop cluster).
- “ZooKeeper - A Reliable, Scalable Distributed Coordination System” - infoq.com article
Materials: Using FP in the financial industry
For a number of reasons (the ability to describe a subject area in the language of combinators) they like to use functional programming languages in the financial industry, which creates a demand for “functionaries” in New York and London.
- Composing Contracts: An Adventure in Financial Engineering, Simon Peyton Jones + ... - A basic article by Haskell about introducing financial contracts at Haskell. "We introduce a combinator library that allows us to describe such contracts precisely, and a compositional denotational semantics that says what such contracts are worth. We sketch an implementation of our combinator library in Haskell. Interestingly, lazy evaluation plays a crucial role. " "The finance industry has an enormous vocabulary of jargon for typical combinations of financial contracts (swaps, futures, caps, oors, swaptions, spreads, straddles, captions, European options, American options, ... the list goes on)." "Our combinators can be used to describe a contract, but we also want to process a contract. Notably, we want to be able to find the value of a contract. In Section 4 we describe how to give an abstract valuation semantics to our combinators. A fundamentally-important property of this semantics is that it is compositional; that is, the value of a compound contract is given by combining the values of its sub-contracts. ”
- “Commercial Uses: Going functional on exotic trades” - a description of the DSL used in Barclays for working with financial instruments (Haskell). “The Functional Payout Framework (fpf) is a Haskell application that uses an embedded domain-specific functional language to represent and process exotic financial derivatives. Whereas scripting languages for pricing exotic derivatives are common in banking, fpf uses multiple interpretations to not only price such trades, but also to analyze the scripts to provide lifecycle support and more »
- “Scala at EDF Trading. Implementing a Domain-Specific Language for Derivative Pricing with Scala. ” -“ DIESEL is a language for representing energy derivatives to facilitate Monte Carlo pricing and analytics. The DSL consists of a combinator parser libary and algebraic data types with case classes. ”
- "Compositional specification of commercial contracts"
- “An Algebraic Specification of a Language for Describing Financial Products” - “We report on the use of formal methods and supporting tools during the development of a language applied in a banking environment. This language, called RISLA, is used to define the nature of the interest products offered by a bank. A RISLA description fixes the cash flows (amounts of money coming in or going out on particular dates) resulting from a product .... "The language has been developed with the use of algebraic specifications, the role of which is discussed."
- “Domain-Specific Languages versus Object-Oriented Frameworks: A Financial Engineering Case Study” - “The use of a domain-specific language can help to develop readable and maintainable applications in that domain with little effort. Alternatively, the same aims can be achieved by setting up an object-oriented framework. For the domain of financial engineering, independently both an objectoriented framework and a domain-specific language have been developed. We use this opportunity to contrast these two, to highlight the differences and to discuss opportunities for mutual benefits. ”
- "Adventures in financial and software engineering"
- “Financial Domain-Specific Language Listing - A Large Selection of Finance API / DSL
PS We are happy to answer any questions via
skype: GolovachCourses
email: GolovachCourses@gmail.com
Only registered users can participate in the survey. Please come in.