Slides and examples for my WTFunctional-talk for 3. F3LGPN
Go to file
Oliver Rümpelein 83116099e9 Small fixes:
* (README) fixed fuckup with anchor
 * (wtfunctional.tex) Added shellesc to fix TeXLive2016-issue
 * (wtfunctional.tex) specified aspect ratio explicitly
2016-06-09 15:03:15 +02:00
examples Small changes to links and haskell comments 2016-05-25 19:28:08 +02:00
tex Small fixes: 2016-06-09 15:03:15 +02:00
.gitignore Added License and Readme 2016-05-25 13:18:10 +02:00
License.txt Added License and Readme 2016-05-25 13:18:10 +02:00
Notes.md Finished C++ and basic examples 2016-05-24 11:14:43 +02:00
Readme.md Small fixes: 2016-06-09 15:03:15 +02:00

Readme.md

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:

[%Title]

Want to read this file properly? Visit the [official homepage][wtfoff]!

The talk was first held at 3. F3L-GPN 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 in handout mode, and a source archive of the examples used during the talk.

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.
Part Two
is all about using some of the mentioned ideas in 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, the other one is the GitLab-server of F3L which contains the whole example and slide sources.

Compiling

If any errors occur, please drop me a mail.

Slides

Unfortunately, the slides have quite a lot of dependencies. You need the following:

  • A working instance of LuaLaTeX (some decent texlive-distro should suffice),
  • Pygments up-and-running (usually in the repositories as 'python-pygmetize' or so),
  • a working installation of the minted package for latex (once again, texlive should be enough), and
  • the two fonts Inconsolata G and Fira Sans installed,
  • not to talk of biber with biblatex.

Then, compile using

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

License

This is licensed under MIT-License. For the exact formulation, see License.txt.