Say Hello to Dinfio 3.2

The wait is over, the next-gen Dinfio has been released!
Now comes with new Garbage Collector—makes your programmes free from memory leaks.

Download Now  Try Online

What is Dinfio?

Dinfio is a high-level, general-purpose, interpreted, minimalist, simple, and open source programming language. Dinfio's design philosophy is "code simple!". Here is an example of "Hello world" programme in Dinfio:

start
    writeln("Hello world!")
stop

Or just:

writeln("Hello world!")

Dinfio supports multiple paradigms, including imperative, procedural, object-oriented, and event-driven programming. Dinfio comes with great built-in modules, like Standard I/O, String manipulation functions, Mathematical functions, Date and Time, Regular expression, File I/O, Graphical User Interface (GUI), HTTP requests, JSON functions, and more.

So, without further ado, let's get started!

  1. Download and install the Dinfio Programming Language
  2. Launch your favourite text editor and code this:
    start
        var name = "Chérie"
        writeln("Hello, my name is " & name)
    stop

  3. Save your code with .fio extension, for example save it as hello.fio on your home directory
  4. Launch Terminal/Command Prompt and type dinfio hello.fio. You'll see the greeting:
    Hello, my name is Chérie

  5. Voilà! You have created your first programme using Dinfio.

Download and Install

Let's go download and install Dinfio! Select your operating system below and follow the instructions to download and install Dinfio

Download Dinfio 3.2.0 for Linux

  1. Extract the package file you have downloaded (dinfio-3.2.0-linux-gtk3.tar.gz):
    $ tar -xzf dinfio-3.2.0-linux-gtk3.tar.gz

    Or if you are using older Linux with GTK 2 installed, download package file dinfio-3.2.0-linux-gtk2.tar.gz instead. And extract it:
    $ tar -xzf dinfio-3.2.0-linux-gtk2.tar.gz

  2. Install Dinfio:
    $ cd dinfio-3.2.0/
    $ ./install.sh

  3. Verify that Dinfio is installed:
    $ dinfio -v

  4. If the command prints the Dinfio version, then Dinfio is successfully installed.
* System requirement: Linux x86-64 with GTK and curl installed.
You can also find the older versions here.

Download Dinfio 3.2.0 for macOS (Apple Silicon)Download Dinfio 3.2.0 for macOS (Intel)

  1. Open the package file you have downloaded and follow the wizard to install Dinfio
  2. Launch Terminal and type the following command to verify that Dinfio is installed:
    $ dinfio -v

  3. If the command prints the Dinfio version, then Dinfio is successfully installed.
* System requirement: macOS 10.12 Sierra or later. You may follow this step if you see a warning message and can't install Dinfio.
** To check whether your Mac uses an Apple silicon chip or not, please refer to this article.

You can also find the older versions here.

Download Dinfio 3.2.0 for Windows

  1. Open the installer file you have downloaded (dinfio-3.2.0-windows.exe) and follow the wizard to install Dinfio
  2. Launch Command Prompt and type the following command to verify that Dinfio is installed:
    > dinfio -v

  3. If the command prints the Dinfio version, then Dinfio is successfully installed.
* System requirement: Windows 7 or later.
You can also find the older versions here.

Download Dinfio 3.1.06 for Raspberry Pi

  1. Extract the package file you have downloaded (dinfio-3.1.06-linux-armv7.tar.gz):
    $ tar -xzf dinfio-3.1.06-linux-armv7.tar.gz

  2. Install Dinfio:
    $ cd dinfio-3.1.06/
    $ ./install.sh

  3. Install wxGTK, this library is required by GUI module:
    $ sudo apt install libwxgtk3.0-dev

  4. Verify that Dinfio is installed:
    $ dinfio -v

  5. If the command prints the Dinfio version, then Dinfio is successfully installed.
* System requirement: Raspberry Pi OS (Linux ARMv7).
You can also find the older versions here.

  1. Download the package file:
    # curl -o dinfio-3.2.0.tar.gz \
    https://dinfio.org/releases/files/3.2.0/dinfio-3.2.0-linux-docker.tar.gz

  2. Extract the package file you have downloaded:
    # tar -xzf dinfio-3.2.0.tar.gz

  3. Install Dinfio:
    # cd dinfio-3.2.0/
    # ./install.sh

  4. Verify that Dinfio is installed:
    # dinfio -v

  5. If the command prints the Dinfio version, then Dinfio is successfully installed.
* System requirement: Linux x86-64 Docker Image with curl and zip installed.
You can also find the older versions here.

Examples

Here is an example of beautiful GUI programming in Dinfio with very simple lines of code:

' GUI Programming
 
import gui
 
start
    window = gui_window("Hello!", 260, 130)
 
    label = gui_label("Your name: ", window, 20, 20)
    textbox = gui_textbox("", window, 100, 17)
    button = gui_button("OK", window, 100, 56)
 
    button.addevent(event.click, button_click())
    window.show()
stop
 
function button_click()
    messagebox(textbox.gettext())
stop

Output:

It's very simple, isn't it? You can even find more great and fun Dinfio programme examples on the Dinfio Playground and on the GitHub Repository.

The Editors

You can download Dinfio syntax highlighting extension/package for your beloved text editors here:

Visual Studio Code
Atom
Sublime Text 3
gedit/gtksourceview

Download Visual Studio Code Extension

Install the extension file you have downloaded (dinfio-vscode-0.0.3.vsix):

$ code --install-extension dinfio-vscode-0.0.3.vsix

Or install via Visual Studio Code GUI app:
  1. Open menu View > Command Palette...
  2. In the search bar, type "vsix" and select "Extensions: Install from VSIX..."
  3. Browse and select the VSIX file you have downloaded (dinfio-vscode-0.0.3.vsix)
Screenshots:

Download Atom Package

Extract the .zip file you have downloaded (dinfio-atom-0.0.2.zip) and then copy folder language-dinfio to:

On Linux: $HOME/.atom/packages/
On macOS: $HOME/.atom/packages/
On Windows: %APPDATA%\atom\packages\

Screenshot:

Download Sublime Text 3 Package

Extract the .zip file you have downloaded (dinfio-sublime-0.0.2.zip) and then copy folder dinfio-sublime to:

On Linux: $HOME/.config/sublime-text-3/Packages/
On macOS: $HOME/Library/Application Support/Sublime Text 3/Packages/
On Windows: %APPDATA%\Sublime Text 3\Packages\

Screenshot:

Download Language Spec

Install the .lang file you have downloaded (dinfio.lang):

$ sudo cp -f dinfio.lang /usr/share/gtksourceview-3.0/language-specs/

Or:
$ sudo cp -f dinfio.lang /usr/share/gtksourceview-4/language-specs/

Screenshot: