{"id":19746362,"url":"https://github.com/astrolabsoftware/scala-tutorials","last_synced_at":"2026-02-02T01:01:49.592Z","repository":{"id":92459628,"uuid":"155340053","full_name":"astrolabsoftware/scala-tutorials","owner":"astrolabsoftware","description":"Tutorials on functional programming \u0026 Scala","archived":false,"fork":false,"pushed_at":"2018-10-30T07:19:02.000Z","size":25,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-15T22:45:25.627Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astrolabsoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-30T07:07:50.000Z","updated_at":"2019-06-23T09:03:53.000Z","dependencies_parsed_at":"2023-06-02T12:45:49.150Z","dependency_job_id":null,"html_url":"https://github.com/astrolabsoftware/scala-tutorials","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/astrolabsoftware/scala-tutorials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolabsoftware%2Fscala-tutorials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolabsoftware%2Fscala-tutorials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolabsoftware%2Fscala-tutorials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolabsoftware%2Fscala-tutorials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrolabsoftware","download_url":"https://codeload.github.com/astrolabsoftware/scala-tutorials/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrolabsoftware%2Fscala-tutorials/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28998208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T23:10:54.274Z","status":"ssl_error","status_checked_at":"2026-02-01T23:10:47.298Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T02:14:22.204Z","updated_at":"2026-02-02T01:01:49.576Z","avatar_url":"https://github.com/astrolabsoftware.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Functional programming \u0026 Scala\n\n## Demystifying functional programming and Scala.\n\n### Functional programming\n\nFunctional programming is a paradigm coming from the declarative programming.\nDespite what we can sometimes hear, the idea of functional programming is not new. In the late 1950s, [Lisp](https://en.wikipedia.org/wiki/Lisp_(programming_language)) paved the road for the yet to become large family of functional programming languages. It recently became popular again with the rise of big data and machine learning.\n\n### Scala: yet another Java cousin?\n\n[Scala](https://scala-lang.org/) is a general-purpose programming language that has been started in 2004 by Martin Odersky (EPFL).\nThe language is inter-operable with Java and Java-like languages, and Scala executables run on the Java Virtual Machine (JVM). Like Java it has a strong static type system, but it does not require type declarations.\nFinally, Scala being younger than Java (1995), its design tries to solve some of the problems of Java.\n\n### Scala: _scalable language_\n\nScala is a portmanteau of scalable and language, to reflect the fact that the language is designed to grow and easily integrate new features over time. There are pros and cons to this... For example it is easy to extend or add specific features from other languages, but then there is no guarantee for backward compatibility between Scala versions. In addition, the syntax of the language is not unique (many _optional_ rules, like type hints).\n\n### Multi-paradigm\n\nScala is not a pure functional programming language. It is multi-paradigm, including functional programming, imperative programming, object-oriented programming and concurrent computing.\n\n### What you will learn and will not learn here\n\n- **Yes:** A few functional programming concepts through examples in Scala.\n\n- **No:** be an expert in Scala.\n\n## Working with Docker\n\nWe provide several images for the need of the exercise. We try to keep the size of the image as light as possible, and it is based on the alpine distribution (the image size is about 100 Mo). To play with the image, build it or download it:\n\n### Building from the DockerFile\n\n```bash\n# Go to the folder containing the Dockerfile\ncd docker/alpine/\n# Build the image - \u003cname\u003e can be scala/2.11.8 for example\ndocker build -t \u003cname\u003e .\n# List the images - scala/2.11.8 should be there!\ndocker image ls\n```\n\n### Download the image\n\nFor the JI, we recommend to the users to clone the repo on their machine, and to download the Scala image:\n\n```bash\nIMAGE=gitlab-registry.in2p3.fr/maitresnageurs/quatrenages/scala:2.11.8\ndocker run --rm --tty --interactive --volume $PWD:/app ${IMAGE} scala\n```\n\n### Unix users\n\nFor convenience, you can define aliases to use the docker as if you were on your local directory directly. For example, to launch a Scala REPL (scala shell if you prefer) from your machine:\n\n```bash\ntoto@local~:$ imageID=\"gitlab-registry.in2p3.fr/maitresnageurs/quatrenages/scala:2.11.8\"\ntoto@local~:$ alias myscala='docker run --rm --tty --interactive --volume $PWD:/app ${imageID} scala'\ntoto@local~:$ myscala\nWelcome to Scala 2.11.8 (OpenJDK 64-Bit Server VM, Java 1.8.0_151).\nType in expressions for evaluation. Or try :help.\n\nscala\u003e\n```\n\nObviously it runs from the docker, but you do not need to know it! Same trick can be use for the compiler\n\n```bash\ntoto@local~:$ imageID=\"gitlab-registry.in2p3.fr/maitresnageurs/quatrenages/scala:2.11.8\"\ntoto@local~:$ alias myscalac='docker run --rm --tty --interactive --volume $PWD:/app ${imageID} scalac'\ntoto@local~:$ myscalac whatever.scala # compile\ntoto@local~:$ myscala whatever.scala  # or compile/execute directly\n```\n\nFinally, it is always a good idea to define aliases to avoid typing long command. We put a bash script with a few pre-define aliases in `scripts/`. You can activate it by sourcing the script in there: `source init.sh`. We encourage you to add new aliases!\n\n### Windows users\n\nSorry, I have no idea how all of that works on Windows!\nIf you tried, do not hesitate to report anything weird you encountered (or let me know if that works)!\n\n## *Demandez le programme!*\n\nWe split the work in 3 parts (~40 min):\n\n- [Syntax review](https://github.com/astrolabsoftware/scala-tutorials/tree/master/01_syntax): A very brief overview of the Scala syntax (15 min).\n- [simple exercises](https://github.com/astrolabsoftware/scala-tutorials/tree/master/02_simple_exercises): simple exercises to discover a few functional programming concepts and Scala (20 min).\n- [extensions](https://github.com/astrolabsoftware/scala-tutorials/tree/master/03_extensions): domain-specific languages (DSL) in Scala (5 min).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrolabsoftware%2Fscala-tutorials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrolabsoftware%2Fscala-tutorials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrolabsoftware%2Fscala-tutorials/lists"}