Archives for posts with tag: Programming Languages

We’ve kicked off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer (you can thank Erik for many of the functional constructs that have shown up in languages like C# and VB.NET. When you use LINQ, thank Erik in addition to Anders).

We will release a new chapter in this series every Thursday.

In Chapter 12, Lazy Evaluation, Dr. Meijer takes us on a journey into the world of order of evaluation (when expressions are evaluated). In the case of lazy evaluation, computation is delayed until the result of the computation is known to be required.

Most programming languages that most of you use day to day use eager or strict evaluation, which is the opposite of lazy evaluation. In the strict evaluation world, expressions are evaluated as soon as they are bound to a variable (this is also known as greedy evaluation). In Haskell, laziness is first class!

Tune in. Learn and enjoy!

Yes. You read the title correctly! For today’s lecture in the Functional Programming Fundamentals series of lectures the great Dr. Graham Hutton, author of the Programming in Haskell book that Dr. Erik Meijer has based this lecture series on, is guest lecturing Chapter 11 – The Countdown Problem! Thank you, Graham! What an honor and a treat to have you on Channel 9, especially in this context. :)

This lecture was filmed in Dr. Hutton’s office at the University of Nottingham. What is the Countdown Problem, exactly? It’s a numbers game, based loosely on a very popular television series. The point is that you will need to use, well, functions to solve the Countdown Problem. Of course, it goes without saying that Haskell is very well suited to solve these kinds of problems.

Tune in and learn from a Haskell master. It should be clear that you will want to have had gone through the earlier episodes (if you are beginning with functional programming and Haskell, specifically) to get the most out of this lecture. That said, it’s quite amazing to learn directly from the author himself. What a nice surprise!

Enjoy!

Juan Chen and Nikhil Swamy, two researchers at the Research in Software Engineering group, present FINE, a new programming language for .NET.

