{ "cells": [ { "cell_type": "markdown", "metadata": { "cell_style": "center", "slideshow": { "slide_type": "slide" } }, "source": [ "
space/shift+space to navigate slides
\n", "ctrl+enter to run code
\n", "up/down to select the previous/next code cell
\n", "optimized for full-screen mode
\n", "Sören Brunk
\n",
" @soebrunk
\n", " \n", "
" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Interactive Computing" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "> An Interactive computation is a persistent computer program that runs with a \"human in the loop,\" where the primary mode of interaction is through the human interactively writing/running blocks of code and looking at the result.\n", "> \n", "> — Brian Granger (co-founder of Project Jupyter)" ] }, { "cell_type": "markdown", "metadata": { "cell_style": "center", "slideshow": { "slide_type": "slide" } }, "source": [ "\n", "Tour of Scala
\n", "Higher-Order-Functions\n", "
\n", "Higher order functions take other functions as parameters or return other functions ...
\n", "One of the most common examples is the higher-order function map
which is available for collections in Scala.
doubleSalary
is a function which takes a single Int, x
, and returns x * 2
. In general, the tuple on the left of the arrow =>
is a parameter list and the value of the expression on the right is what gets returned. On line 3, the function doubleSalary
gets applied to each element in the\n",
"list of salaries.
(source: Jupyter documentation)
" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# Jupyter Frontends\n", "\n", "* Classic Notebook - first Jupyter UI, still widely used\n", "* JupyterLab - modern frontend implementation\n", "* nteract - minimalistic desktop based frontend\n", "* Hydrogen atom plugin - worksheet like with Jupyter backend\n", "* IntelliJ and VS Code also have limited notebook support\n", " * Currently restricted to Python" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "$emoji
\"\"\")}" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "fragment" } }, "source": [ "Some notebook:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [], "source": [ "// import $ivy.`my:library:1.0`\n", "randomEmoji()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Teaching with Notebooks" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# How To Make Your Existing Documentation Interactive\n", "\n", "* Many tutorials are already Markdown with examples in code fences\n", " * Often even checked via **tut** or **mdoc**\n", "* Notebook contents are very similar, just encoded differently (JSON)\n", " * Tools like https://github.com/aaren/notedown let us convert markdown with code fences to notebooks" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "# Share Your Runnable Notebooks With Binder\n", "\n", "\n", "\n", "# → [DEMO](https://mybinder.org/v2/gh/almond-sh/examples/master?urlpath=lab%2Ftree%2Fnotebooks%2Findex.ipynb) ←" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Ok this looks cool, where do I find more Info?\n", "\n", "Sören Brunk
\n",
" @soebrunk