Development & Programming¶
Overview¶
- Python 3 - High-level interpreted programming language
- Go - Programming language
- Java - Programming language
- Mono - Programming language
- VSCodium - FLOSS version of Microsoft VSCode
- Git - Distributed version control system
- PHP Composer - A Dependency Manager for PHP
- Node.js - open-source, JavaScript runtime environment
How do I run DietPi-Software and install optimised software items?
To install any of the DietPi optimised software items listed below run from the command line:
dietpi-software
Choose Browse Software and select one or more items. Finally select Install
.
DietPi will do all the necessary steps to install and start these software items.
To see all the DietPi configurations options, review the DietPi Tools section.
Return to the Optimised Software list
Python 3¶
Python is a text based interpreted programming language with object oriented programming options for general purpose applications.
Source: By www.python.org, GPL
You can find Python everywhere in the world of computer programming. For example, Python is the foundation of some of the world’s most popular websites 1, including Reddit, Dropbox, and YouTube, to name a few. The Python web framework Django powers both Instagram and Pinterest.
Currently, Python is 3rd most popular of programming language 2.
To find out which version of Python is installed, just run
python3 -V
The install option explicitly installs only Python 3.
The pip
/pip3
Python package manager and development headers are included. To use the pip
package manager, a typical usage will be pip3 install -U <module>
.
There are many Python IDE packages available. Following is a short list of well known and widely good accepted IDE packages (alphabetical order):
Name | URL |
---|---|
Eclipse + Pydev | https://www.eclipse.org and https://www.pydev.org/ |
IDLE | https://docs.python.org/3/library/idle.html |
Pycharm | https://www.jetbrains.com/pycharm |
Spyder | spyder-ide/spyder |
Thonny | https://thonny.org |
VSCodium | VSCodium below |
Website: https://www.python.org
Official documentation, from beginner to advanced: https://www.python.org/doc/
How to Use Python: Your First Steps https://realpython.com/python-first-steps/ Wikipedia: https://wikipedia.org/wiki/Python_(programming_language)
Go¶
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Source: By https://golang.org, Creative Commons Attribution 3.0
Go is a compiled, fast and high-performance language intended to be simple and is designed to be easy to read and understand. Go was created at Google by Rob Pike, Robert Griesemer, and Ken Thompson, and it first appeared in Nov 2009.
Go is used by some of the big organizations such as Google, BBC, Uber, Soundcloud, Twitch, Medium, Daily Motion. Uber has reported better throughput, high performance, latency, and uptime. BBC, the house name in broadcasting the world news, uses it for backend, including crawlers and web scrapers. The build and deployment system of Soundcloud is in Go.
To find out which version of Go is installed, just run
go version
To edit the code you can use an editor of your choice, or use VSCodium. The Go extension available in VSCodium provides rich language support for the Go programming language.
Just to have a taste of it, you could run some commands in Go playground
Checkout also the official tutorial Get started with Go.
Some common Go commands are:
go env
: Prints the Go internal environment variables (e.g. GOPATH). Can also be used e.g. like$(go env GOPATH)/bin
go mod tidy <MODULNAME>
: Generate a Go modulego help
: Start the Go internal help in general, details for commands e.g. viago help build
/usr/local/go
: This is the place where the Go development tools is installed.When installing packages via
go get
orgo install
, they are installed into the users home directory~/go
by default. A custom path can be set via theGOPATH
environment variable. To also load binaries of compiled Go packages into yourPATH
, something like this can be done:cat << '_EOF_' >> ~/.bashrc export GOPATH=/path/to/go export PATH="$PATH:$GOPATH/bin" _EOF_
dietpi-software reinstall 188
Website: https://golang.org
Official documentation: https://golang.org/doc
Additional libraries: avelino/awesome-go
Wikipedia: https://en.wikipedia.org/wiki/Go_(programming_language)
Source code: golang/go
License: BSD 3-Clause
Java¶
Source: https://de.wikipedia.org/w/index.php?curid=2095155
The Java options of DietPi contain these basic options
- Java Runtime Environment JRE
- Java Development Kit JDK
The Java Runtime Environment is the runtime environment of the Java technology. It serves as a more or less hardware dependent software platform to abstract the Java applications from the host system (operating system). It defines an API (application programming interface, which is host system independent and contains the so called Java Virtual Machine (JVM).
The Java Development Kit is one of several Java software development kits (SDK) and is often used by the Java developers. It contains the components Java compiler javac
, Java debugger jdb
, Java documentation tool javadoc
, Java archiver jar
and further small tools.
To find out which version of Java is installed, just run
java -version
Mono¶
Source: User OsamaK
- https://de.wikipedia.org/w/index.php?curid=3548404
Mono is a cross platform, open source .NET framework. Is an alternative implementation of the Microsoft .NET framework. It support the development of platform independent software on the standards of the Common Language Infrastructure and the programming language C#.
To find out which version of Mono is installed, just run
mono --version
VSCodium¶
VSCodium is a FLOSS version of Microsoft’s Visual Studio code, built directly from the source on GitHub, without branding, tracking, or telemetry.
VSCodium is installed as APT package, hence you can update it by running the following commands:
apt update
apt install codium
Documentation (Visual Studio Code): https://code.visualstudio.com/docs
Documentation (VSCodium): https://github.com/VSCodium/vscodium/blob/master/docs/index.md
Source code: VSCodium/vscodium
License: MIT
Git¶
Source: https://git-scm.com/downloads/logos
Git is a distributed version control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
To find out which version of Git is installed, just run
git --version
See also Gogs and Gitea, the GitHub style servers which are available in dietpi-software
as an installation package.
Official website: https://git-scm.com/
Official documentation: https://git-scm.com/docs
Source code: git/git
License: GPLv2
PHP Composer¶
Source: WizardCat via Wikimedia tech blog, MIT.
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
Website: https://getcomposer.org/
Official documentation: https://getcomposer.org/doc/
Node.js¶
Node.js is JavaScript runtime built on Chrome’s V8 JavaScript engine.
Source: By nodejs.org, Trademark policy
By using the event-callback/non-blocking approach, Node.js offers a single-threaded event-io model that allows orchestration of tasks running in parallel. It supports multiple connections without a need for a large memory footprint. Amazon, Netflix, eBay, Reddit, LinkedIn, Tumblr, and PayPal use Node.js 3.
To update Node.js to the latest version, simply reinstall it:
dietpi-software reinstall 9
Website: https://nodejs.org/
Official documentation: https://nodejs.org/api/