wtfunctional/Readme.md

126 lines
3.9 KiB
Markdown
Raw Permalink Normal View History

2016-05-25 11:36:20 +02:00
Title: WTFunctional Talk slides and examples
Author: Oliver Rümpelein
Affiliation: Member of F3L-Team
Quotes Language: english
Date: 2016-05-25
CSS: /md.css
Html header: <script type="text/javascript">
window.onload = function() {
var loc=window.location.hostname;
if(loc="www.pheerai.de") {
var warn=document.getElementById("warn");
warn.style.display="none";
};
};
</script>
# [%Title] #
<div id="warn" markdown=1>Want to read this file properly? Visit the
[official homepage][wtfoff]!</div>
The talk was first held at [3. F3L-GPN][f3l] in Regensburg, on 2015-06-11. Its
target is to show how even non-functional programming languages can profit from
using functional paradigms.
{{TOC}}
## Files ##
You may download both [the slides PDF][ext-slides] in handout mode, and a
[source archive][ext-examples] of the examples used during the talk.
2016-05-25 11:36:20 +02:00
## Structure ##
The talk is split into three main parts:
Part One
: deals with functional programming in general. What are its benefits?
: Afterwards, the main ideas behind it get shown using [Haskell][haskell].
Part Two
: is all about using some of the mentioned ideas in [Python][python].
: The focus lies on getting a feeling for functional programming, using a
language that is heavily influenced by those designs.
Part Three
: tries to transfer those ideas to C++.
: It also deals with the weaknesses and advantages of the modern C++11/14,
and gives a preview of some features in C++17/20/22
## Pages ##
There are two main-pages for this talk. One is my [homepage][wtfoff], the other
one is the [GitLab-server of F3L][f3lgit] which contains the whole example and
slide sources.
2016-05-25 11:36:20 +02:00
## Compiling ##
If any errors occur, please [drop me a mail][mailto].
### Slides ###
Unfortunately, the slides have quite a lot of dependencies. You need the
following:
* A working instance of [LuaLaTeX][lualatex] (some decent [texlive-distro][texlive] should suffice),
* [Pygments][pygments] up-and-running (usually in the repositories as
'python-pygmetize' or so),
* a working installation of the [minted][minted] package for latex (once
again, texlive should be enough), and
* the two fonts [Inconsolata G][inconsolata-g] and [Fira Sans][fira] installed,
* not to talk of biber with biblatex.
Then, compile using
2016-05-25 11:36:20 +02:00
```
lualatex -shell-escape wtfunctional
biber wtfunctional
lualatex -shell-escape wtfunction
```
### Examples ###
Exmaple 00_dafunc.cpp is not that important, and should build with any decent C++-compiler.
For the haskell-example, use `ghci`, then `:load 01_haskell.hs`. The functions provided are:
* extract (≅ fst)
* addto
* mfold (≅ foldl)
02_python.py can be executed using `python`, or inspected using `python -m`. It
provides:
* a debug-function usable as decorator
* a bubblesort-implementation using functional paradigms.
03_cpp.cpp needs a compiler capable of C++11. It shows code- and
runtime-examples for `for_each`, `transform` and `accumulate`.
04_cpp17.cpp needs a compiler capable of C++17-folds, `gcc` or `clang` should
do. Then compile using the option `std=c++1z`
2016-05-25 11:36:20 +02:00
## License ##
This is licensed under MIT-License. For the exact formulation, see License.txt.
2016-05-25 11:36:20 +02:00
[ext-examples]: https://www.pheerai.de/assets/wtf_examples.tar.gz
2016-05-25 11:36:20 +02:00
[f3l]: https://www.f3l.de
[f3lgit]: https://git.f3l.de/pheerai/wtfunctional
[fira]: https://github.com/mozilla/Fira
[haskell]: https://www.haskell.org
[inconsolata-g]: http://leonardo-m.livejournal.com/77079.html
[lualatex]: http://luatex.org
[mailto]: mailto:oli_r@fg4f.de
2016-05-25 11:36:20 +02:00
[minted]: http://github.com/gpoore/minted
[pygments]: http://pygments.org/
[python]: https://python.org/
[ext-slides]: https://www.pheerai.de/assets/wtf_slides.pdf
2016-05-25 11:36:20 +02:00
[texlive]: https://www.tug.org/texlive/
[wtfoff]: https://www.pheerai.de/wtf/
<!--- Local Variables: -->
<!--- ispell-local-dictionary: "english" -->
<!--- End: -->