# Installation:
# gcc
sudo apt install gcc
gcc --version
# g++
sudo apt install g++
g++ --version# Usage:
# gcc
gcc -o <binary-name> <program>.c
./<program>
# g++
g++ -o <binary-name> <program>.cpp
./<program># Installation:
sudo apt install gnat
gnat compile --version# Usage:
# Compile (out: binary) & run
gnatmake <program>.adb
./<program>
# Clean
gnatclean <program># Installation:
sudo apt install openjdk-17-jdk
java --version# Usage:
javac <program>.java
java <program># Building a simple maven project:
mvn archetype:generate -DgroupId="com.PROJECT_NAME.app" -DartifactId="APP_NAME" -DarchetypeArtifactId="maven-archetype-quickstart" -DarchetypeVersion="1.4" -DinteractiveMode="false"
# Running tests:
cd <project-dir>/<APP_NAME>
mvn test# Installation:
sudo apt install go
go version# Install specific version, eg. 1.21.2:
wget https://go.dev/dl/go1.21.2.linux-amd64.tar.gz
sudo tar -xvf go1.21.0.linux-amd64.tar.gz
sudo mv go /usr/local
# Add the following to ~/.bashrc
export GOPATH="/usr/local/go"
export PATH="$PATH:$GOPATH/bin"
# In terminal
source ~/.bashrc
go version# Usage:
go mod init <module>
# Compile (out: binary)
go build -o <binary-name> <program>.go
./<program>
# Run (without compilation)
go run <program>.go# Installation:
sudo apt install ghc
ghc --version# Usage:
# Compile (out: binary)
ghc <program>.hs
./<progam># Installation:
sudo apt install clisp
clisp --version# Usage:
# Compile & run
clisp -c <program>.lisp
clisp -x '(load "<program>.fas")'
# Run (without compilation)
clisp <program>.lisp# Installation:
sudo apt install smlnj
sml --version # Ctrl+D to exit# Usage:
sml -m < <program>.sml# Installation:
sudo apt install swi-prolog
swipl --version# Usage:
swipl -s <program>.pl
# In the interpreter:
?- <main-func>.NOTE: This can be encapsulated to a
run.shbash script#!/bin/bash # Load the Prolog file and execute the main function swipl -g "consult('$1'), $2, halt." -t 'halt.'# Usage: ./run.sh <program>.pl <main-func>