Lex Spoon discusses the Scala programming language including the origin of Scala, the philosophy behind Scala, the Scala feature set, Object-Oriented and Functional programming in Scala, examples of Scala code, writing DSLs, how Scala is converted into Java, Scala performance, Abstract Data Types, unapply, actors and partial functions. Lex Spoon divides his time between two posts: he works at EPFL in Switzerland on the Scala team, and at IBM Research in New York on X10.
For some reason, I suddenly felt like playing around with Scala for a couple of days, and having gotten over my perceived difficulty of the language vs Groovy, and after actually trying to write something in it - I really like it :) At first glance, advanced functional programming in Scala can look a little freaky to someone who’s only been writing Java for the last few years. But if you start slowly, it all slides into place. I started to get into it by reading this is a really good series of articles introducing the language What follows are two examples of Scala. The first, LoveGame is a demonstration of programming a simple algorithm in Scala along with a little comarpison with Java. The second is a little toying around i did with Scala to create a front end for JScience with the “Pimp my library” pattern.
This application is an end-to-end sample application for .NET Enterprise Application Server technologies. It is a service-oriented application based on Windows Communication Foundation (.NET 3.0) and ASP.NET, and illustrates many of the .NET enterprise development technologies for building highly scalable, rich "enterprise-connected" applications. It is designed as a benchmark kit to illustrate alternative technologies within .NET and their relative performance. The application offers full interoperability with Java Enterprise, including IBM WebSphere's Trade 6.1 sample application, and newly provided implementations on Oracle Application Server 10G (OC4J) and Oracle WebLogic Server 10.3 (Oracle implementations included with the download below). As such, the application offers an excellent opportunity for developers to learn about .NET and building interoperable, service-oriented applications.
Class 1: Overview * Arithmetic expressions * Arithmetic expressions with let-binding o Variation: Call-by-value let-binding syntax o Variation: Defining evaluation with a hypothetical judgement * Typed arithmetic expressions o Variation: Typed arithmetic expressions (extrinsic encoding) * Exercises 1 Class 2: Representation * Mechanizing Metatheory in a Logical Framework discusses this material in detail. * Exercises 2 Class 3: Mechanizing Metatheory * Type safety for MinML (intrinsic encoding) * Type safety for MinML (extrinsic encoding) * Exercises 3 Additional reading * PFPL: We will use Practical Foundations for Programming Languages as a reference for basic PL concepts. * MMLF: Mechanizing Metatheory in a Logical Framework discusses LF, representation, and mechanized metatheory in technical detail. * Proving metatheorems with Twelf is a self-contained intro tutorial
This article is part three in a series on introductory Haskell programming. In the first article, we wrote a small program to recursively scan file-system directories and print their contents as ASCII-art trees. In the second article, we refactored the program to make its logic more reusable by separating the directory-scanning logic from the tree-printing logic. In this article, we will address a shortcoming of the refactored version: It must scan directory hierarchies completely before printing their trees, i.e., it must scan and then print, when doing both simultaneously is both more efficient and more user friendly. Recall from the previous article that our directory-printing program is factored into three pieces of logic:
A Tutorial Implementation of a Dependently Typed Lambda Calculus Andres Löh, Conor McBride and Wouter Swierstra We present the type rules for a dependently-typed core calculus together with a straightforward implementation in Haskell. We explicitly highlight the changes necessary to shift from a simply-typed lambda calculus to the dependently-typed lambda calculus. We also describe how to extend our core language with data types and write several small example programs. The paper is accompanied by an executable interpreter and example code that allows immediate experimentation with the system we describe. Download Draft Paper (submitted to FI) Haskell source code (executable Haskell file containing all the code from the paper plus the interpreter; automatically generated from the paper sources) prelude.lp (prelude for the LambdaPi interpreter, containing several example programs) Instructions (how to get started with the LambdaPi interpreter)