Developer Blog

Tipps und Tricks für Entwickler und IT-Interessierte

Podman | Getting Started

TL;DR

Take alook at the Podman Website

❯ brew install podman
❯ brew machine init
❯ podman machine start

Starting machine “podman-machine-default”
Waiting for VM …
Mounting volume… /Users:/Users
Mounting volume… /private:/private
Mounting volume… /var/folders:/var/folders

This machine is currently configured in rootless mode. If your containers
require root permissions (e.g. ports < 1024), or if you run into compatibility
issues with non-podman clients, you can switch using the following command:

podman machine set --rootful

API forwarding listening on: /Users/Shared/CLOUD/Programmier-Workshops/Kurse/Haskell/.podman/podman.sock

The system helper service is not installed; the default Docker API socket
address can’t be used by podman. If you would like to install it run the
following commands:

sudo /usr/local/Cellar/podman/4.4.2/bin/podman-mac-helper install
podman machine stop; podman machine start

You can still connect Docker API clients by setting DOCKER_HOST using the
following command in your terminal session:

export DOCKER_HOST='unix:///Users/Shared/CLOUD/Programmier-Workshops/Kurse/Haskell/.podman/podman.sock'

Machine “podman-machine-default” started successfully

Haskell | Getting Started

Readings

Haskell

Glasgow Haskell Compiler

Tutorials

Applications

Games

Installation

  • Install GHCup: Windows Binary is here
    GHCup is the main installer for the general purpose language Haskell.

Or install manuell

  • Download and Install Haskell here
choco install haskell-dev
refreshenv

Installation on Windows and Powershell

Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $true

First Steps

In order to run ghc and cabal, you need to adjust your PATH variable.

To do so, you may want to run 'source /d/CLOUD/Programmier-Workshops/Kurse/Haskell/Programme/Haskell/ghcup/env' in your current terminal
session as well as your shell configuration (e.g. ~/.bashrc).
Start a simple repl via:
  ghci

Start a new haskell project in the current directory via:
  cabal init --interactive

Install other GHC versions and tools via:
  ghcup list
  ghcup install <tool> <version>

To install system libraries and update msys2/mingw64,
open the "Mingw haskell shell"
and the "Mingw package management docs"
desktop shortcuts.

If you are new to Haskell, check out https://www.haskell.org/ghcup/steps/

Configuration

Cabal configuration file is by default located at

&lt;$ENV:USERPROFILE>\AppData\Roaming\cabal\config

Create your first project

Create a haskell project

cabal init
cabal build
cabal run

Configure VS Code with Haskell Support

Install required components

$ cabal install hlint

Configure VSCode

$ stack new vscode-haskell-config
$ cd vscode-haskell-config
$ stack setup

Install an additional source code formatter

$ stack install brittany

Anaconda | Getting Started

Updating packages

To check if any new update is available you can use conda update. If any update is available you can choose whether to install or not to install it.

You can use an Anaconda prompt or the terminal for the following steps: 

  • Update specific package: 
conda update package-name
conda update --all
  • Update all packages in the current environment: 
conda update -n myenv --all
  • 4. Update Python: 
conda update python

5. Update conda itself: 

conda update conda

F# – Snippets

Mathematics

Sum of Squares

dotnet new --install Fable.Template

Create an new App

dotnet new fable

Prepare environment

dotnet tool restore

Fix NodeJS SSL Error

$ENV:NODE_OPTIONS="--openssl-legacy-provider"

Install dependencies and run app

npm install
npm start

F# – Working with Fable

Get started

Install Fable with

dotnet new --install Fable.Template

Create an new App

dotnet new fable

Prepare environment

dotnet tool restore

Fix NodeJS SSL Error

$ENV:NODE_OPTIONS="--openssl-legacy-provider"

Install dependencies and run app

npm install
npm start