Skip to content

Commit

Permalink
Modified Rakefile to use rule for pdf generation.
Browse files Browse the repository at this point in the history
Pdf generation of slides looked horrible just stick with s5.
Removed / prefix for the images pdftex did not like them
Fixed some bugs in the notes.
  • Loading branch information
basbossink committed Apr 28, 2010
1 parent b338be2 commit 8510461
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
9 changes: 5 additions & 4 deletions functional-programming/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ rule '.png' => '.svg' do |t|
sh "#{cov} #{t.source} #{t.name}"
end

rule '.pdf' => '.markdown' do |t|
sh "markdown2pdf -N -o #{t.name} #{t.source}"
end

file 'slides.html' => 'slides.markdown' do
sh "pandoc -w s5 -s slides.markdown > slides.html"
end
Expand All @@ -27,15 +31,12 @@ file 'languages.png' => 'language-study.list' do
sh "perl language-study.list2dot language-study.list | dot -Tpng > languages.png"
end

file 'notes.pdf' => 'notes.markdown' do
sh "markdown2pdf -N -o notes.pdf notes.markdown"
end

file 'slides.markdown' => [
'lazy-eager-single-multi.png',
'dynamic-static-strong-weak.png',
'languages.png',
'parabola.png',
'curve.png'
]

file 'notes.markdown' => []
25 changes: 17 additions & 8 deletions functional-programming/notes.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

### Inventory

- How has used a functional language?
- How has used a functional language after completing their education?
- How has written a LINQ query?
- Who has used a functional language?
- Who has used a functional language after completing their education?
- Who has written a LINQ query?

### Anecdote

- Euclid greek mathematician 300 BC known for:
+ Elements, 13 books containing from the ground up geometry and number theory Euclidean algorithm
+ Elements, 13 books containing from the ground up geometry and number theory
+ Euclidean algorithm, efficient algorithm to calculate gcd

> When Ptolemy the First asked Euclid if there was no shorter road to geometry than the Elements, he replied, "there is no royal road to geometry."
Expand Down Expand Up @@ -83,6 +83,7 @@

### Timeline

- Stripped down [history of programming languages][hist]
- Lisp one of the first programming languages
+ predates C by 14 years
+ based on untyped lambda calculus
Expand All @@ -98,6 +99,8 @@
languages
- Clojure a Lisp on the JVM and .Net

[hist]: http://oreilly.com/news/languageposter_0504.html

## Taxonomy

- Languages can be classified in different ways
Expand Down Expand Up @@ -132,7 +135,7 @@
+ Python
+ Ruby
+ Scala
- F# no interpreter on the fly compilation
- F# no interpreter but on the fly compilation

### Type inference

Expand All @@ -145,7 +148,7 @@

- Examples
- F# supports **Active Patterns** functions to be run as part of pattern matching
Makes it possible to match over arbitrary types and paremeterize pattern
Makes it possible to match over arbitrary types and parameterize pattern
matching.

### Algabraic data types
Expand Down Expand Up @@ -200,7 +203,7 @@ Java JSE 7 proposed syntax quite ugly
- example
- naive is **not** tail recursive
+ large and/or unbalanced tree's -> stackoverflow
- continuation passing pass the function that should be invoked with answer
- continuation passing, pass the function that should be invoked with answer
- both sizeCont left (fun leftSize -> .. are tail recursive

## Memoization
Expand All @@ -216,9 +219,15 @@ Java JSE 7 proposed syntax quite ugly
- chaining computations
- jukky cs example

# What is it good at?
# When to use it?

## Stateless

- web/REST

# When not to use it?

- a lotta state
- interoperabillity, e.g. Haskell, Erlang only interoperate with C
- team knowledge

10 changes: 5 additions & 5 deletions functional-programming/slides.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@

# Example

![](/parabola.png "A simple function")
![](parabola.png "A simple function")

# Non-example

![](/curve.png "A simple curve")
![](curve.png "A simple curve")

# Definition of a Function

Expand All @@ -61,7 +61,7 @@
+ untyped lambda calculus
+ simply typed lambda calculus

![](/languages.png "Abbreviated genealogy of functional programming languages")
![](languages.png "Abbreviated genealogy of functional programming languages")

# Taxonomy

Expand All @@ -73,11 +73,11 @@

# Taxonomy

![](/dynamic-static-strong-weak.png "dynamic vs. static and strong vs. weak typing")
![](dynamic-static-strong-weak.png "dynamic vs. static and strong vs. weak typing")

# Taxonomy

![](/lazy-eager-single-multi.png "lazy vs eager evaluation and single vs multi-paradigm" )
![](lazy-eager-single-multi.png "lazy vs eager evaluation and single vs multi-paradigm" )

# Features

Expand Down

0 comments on commit 8510461

Please sign in to comment.