Category Tutorials

Hello World with HTTPs→JSON→SQL

Though fizz-buzz-like exercises are necessary at some early development stages, now it’s time to try something more practical. Today we’ll make some simple program that: 1. Create the app Launch VSCode, File->OpenFolder and chose the Argentum directory: Create a httpJsonDbDemo.ag…

JSON DOM

Argentum JSON module has effective Writer and Parser that reads and writes generic application data structures to and from JSONs. It’s a preferred way of using JSON in Argentum. Though in rare cases when an application has to deal with…

JSON Writer

Argentum got a JSON module. Its Writer class allows to directly encode in JSON arbitrary application data without creating any intermediate DOM structures. Writer has a number of methods that write structural and primitive data nodes.After data is written, a…

JSON Parser

This StAX parser allows to easily read JSONs directly to the application data structures, skipping the building of JSON DOM and skipping all irrelevant pieces of data in the JSON stream. Why StAX 99% of real world applications read JSONs…

Tutorial #4. SDL Demo

Step 1. Create a separate module for the graphical scene. Let’s name this module gui. Step 2. Create a main application module. Step3. Entry point This line of code must always be the last line of the source file. What…

Argentum debugger v1

Debugger v0 supported breakpoints, call-stack inspection and stepping through the program. Version 1 added object inspection and watch expressions. Also it has special support for strings and limited support for arrays. This version is available in binary distribution. 1. Installation…

99 bottles of beer

There is a famous kid’s song in the USA: 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall. 98 bottles of beer on the…

Foreign Function Interface (FFI)

Argentum can call C/C++ functions and pass parameters of primitive data types and objects. On Argentum side: Create a module io.ag and declare there a number of functions with “;” in place of body: On C/C++ side: Create a library:…

Tutorial #0 Basic syntax

The sources of argentum programming language are organized in modules.Modules are text files with extension ag residing in the same directory. They are always in UTF-8 encoding. On compiler invocation one of modules is passed to it as a starting…

Tutorial #2. Graphs with Cycles.

Tutorial updated to v.0.0.2 Let’s solve the following coding interview problem: You are given a directed graph in the form of a text string: “a>b b>c c>d e>f b>e e>a c>c” Graph nodes are marked with letters a-z. The graph…