”Life is too short for imperative programming” John Hughes.

Slides:



Advertisements
Similar presentations
Haskell Lets review some of the Haskell concepts you have been learning on your own. The answers are included, but try it yourself first.
Advertisements

Introduction to Compilation of Functional Languages Wanhe Zhang Computing and Software Department McMaster University 16 th, March, 2004.
WALT: DESIGN AN EXERCISE PROGRAMME IN FRENCH WILF: USE OF THE IMPERATIVE FORM OF THE PRESENT TENSE TO GIVE INSTRUCTIONS FOR LEVEL 5. ADDITIONAL TENSES.
Lesson Six Is That A New Jacket? Vocabulary Dialogue1~3 Practice Grammar Focus.
Applied Calculus, 3/E by Deborah Hughes-Hallet Copyright 2006 by John Wiley & Sons. All rights reserved. Section 7.2 Integration by Substitution.
P u t y o u r h e a d o n m y s h o u l d e r.
KJ 412 : “ TUNTUN AKU, TUHAN ALLAH ” Syair: William Williams (1945) (Bahasa Wales) Terjemahan: Yamuger (1978) Lagu: John Hughes (1907)
John Oldfield Sunday 6 th April 2014 Heroes: People Just Like Us.
Quick Sort Elements pivot Data Movement Sorted.
CMPE 293Gabriel Hugh Elkaim 1. CMPE 293Gabriel Hugh Elkaim 2.
CMPE 293Gabriel Hugh Elkaim 1. CMPE 293Gabriel Hugh Elkaim 2.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Introduction to Computer Engineering by Richard E. Haskell 8086 Tutor Monitor Module M14.3 Section 9.3 Appendix B.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Introduction to Functional Programming Notes for CSCE 190 Based on Sebesta,
Selection Sort
Color Blindness Test What do YOU see?. Image 1 Both the normal and those with all sort of color vision deficiencies read it as 12.
Environmental Awareness Week Eco Fashion Day Visuals.
Arithmetic and Geometric Series (11.5) Short cuts.
Haskell Chapter 1, Part II. List Comprehension  List comprehensions are a way to filter, transform and combine lists  Similar to mathematical set comprehensions.
”Life is too short for imperative programming” John Hughes.
Classification and Division Let's review: What's the difference between classification and division ?
CS 355 – PROGRAMMING LANGUAGES Dr. X. Common LISP A combination of many of the features of the popular dialects of LISP around in the early 1980s A large.
too.
Modeling with Haskell Scientific Seminar 03/04 Gerhard Navratil.
Geometry Warm ups. 7-4 SIMILARITY IN RIGHT TRIANGLE.
Going Functional Primož Gabrijelčič. Functional programming.
Format of the Final Project. Final Project The Final project is due 1 week from today. To complete the project students must prepare the following – A.
Selection Sort Comparison Data Movement Sorted.
Selection Sort
JOHN DOE PERIOD 8. AT LEAST 80% OF HUMANITY LIVES ON LESS THAN $10 A DAY.
Short Vowels Sort the pictures according to vowel sounds. Press space bar to see the vowels. By: Mrs. Sabata and Mrs. McDaniel.
FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES Dr. John Peterson Western State Colorado University.
Minutes Left:
Writing Your Speech.
outh-korea-sewol-ferry- disaster-president- apologizes/
Merge Sort Comparison Left Half Data Movement Right Half Sorted.
Be Inspired By Dylan. How to write a poem? This can be a puzzler!!!!!!! Let Dylan inspire you to write. His poems take the reader on a journey. He carefully.
If Clauses Conditional Clauses If clause indicates the condition and a principal clause indicates the result of the action.
“I cannot keep from saying at least 20 times a day, ‘How right I am and how wrong they are.’” Conference of Vienna - Run by Prince Metternich.
Short or Tall?. Short Tall Short Tall Short Tall. 3
Set Comprehensions In mathematics, the comprehension notation can be used to construct new sets from old sets. {x2 | x  {1...5}} The set {1,4,9,16,25}
Set Comprehensions In mathematics, the comprehension notation can be used to construct new sets from old sets. {x2 | x  {1...5}} The set {1,4,9,16,25}
What is a Functional Language?
Golden Line Exercise Read the excerpt from Malcolm X’s autobiography about his reading experience while he was in prison. Choose a single line from the.
Haskell Chapter 1, Part II.
Depicting Ophelia “Too much of water has thou, poor Ophelia, And therefore I forbid my tears” ( )
More Functional Programming
Test Data Generators.
Semantics HOFL short semantics Roberto Zunino
Programming Languages 2nd edition Tucker and Noonan
James 4:13 – 17 Psalm 103:15 – 16; Job 14:1 – 2 Job 7:6
پروتكل آموزش سلامت به مددجو
Computer Science 312 Haskell Lists 1.
Place for the Word John 8:37. Place for the Word John 8:37.
CSE 341 : Programming Languages Section 5 Haskell: Round 3
Merge sort merge sort: Repeatedly divides the data in half, sorts each half, and combines the sorted halves into a sorted whole. The algorithm: Divide.
Student Satisfaction Spring 2006 (Short version)
PROGRAMMING PARADIGMS
#50 Martin Luther King, Jr. and Malcolm X Assignment
Given value and sorted array, find index.
Element, Compound or Mixture?
PROGRAMMING IN HASKELL
Question Tags Teacher Silvino Sieben 2nd grade HS.
Heapsort Build the heap.
Merge sort merge sort: Repeatedly divides the data in half, sorts each half, and combines the sorted halves into a sorted whole. The algorithm: Divide.
Copyright © 2014 John Wiley & Sons, Inc. All rights reserved. Chapter 19 Current Asset Management and Short-Term Financing Tenth Edition Alan C. Shapiro.
RANDOM NUMBERS SET # 1:
Set 8 first ran where new pretty call too him three after.
December Week 1 a_e Monday Tuesday Wednesday Thursday Friday
Presentation transcript:

