Skip to content

Commit 458e375

Browse files
committed
Import first translation
0 parents  commit 458e375

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+5604
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
grunt
3+
less
4+
Gruntfile.js
5+
npm-debug.log
6+
.DS_Store

CONTRIBUTING-it.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Contribuire a Un'Adeguata Guida alla Programmazione Funzionale
3+
4+
## Licenza
5+
6+
Aprendo una pull request su questo repository, accetti di rilasciare il tuo lavoro sotto la [licenza del progetto](LICENCE.md). Inoltre, accetti di concedere tale licenza sul tuo lavoro per utilizzo futuro per edizioni stampate a @DrBoolean. Qualora le modifiche dovessero apparire in un'edizione stampata sarete inclusi nell'elenco dei collaboratori.
7+
8+
## Piccole Correzioni
9+
10+
Errata corrige e chiarimenti di base saranno accettati se saremo d'accordo che migliorino il contenuto. È inoltre possibile aprire una issue per capire se e come dev'essere affrontata. Se non lo hai mai fatto prima, questa [guida passo passo](https://guides.github.com/introduction/flow/) potrebbe esserti utile.
11+
12+
## Traduzioni
13+
14+
Le traduzioni in altre lingue sono fortemente incoraggiate. Ogni traduzione ufficiale verrà gestita con un repository a parte della [organizzazione MostlyAdequate](https://github.com/MostlyAdequate) e linkata dalla versione inglese del libro.
15+
Dal momento che ogni traduzione sarà un repository a sè, potremo avere anche diversi collaboratori per ogni progetto.
16+
17+
### Creare un nuovo repo di traduzione
18+
19+
Per creare una nuova traduzione, devi seguire questi passaggi:
20+
21+
* Effettua il fork del []repo principale](https://github.com/MostlyAdequate/mostly-adequate-guide).
22+
* Aggiungiti alla watch list del repo principale per ottenere ogni aggiornamento.
23+
* Quando traduci i capitoli, **crea dei NUOVI file con il suffisso relativo alla tua lingua di traduzione**.
24+
* Per esempio, per una traduzione in spagnolo del file `ch1.md` dovrai creare la copia `ch1-es.md.`
25+
* Apri una [nuova issue](https://github.com/MostlyAdequate/mostly-adequate-guide/issues/new) e chiedi di entrare a far parte dell'organizzazione.
26+
* Trasferisci il repo all'organizzazione.
27+
* Effettua il merge del nuovo contenuto dal repository principale.
28+
* Continua a tradurre...
29+
* Ripeti gli ultimi due passaggi finché il libro non è completo.

CONTRIBUTING.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# Contributing to Mostly Adequate Guide to Funcitonal Programming
3+
4+
## Licensing
5+
6+
By opening a pull request to this repository, you agree to provide your work under the [project license](LICENSE.md). Also, you agree to grant such license of your work as is required for the purposes of future print editions to @DrBoolean. Should your changes appear in a printed edition, you'll be included in the contributors list.
7+
8+
## Small Corrections
9+
10+
Errata and basic clarifications will be accepted if we agree that they improve the content. You can also open an issue so we can figure out how or if it needs to be addressed. If you've never done this before, the [flow guide](https://guides.github.com/introduction/flow/) might be useful.
11+
12+
## Translations
13+
14+
Translations to other languages are highly encouraged. Each official translation will be held as a separate repository in the [MostlyAdequate organization](https://github.com/MostlyAdequate) and linked from the English version book.
15+
Since each translation is a different repository, we can also have different maintainers for each project.
16+
17+
### Creating a new translation repo
18+
19+
In order to create a new translation, you need to follow these steps:
20+
21+
* Fork the [main repo](https://github.com/MostlyAdequate/mostly-adequate-guide).
22+
* Add yourself to the watch list of the main repo, to keep up with changes.
23+
* When translating chapters, **create NEW files with suffix of your language**.
24+
* For example, Spanish tranlation for `ch1.md` will be on `ch1-es.md`.
25+
* Open a [new issue](https://github.com/MostlyAdequate/mostly-adequate-guide/issues/new) and ask to be part of the organization.
26+
* Transfer the repo to the organization.
27+
* Merge new content from the main repo.
28+
* keep translating...
29+
* Rinse/repeat last too steps until the book is done.

LICENSE.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* All text in this book is under:
2+
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
3+
http://creativecommons.org/licenses/by-sa/4.0/
4+
5+
* All artwork randomly stolen from google image search so the license doesn't apply. Please let me know if any artwork is yours and I'll give credit or remove.
6+

README-original.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[![cover](images/cover.png)](SUMMARY.md)
2+
3+
## About this book
4+
5+
This is a book on the functional paradigm in general. We'll use the world's most popular functional programming language: JavaScript. Some may feel this is a poor choice as it's against the grain of the current culture which, at the moment, feels predominately imperative. However, I believe it is the best way to learn FP for several reasons:
6+
7+
* **You likely use it every day at work.**
8+
9+
This makes it possible to practice and apply your acquired knowledge each day on real world programs rather than pet projects on nights and weekends in an esoteric FP language.
10+
11+
12+
* **We don't have to learn everything up front to start writing programs.**
13+
14+
In a pure functional language, you cannot log a variable or read a DOM node without using monads. Here we can cheat a little as we learn to purify our codebase. It's also easier to get started in this language since it's mixed paradigm and you can fall back on your current practices while there are gaps in your knowledge.
15+
16+
17+
* **The language is fully capable of writing top notch functional code.**
18+
19+
We have all the features we need to mimic a language like Scala or Haskell with the help of a tiny library or two. Object-oriented programming currently dominates the industry, but it's clearly awkward in JavaScript. It's akin to camping off of a highway or tap dancing in galoshes. We have to `bind` all over the place lest `this` change out from under us, we don't have classes(Yet), we have various work arounds for the quirky behavior when the `new` keyword is forgotten, private members are only available via closures. To a lot of us, FP feels more natural anyways.
20+
21+
That said, typed functional languages will, without a doubt, be the best place to code in the style presented by this book. JavaScript will be our means of learning a paradigm, where you apply it is up to you. Luckily, the interfaces are mathematical and, as such, ubiquitous. You'll find yourself at home with swiftz, scalaz, haskell, purescript, and other mathematically inclined environments.
22+
23+
24+
### Gitbook (for a better reading experience)
25+
26+
* [Read it online](http://drboolean.gitbooks.io/mostly-adequate-guide/)
27+
* [Download EPUB](https://www.gitbook.com/download/epub/book/drboolean/mostly-adequate-guide)
28+
* [Download Mobi (Kindle)](https://www.gitbook.com/download/mobi/book/drboolean/mostly-adequate-guide)
29+
30+
### Do it yourself
31+
32+
```
33+
git clone https://github.com/DrBoolean/mostly-adequate-guide.git
34+
35+
cd mostly-adequate-guide/
36+
npm install gitbook-cli -g
37+
gitbook init
38+
39+
brew update
40+
brew install Caskroom/cask/calibre
41+
42+
gitbook mobi . ./functional.mobi
43+
```
44+
45+
46+
# Table of Contents
47+
48+
See [SUMMARY.md](SUMMARY.md)
49+
50+
### Contributing
51+
52+
See [CONTRIBUTING.md](CONTRIBUTING.md)
53+
54+
### Translations
55+
56+
See [TRANSLATIONS.md](TRANSLATIONS.md)
57+
58+
59+
# Plans for the future
60+
61+
* **Part 1** is a guide to the basics. I'm updating as I find errors since this is the initial draft. Feel free to help!
62+
* **Part 2** will address type classes like functors and monads all the way through to traversable. I hope to squeeze in transformers and a pure application.
63+
* **Part 3** will start to dance the fine line between practical programming and academic absurdity. We'll look at comonads, f-algebras, free monads, yoneda, and other categorical constructs.

README.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[![cover](images/cover.png)](SUMMARY.md)
2+
3+
## A proposito di questo libro
4+
5+
Questo è un libro sul paradigma funzionale in generale. Useremo il linguaggio di programmazione più diffuso nel mondo: JavaScript. Alcuni potrebbero pensare che questa sia una scelta sbagliata perché va contro la logica del pensiero attuale, che punta maggiormente verso un paradigma imperativo. Tuttavia, credo che sia il modo migliore per imparare la PF (Programmazione Funzionale) per diversi motivi:
6+
7+
* **Probabilmente lo utilizzi ofni giorno a lavoro.**
8+
9+
Questo ci permette di fare pratica ed applicare le conoscenze acquisite ogni giorno in programmi reali, piuttosto che di notte, o nel fine settimana, in progetti fittizi e con un linguaggio di PF esoterico.
10+
11+
12+
* **Non dobbiamo imparare niente per poter iniziare con i nostri programmi.**
13+
14+
In un linguaggio basato puramente sulla PF, non è possibile loggare una variabile o leggere un nodo del DOM senza utilizzare monads. Qui possiamo barare un pochino. E' anche più facile iniziare con questo linguaggio dal momento che utilizza più paradigmi e che potete quindi ripiegare sulle vostre conoscenze per colmare eventuali lacune.
15+
16+
17+
* **Il linguaggio è pienamente capace di scrivere codice funzionale di prim'ordine.**
18+
19+
We have all the features we need to mimic a language like Scala or Haskell with the help of a tiny library or two. Object-oriented programming currently dominates the industry, but it's clearly awkward in JavaScript. It's akin to camping off of a highway or tap dancing in galoshes. We have to `bind` all over the place lest `this` change out from under us, we don't have classes(Yet), we have various work arounds for the quirky behavior when the `new` keyword is forgotten, private members are only available via closures. To a lot of us, FP feels more natural anyways.
20+
21+
Detto ciò, i linguaggi funzionali tipizzati, sono senza dubbio il posto migliore per programmare nello stile presentato in questo libro. JavaScript sarà il nostro mezzo di apprendimento, dove applicherai ciò che impari spetta a te. Fortunatamente le interfacce sono matematiche e, come tali, onniprensenti. Ti ritroverai a casa con swiftz, scalaz, haskell, purescript, ed altri ambienti inclini alla matematica.
22+
23+
24+
### Gitbook (per un'esperienza di lettura migliore)
25+
26+
* [Leggilo online](http://drboolean.gitbooks.io/mostly-adequate-guide/)
27+
* [Scarica l'EPUB](https://www.gitbook.com/download/epub/book/drboolean/mostly-adequate-guide)
28+
* [Scarica il Mobi (Kindle)](https://www.gitbook.com/download/mobi/book/drboolean/mostly-adequate-guide)
29+
30+
### Fai da solo
31+
32+
```
33+
git clone https://github.com/DrBoolean/mostly-adequate-guide.git
34+
35+
cd mostly-adequate-guide/
36+
npm install gitbook-cli -g
37+
gitbook init
38+
39+
brew update
40+
brew install Caskroom/cask/calibre
41+
42+
gitbook mobi . ./functional.mobi
43+
```
44+
45+
46+
# Indice dei contenuti
47+
48+
Vedi [SUMMARY.md](SUMMARY-it.md)
49+
50+
### Contribuire
51+
52+
Vedi [CONTRIBUTING.md](CONTRIBUTING-it.md)
53+
54+
### Traduzioni
55+
56+
Vedi [TRANSLATIONS.md](TRANSLATIONS-it.md)
57+
58+
59+
# Obiettivi per il futuro
60+
61+
* **Parte 1** è una guida alle basi. La aggiornerò via via che troverò errori dato che questa è la bozza iniziale. Sentiti libero di dare una mano!
62+
* **Parte 2** tratterà i tipi di classi, come functors e monads, per tutto il percorso percorribile. Spero di spremerli in trasformatori e in un'applicazione pura.
63+
* **Parte 3** inizieremo a percorrere il filo sottile tra la programmazione pratica e quella assurdamente accademica. Vedremo comonads, f-algebras, free monads, yoneda, e altri costruttori categorici.

SUMMARY-it.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Summary
2+
3+
* [Capitolo 1: Cosa stiamo facendo?](ch1-it.md)
4+
* [Introduzioni](ch1-it.md#introduzioni)
5+
* [Un breve incontro](ch1-it.md#un-breve-incontro)
6+
* [Capitolo 2: First Class Functions](ch2.md)
7+
* [A quick review](ch2.md#a-quick-review)
8+
* [Why favor first class?](ch2.md#why-favor-first-class)
9+
* [Capitolo 3: Pure Happiness with Pure Functions](ch3.md)
10+
* [Oh to be pure again](ch3.md#oh-to-be-pure-again)
11+
* [Side effects may include...](ch3.md#side-effects-may-include)
12+
* [8th grade math](ch3.md#8th-grade-math)
13+
* [The case for purity](ch3.md#the-case-for-purity)
14+
* [In Summary](ch3.md#in-summary)
15+
* [Capitolo 4: Currying](ch4.md)
16+
* [Can't live if livin' is without you](ch4.md#cant-live-if-livin-is-without-you)
17+
* [More than a pun / Special sauce](ch4.md#more-than-a-pun--special-sauce)
18+
* [In Summary](ch4.md#in-summary)
19+
* [Capitolo 5: Coding by Composing](ch5.md)
20+
* [Functional Husbandry](ch5.md#functional-husbandry)
21+
* [Pointfree](ch5.md#pointfree)
22+
* [Debugging](ch5.md#debugging)
23+
* [Category Theory](ch5.md#category-theory)
24+
* [In Summary](ch5.md#in-summary)
25+
* [Capitolo 6: Example Application](ch6.md)
26+
* [Declarative Coding](ch6.md#declarative-coding)
27+
* [A flickr of functional programming](ch6.md#a-flickr-of-functional-programming)
28+
* [A Principled Refactor](ch6.md#a-principled-refactor)
29+
* [In Summary](ch6.md#in-summary)
30+
* [Capitolo 7: Hindley-Milner and Me](ch7.md)
31+
* [What's your type?](ch7.md#whats-your-type)
32+
* [Tales from the cryptic](ch7.md#tales-from-the-cryptic)
33+
* [Narrowing the possibility](ch7.md#narrowing-the-possibility)
34+
* [Free as in theorem](ch7.md#free-as-in-theorem)
35+
* [In Summary](ch7.md#in-summary)
36+
* [Capitolo 8: Tupperware](ch8.md)
37+
* [The Mighty Container](ch8.md#the-mighty-container)
38+
* [My First Functor](ch8.md#my-first-functor)
39+
* [Schrödinger’s Maybe](ch8.md#schrodingers-maybe)
40+
* [Pure Error Handling](ch8.md#pure-error-handling)
41+
* [Old McDonald had Effects…](ch8.md#old-mcdonald-had-effects)
42+
* [Asynchronous Tasks](ch8.md#asynchronous-tasks)
43+
* [A Spot of Theory](ch8.md#a-spot-of-theory)
44+
* [In Summary](ch8.md#in-summary)
45+
* [Capitolo 9: Monadic Onions](ch9.md)
46+
* [Pointy Functor Factory](ch9.md#pointy-functor-factory)
47+
* [Mixing Metaphors](ch9.md#mixing-metaphors)
48+
* [My chain hits my chest](ch9.md#my-chain-hits-my-chest)
49+
* [Theory](ch9.md#theory)
50+
* [In Summary](ch9.md#in-summary)
51+
* [Capitolo 10: Applicative Functors](ch10.md)
52+
* [Applying Applicatives](ch10.md#applying-applicatives)
53+
* [Ships in bottles](ch10.md#ships-in-bottles)
54+
* [Coordination Motivation](ch10.md#coordination-motivation)
55+
* [Bro, do you even lift?](ch10.md#bro-do-you-even-lift)
56+
* [Free can openers](ch10.md#free-can-openers)
57+
* [Laws](ch10.md#laws)
58+
* [In Summary](ch10.md#in-summary)

SUMMARY.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Summary
2+
3+
* [Chapter 1: What ever are we doing?](ch1.md)
4+
* [Introductions](ch1.md#introductions)
5+
* [A brief encounter](ch1.md#a-brief-encounter)
6+
* [Chapter 2: First Class Functions](ch2.md)
7+
* [A quick review](ch2.md#a-quick-review)
8+
* [Why favor first class?](ch2.md#why-favor-first-class)
9+
* [Chapter 3: Pure Happiness with Pure Functions](ch3.md)
10+
* [Oh to be pure again](ch3.md#oh-to-be-pure-again)
11+
* [Side effects may include...](ch3.md#side-effects-may-include)
12+
* [8th grade math](ch3.md#8th-grade-math)
13+
* [The case for purity](ch3.md#the-case-for-purity)
14+
* [In Summary](ch3.md#in-summary)
15+
* [Chapter 4: Currying](ch4.md)
16+
* [Can't live if livin' is without you](ch4.md#cant-live-if-livin-is-without-you)
17+
* [More than a pun / Special sauce](ch4.md#more-than-a-pun--special-sauce)
18+
* [In Summary](ch4.md#in-summary)
19+
* [Chapter 5: Coding by Composing](ch5.md)
20+
* [Functional Husbandry](ch5.md#functional-husbandry)
21+
* [Pointfree](ch5.md#pointfree)
22+
* [Debugging](ch5.md#debugging)
23+
* [Category Theory](ch5.md#category-theory)
24+
* [In Summary](ch5.md#in-summary)
25+
* [Chapter 6: Example Application](ch6.md)
26+
* [Declarative Coding](ch6.md#declarative-coding)
27+
* [A flickr of functional programming](ch6.md#a-flickr-of-functional-programming)
28+
* [A Principled Refactor](ch6.md#a-principled-refactor)
29+
* [In Summary](ch6.md#in-summary)
30+
* [Chapter 7: Hindley-Milner and Me](ch7.md)
31+
* [What's your type?](ch7.md#whats-your-type)
32+
* [Tales from the cryptic](ch7.md#tales-from-the-cryptic)
33+
* [Narrowing the possibility](ch7.md#narrowing-the-possibility)
34+
* [Free as in theorem](ch7.md#free-as-in-theorem)
35+
* [In Summary](ch7.md#in-summary)
36+
* [Chapter 8: Tupperware](ch8.md)
37+
* [The Mighty Container](ch8.md#the-mighty-container)
38+
* [My First Functor](ch8.md#my-first-functor)
39+
* [Schrödinger’s Maybe](ch8.md#schrodingers-maybe)
40+
* [Pure Error Handling](ch8.md#pure-error-handling)
41+
* [Old McDonald had Effects…](ch8.md#old-mcdonald-had-effects)
42+
* [Asynchronous Tasks](ch8.md#asynchronous-tasks)
43+
* [A Spot of Theory](ch8.md#a-spot-of-theory)
44+
* [In Summary](ch8.md#in-summary)
45+
* [Chapter 9: Monadic Onions](ch9.md)
46+
* [Pointy Functor Factory](ch9.md#pointy-functor-factory)
47+
* [Mixing Metaphors](ch9.md#mixing-metaphors)
48+
* [My chain hits my chest](ch9.md#my-chain-hits-my-chest)
49+
* [Theory](ch9.md#theory)
50+
* [In Summary](ch9.md#in-summary)
51+
* [Chapter 10: Applicative Functors](ch10.md)
52+
* [Applying Applicatives](ch10.md#applying-applicatives)
53+
* [Ships in bottles](ch10.md#ships-in-bottles)
54+
* [Coordination Motivation](ch10.md#coordination-motivation)
55+
* [Bro, do you even lift?](ch10.md#bro-do-you-even-lift)
56+
* [Free can openers](ch10.md#free-can-openers)
57+
* [Laws](ch10.md#laws)
58+
* [In Summary](ch10.md#in-summary)

TRANSLATIONS-it.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Traduzioni Disponibili
2+
3+
* [中文版 (Cinese)](https://github.com/llh911001/mostly-adequate-guide-chinese) by Linghao Li @llh911001
4+
* [Русский (Russo)](https://github.com/MostlyAdequate/mostly-adequate-guide-ru) by Maksim Filippov @maksimf
5+
* [Français (Francese)](https://github.com/MostlyAdequate/mostly-adequate-guide-fr) by Benkort Matthias @KtorZ
6+
* [Português (Portoghese)](https://github.com/MostlyAdequate/mostly-adequate-guide-pt-BR) by Palmer Oliveira @expalmer
7+
* [Español (Spagnolo)](https://github.com/MostlyAdequate/mostly-adequate-guide-es) by Gustavo Marin @guumaster
8+
9+
## Creare una nuova Traduzione
10+
11+
Vedi [Creare nuove traduzioni](CONTRIBUTING-it.md#Traduzioni)

TRANSLATIONS.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Available Translations
2+
3+
* [中文版 (Chinese)](https://github.com/llh911001/mostly-adequate-guide-chinese) by Linghao Li @llh911001
4+
* [Русский (Russian)](https://github.com/MostlyAdequate/mostly-adequate-guide-ru) by Maksim Filippov @maksimf
5+
* [Français (French)](https://github.com/MostlyAdequate/mostly-adequate-guide-fr) by Benkort Matthias @KtorZ
6+
* [Português (Portuguese)](https://github.com/MostlyAdequate/mostly-adequate-guide-pt-BR) by Palmer Oliveira @expalmer
7+
* [Español (Spanish)](https://github.com/MostlyAdequate/mostly-adequate-guide-es) by Gustavo Marin @guumaster
8+
9+
## Creating new Translations
10+
11+
See [Creating new translations](CONTRIBUTING.md#Translations)

0 commit comments

Comments
 (0)