# NPRG014
Supplementary materials for the course of "Concepts of Modern Programming Languages" (NPRG014).
- Language dynamism - typing, casting, object construction, method invocation
- Scripting
- LLM generation and chat API use in Groovy
Please bring your laptop to the lecture with the following software pre-installed. Doing this ahead of time ensures we can jump straight into the exercises!
- Download: Get the latest JDK 17+ from the Java download site (or use an open-source distribution like Adoptium).
- Verify: Open your terminal or command prompt and run
java -versionto ensure it is installed correctly.
- Download: Grab Groovy 5.0.x or later from the Groovy download page.
- Verify: Make sure the
groovyConsoleeditor tool can be started from your command line. (Note: Mind the capitalization of the command!)
- Install Git: If you don't have it installed, download it from git-scm.com.
- Checkout Code: Clone this repository to get the source code of the examples and homework assignments that will be used during the lecture:
git clone <INSERT_YOUR_REPO_URL_HERE>
We will use Ollama to run Large Language Models (LLMs) locally. Alternatively, you may use a remote server-based LLM, provided it exposes a standard /v1/chat/completions API endpoint and is accessible from the classroom network.
- macOS: Download from ollama.com/download, unzip it, and drag the app to your Applications folder.
- Windows: Download the
.exeinstaller from ollama.com/download and run it. - Linux: Open your terminal and run the official install script:
curl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh) | sh
Network Configuration: Once Ollama is installed and running, open the application Settings (usually located in your system tray or menu bar) and enable "Expose Ollama on the network".
- Troubleshooting: If your operating system UI doesn't show this setting or it fails to apply, you can manually expose the network by setting the environment variable
OLLAMA_HOST=0.0.0.0before starting the Ollama application or service.
Hardware Note: Running the 12-billion parameter model (gemma4:12b) locally requires significant memory (roughly 8–12GB of RAM just to load the model). A laptop with at least 16GB of total system RAM is highly recommended. If your machine has 8GB or less, please stick to the 4b models during the exercises to avoid crashing your system.
With Ollama running in the background, open your terminal or command prompt and run the following commands to download the necessary models.
(Please do this before coming to class, as these files are several gigabytes in size and require a stable internet connection!)
ollama pull gemma3:4b
ollama pull gemma4
ollama pull gemma4:12b
ollama pull qwen3.6- Exercises to work with during the lesson are located in the “lecture0929/exercises” folder
- The homework is to be found at “lecture0929/homework”
- The “lecture0929/slides” holds the slides for the lecture
- Dynamic meta-programming
- Intro into Domain Specific Languages
- Domain specific languages
- Builders
- Same as for Lesson 1
- Do a fresh checkout of this repository to get updated source code for examples and homework assignments
- Exercises to work with during the lesson are located in the “lecture1006/exercises” folder
- The homework is to be found at “lecture1006/homework”
- The “lecture1006/slides” holds the slides for the lecture
- Static meta-programming
- AST transformations
- Same as for Lesson 1
- Do a fresh checkout of this repository to get updated source code for examples and homework assignments
- Exercises to work with during the lesson are located in the “lecture1013/exercises” folder
- The homework is to be found at “lecture1013/homework”
- The “lecture1013/slides” holds the slides for the lecture
- Bytecode
- Statically-typed languages (Scala) - Part I
- Grab and install SBT (http://www.scala-sbt.org/)
- Install Java JDK (if you don't have it installed) from the Java download site
- Checkout this repository to get all examples
- Go to lecture-scala/exercises-homework and run "sbt compile" to download all necessary packages (Scala and related libraries)
- Exercises to work with during the lesson and the homework are located in the lecture-scala/exercises-homework” folder
- The “lecture-scala/slides” holds the slides for the lecture
- Statically-typed languages (Scala) - Part II
- Same as for Lesson 4
- Statically-typed languages (Scala) - Part III
- Same as for Lesson 4
- Statically-typed languages (Scala) - Part IV
- Same as for Lesson 4
- Concurrency abstractions in modern languages ** Dataflow ** Fork-join ** Actors ** Parallel collections ** Agents
- Same as for Lesson 1 (Groovy, JDK, Ollama)
- Do a fresh checkout of this repository to get updated source code for examples and homework assignments
- Exercises to work with during the lesson are located in the “lecture1124/exercises” folder
- The homework is to be found at “lecture1124/homework”
- The “lecture1124/slides” holds the slides for the lecture
- Introduction to prototype-based languages (IO)
- Download IO interpreter from http://iolanguage.org/binaries.html
- Checkout this repository to get all examples
- Advanced types in TypeScript
- If you do not have Node.js installed, get the LTS version from https://nodejs.org (but any reasonably recent version should work) and check the README.md in the lecture materials for more details.
- You will need an editor that does type checking in background. WebStorm (from JetBrains) or VSCode are good choices, but anything will do.