”Life is too short for imperative programming” John Hughes

Sorting in Haskell sort [] = [] sort (x:xs) = sort [y | y <- xs, y<x] ++ [x] ++ sort [y | y =x]

Sorting in Pascal

Sorting in Pascal, page 2

Sorting in Pascal, page 3

Sorting in Java private void quicksort(int low, int high) { int i = low, j = high; int pivot = numbers[low + (high-low)/2]; while (i <= j) { while (numbers[i] < pivot) { i++; } while (numbers[j] > pivot) { j--; } if (i <= j) { exchange(i, j); i++; j--; }

Sorting in Java, page 2 if (low < j) quicksort(low, j); if (i < high) quicksort(i, high); } private void exchange(int i, int j) { int temp = numbers[i]; numbers[i] = numbers[j]; numbers[j] = temp; }

Software Crisis, 1968—today Software project outcomes

In Large Companies

The Von Neumann Bottleneck

Technology adoption life cycle

The Erlang Story 1986—Erlang emerges at Ericsson –Functional language –Extra support for concurrency & fault tolerance Early 1990s—small products 1996 –Open Telecoms Platform (higher-order functions for robust telecom systems) –AXD 301 project starts

The AXD 301 ATM switch (telephone backbone) Born out of a failed project! 1,5 MLOC Erlang Seven nines reliability 4-10x better productivity, quality

Erlang Story II 1998—Erlang banned for new projects 1998—Open source Erlang 1998—Bluetail –Jane Walerud VD –Mail robustifier, Web prioritizer

SSL Accelerator Alteon WebSystems' SSL Accelerator offers phenomenal performance, management and scalability. –Network Computing

Kreditor Order 100:- Order details 97:- invoice 100:- Fem år har gått och vi har vuxit till ett ambitiöst och kreativt gäng på 350 stycken. Vi har blivit utsedda till Årets företag -07 (skryt), ökat omsättningen med % och lyckats bli marknadsledande i Norden (fakta).

Founded May 2006 Selling… QuickCheck! –Key feature: simplifies failing tests –Extensions for testing stateful systems

Media Proxy Multimedia IP-telephony (IMS) Connects calls across a firewall Test adding and removing callers from a call Add Sub Add Sub Add Sub Call Full

OK 3G Radio Base Station Setup OK Reject

Database bug premature eof Open Close Insert Look up Find "We know there is a lurking bug somewhere in the code. We have got 'bad object' and 'premature eof' every other month the last year. We have not been able to track the bug down since the file is repaired automatically next time it is opened.“ Tobbe Törnqvist, Klarna, 2007

Most Influential ICFP Paper Award

Erlang in Ericsson 1998—BANNED! 2007—Recommended for ”complex state machines with high performance requirements” 2010—recruiting Erlang programmers in Göteborg

Derivatives trading in New York 10 Microsoft shares Option to buy ● for $100 anytime In 2007 Option to sell ● for $10 in Nov 2006

Financial Contracts in Haskell anytime :: Contract -> Contract -- Acquire the underlying contract at -- any time before it expires (but -- you must acquire it)  The option to acquire 10 Microsoft shares, for $100, anytime between t1 and t2 years from now golden_handcuff = anytime shares shares = zero `or` (scaleK -100 (one Dollar) `and` scaleK 10 (one MSShare)) anytime : Choose when MS shares are a “currency” or : Choose whether

New Approach C++ plugins Haskell contract models

”Functional programming on Wall Street” –Proprietary trading –>100 people –Offices in New York, London, Tokyo –OCaml primary development language

Where are we?

TIOBE Programming Language Index Position Oct 2010 Position Oct 2009 Programming Language Ratings Oct 2010 Delta Oct Java18.166%-0.48% 22C17.177%+0.33% …………… CategoryRatings Oct 2010Delta Oct 2009 Object-Oriented Languages 55.9%+2.5% Procedural Languages 38.9%-3.4% Functional Languages 3.5%+0.6% Logical Languages1.6%+0.2%

The Multicore Opportunity 4 cores 64 cores

Stable compiler and selected high quality libraries Installers for multiple platforms For serious developers 200,000 downloads in 4 months for Windows alone!

När all världens programmerare börjar få grepp om objektorientering är det dags för nästa paradigmskifte. Med Microsoft som härförare vinner funktionella språk mark. Programmerare får räkna med att lära om.

First Intel dual core released

60 people in 2010 x2 every year! Customers –Telecom –Internet services –Financial services –Automotive –…

Functional Programming on the Java Virtual Machine

Java and Object Orientation ” one of the leading IT industry events in Europe … attracts more than 1,300 participants.”