Software systems are governed by increasingly complex security policies. Ensuring that a system properly enforces its policy is hard. FINE is a new programming language (similar to F#) whose type system can be used to check that rich, stateful authorization and information flow policies are properly enforced. FINE is compiled to DCIL, a new minimal extension of .NET CIL. Our compiler carries type information throughout and allows DCIL programs to be verified independently for security.

In this video, Juan an Nikhil give the big picture and a shiny demo of FINE.

 The Research in Software Engineering team (RiSE) coordinates Microsoft’s research in Software Engineering in Redmond, USA.

You asked for it and we delivered: The first E2E2E (expert to expert to expert). Here, Erik Meijer converses with language designer Paul Vick (of VB fame and now focusing on the language code-named “M”) and Michael Rys, a long time expert in the world of data programmability working on the SQL Server team. This great conversation covers many topics (data, type systems, programming languages, transactions, beyond the relational database) as you’ve come to expect from Expert to Expert. Tune in.

Enjoy.

We’ve kicked off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer (you can thank Erik for many of the functional constructs that have shown up in languages like C# and VB.NET. When you use LINQ, thank Erik in addition to Anders).

We will release a new chapter in this series every Thursday.

In Chapter 10, Declaring Types and Classes, Dr. Meijer teaches us about type declarations, data declarations, arithmetic expressions, etc.  In Haskell, a new name for an existing type can be defined using a type declaration:

 type String = [Char]

 String is a synonym for the type [Char].

Like function definitions, type declarations can also have parameters. Type declarations can be nested, but not recursive.

Nested:
type Pos   = (Int,Int)

type Trans = Pos -> Pos

Illegal recursion:
type Tree = (Int,[Tree])

A completely new type can be defined by specifying its values using a data declaration:

 data Bool = False | True

Bool is a new type, with two new values False and True.

Get the presentation slides here

Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9

We’ve kicked off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer (you can thank Erik for many of the functional constructs that have shown up in languages like C# and VB.NET. When you use LINQ, thank Erik in addition to Anders).

We will release a new chapter in this series every Thursday.

In Chapter 9, Interactive Programs, Dr. Meijer will teach us how to make programs in Haskell that are side-effecting: interactive. Haskell programs are pure mathematical functions with no side effects. That said, you want to be able to write Haskell programs that can read input from the keyboard and write output to the screen which are in fact side effects. So, interactive programs have side effects… Interactive programs can be written in Haskell by using types to distinguish pure expressions from impure actions that may involve side effects.

Consider the following:


IO a
The type of actions that return values of type a

IO Char
The type of actions that return a character

IO()
The type of purely side effecting actions that return no result value

Warning: This lecture may contain the use of the term Monad. Do not fear. Everything will be OK. :)

You should watch these in sequence (or skip around depending on your curent level of knowledge in this domain):

Get the presentation slides here

Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8

in reply to C9 Lectures: Dr. Erik Meijer – Functional Programming Fundamentals Chapter 9 of 13

Languages Matter
Google Tech Talk November 17, 2009 ABSTRACT Presented by Yukihiro Matsumoto. A short talk by Yukihiro "Matz" Matsumoto about programming languages. Matz is the chief designer of the Ruby programming language and its reference implementation, Matz's Ruby Interpreter (MRI).
Views:
6972
68
ratings

Time:
14:25
More in
Science & Technology

We’ve kicked off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer (you can thank Erik for many of the functional constructs that have shown up in languages like C# and VB.NET. When you use LINQ, thank Erik in addition to Anders). 

We will release a new chapter in this series every Thursday.

In Chapter 8, Functional Parsers, it’s all about parsing and parsers. A parser is a program that analyses a piece of text to determine its syntactic structure. In a functional language such as Haskell, parsers can naturally be viewed as functions.

  type Parser = String -> Tree

A parser is a function that takes a string and returns some form of tree.

You should watch these in sequence (or skip around depending on your curent level of knowledge in this domain):

Get the presentation slides here

Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7

We’ve kicked off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer (you can thank Erik for many of the functional constructs that have shown up in languages like C# and VB.NET. When you use LINQ, thank Erik in addition to Anders). 

We will release a new chapter in this series every Thursday.

In Chapter 7, Dr. Meijer teaches us about Higher-Order Functions. A function is called higher-order if it takes a function as an argument and returns a function as a result:

twice    :: (a -> a) -> a -> a
twice f x = f (f x)

The function twice above is higher order because it takes a function (f x) as it first argument and returns a function (f(fx)) 

Dr. Meijer will elaborate on why higher-order functions are important and there are some really interesting side-effects of higher-order functions such as defining DSLs as collections of higher-order functions and using algebraic properties of higher-order functions to reason about programs.

You should watch these in sequence (or skip around depending on your curent level of knowledge in this domain):

Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6

Now, we do have a textbook and you should go buy it: The great Graham Hutton’s Programming in Haskell. We worked with the publisher, Cambridge University Press, to get all Niners a 20% discount on the book. Now, you don’t need the book to learn a great deal from this lecture series since Graham’s website has all the slides and samples from the book as well as answers to the exercises. That said, it’s highly recommended reading and you should consider it.

The promotion code is 09HASK and it is vaild on both the Hardback:

9780521871723 and Paperback: 9780521692694. The catalog pages are:

Hardback:

http://www.cambridge.org/us/catalogue/catalogue.asp?isbn=9780521871723 and the paperback is:

http://www.cambridge.org/us/catalogue/catalogue.asp?isbn=9780521692694

Note: This special offer is valid until December 31, 2009

We’ve kicked off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer (you can thank Erik for many of the functional constructs that have shown up in languages like C# and VB.NET. When you use LINQ, thank Erik in addition to Anders). 

We will release a new chapter in this series every Thursday.

In Chapter 5, Dr. Meijer introduces and digs into List Comprehensions. In mathematics, comprehension notation is used to construct new sets from old sets. In Haskell, you can create new lists from old lists using a similar comprehension syntax:

[x^2 | x <- [1..5]]

The above notation represents the list [1,4,9,16,25] of all numbers x^2 such that x is an element of the list [1..5]. The <- [1..5] syntax is known as a generator and list comprehensions can have mulitple generators that can have explicit dependencies on other generators. You will also learn about guards, which restrict values created by earlier generators.

You should watch these in sequence (or skip around depending on your curent level of knowledge in this domain):

Chapter 1
Chapter 2
Chapter 3
Chapter 4

Now, we do have a textbook and you should go buy it: The great Graham Hutton’s Programming in Haskell. We worked with the publisher, Cambridge University Press, to get all Niners a 20% discount on the book. Now, you don’t need the book to learn a great deal from this lecture series since Graham’s website has all the slides and samples from the book as well as answers to the exercises. That said, it’s highly recommended reading and you should consider it.

The promotion code is 09HASK and it is vaild on both the Hardback:

9780521871723 and Paperback: 9780521692694. The catalog pages are:

Hardback:

http://www.cambridge.org/us/catalogue/catalogue.asp?isbn=9780521871723 and the paperback is:

http://www.cambridge.org/us/catalogue/catalogue.asp?isbn=9780521692694

Note: This special offer is valid until December 31, 2009