Hello World - in Golang, C++ and Python with Arnica WebScript

December 16, 2019 by Igor Lozhkin
Arnica WebScript allows scripting in various programming languages. Depending on the language implementation, scripts are either compiled, or interpreted, or just-in-time compiled by their corresponding runtime libraries. 

Arnica WebScript works with compilers and runtime libraries on server side. Arnica WebScript passes parameters to the script, reads the result, and makes the result available to other scripts or just sends it to the HTTP stream.   

Below are several examples of how programming code of a simple Hello World program is implemented in Arnica WebScript using Golang, C++ and Python.

Example 1 - Golang: 

hello_world_golang.png
WebScript communicates with Golang compiler, compiles the script, deploys executable binary into the local cache folder and executes it using system call.

Example 2 - C++: 

hello_world_cpp.png

Like with the previous example, WebScript communicates with C++ compiler, compiles the script, deploys executable binary into the local cache folder and executes it using system call.

Example 3 - Python: 

hello_world_python.png
WebScript saves the Python script into the local cache folder and makes a system call to the Python runtime, passing script file name as a parameter.