juste saving work
This commit is contained in:
parent
38e5fb6966
commit
abc26c979c
3 changed files with 231 additions and 49 deletions
BIN
Cisco.org.gpg
BIN
Cisco.org.gpg
Binary file not shown.
146
TODO.org
146
TODO.org
|
@ -68,14 +68,29 @@
|
|||
:PROPERTIES:
|
||||
:EFFORT: 2:00
|
||||
:END:
|
||||
** CANCELED [#C] FP Meetup :geek:
|
||||
CLOSED: [2017-09-14 Thu 07:19] DEADLINE: <2017-10-30 Mon>
|
||||
*** DONE Presentation History of FP, etc...
|
||||
CLOSED: [2017-06-21 Wed 08:09]
|
||||
** TODO [#C] FP Meetup :geek:
|
||||
*** TODO Presentation History of FP, etc...
|
||||
*** TODO Demander à Luc pour organiser une conf OSDC environ 100 personnes sur plusieurs jours, workshop, etc...
|
||||
*** DONE Appler SunDesk pour savoir s'is peuvent nous filer une salle
|
||||
CLOSED: [2017-12-04 Mon 22:15]
|
||||
** Perso
|
||||
*** [#A] Reparation C4
|
||||
**** TODO Prendre RDV
|
||||
SCHEDULED: <2017-11-28 Tue>
|
||||
*** DONE Envoyer demande autorisation tonnelle
|
||||
CLOSED: [2017-12-02 Sat 11:22]
|
||||
Bonjour,
|
||||
|
||||
Nous aurions aimé pouvoir ajouter à l'ordre du jour lors de la prochaine
|
||||
assemblée des co-propriétaires de la résidence "Les collines de Circée" une
|
||||
demande nous autorisant à installer une tonnelle sur notre terrasse.
|
||||
|
||||
Pour donner une idée voici une photo du type de tonnelle que nous envisageons
|
||||
d'installer: http://www.castorama.fr/images/products/i/i_598558_02.jpg
|
||||
|
||||
Très cordialement,
|
||||
Krystlele & Yann Esposito
|
||||
|
||||
*** TODO Reparation C4
|
||||
**** DONE [#A] Prendre RDV E&G tel:+33492049579
|
||||
CLOSED: [2017-12-07 Thu 16:43] SCHEDULED: <2017-11-28 Tue>
|
||||
*** DONE Impots :admin:
|
||||
CLOSED: [2017-06-21 Wed 07:53]
|
||||
**** DONE Vérifier Revenu Cisco 2016-12: 52407€
|
||||
|
@ -98,3 +113,120 @@
|
|||
**** Sonia (1 adulte ou 1 adulte et deux enfant, ou 2 adultes et 4 enfants)
|
||||
**** Guillaume & Emilie (2 adultes et 1 enfant)
|
||||
**** TOTAL Adultes: 14 adultes + 5 enfants.
|
||||
*** Menus
|
||||
**** W49
|
||||
***** Plats principaux
|
||||
****** Legumes vapeur & poisson blanc
|
||||
****** Soupe
|
||||
****** Saucisses aux lentilles
|
||||
http://www.marmiton.org/recettes/recette_saucisses-aux-lentilles_22979.aspx
|
||||
******* Ingredients
|
||||
- 250 g de lentilles vertes
|
||||
- 4 saucisses
|
||||
- Oignon blanc
|
||||
- 1 carotte
|
||||
- 100 g de lardons fumés
|
||||
- 1 bouquet garni
|
||||
******* recette
|
||||
1. Piquer les saucisses avec une fourchette.
|
||||
2. Après mettez-les dans 1,5 litre d'eau froide, avec le bouquet garni et la
|
||||
carotte coupée en rondelles. Faites cuire à gros bouillons pendant 15 à 20
|
||||
min.
|
||||
3. Pendant ce temps, faites revenir les lardons dans une poêle, juste pour
|
||||
qu'ils soient légèrement dorés et croquants.
|
||||
4. Ajoutez les lardons, les oignons blancs et les lentilles dans le faitout des
|
||||
saucisses. Ne salez pas, les lardons le feront.
|
||||
5. Couvrez et faites cuire le tout à feu doux de 20 à 25 min.
|
||||
6. Égouttez, retirez le bouquet garni, disposez sur un plat avec un peu de
|
||||
persil haché et servez aussitôt.
|
||||
|
||||
Note de l'auteur
|
||||
Vous pouvez rajouter à cette recette quelques carottes supplémentaires ainsi que quelques pommes de terre.
|
||||
****** Soufflet au fromage
|
||||
****** Oeufs à la coque ou omelette & salade
|
||||
****** Poulet roti & haricots verts
|
||||
****** Soupe de carottes au lait de coco
|
||||
http://www.3etplus.com/recettes-familles-nombreuses/soupe-de-carottes-au-lait-de-coco
|
||||
******* Ingrédients
|
||||
- 1 kilo de carottes
|
||||
- 2 pommes de terre
|
||||
- 2 oignons
|
||||
- sel, poivre
|
||||
- 50 cl de lait de coco
|
||||
- 1/2 cuillère à café de curry (facultatif)
|
||||
- 1 pincée de gingembre (facultatif)
|
||||
- coriandre (facultatif)
|
||||
******* recette
|
||||
Couper les pommes de terres en morceaux, les carottes et oignons en rondelles
|
||||
après les avoir épluchés et lavés. Faire cuire après avoir recouvert d'eau
|
||||
pendant 45 mn avec sel, poivre, curry, gingembre. Mixer, rajouter le lait de
|
||||
coco et quelques feuilles de coriandre.
|
||||
|
||||
Conseil : mettre le coriandre dans une assiette à part car son goût particulier
|
||||
n'est pas tjs apprécié des enfants.
|
||||
|
||||
***** Desserts
|
||||
**** W48
|
||||
***** Plats principaux
|
||||
****** Poisson & legumes
|
||||
****** Legumes vapeur
|
||||
****** Poule au pot
|
||||
http://www.marmiton.org/recettes/recette_poule-au-pot-a-l-ancienne_21529.aspx
|
||||
******* Ingredients
|
||||
- 1 poule
|
||||
- 800 g de carottes
|
||||
- 300 g de navets
|
||||
- 4 poireaux
|
||||
- 1 oignon piqué de 2 clous de girofle
|
||||
- Poivre
|
||||
- Sel
|
||||
- 1 cuillère à soupe de thym et de laurier haché
|
||||
******* recette
|
||||
1. Nettoyer tous les légumes, les éplucher.
|
||||
2. Mettre la poule dans une grande marmite et couvrir d'eau. Porter à ébulition
|
||||
et écumer.
|
||||
3. Ajouter les légumes (plier les poireaux en deux), l'oignon piqué, les fines
|
||||
herbes, saler et poivrer.
|
||||
4. Couvrir et laisser cuire 2 h à 2 h 30. La chair de la poule doit se détacher.
|
||||
5. Servir d'abord le bouillon dégraissé, puis la viande entourée de légumes.
|
||||
****** Jambalaya à la dinde
|
||||
http://www.marmiton.org/recettes/recette_jambalaya-a-la-dinde_57538.aspx
|
||||
******* ingrédients
|
||||
- 4 filets de dindes coupés en fines lanières
|
||||
- 4 merguez
|
||||
- 1/2 poivron coupé en lanières
|
||||
- 12 champignons émincés
|
||||
- 400 g de tomates concassées
|
||||
- 350 g de riz long grain
|
||||
- 3 cubes de bouillon de poule
|
||||
- 1 échalote émincée
|
||||
- 2.5 cuillères à soupe d' huiles de tournesol
|
||||
- Paprika
|
||||
- Poivre
|
||||
- Sel
|
||||
******* recette
|
||||
1. Faites chauffer 2 cuillères à soupe d’huile dans une casserole et saisissez-y
|
||||
les lanières de dinde.
|
||||
2. Poivrez et salez.
|
||||
3. Retirez la viande de la casserole et faites-y ensuite blondir l’échalote
|
||||
émincée.
|
||||
4. Ajoutez les lanières de poivrons et les champignons émincés.
|
||||
5. Intégrez délicatement les tomates concassées.
|
||||
6. Incorporez-y également le riz et la viande.
|
||||
7. Versez le tout dans un plat à four à bords hauts.
|
||||
8. Emiettez les cubes de bouillon de poule dans 7,5 cl d’eau très chaude et
|
||||
versez-la dans le plat.
|
||||
9. Epicez d’une pincée de paprika.
|
||||
10. Glissez au four préchauffé à 200°C (thermostat 6-7) et faites cuire pendant
|
||||
35 minutes.
|
||||
11. Veillez à ce que le bouillon ne s’évapore pas entièrement de la préparation.
|
||||
12. Entre-temps, faites cuire les merguez pendant 5 min, dans ½ cuillère à soupe d’huile.
|
||||
13. Disposez les merguez sur le plat, 5 minutes avant la fin de la cuisson du
|
||||
jambalaya.
|
||||
****** Boudin noir & purée & pommes
|
||||
****** Soupe congelée
|
||||
****** Courge rotie avec du chèvre
|
||||
http://www.mesenviesetdelices.com/2016/10/courge-butternut-rotie-au-four-farcie-au-chevre.html
|
||||
***** Desserts
|
||||
****** Le moelleux au chocolat parfait
|
||||
http://www.mesenviesetdelices.com/2016/11/le-moelleux-au-chocolat-parfait.html
|
||||
|
|
|
@ -1,40 +1,58 @@
|
|||
---
|
||||
patat:
|
||||
slideLevel: 3
|
||||
---
|
||||
#+Title: Functional Programming Survey
|
||||
#+Author: Yann Esposito
|
||||
|
||||
* Intro (Definition / History)
|
||||
** FP definition
|
||||
*** Programming paradigm
|
||||
*** Avoids changing-state and mutable data
|
||||
*** Declarative programming, expression or declarations instead of statements
|
||||
*** Output value of a function depends *only* on the arguments that are input to the function
|
||||
*** Eliminating side-effects, easier to reason about code and predict behavior
|
||||
*** Functions are *first-class*
|
||||
which means that they are treated like any other values and can be passed as arguments to other functions or be returnred as a result of a function.
|
||||
** History
|
||||
** In Short
|
||||
*** What is Functional Programming?
|
||||
- Programming paradigm
|
||||
- Avoids changing-state and mutable data
|
||||
- Declarative programming, expression or declarations instead of statements
|
||||
- *Pure*:
|
||||
- Output value of a function depends *only* on the arguments that are input to the function
|
||||
- Eliminating side-effects, easier to reason about code and predict behavior
|
||||
- Functions are *first-class*:
|
||||
- functions are treated like any other values.
|
||||
- functions can be passed as arguments to other functions
|
||||
- functions can returns other functions
|
||||
* History
|
||||
** Short
|
||||
- λ-Calculus, Alonzo Church & Rosser 1936
|
||||
- LISP (McCarthy 1960)
|
||||
- Algol 60 (Naur et al 1963)
|
||||
- ISWIM (Landin 1966)
|
||||
- PAL (Evans 1968)
|
||||
- SASL (1973-83)
|
||||
- Edinburgh (1969-80) NLP, early ML, HOPE
|
||||
- Miranda (1986)
|
||||
- Haskell (1992‥)
|
||||
** λ-Calculus
|
||||
*** λ-Calculus, Alonzo Church & Rosser 1936
|
||||
Typeless theory of functions.
|
||||
|
||||
A syntaxic construction can be equivalent to any Turing Machine.
|
||||
Mainly re-writing rules.
|
||||
**** Learn λ-Calculus in less than 1 minute
|
||||
***** Definitions
|
||||
*** Learn λ-Calculus in less than 1 minute
|
||||
*** Definitions
|
||||
- =a,b,...= are variables
|
||||
- =()= parenthesis to group part of an expression
|
||||
- =λ= greek letter (pronounced Lambda) and the =.= to write functions.
|
||||
***** Free vs Bound
|
||||
*** Free vs Bound
|
||||
- =λx.xy= the expression is open as =xy= contains a =y= and there is no =λy= that bound it.
|
||||
- =λx.λy.xy= is said to be bound.
|
||||
|
||||
Bound expressions represent functions.
|
||||
|
||||
***** Rules
|
||||
|
||||
*** Rules
|
||||
(α) λx.A → λy.[y/x]A
|
||||
(β) (λx.A)B → λy.[B/x]A
|
||||
(η) λx.Ax → A if x not free in A
|
||||
|
||||
Where =[B/x]A= means substitue B for free occurrences of x in A.
|
||||
|
||||
***** How does that work? Simply cut and paste! That's it
|
||||
*** Resume
|
||||
How does that work? Simply cut and paste! That's it.
|
||||
|
||||
Example: =(λy.x(yz))(ab)=
|
||||
|
||||
|
@ -44,43 +62,51 @@ So replace =y= by =ab= and we get: =x(abz)=.
|
|||
And...
|
||||
|
||||
That's it.
|
||||
|
||||
** LISP
|
||||
*** LISP (McCarthy 1960)
|
||||
The first functional programming language and the second oldest programming
|
||||
language stil in use (after FORTRAN).
|
||||
|
||||
**** S-Language
|
||||
*** LISP: S-Language
|
||||
- atom which are words like X or TWO
|
||||
- pairing operation written as a dot
|
||||
|
||||
=((X.Y).Z)=
|
||||
=(ONE.(TWO.(THREE.NIL)))=
|
||||
#+BEGIN_SRC elisp
|
||||
((X.Y).Z)
|
||||
(ONE.(TWO.(THREE.NIL)))
|
||||
#+END_SRC
|
||||
|
||||
List, Trees, etc..
|
||||
|
||||
**** M-Language
|
||||
*** LISP: M-Language
|
||||
defines computations on S-exrepssions. It has
|
||||
- S-expressions
|
||||
- function application (=f[a;b;...]=) with primitve functions =cons=, =car=, =cdr=, =atom=, =eq=
|
||||
- conditional expressions (=[ test1 -> result1 ; test2 -> result2 ; ... ]=)
|
||||
- ability to define recursive functions (=first[x] = [atom [x] -> x ; T -> first[car[x]]]=)
|
||||
|
||||
**** Encoding M-Language expressions and functions as S-Expressions
|
||||
define M-language functions =eval= and =apply= that correctly interpret these S-expressions
|
||||
*** LISP: Encode M-Language exprs as S-Expressions
|
||||
|
||||
Encoding M-Language expressions and functions as S-Expressions:
|
||||
|
||||
Define M-language functions =eval= and =apply= that correctly interpret these
|
||||
S-expressions
|
||||
|
||||
Thus LISP allow meta-programming: treating program as data and vice versa
|
||||
|
||||
**** LISP Syntax so much parenthesis
|
||||
*** LISP: LISP Syntax so much parenthesis
|
||||
|
||||
It was intended to code use M-language in an Algol-like notation.
|
||||
In practice LISP wrote their code directly in S-expressions.
|
||||
In practice LISPers wrote their code directly in S-expressions.
|
||||
M-language became a kind of ghost... theoretically important but not used by anyone.
|
||||
|
||||
*** Algol 60 (Naur et al 1963)
|
||||
*** ISWIM (Landin 1966)
|
||||
*** PAL (Evans 1968)
|
||||
*** SASL (1973-83)
|
||||
*** Edinburgh (1969-80) -- NPL, early ML, HOPE
|
||||
** History
|
||||
*** 1960 → 1983
|
||||
- Algol 60 (Naur et al 1963)
|
||||
- ISWIM (Landin 1966)
|
||||
- PAL (Evans 1968)
|
||||
- SASL (1973-83)
|
||||
*** Edinburgh (1969-80)
|
||||
- NLP strongly typed but no polymorphisms, call-by-value
|
||||
- NLP evolved into HOPE: higher order, strongly typed with explicit types and
|
||||
polymorphic type variables, purely functional.
|
||||
|
@ -97,27 +123,51 @@ Similar to Miranda but richer and more redundant syntax.
|
|||
|
||||
* Major Principles (Theoretical)
|
||||
** Higher-order functions
|
||||
|
||||
A function can take another function as parameter.
|
||||
|
||||
#+BEGIN_SRC haskell
|
||||
map :: (a -> b) -> [a] -> [b]
|
||||
map (+2) [1,2,3] -- ⇒ [3,4,5]
|
||||
|
||||
filter :: (a -> Bool) -> [a] -> [a]
|
||||
filter (>2) [1,2,3] -- ⇒ [3]
|
||||
#+END_SRC
|
||||
|
||||
** Purity
|
||||
*** Function vs Procedure/Subroutines
|
||||
**** Referential Transparency vs Referential Opacity
|
||||
- A Function is something that doesn't have any effect.
|
||||
- A Procedure/subroutine is something that can interleave effects during
|
||||
evaluation
|
||||
*** Referential Transparency vs Referential Opacity
|
||||
- Ability to copy/paste without changing result vs impossible
|
||||
- Help the programmer but also the compiler!
|
||||
- Help in proving correctness
|
||||
- Help simplifying algorithms, better linters
|
||||
- Optimizing by memoization, common subexpression elimination, lazy evaluation, parallelization
|
||||
**** Parallel computation become extremely easier to achieve
|
||||
***** Evaluation strategies:
|
||||
****** =(h (f a) (g b))= We can evaluate: =a= then =(f a)= then =b= then =(g b)= and finally =(h (f a) (g b))=
|
||||
****** =(h (f a) (g b))= We can evaluate: =b= then =a= then =(g b)= then =(f a)= and finally =(h (f a) (g b))=
|
||||
****** =(h (f a) (g b))= We can evaluate: =a= and =b= in parallel then =(f a)= and =(g b)= in parallel and finally =(h (f a) (g b))=
|
||||
****** =(h (f a) (g b))= We can evaluate: =h= and then evaluate =(f a)= only if needed and then =(g b)= only if needed...
|
||||
- Optimizing by:
|
||||
- memoization
|
||||
- common subexpression elimination
|
||||
- lazy evaluation
|
||||
- parallelization
|
||||
*** Extremely Easy to Parallelze
|
||||
**** Evaluation strategies:
|
||||
=(h (f a) (g b))= We can evaluate:
|
||||
|
||||
- =a= then =(f a)= then =b= then =(g b)= and finally =(h (f a) (g b))=
|
||||
- =b= then =a= then =(g b)= then =(f a)= and finally =(h (f a) (g b))=
|
||||
- =a= and =b= in parallel then =(f a)= and =(g b)= in parallel and finally
|
||||
=(h (f a) (g b))=
|
||||
- =h= and then evaluate =(f a)= only if needed and then =(g b)= only if needed...
|
||||
That's called non-strict evaluation (sometime lazy evaluation)
|
||||
For example if: =(def h (λx.λy.(+ x x)))= we don't need to evaluate =y=, in our case =(g b)=
|
||||
|
||||
**** Time is Hard, purity remove time from the paradigm
|
||||
Calling the same function with the same parameter twice will always results in the same value.
|
||||
Calling the same function with the same parameter twice will always results in
|
||||
the same value.
|
||||
*** Effects?
|
||||
**** Side effects in the language
|
||||
The programmer must be careful not to use impure functions in place where only pure functions are expected.
|
||||
The programmer must be careful not to use impure functions in place where only
|
||||
pure functions are expected.
|
||||
**** Split impurity using a flag (generaly a type)
|
||||
- =foo : Int -> String= declared as pure
|
||||
- =foo : Int -> IO String= declared as impure (IO)
|
||||
|
@ -184,7 +234,6 @@ Different type systems: Hindley Milner, Martin/Lof, HoTT
|
|||
- Prod ready mean used at 100% by a company earning money for some years, and
|
||||
used partially (more than 10%) by more than 10 company or having a big
|
||||
production project
|
||||
|
||||
** Not Pure
|
||||
*** Can be used in modern production env
|
||||
**** LISP Family
|
||||
|
@ -206,6 +255,7 @@ Different type systems: Hindley Milner, Martin/Lof, HoTT
|
|||
*** Prod ready
|
||||
**** Haskell
|
||||
**** Elm
|
||||
**** Purescript
|
||||
*** Not Prod ready yet
|
||||
**** Idris
|
||||
**** Frege
|
||||
|
|
Loading…
Reference in a new issue