Code Monkey home page Code Monkey logo

urjc-pd's Introduction

This is the repository of the course on Functional Programming in Scala taught at the University Rey Juan Carlos.

Content

The course basically includes several notebooks on the following topics:

  • PF-1.1 Object-oriented Scala
  • PF-2.1 Functions and algebraic data types
  • PF-2.2 Recursive functions and ADTs
  • PF-2.3 The Curry-Howard correspondence
  • PF-3.1 The Hall-of-Fame of HOFs
  • PF-3.2 HOFs as a query language

Intro & Schedule

Intro.pdf -- (Spanish, URJC specifics)

Launching notebooks

To access these notebooks you need first to install git and clone this repository in your local drive:

> git clone https://github.com/jserranohidalgo/urjc-pd.git pd

Then, run the program:

jupyter notebook

in the root directory of the repository, if you already installed jupyter in your computer (see instructions below).

Alternatively, you can skip the manual installation of jupyter and run it through docker as follows:

docker run -it --rm -p 8888:8888 -p 4040:4040 -m 4g -v "$PWD":/home/jovyan/work almondsh/almond:latest (LINUX)

docker run -it --rm -p 8888:8888 -p 4040:4040 -m 4g -v <<c:/path/to/downloaded/folder>>:/home/jovyan/work almondsh/almond:latest (WINDOWS)

(also in the root directory of the repository)

Finally, note that jupyter is already installed in the virtual environment MyApps (just for URJC users).

Installing jupyter and the Scala kernel

To install jupyter and run Scala notebooks, follow these steps:

  • Install the package manager conda, or use pip, the python package manager.
  • Install jupyter itself
  • Alternatively, you can also find jupyter notebooks for free when installing anaconda.
  • Install the Scala plugin almond

Possible problems when installing almond

  • The installation command hangs (most likely, on windows)

Execute the installation command with the verbose option enabled (-v -v):

    .\coursier launch --fork almond -M almond.ScalaKernel -v -v -- --install

When the program hangs, stop it (C-c C-c). Most likely, the last command that was attempted was something like "Running java ...". Copy-paste that java invocation and run it manually:

    java -Dscala-kernel.version=<...> -jar <...> --install

Luckily, this will complete the installation of the almond kernel.

  • "Cannot find default main class. Specify one with -M or --main-class" (most likely, on linux)

Add the option -M almond.ScalaKernel to the installation command, i.e.

    ./coursier launch --fork almond -M almond.ScalaKernel -- --install

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

urjc-pd's People

Contributors

jserranohidalgo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.