\n@end\n-->\n\n# CodeRunner\n\n --{{0}}--\nThis project allows you to run a code-running server, based on Python, that\ncan compile and execute code and communicate via websockets. Thus, if you want\nto develop some interactive online courses, this is probably a good way to\nstart. This README is also a self-contained LiaScript template, that defines\nsome basic macros, which can be used to make your Markdown code-snippets\nexecutable.\n\n__Try it on LiaScript:__\n\nhttps://liascript.github.io/course/?https://github.com/liascript/CodeRunner\n\n__See the project on Github:__\n\nhttps://github.com/liascript/CodeRunner\n\n --{{1}}--\nThere are three ways to use this template. The easiest way is to use the\n`import` statement and the URL of the raw text-file of the master branch or any\nother branch or version. But you can also copy the required functionality\ndirectly into the header of your Markdown document, see therefor the\nlast slide. And of course, you could also clone this project\nand change it, as you wish.\n\n\t {{1}}\n1. Load the macros via\n\n `import: https://raw.githubusercontent.com/LiaScript/CodeRunner/master/README.md`\n\n2. Copy the definitions into your Project\n\n3. Clone this repository on GitHub\n\n## `@LIA.eval`\n\nYou only have to attach the command `@LIA.eval` to your code-block or project\nand pass three parameters.\n\n1. The first, is a list of filenames, the number of sequential code-blocks\n defines the naming order.\n2. Then pass the command how your code should be compiled\n3. And as the last part, how to execute your code.\n\n```` Markdown\n```c\n#include \n\nint main (void){\n printf (\"Hello, world \\n\");\n\n\treturn 0;\n}\n```\n@LIA.eval(`[\"main.c\"]`, `gcc -Wall main.c -o a.out`, `./a.out`)\n````\n\nIn most cases it is sufficient to have only one file.\nFor this purpose we also provide shortcuts, such that the complex functionality above can be simplified with only the macro `@LIA.c`.\nThese shortcuts always assume one file only.\n\n## Languages\n\nThe following overview shows you the available languages and their shortcuts.\nTo some languages, we also provide a shell, which allows you to interact with the code after it has been executed.\nSimply add `_withShell` to the language name, e.g., `@LIA.elixir_withShell`.\n\n### Ada : `@LIA.ada`\n\n**Ada Language Summary:**\n\nAda is a structured, statically typed, imperative, and object-oriented high-level programming language, designed primarily for systems and real-time embedded applications. It is known for its strong typing, explicit concurrency, and reliability features, making it ideal for safety-critical systems. Ada was developed in the early 1980s by Jean Ichbiah under contract to the U.S. Department of Defense. One of the most commonly used Ada compilers is GNAT, and the backend here uses the GNAT-12 compiler, which ensures robust and efficient code generation.\n\nFor more detailed information, you can visit the [Wikipedia page on Ada](https://en.wikipedia.org/wiki/Ada_%28programming_language%29).\n\n---\n\n```ada\nwith Ada.Text_IO; use Ada.Text_IO;\nprocedure Main is\nbegin\n Put_Line (\"Hello WORLD!\");\nend Main;\n```\n@LIA.ada\n\n### ALGOL : `@LIA.algol`\n\nALGOL (Algorithmic Language) is a family of imperative, procedural, and structured programming languages that were developed in the late 1950s and early 1960s. ALGOL was designed to be a universal language for expressing algorithms and was influential in the development of modern programming languages. ALGOL 60, the most well-known version, introduced many concepts that are still used today, such as block structures, recursion, and parameter passing mechanisms. The backend here uses the ALGOL 60 compiler to compile and execute ALGOL code, ensuring compatibility with the original language specification.\n\nFor more information, you can visit the [ALGOL programming language Wikipedia page](https://en.wikipedia.org/wiki/ALGOL).\n\n---\n\n```algol\nBEGIN\n print((\"Hello, World!\", new line))\nEND\n```\n@LIA.algol\n\n### APL : `@LIA.apl`\n\nAPL (A Programming Language) is a high-level, array-oriented programming language that was developed in the 1960s by Kenneth E. Iverson. APL is known for its concise and expressive syntax, which uses a wide range of special symbols to represent mathematical functions and operations. It is particularly well-suited for numerical and array processing tasks, making it popular in scientific computing, data analysis, and financial modeling. The backend here uses the Dyalog APL interpreter, which provides a powerful environment for developing and executing APL code.\n\nFor more information, you can visit the [APL programming language Wikipedia page](https://en.wikipedia.org/wiki/APL_%28programming_language%29).\n\n---\n\n```apl\n\u2395\u2190'abcd' \u2218.= 'cabbage'\n```\n@LIA.apl\n\n### Assembly (nasm) : `@LIA.nasm`\n\nAssembly language is a low-level programming language that provides direct control over hardware through symbolic representation of machine code instructions. Each instruction in an assembly language corresponds closely to a machine code instruction supported by the architecture's CPU. Assembly language is often used in system programming, particularly for writing operating systems, device drivers, and embedded systems, where precise control of the hardware is essential. In the backend, the NASM (Netwide Assembler) compiler is used, which is a popular assembler for x86 architecture, known for its portability and flexibility.\n\nFor more information, you can visit the [Assembly language Wikipedia page](https://en.wikipedia.org/wiki/Assembly_language).\n\n---\n\n```asm\n; ----------------------------------------------------------------------------------------\n; Writes \"Hello, World\" to the console using only system calls. Runs on 64-bit Linux only.\n; To assemble and run:\n;\n; nasm -felf64 main.asm && ld main.o && ./a.out\n; ----------------------------------------------------------------------------------------\n\n global _start\n\n section .text\n_start: mov rax, 1 ; system call for write\n mov rdi, 1 ; file handle 1 is stdout\n mov rsi, message ; address of string to output\n mov rdx, 13 ; number of bytes\n syscall ; invoke operating system to do the write\n mov rax, 60 ; system call for exit\n xor rdi, rdi ; exit code 0\n syscall ; invoke operating system to exit\n\n section .data\nmessage: db \"Hello, World\", 10 ; note the newline at the end\n```\n@LIA.nasm\n\n### AWK : `@LIA.awk`\n\nAWK is a versatile and powerful programming language that is primarily used for text processing and data extraction. It was developed in the 1970s by Alfred Aho, Peter Weinberger, and Brian Kernighan, and its name is derived from their initials. AWK provides a rich set of features for pattern matching, text manipulation, and data processing, making it a popular choice for working with structured data files, log files, and reports. The backend here uses the GNU AWK interpreter, which is a free and open-source implementation of the AWK language, providing a flexible and efficient environment for writing AWK scripts.\n\nFor more information, you can visit the [AWK programming language Wikipedia page](https://en.wikipedia.org/wiki/AWK).\n\n---\n\n```awk\nBEGIN {\n print \"Hello, World!\"\n}\n```\n@LIA.awk\n\n### Basic (bwbasic) : `@LIA.basic`\n\nBASIC (Beginner's All-purpose Symbolic Instruction Code) is a high-level programming language that was developed in the 1960s to provide an easy-to-learn and easy-to-use language for beginners. BASIC is known for its simplicity and readability, making it an ideal language for teaching programming concepts to novices. The backend here uses the BWBASIC interpreter, which is a modern implementation of the original BASIC language, providing a simple and interactive environment for writing and executing BASIC code.\n\nFor more information, you can visit the [BASIC programming language Wikipedia page](https://en.wikipedia.org/wiki/BASIC).\n\n---\n\n```basic\n10 PRINT \"Hello, World!\"\n20 SYSTEM\n```\n@LIA.basic\n\n... or stay in the shell, by using `END`\n\n```basic\n10 PRINT \"Hello, World!\"\n20 END\n```\n@LIA.basic\n\n### C : `@LIA.c`\n\nC is a general-purpose, procedural programming language that was developed in the early 1970s by Dennis Ritchie at Bell Labs. It has become one of the most widely used programming languages of all time due to its efficiency, flexibility, and closeness to system hardware, making it ideal for operating systems, system software, and embedded systems. C provides low-level access to memory and allows for fine-grained control over the execution of programs. The language is also known for its simplicity and powerful set of operators. The backend here uses the GCC (GNU Compiler Collection) for compiling C code, ensuring highly optimized and portable executables.\n\nFor more information, you can visit the [C programming language Wikipedia page](https://en.wikipedia.org/wiki/C_%28programming_language%29).\n\n---\n\n```c\n#include \n\nint main (void){\n\tint i = 0;\n\tint max = 0;\n\n\tprintf(\"How many hellos: \");\n\tscanf(\"%d\",&max);\n\n for(i=0; i\nusing namespace std;\n\nint main (){\n\tint i = 0;\n\tint max = 0;\n\n\tcout << \"How many hellos: \";\n\tcin >> max;\n\n for(i=0; i\n\n \n Exe\n net8.0\n enable\n enable\n \n\n\n```\n@LIA.eval(`[\"Program.cs\", \"project.csproj\"]`, `dotnet build -nologo`, `dotnet run`)\n\n---\n\n### Clojure : `@LIA.clojure`\n\n**Clojure Language Summary:**\n\nClojure is a modern, functional, and dynamically-typed programming language that runs on the Java Virtual Machine (JVM). It was created by Rich Hickey and first released in 2007. Clojure emphasizes immutability, concurrency, and simplicity, making it ideal for building robust and scalable applications. It combines the best features of Lisp\u2014such as code-as-data (homoiconicity) and a powerful macro system\u2014with seamless Java interoperability, allowing developers to use existing Java libraries and tools. The backend here uses the Clojure compiler to execute Clojure code, ensuring efficient performance on the JVM.\n\nFor more information, you can visit the [Clojure programming language Wikipedia page](https://en.wikipedia.org/wiki/Clojure).\n\n---\n\n``` clojure\n(ns clojure.examples.hello\n (:gen-class))\n(defn hello-world []\n (println \"Hello World\"))\n(hello-world)\n```\n@LIA.clojure\n\n----\n\nAdditionally, you can also use the `@LIA.clojure_withShell` macro, which will start a REPL after the code has been executed.\n\n``` clojure\n(ns clojure.examples.hello\n (:gen-class))\n(defn hello-world []\n (println \"Hello World\"))\n(hello-world)\n```\n@LIA.clojure_withShell\n\n### COBOL : `@LIA.cobol`\n\nCOBOL (Common Business-Oriented Language) is a high-level programming language designed for business data processing. It was developed in the late 1950s and early 1960s by a committee of computer professionals from private industry, universities, and government agencies. COBOL is known for its readability, self-documenting code, and English-like syntax, making it easy to understand and maintain. It is widely used in legacy systems, financial institutions, and government agencies for processing large volumes of data. The backend here uses the GnuCOBOL compiler to compile COBOL code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [COBOL programming language Wikipedia page](https://en.wikipedia.org/wiki/COBOL).\n\n```cobol\n IDENTIFICATION DIVISION.\n PROGRAM-ID. HELLO-WORLD.\n PROCEDURE DIVISION.\n DISPLAY 'Hello, world'.\n STOP RUN.\n```\n@LIA.cobol\n\n### Coq : `@LIA.coq`\n\nCoq is an interactive theorem prover and functional programming language developed by the French Institute for Research in Computer Science and Automation (INRIA). It is designed for formal verification of mathematical proofs and software programs, allowing developers to write and verify complex mathematical statements and algorithms. Coq is based on the Calculus of Inductive Constructions (CIC), a powerful type theory that supports dependent types, higher-order logic, and formal reasoning. The backend here uses the Coq compiler to execute Coq code, ensuring correctness and reliability of the proofs and programs.\n\nFor more information, you can visit the [Coq programming language Wikipedia page](https://en.wikipedia.org/wiki/Coq).\n\n---\n\n```coq\nRequire Import ZArith.\nOpen Scope Z_scope.\nGoal forall a b c:Z,\n (a + b + c) ^ 2 =\n a * a + b ^ 2 + c * c + 2 * a * b + 2 * a * c + 2 * b * c.\n intros; ring.\nQed.\n```\n@LIA.coq\n\n### D : `@LIA.d`\n\nD is a systems programming language with C-like syntax and static typing. It combines the power and performance of C and C++ with the safety and expressiveness of modern programming languages like Rust and Swift. D is designed for writing efficient, maintainable, and scalable software, making it ideal for system programming, game development, and high-performance applications. The backend here uses the DMD (Digital Mars D) compiler to compile D code, ensuring fast and reliable execution.\n\nFor more information, you can visit the [D programming language Wikipedia page](https://en.wikipedia.org/wiki/D_%28programming_language%29).\n\n---\n\n```d\nimport std.stdio;\n\nvoid main()\n{\n writeln(\"Hello, World!\");\n}\n```\n@LIA.d\n\n### Delphi : `@LIA.delphi`\n\nDelphi is an integrated development environment (IDE) and object-oriented programming language based on the Object Pascal language. It was developed by Borland in the mid-1990s and is known for its rapid application development (RAD) capabilities, particularly for Windows applications. Delphi provides a visual programming environment, allowing developers to design user interfaces using drag-and-drop components. The backend here uses the Free Pascal compiler to compile Delphi code, ensuring compatibility with modern Pascal standards.\n\nFor more information, you can visit the [Delphi programming language Wikipedia page](https://en.wikipedia.org/wiki/Delphi_%28programming_language%29).\n\n---\n\n``` delphi\nprogram example001;\nuses\n SysUtils;\nvar\n i : Integer;\n Zahl : Real;\n Antwort: Char;\nbegin\n WriteLn('Programmbeispiel Kontrollstrukturen');\n WriteLn;\n repeat // nicht abweisende Schleife\n Write('Bitte geben Sie eine Zahl ein: ');\n ReadLn(Zahl);\n if Zahl <> 0 then // einseitige Auswahl\n Zahl := 1 / Zahl;\n for i := 1 to 10 do // Z\u00e4hlschleife\n Zahl := Zahl * 2;\n while Zahl > 1 do // abweisende Schleife\n Zahl := Zahl / 2;\n i := Round(Zahl) * 100;\n case i of // Fallunterscheidung\n 1: Zahl := Zahl * 2;\n 2: Zahl := Zahl * 4;\n 4: Zahl := Zahl * 8\n else\n Zahl := Zahl * 10\n end;\n if Zahl <> 0 then // zweiseitige Auswahl\n WriteLn(Format('Das Ergebnis lautet %.2f', [Zahl]))\n else\n Writeln('Leider ergibt sich der Wert von 0.');\n Write('Noch eine Berechnung (J/N)? ');\n ReadLn(Antwort)\n until UpCase(Antwort) = 'N'\nend.\n```\n@LIA.eval(`[\"main.pas\"]`, `fpc main.pas`, `./main`)\n\n### Elixir : `@LIA.elixir`\n\nElixir is a dynamic, functional programming language designed for building scalable and maintainable applications. It was created by Jos\u00e9 Valim and first released in 2011. Elixir runs on the Erlang Virtual Machine (BEAM), which provides excellent support for concurrency, fault tolerance, and distributed systems. Elixir leverages the strengths of Erlang while offering a more modern syntax and powerful metaprogramming capabilities. It is widely used for web development, embedded systems, and applications requiring high reliability. The backend here uses the Elixir compiler to execute Elixir code, ensuring robust and efficient performance on the BEAM platform.\n\nFor more information, you can visit the [Elixir programming language Wikipedia page](https://en.wikipedia.org/wiki/Elixir_%28programming_language%29).\n\n---\n\n```elixir\nIO.puts \"Hello World\"\n```\n@LIA.elixir\n\n---\n\nAdditionally, you can also use the `@LIA.elixir_withShell` macro, which will start an IEx shell after the code has been executed.\n\n```elixir\nIO.puts \"Hello World\"\n```\n@LIA.elixir_withShell\n\n### Erlang : `@LIA.erlang`\n\nErlang is a functional programming language designed for building concurrent, distributed, and fault-tolerant systems. It was developed by Ericsson in the late 1980s and is known for its lightweight processes, message-passing concurrency model, and hot code swapping capabilities. Erlang is particularly well-suited for telecommunications, real-time systems, and applications requiring high availability. The backend here uses the Erlang compiler to execute Erlang code, ensuring efficient performance and reliability.\n\nFor more information, you can visit the [Erlang programming language Wikipedia page](https://en.wikipedia.org/wiki/Erlang_%28programming_language%29).\n\n---\n\n```erlang\n-module(hello).\n-export([hello/0]).\nhello() ->\n io:format(\"Hello, World!~n\").\n```\n@LIA.erlang\n\n---\n\nAdditionally, you can also use the `@LIA.erlang_withShell` macro, which will start an Erlang shell after the code has been executed.\n\n```erlang\n-module(hello).\n-export([hello/0]).\nhello() ->\n io:format(\"Hello, World!~n\").\n```\n@LIA.erlang_withShell\n\n### F# : `@LIA.fsharp`\n\n**F# Language Summary:**\n\nF# is a functional-first programming language that runs on the .NET platform. It was developed by Microsoft Research and first released in 2005. F# is known for its strong support for functional programming paradigms, but it also seamlessly integrates with object-oriented and imperative programming, making it a versatile language for a wide range of applications. It is particularly well-suited for tasks involving data analysis, scientific computing, and financial modeling, thanks to its concise syntax, powerful type system, and efficient performance. The backend here uses the .NET compiler to compile F# code, ensuring compatibility and high performance within the .NET ecosystem.\n\nFor more information, you can visit the [F# programming language Wikipedia page](https://en.wikipedia.org/wiki/F_Sharp_%28programming_language%29).\n\n---\n\nThe project file is already included in the macro `@LIA.fsharp`.\n\n```fsharp +Program.fs\n// See https://aka.ms/new-console-template for more information\nprintfn \"Hello from F#\"\n```\n@LIA.fsharp\n\n---\n\nBut you are free to add your own project file manually, if you want to.\n\n```fsharp +Program.fs\n// See https://aka.ms/new-console-template for more information\nprintfn \"Hello from F#\"\n```\n```xml -project.fsporj\n\n\n \n Exe\n net8.0\n \n\n \n \n \n\n\n```\n@LIA.eval(`[\"Program.fs\", \"project.fsproj\"]`, `dotnet build -nologo`, `dotnet run`)\n\n### Forth : `@LIA.forth`\n\nForth is a stack-based, extensible, and interactive programming language that was developed in the late 1960s by Charles H. Moore. It is known for its simplicity, flexibility, and efficiency, making it ideal for embedded systems, real-time applications, and low-level programming tasks. Forth uses a postfix notation, where operations are performed by pushing and popping values on a data stack. It provides direct access to memory and hardware, allowing for fine-grained control over system resources. The backend here uses the Gforth interpreter to execute Forth code, ensuring fast and reliable execution.\n\nFor more information, you can visit the [Forth programming language Wikipedia page](https://en.wikipedia.org/wiki/Forth_%28programming_language%29).\n\n---\n\n```forth\n: hello .\" Hello, world!\" cr ;\nhello\n```\n@LIA.forth\n\n### Fortran : `@LIA.fortran`\n\nFortran (Formula Translation) is a high-level programming language developed by IBM in the 1950s for scientific and engineering applications. It is known for its efficiency, numerical accuracy, and extensive library of mathematical functions, making it ideal for numerical computations, simulations, and data analysis. Fortran has evolved over the years, with the latest standard being Fortran 2018, which includes modern features like coarrays, improved parallelism, and interoperability with C. The backend here uses the GNU Fortran compiler (gfortran) to compile Fortran code, ensuring high performance and compatibility with modern Fortran standards.\n\nFor more information, you can visit the [Fortran programming language Wikipedia page](https://en.wikipedia.org/wiki/Fortran).\n\n---\n\n```fortran\nprogram hello\n print *, \"Hello, world!\"\nend program hello\n```\n@LIA.fortran\n\n### Groovy : `@LIA.groovy`\n\nGroovy is a dynamic, object-oriented programming language that runs on the Java Virtual Machine (JVM). It was created by James Strachan and first released in 2003. Groovy is known for its simplicity, flexibility, and seamless integration with Java, allowing developers to write concise and expressive code. It supports features like closures, dynamic typing, and metaprogramming, making it ideal for scripting, web development, and automation tasks. The backend here uses the Groovy compiler to execute Groovy code, ensuring compatibility with the JVM and access to the Java ecosystem.\n\nFor more information, you can visit the [Groovy programming language Wikipedia page](https://en.wikipedia.org/wiki/Apache_Groovy).\n\n---\n\n```groovy\nprintln \"Hello, world!\"\n```\n@LIA.groovy\n\n### GO : `@LIA.go`\n\nGo, also known as Golang, is a statically typed, compiled programming language designed by Google engineers and first released in 2009. It is known for its simplicity, efficiency, and strong support for concurrent programming. Go combines the performance and safety of a compiled language like C with the ease of use and productivity features of dynamically typed languages. It is particularly well-suited for building large-scale, distributed systems, cloud services, and other performance-critical applications. The backend here uses the `golang-go` compiler to compile Go code, ensuring fast and reliable execution.\n\nFor more information, you can visit the [Go programming language Wikipedia page](https://en.wikipedia.org/wiki/Go_%28programming_language%29).\n\n---\n\n``` go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Println(\"hello world\")\n}\n```\n@LIA.go\n\n### Haskell : `@LIA.haskell`\n\nHaskell is a purely functional programming language known for its strong static type system, immutability, and lazy evaluation. It was developed in the late 1980s as a standardized open-source language to serve as a foundation for research and teaching in functional programming. Haskell is ideal for applications that require robust correctness, such as financial systems, data analysis, and concurrent programming. It supports powerful abstractions like monads and higher-order functions, making it highly expressive and concise. The backend here uses the GHC (Glasgow Haskell Compiler) to compile Haskell code, ensuring optimized performance and advanced features.\n\nFor more information, you can visit the [Haskell programming language Wikipedia page](https://en.wikipedia.org/wiki/Haskell_%28programming_language%29).\n\n---\n\n``` haskell\nmain = putStrLn \"hello world\"\n```\n@LIA.haskell\n\n---\n\nAdditionally, you can also use the `@LIA.haskell_withShell` macro, which will start a GHCi shell after the code has been executed.\n\n``` haskell\nmain = putStrLn \"hello world\"\n```\n@LIA.haskell_withShell\n\n### Haxe : `@LIA.haxe`\n\nHaxe is a high-level, cross-platform programming language that was developed by Nicolas Cannasse in 2005. It is known for its versatility, performance, and ease of use, making it ideal for building web applications, games, and mobile apps. Haxe is a strongly typed language that compiles to multiple target platforms, including JavaScript, C++, and Java, allowing developers to write code once and deploy it across different environments. The backend here uses the Haxe compiler to execute Haxe code, ensuring compatibility with various platforms and efficient performance.\n\nFor more information, you can visit the [Haxe programming language Wikipedia page](https://en.wikipedia.org/wiki/Haxe).\n\n---\n\n``` haxe\nclass Main {\n static function main() {\n trace(\"Hello, World!\");\n }\n}\n```\n@LIA.haxe\n\n### Inform : `@LIA.inform`\n\nThis program is a compiler of Infocom format (also called \"Z-machine\") text adventure games, written in Inform 6. The Z-machine was developed by Infocom to run its text adventures, and it has since been used by other interactive fiction authors. The Inform 6 compiler is a powerful tool for creating interactive fiction games, providing a high-level language for writing game logic and a virtual machine for executing the compiled games. The backend here uses the Inform 6 compiler to compile Inform code, ensuring compatibility with the Z-machine and the ability to run text adventure games.\n\nFor more information, you can visit the [Inform programming language Wikipedia page](https://en.wikipedia.org/wiki/Inform).\n---\n\n``` inform\nConstant Story \"Hello Deductible\";\nConstant Headline \"^An Interactive Example^\";\n\nInclude \"Parser\";\nInclude \"VerbLib\";\n\n[ Initialise;\n location = Living_Room;\n \"Hello World\";\n];\n\nObject Kitchen \"Kitchen\";\nObject Front_Door \"Front Door\";\n\nObject Living_Room \"Living Room\"\n with\n description \"A comfortably furnished living room.\",\n n_to Kitchen,\n s_to Front_Door,\n has light;\n\nObject -> Salesman \"insurance salesman\"\n with\n name 'insurance' 'salesman' 'man',\n description \"An insurance salesman in a tacky polyester\n suit. He seems eager to speak to you.\",\n before [;\n Listen:\n move Insurance_Paperwork to player;\n \"The salesman bores you with a discussion\n of life insurance policies. From his\n briefcase he pulls some paperwork which he\n hands to you.\";\n ],\n has animate;\n\nObject -> -> Briefcase \"briefcase\"\n with\n name 'briefcase' 'case',\n description \"A slightly worn, black briefcase.\",\n has container;\n\nObject -> -> -> Insurance_Paperwork \"insurance paperwork\"\n with\n name 'paperwork' 'papers' 'insurance' 'documents' 'forms',\n description \"Page after page of small legalese.\";\n\nInclude \"Grammar\";\n```\n@LIA.inform\n\n### IO : `@LIA.io`\n\nIo is a prototype-based, object-oriented programming language that was developed by Steve Dekorte in the early 2000s. It is known for its simplicity, minimalism, and powerful message-passing model, making it ideal for building dynamic and interactive applications. Io is inspired by Smalltalk, Self, and Lisp, and it provides a flexible and extensible environment for creating domain-specific languages and frameworks. The backend here uses the Io interpreter to execute Io code, ensuring fast and efficient execution.\n\nFor more information, you can visit the [Io programming language Wikipedia page](https://en.wikipedia.org/wiki/Io_%28programming_language%29).\n\n---\n\n``` io\n\"Hello, world!\" println\n```\n@LIA.io\n\nAs an alternative, you can also run it within an interactive REPL shell.\n\n``` io\n\"Hello, world!\" println\n```\n@LIA.io_withShell\n\n### Java : `@LIA.java`\n\nJava is a widely-used, class-based, object-oriented programming language that was developed by Sun Microsystems (now owned by Oracle) and released in 1995. It is designed to be platform-independent, meaning that compiled Java code can run on any platform that supports the Java Virtual Machine (JVM). Java is known for its portability, scalability, and strong memory management features, making it ideal for building large-scale enterprise applications, Android apps, and web services. The language's syntax is similar to C++, but it simplifies many complex features, making it easier to learn and use. The backend here uses `jdk-21_linux-x64_bin`, the latest version of the Java Development Kit (JDK), to compile and execute Java code, ensuring cutting-edge performance and compatibility with modern Java features.\n\nFor more information, you can visit the [Java programming language Wikipedia page](https://en.wikipedia.org/wiki/Java_%28programming_language%29).\n\n---\n\nThe short-cut for java requires a special parameter, which is the name of the class, such that this can be substituted within filenames and commands.\n\n``` java\nimport java.io.*;\nclass Demo {\npublic static void main(String args[])\nthrows IOException\n{\n // create a BufferedReader using System.in\n BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));\n String str;\n\n System.out.println(\"Enter lines of text.\");\n System.out.println(\"Enter 'stop' to quit.\");\n do {\n\n str = obj.readLine();\n System.err.println(str);\n } while(!str.equals(\"stop\"));\n}\n}\n```\n@LIA.java(Demo)\n\n---\n\nBut, you can also use the `@LIA.eval` macro, which allows you to define all settings manually.\n\n``` java\nimport java.io.*;\nclass Demo {\npublic static void main(String args[])\nthrows IOException\n{\n // create a BufferedReader using System.in\n BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));\n String str;\n\n System.out.println(\"Enter lines of text.\");\n System.out.println(\"Enter 'stop' to quit.\");\n do {\n\n str = obj.readLine();\n System.err.println(str);\n } while(!str.equals(\"stop\"));\n}\n}\n```\n@LIA.eval(`[\"Demo.java\"]`, `javac Demo.java`, `java Demo`)\n\n### Julia : `@LIA.julia`\n\nJulia is a high-level, high-performance programming language designed for technical and scientific computing. It was first released in 2012 and has gained popularity for its ability to handle numerical and computational tasks efficiently, combining the speed of languages like C and Fortran with the ease of use of Python and R. Julia supports multiple programming paradigms, including functional, object-oriented, and parallel programming, and it is particularly well-suited for data analysis, machine learning, and simulations. The backend here uses Julia 1.9.3 to execute Julia code, ensuring optimal performance and access to the latest language features.\n\nFor more information, you can visit the [Julia programming language Wikipedia page](https://en.wikipedia.org/wiki/Julia_%28programming_language%29).\n\n---\n\n```julia\n# function to calculate the volume of a sphere\nfunction sphere_vol(r)\n # julia allows Unicode names (in UTF-8 encoding)\n # so either \"pi\" or the symbol \u03c0 can be used\n return 4/3*pi*r^3\nend\n\n# functions can also be defined more succinctly\nquadratic(a, sqr_term, b) = (-b + sqr_term) / 2a\n\n# calculates x for 0 = a*x^2+b*x+c, arguments types can be defined in function definitions\nfunction quadratic2(a::Float64, b::Float64, c::Float64)\n # unlike other languages 2a is equivalent to 2*a\n # a^2 is used instead of a**2 or pow(a,2)\n sqr_term = sqrt(b^2-4a*c)\n r1 = quadratic(a, sqr_term, b)\n r2 = quadratic(a, -sqr_term, b)\n # multiple values can be returned from a function using tuples\n # if the return keyword is omitted, the last term is returned\n r1, r2\nend\n\nvol = sphere_vol(3)\n# @printf allows number formatting but does not automatically append the \\n to statements, see below\nusing Printf\n@printf \"volume = %0.3f\\n\" vol\n#> volume = 113.097\n\nquad1, quad2 = quadratic2(2.0, -2.0, -12.0)\nprintln(\"result 1: \", quad1)\n#> result 1: 3.0\nprintln(\"result 2: \", quad2)\n#> result 2: -2.0\n```\n@LIA.julia\n\n---\n\nAdditionally, you can also use the `@LIA.julia_withShell` macro, which will start a Julia shell after the code has been executed.\n\n```julia\n# function to calculate the volume of a sphere\nfunction sphere_vol(r)\n # julia allows Unicode names (in UTF-8 encoding)\n # so either \"pi\" or the symbol \u03c0 can be used\n return 4/3*pi*r^3\nend\n\n# functions can also be defined more succinctly\nquadratic(a, sqr_term, b) = (-b + sqr_term) / 2a\n\n# calculates x for 0 = a*x^2+b*x+c, arguments types can be defined in function definitions\nfunction quadratic2(a::Float64, b::Float64, c::Float64)\n # unlike other languages 2a is equivalent to 2*a\n # a^2 is used instead of a**2 or pow(a,2)\n sqr_term = sqrt(b^2-4a*c)\n r1 = quadratic(a, sqr_term, b)\n r2 = quadratic(a, -sqr_term, b)\n # multiple values can be returned from a function using tuples\n # if the return keyword is omitted, the last term is returned\n r1, r2\nend\n\nvol = sphere_vol(3)\n# @printf allows number formatting but does not automatically append the \\n to statements, see below\nusing Printf\n@printf \"volume = %0.3f\\n\" vol\n#> volume = 113.097\n\nquad1, quad2 = quadratic2(2.0, -2.0, -12.0)\nprintln(\"result 1: \", quad1)\n#> result 1: 3.0\nprintln(\"result 2: \", quad2)\n#> result 2: -2.0\n```\n@LIA.julia_withShell\n\n### Kotlin : `@LIA.kotlin`\n\nKotlin is a modern, statically typed programming language developed by JetBrains in 2011. It is designed to be fully interoperable with Java and runs on the Java Virtual Machine (JVM). Kotlin combines object-oriented and functional programming features, making it a versatile language for building Android apps, web services, and enterprise applications. It is known for its conciseness, safety features, and expressive syntax, which reduce boilerplate code and improve developer productivity. The backend here uses the Kotlin compiler to compile Kotlin code, ensuring compatibility with the JVM and access to the Java ecosystem.\n\nFor more information, you can visit the [Kotlin programming language Wikipedia page](https://en.wikipedia.org/wiki/Kotlin_%28programming_language%29).\n\n---\n\n```kotlin\nfun main() {\n println(\"Hello, World!\")\n}\n```\n@LIA.kotlin\n\n### Lua : `@LIA.lua`\n\nLua is a lightweight, high-level programming language designed for embedded systems, scripting, and game development. It was developed in the early 1990s by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes at the Pontifical Catholic University of Rio de Janeiro. Lua is known for its simplicity, efficiency, and extensibility, making it ideal for integrating with other languages and platforms. It provides a powerful set of features, including first-class functions, coroutines, and metatables, which enable developers to build flexible and scalable applications. The backend here uses the Lua interpreter to execute Lua code, ensuring fast and reliable execution.\n\nFor more information, you can visit the [Lua programming language Wikipedia page](https://en.wikipedia.org/wiki/Lua_%28programming_language%29).\n\n---\n\n```lua\nprint(\"Hello, world!\")\n```\n@LIA.lua\n\n### Modula 2 : `@LIA.modula2`\n\nModula-2 is a procedural programming language developed by Niklaus Wirth in the late 1970s as a successor to Pascal. It is known for its simplicity, strong typing, and modular programming features, making it ideal for teaching programming concepts and developing reliable software. Modula-2 introduced many concepts that are now common in modern programming languages, such as modules, data abstraction, and exception handling. The backend here uses the GNU Modula-2 compiler to compile Modula-2 code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [Modula-2 programming language Wikipedia page](https://en.wikipedia.org/wiki/Modula-2).\n\n---\n\n```modula2\nMODULE hello ;\n\nFROM StrIO IMPORT WriteString, WriteLn ;\n\nBEGIN\n WriteString ('hello world') ; WriteLn\nEND hello.\n```\n@LIA.eval(`[\"hello.mod\"]`, `gm2 hello.mod`, `./a.out`)\n\n### Nim : `@LIA.nim`\n\nNim is a statically typed, compiled programming language that combines the performance of C with the expressiveness of modern languages like Python. First released in 2008, Nim is known for its simplicity, efficiency, and flexibility, making it suitable for systems programming, web development, and scientific computing. Nim features a powerful metaprogramming system, automatic memory management, and a syntax that is easy to read and write. It compiles to C, C++, and JavaScript, enabling cross-platform development with high performance. The backend here uses the Nim compiler to execute Nim code, ensuring efficient and optimized output.\n\nFor more information, you can visit the [Nim programming language Wikipedia page](https://en.wikipedia.org/wiki/Nim_%28programming_language%29).\n\n---\n\n```nim\necho \"Hello World\"\n```\n@LIA.nim\n\n### Node.js : `@LIA.nodejs`\n\nNode.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows you to run JavaScript code outside of a web browser, enabling server-side scripting, command-line tools, and automation tasks. Node.js provides a rich set of libraries and frameworks for building web applications, APIs, and microservices. It is known for its event-driven, non-blocking I/O model, which allows for high concurrency and scalability. The backend here uses the Node.js runtime to execute JavaScript code, ensuring compatibility with the latest ECMAScript features and access to the Node.js ecosystem.\n\nFor more information, you can visit the [Node.js Wikipedia page](https://en.wikipedia.org/wiki/Node.js).\n\n---\n\n```javascript\nconsole.log(\"Hello, World!\");\n```\n@LIA.nodejs\n\n### Objective-C : `@LIA.objectivec`\n\nObjective-C is a general-purpose, object-oriented programming language that was developed by Brad Cox and Tom Love in the early 1980s. It is known for its dynamic runtime, message-passing syntax, and close integration with the C programming language. Objective-C was the primary language used for developing macOS and iOS applications before the introduction of Swift. It provides a rich set of features for building graphical user interfaces, handling events, and managing memory, making it ideal for developing desktop and mobile applications. The backend here uses the Clang compiler to compile Objective-C code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [Objective-C programming language Wikipedia page](https://en.wikipedia.org/wiki/Objective-C).\n\n---\n\n```objectivec\n// 'Hello World' Program in Objective-C\n#import \n\nint main (int argc, const char * argv[])\n{\n NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\n NSLog (@\"Hello, World!\");\n [pool drain];\n return 0;\n}\n```\n@LIA.eval(`[\"main.m\"]`, `gobjc main.m`, `./main`)\n\n### OCaml : `@LIA.ocaml`\n\nOCaml is a statically typed, functional programming language that was developed in the late 1990s as an extension of the Caml language. It is known for its strong type system, type inference, and support for functional, imperative, and object-oriented programming paradigms. OCaml is widely used in academia and industry for developing compilers, interpreters, theorem provers, and other applications that require high reliability and performance. The backend here uses the OCaml compiler to execute OCaml code, ensuring efficient and optimized execution.\n\nFor more information, you can visit the [OCaml programming language Wikipedia page](https://en.wikipedia.org/wiki/OCaml).\n\n---\n\n```ocaml\nprint_string \"Hello, world!\\n\";;\n```\n@LIA.ocaml\n\n### Octave : `@LIA.octave`\n\nOctave is a high-level, interpreted programming language primarily used for numerical computations and data analysis. It is compatible with MATLAB and provides a similar syntax and functionality, making it a popular choice for scientific computing, machine learning, and signal processing. Octave supports matrix operations, plotting, and algorithm development, allowing users to prototype and test complex mathematical models efficiently. The backend here uses the Octave interpreter to execute Octave code, ensuring compatibility with MATLAB scripts and toolboxes.\n\nFor more information, you can visit the [Octave programming language Wikipedia page](https://en.wikipedia.org/wiki/GNU_Octave).\n\n---\n\n```octave\ndisp(\"Hello, world!\")\n```\n@LIA.eval(`[\"main.m\"]`, `none`, `octave --no-window-system main.m`)\n\n### Pascal : `@LIA.pascal`\n\nPascal is a high-level, procedural programming language developed by Niklaus Wirth in the late 1960s. It was designed to encourage good programming practices and provide a structured approach to software development. Pascal is known for its readability, simplicity, and strong typing, making it ideal for teaching programming concepts and developing reliable software. It introduced many features that are now common in modern programming languages, such as block structures, data structures, and modular programming. The backend here uses the Free Pascal compiler to compile Pascal code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [Pascal programming language Wikipedia page](https://en.wikipedia.org/wiki/Pascal_%28programming_language%29).\n\n---\n\n```pascal\nprogram HelloWorld;\nbegin\n writeln('Hello, world!');\nend.\n```\n@LIA.eval(`[\"main.pas\"]`, `fpc main.pas`, `./main`)\n\n### Perl : `@LIA.perl`\n\nPerl is a high-level, dynamic programming language known for its versatility and powerful text-processing capabilities. Originally developed by Larry Wall in 1987, Perl has evolved to become a popular choice for system administration, web development, and network programming. It is especially strong in string manipulation, regular expressions, and file handling, making it ideal for tasks involving data extraction, reporting, and automation. Perl's flexible syntax allows for rapid development and prototyping. The backend here uses the Perl interpreter to execute Perl scripts, ensuring compatibility and efficient performance.\n\nFor more information, you can visit the [Perl programming language Wikipedia page](https://en.wikipedia.org/wiki/Perl).\n\n---\n\n```perl\nprint \"Enter your name: \";\n$name=;\nprint \"Hello, ${name} ... you will soon be a Perl addict!\\n\";\n```\n@LIA.perl\n\n---\n\nAdditionally, you can also use the `@LIA.perl_withShell` macro, which will start a Perl shell after the code has been executed.\n\n```perl\nsub greet {\n my $name = shift;\n print \"Hello, $name!\\n\";\n}\n\nmy $x = 42;\n```\n@LIA.perl_withShell\n\n### PHP : `@LIA.php`\n\nPHP is a server-side scripting language designed for web development and general-purpose programming. It was created by Rasmus Lerdorf in 1994 and has since become one of the most widely used languages for building dynamic websites and web applications. PHP is known for its simplicity, flexibility, and extensive library of functions, making it easy to integrate with databases, web servers, and other technologies. It supports object-oriented programming, procedural programming, and functional programming paradigms. The backend here uses the PHP interpreter to execute PHP code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [PHP programming language Wikipedia page](https://en.wikipedia.org/wiki/PHP).\n\n---\n\n```php\n\n```\n@LIA.php\n\n### PostScript : `@LIA.postscript`\n\nPostScript is a page description language developed by Adobe Systems in the early 1980s. It is used primarily in the printing and graphics industries to describe the layout and appearance of documents, images, and other visual content. PostScript is known for its flexibility, scalability, and device independence, making it ideal for generating high-quality output on a wide range of printers and displays. It uses a stack-based programming model, where operations are performed by pushing and popping values on a data stack. The backend here uses the Ghostscript interpreter to execute PostScript code, ensuring compatibility and efficient rendering.\n\nFor more information, you can visit the [PostScript programming language Wikipedia page](https://en.wikipedia.org/wiki/PostScript).\n\n---\n\n```postscript\n%!PS\n<< /PageSize [420 100] >> setpagedevice % Set page size to A5\n/Courier % name the desired font\n20 selectfont % choose the size in points and establish\n % the font as the current one\n 72 50 moveto % position the current point at\n % coordinates 72, 500 (the origin is at the\n % lower-left corner of the page)\n(Hello world!) show % paint the text in parentheses\nshowpage % print all on the page\n```\n@LIA.postscript\n\n### Prolog : `@LIA.prolog`\n\nProlog is a logic programming language that was developed in the early 1970s by Alain Colmerauer and Robert Kowalski. It is based on formal logic and provides a declarative approach to problem-solving, where programs are defined as sets of logical rules and facts. Prolog is particularly well-suited for tasks involving symbolic reasoning, artificial intelligence, and natural language processing. It is known for its pattern matching and backtracking capabilities, which allow for efficient search and inference. The backend here uses the SWI-Prolog interpreter to execute Prolog code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [Prolog programming language Wikipedia page](https://en.wikipedia.org/wiki/Prolog).\n\n---\n\n``` prolog\nlikes(mary, chocolate).\nlikes(mary, wine).\nlikes(john, wine).\nlikes(john, mary).\n\n% Define the query rule to find pairs X and Y where john likes X and X likes Y\nquery :-\n likes(john, X),\n likes(X, Y),\n format('X = ~w, Y = ~w~n', [X, Y]).\n```\n@LIA.prolog(query)\n\n---\n\nAdditionally, you can also use the `@LIA.prolog_withShell` macro, which will start a Prolog shell after the code has been executed.\n\n``` prolog\nlikes(mary, chocolate).\nlikes(mary, wine).\nlikes(john, wine).\nlikes(john, mary).\n\n% Define the query rule to find pairs X and Y where john likes X and X likes Y\nquery :-\n likes(john, X),\n likes(X, Y),\n format('X = ~w, Y = ~w~n', [X, Y]).\n```\n@LIA.prolog_withShell\n\n### Python2 : `@LIA.python2`\n\nPython 2 is a version of the Python programming language that was widely used for many years, first released in 2000. It is known for its simplicity, readability, and versatility, making it popular for web development, automation, data analysis, and scripting. Python 2 introduced many features that made Python a popular choice among developers, but it also had some design limitations that led to the development of Python 3. Python 2.7, the last release of Python 2, reached its end of life on January 1, 2020, meaning it no longer receives updates or support. The backend here uses the Python 2 interpreter to execute Python 2 code, ensuring compatibility with legacy systems and software that still rely on this version.\n\nFor more information, you can visit the [Python 2 programming language Wikipedia page](https://en.wikipedia.org/wiki/CPython#Version_history).\n\n---\n\n```python\nfor i in range(10):\n print \"Hallo Welt\", i\n```\n@LIA.python2\n\n---\n\nAdditionally, you can also use the `@LIA.python2_withShell` macro, which will start a Python 2 shell after the code has been executed.\n\n```python\nfor i in range(10):\n print \"Hallo Welt\", i\n```\n@LIA.python2_withShell\n\n### Python3 : `@LIA.python3`\n\nPython 3 is the current and actively maintained version of the Python programming language, first released in 2008. It was developed to address and improve upon the limitations of Python 2, introducing several key features like better Unicode support, a more consistent and intuitive syntax, and enhancements in performance and standard library functionality. Python 3 is widely used for web development, data science, machine learning, automation, and scripting. It is known for its readability, ease of use, and extensive ecosystem of libraries and frameworks. The backend here uses the Python 3 interpreter to execute Python 3 code, ensuring compatibility with modern Python applications and libraries.\n\nFor more information, you can visit the [Python 3 programming language Wikipedia page](https://en.wikipedia.org/wiki/CPython#Version_history).\n\n---\n\n```python\nfor i in range(10):\n print(\"Hallo Welt\", i)\n```\n@LIA.python3\n\n---\n\nAdditionally, you can also use the `@LIA.python3_withShell` macro, which will start a Python 3 shell after the code has been executed.\n\n```python\nfor i in range(10):\n print(\"Hallo Welt\", i)\n```\n@LIA.python3_withShell\n\n---\n\nIf you want to pass multiple files for data processing, you can use the `@LIA.eval` macro, which allows you to define all settings manually.\n\n```text -data.csv\nA,B,C\n0,0.1,3\n1,0.3,5\n2,0.4,2\n```\n```python readCSV.py\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndf = pd.read_csv('data.csv', header = 0)\ndf.plot.scatter(x='A', y='B')\nplt.savefig('temp.png')\n```\n@LIA.eval(`[\"data.csv\", \"main.py\"]`, `none`, `python3 main.py`, `*`)\n\n### Q# : `@LIA.qsharp`\n\nQ# is a domain-specific programming language developed by Microsoft for quantum computing. It is designed to express quantum algorithms, operations, and simulations in a high-level, expressive manner. Q# provides a rich set of features for developing quantum programs, including quantum data types, quantum operations, and quantum simulators. It is integrated with the Microsoft Quantum Development Kit, which includes a quantum simulator and tools for developing, testing, and debugging quantum programs. The backend here uses the Q# compiler to compile Q# code, ensuring compatibility with quantum hardware and simulators.\n\nFor more information, you can visit the [Q# programming language Wikipedia page](https://en.wikipedia.org/wiki/Q_Sharp).\n\n---\n\n```qsharp\nnamespace HelloWorld {\n open Microsoft.Quantum.Intrinsic;\n\n operation SayHello() : Unit {\n Message(\"Hello, world!\");\n }\n}\n```\n@LIA.eval(`[\"HelloWorld.qs\"]`, `dotnet build`, `dotnet run`)\n\n### R : `@LIA.r`\n\nR is a high-level programming language and environment specifically designed for statistical computing and data analysis. First released in 1995 by Ross Ihaka and Robert Gentleman, R is widely used among statisticians, data scientists, and researchers for its powerful statistical packages and data visualization capabilities. It supports a wide range of statistical techniques, from linear and nonlinear modeling to time-series analysis and clustering. R's rich ecosystem of packages and libraries, combined with its scripting capabilities and interactive data analysis features, makes it a preferred choice for data manipulation and graphical representation. The backend here uses the R interpreter to execute R scripts, ensuring robust statistical analysis and data handling.\n\nFor more information, you can visit the [R programming language Wikipedia page](https://en.wikipedia.org/wiki/R_%28programming_language%29).\n\n---\n\n``` R\nlibrary(ggplot2)\n\n# Use stdout as per normal...\nprint(\"Hello, world!\")\n\n# Use plots...\npng(file=\"out1.png\")\nplot(cars)\n\n# Even ggplot!\npng(file=\"out2.png\")\nqplot(wt, mpg, data = mtcars, colour = factor(cyl))\n```\n@LIA.r\n\n---\n\nAdditionally, you can also use the `@LIA.r_withShell` macro, which will start an R shell after the code has been executed.\n\n``` R\nprint(\"Hello World\")\n```\n@LIA.r_withShell\n\n### Racket : `@LIA.racket`\n\nRacket is a general-purpose, multi-paradigm programming language that was developed as a descendant of the Scheme programming language. It is known for its extensibility, expressive syntax, and powerful macro system, making it ideal for language-oriented programming, domain-specific languages, and software development. Racket provides a rich set of libraries and tools for building web applications, graphical user interfaces, and educational software. It is widely used in academia and industry for research, teaching, and prototyping. The backend here uses the Racket interpreter to execute Racket code, ensuring efficient and reliable performance.\n\nFor more information, you can visit the [Racket programming language Wikipedia page](https://en.wikipedia.org/wiki/Racket_%28programming_language%29).\n\n---\n\n```racket\n#lang racket\n(displayln \"Hello, world!\")\n```\n@LIA.racket\n\n### REXX : `@LIA.rexx`\n\nREXX (Restructured Extended Executor) is a high-level, procedural programming language developed by IBM in the late 1970s. It is known for its simplicity, readability, and ease of use, making it ideal for scripting, automation, and system administration tasks. REXX provides a rich set of built-in functions and features for string manipulation, file processing, and program control. It is widely used in mainframe environments, such as IBM z/OS, as well as in cross-platform scripting and automation. The backend here uses the Regina REXX interpreter to execute REXX code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [REXX programming language Wikipedia page](https://en.wikipedia.org/wiki/REXX).\n\n---\n\n```rexx\n/* REXX program to display \"Hello, world!\" */\nsay \"Hello, world!\"\n```\n@LIA.eval(`[\"hello.rexx\"]`, `none`, `rexx hello.rexx`)\n\n### Ruby : `@LIA.ruby`\n\nRuby is a high-level, interpreted programming language known for its simplicity and productivity. Developed by Yukihiro Matsumoto and first released in 1995, Ruby emphasizes ease of use and developer happiness, featuring a clean and elegant syntax that is easy to read and write. It supports multiple programming paradigms, including object-oriented, functional, and imperative programming. Ruby is particularly renowned for its use in web development, especially with the Ruby on Rails framework, which facilitates rapid development and deployment of web applications. The backend here uses the Ruby interpreter to execute Ruby code, ensuring efficient execution and support for modern Ruby features.\n\nFor more information, you can visit the [Ruby programming language Wikipedia page](https://en.wikipedia.org/wiki/Ruby_%28programming_language%29).\n\n---\n\n```ruby\nclass HelloWorld\n def initialize(name)\n @name = name.capitalize\n end\n def sayHi\n puts \"Hello #{@name}!\"\n end\nend\n\nhello = HelloWorld.new(\"World\")\nhello.sayHi\n```\n@LIA.ruby\n\n---\n\nAdditionally, you can also use the `@LIA.ruby_withShell` macro, which will start an IRB shell after the code has been executed.\n\n```ruby\nclass HelloWorld\n def initialize(name)\n @name = name.capitalize\n end\n def sayHi\n puts \"Hello #{@name}!\"\n end\nend\n\nhello = HelloWorld.new(\"World\")\nhello.sayHi\n```\n@LIA.ruby_withShell\n\n### Rust : `@LIA.rust`\n\n**Rust Language Summary:**\n\nRust is a systems programming language that focuses on safety, performance, and concurrency. It was first released in 2010 by Mozilla and has gained significant popularity for its ability to provide memory safety without a garbage collector. Rust combines the performance characteristics of languages like C++ with modern features such as strong static typing, ownership, and borrowing, which help prevent common programming errors like null pointer dereferences and data races. Rust is well-suited for systems programming, web assembly, and high-performance applications. The backend here uses the Rust compiler to compile Rust code, ensuring efficient, safe, and reliable execution.\n\nFor more information, you can visit the [Rust programming language Wikipedia page](https://en.wikipedia.org/wiki/Rust_%28programming_language%29).\n\n``` rust\nfn main() {\n println!(\"Hello World!\");\n}\n```\n@LIA.rust\n\n### SelectScript : `@LIA.selectscript`\n\nhttps://github.com/andre-dietrich/SelectScriptC/tree/master\n\n``` sql\nmov\n = PROC(Tower, frm, to)\n \"A simple tower move function that returns a new tower configuration:\n mov([[3,2,1], [], []], 0, 1) -> [[3,2], [1], []]\n\n In case of an unalowed move a None value gets returned:\n mov([[3,2], [1], []], 0, 1) -> None \"\n : ( IF( $Tower == None, EXIT None);\n\n IF( not $Tower[$frm], EXIT None);\n\n IF( $Tower[$to],\n IF( $Tower[$frm][-1] > $Tower[$to][-1],\n EXIT None));\n\n $Tower[$to]@+( $Tower[$frm][-1] );\n $Tower[$frm]@pop();\n $Tower;\n );\n\n# initial tower configuration\ntower = [[3,2,1], [], []];\n\n# allowed moves [from, to]\nmoves = [[0,1], [0,2], [1,0], [1,2], [2,0], [2,1]];\n\n# goal configuration\nfinish = [[], [], [3,2,1]];\n\n# vanilla-approach: recusively test all combinations for 7 moves\n$start_time = time();\nrslt1 = SELECT [$m1, $m2, $m3, $m4, $m5, $m6, $m7]\n FROM m1:moves, m2:moves, m3:moves, m4:moves,\n m5:moves, m6:moves, m7:moves\n WHERE finish == (tower\n |> mov($m1[0], $m1[1])\n |> mov($m2[0], $m2[1])\n |> mov($m3[0], $m3[1])\n |> mov($m4[0], $m4[1])\n |> mov($m5[0], $m5[1])\n |> mov($m6[0], $m6[1])\n |> mov($m7[0], $m7[1]))\n AS list;\n\nprint(\"######################################################################\");\nprint(\"first vanilla-approach search\");\nprint(\"time: \", time()-$start_time);\nprint(\"result: \", rslt1);\n\n$start_time = time();\nrslt2 = SELECT $m\n FROM m:moves\n WHERE finish == mov($tower, $m[0], $m[1])\n START WITH $tower = tower\n CONNECT BY $tower@mov($m[0], $m[1])\n STOP WITH $tower == None OR $step$ > 6\n AS list;\n\nprint(\"######################################################################\");\nprint(\"simple CONNECT BY (recursive search)\");\nprint(\"time: \", time()-$start_time);\nprint(\"result: \", rslt2);\n\n$start_time = time();\nrslt3 = SELECT $tower\n FROM m:moves\n WHERE finish == mov($tower, $m[0], $m[1])\n START WITH $tower = tower\n CONNECT BY NO CYCLE\n $tower@mov($m[0], $m[1])\n STOP WITH $tower == None OR $step$ > 6\n AS LIST;\n\nprint(\"######################################################################\");\nprint(\"CONNECT BY with no cycles\");\nprint(\"time: \", time()-$start_time);\nprint(\"result: \", rslt3);\n\nrslt4 = SELECT $step$, $tower, $m\n FROM m:moves\n WHERE finish == mov($tower, $m[0], $m[1])\n START WITH $tower = tower\n CONNECT BY UNIQUE\n $tower@mov($m[0], $m[1])\n STOP WITH $tower == None OR $step$ > 7\n AS LIST;\n\nprint(\"######################################################################\");\nprint(\"CONNECT BY with UNIQUE\");\nprint(\"time: \", time()-$start_time);\nprint(\"result: \", rslt4);\n\nTrue;\n```\n@LIA.selectscript\n\n### Solidity : `@LIA.solidity`\n\nSolidity is a high-level, statically typed programming language designed for writing smart contracts on the Ethereum blockchain. It was developed by Gavin Wood, Christian Reitwiessner, and others in 2014 as part of the Ethereum project. Solidity is known for its simplicity, security, and efficiency, making it ideal for creating decentralized applications (dApps) and automated contracts that run on the Ethereum Virtual Machine (EVM). Solidity supports object-oriented programming features, including inheritance, interfaces, and libraries, allowing developers to build complex smart contracts with reusable components. The backend here uses the Solidity compiler to compile Solidity code, ensuring compatibility with the Ethereum blockchain and efficient execution.\n\nFor more information, you can visit the [Solidity programming language Wikipedia page](https://en.wikipedia.org/wiki/Solidity).\n\n---\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract HelloWorld {\n string public message;\n\n constructor() {\n message = \"Hello, world!\";\n }\n\n function setMessage(string memory newMessage) public {\n message = newMessage;\n }\n}\n```\n@LIA.eval(`[\"HelloWorld.sol\"]`, `none`, `solcjs --abi HelloWorld.sol`)\n\n### Scala : `@LIA.scala`\n\nScala is a modern, functional programming language that runs on the Java Virtual Machine (JVM). It was developed by Martin Odersky and first released in 2003. Scala combines object-oriented and functional programming paradigms, providing a powerful and expressive language for building scalable and robust applications. Scala is known for its conciseness, type safety, and interoperability with Java, making it a popular choice for developing web services, distributed systems, and data processing applications. The backend here uses the Scala compiler to execute Scala code, ensuring efficient performance on the JVM.\n\nFor more information, you can visit the [Scala programming language Wikipedia page](https://en.wikipedia.org/wiki/Scala_%28programming_language%29).\n\n---\n\n```scala\nobject HelloWorld {\n def main(args: Array[String]): Unit = {\n println(\"Hello, world!\")\n }\n}\n```\n@LIA.scala(HelloWorld)\n\n### Scheme : `@LIA.scheme`\n\nScheme is a minimalist, functional programming language that was developed in the 1970s as a dialect of Lisp. It is known for its simplicity, elegance, and expressive power, making it an ideal language for teaching programming concepts and exploring functional programming paradigms. Scheme features a simple syntax based on s-expressions and a powerful macro system that allows for easy metaprogramming. It is widely used in academic settings and research for its clarity and ease of understanding. The backend here uses the Scheme interpreter to execute Scheme code, ensuring efficient and reliable performance.\n\nFor more information, you can visit the [Scheme programming language Wikipedia page](https://en.wikipedia.org/wiki/Scheme_%28programming_language%29).\n\n---\n\n```scheme\n(display \"Hello, world!\")\n(newline)\n```\n@LIA.scheme\n\n### Smalltalk : `@LIA.smalltalk`\n\nSmalltalk is an object-oriented, dynamically typed programming language that was developed in the 1970s at Xerox PARC. It is known for its simplicity, elegance, and powerful object model, making it an ideal language for teaching object-oriented programming concepts. Smalltalk features a live programming environment where developers can interact with objects directly, making it easy to explore and modify code in real time. Smalltalk has influenced many modern programming languages, including Java, Ruby, and Python. The backend here uses the Squeak Smalltalk interpreter to execute Smalltalk code, ensuring interactive and dynamic programming capabilities.\n\nFor more information, you can visit the [Smalltalk programming language Wikipedia page](https://en.wikipedia.org/wiki/Smalltalk).\n\n---\n\n```smalltalk\n'Hello, world!' displayNl\n```\n@LIA.smalltalk\n\n### Standard ML : `@LIA.sml`\n\nStandard ML (SML) is a functional programming language that was developed in the 1980s as a standardized version of the ML programming language. It is known for its strong type system, pattern matching, and type inference capabilities, making it ideal for developing reliable and efficient software. SML features a clean and expressive syntax that emphasizes functional programming concepts, such as higher-order functions, currying, and immutability. It is widely used in academia and research for teaching programming languages and compiler construction. The backend here uses the SML/NJ compiler to execute Standard ML code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [Standard ML programming language Wikipedia page](https://en.wikipedia.org/wiki/Standard_ML).\n\n---\n\n``` sml\nprint \"Hello, world!\\n\";\n```\n@LIA.eval(`[\"main.sml\"]`, `none`, `sml main.sml`)\n\n### TCL : `@LIA.tcl`\n\nTcl (Tool Command Language) is a high-level, interpreted programming language known for its simplicity, flexibility, and extensibility. Developed by John Ousterhout in the late 1980s, Tcl is designed to be easy to learn and use, with a minimalistic syntax that emphasizes commands and procedures. Tcl is widely used for scripting, automation, and rapid prototyping, as well as for embedding in applications and extending with custom functionality. The backend here uses the Tcl interpreter to execute Tcl code, ensuring compatibility and efficient execution.\n\nFor more information, you can visit the [Tcl programming language Wikipedia page](https://en.wikipedia.org/wiki/Tcl).\n\n---\n\n```tcl\nputs \"Hello, world!\"\n```\n@LIA.tcl\n\n### Vala : `@LIA.vala`\n\nVala is a high-level, object-oriented programming language developed by J\u00fcrg Billeter and Raffaele Sandrini in 2006. It is designed to be a modern alternative to C and C++, with a focus on simplicity, performance, and ease of use. Vala is known for its clean syntax, memory safety, and interoperability with existing libraries and frameworks. It is widely used for developing desktop applications, system utilities, and software libraries. Vala compiles to C code and uses the GObject system for object-oriented programming, making it compatible with the GNOME ecosystem. The backend here uses the Vala compiler to compile Vala code, ensuring efficient execution and compatibility with the GNOME platform.\n\nFor more information, you can visit the [Vala programming language Wikipedia page](https://en.wikipedia.org/wiki/Vala_%28programming_language%29).\n\n---\n\n```vala\nvoid main () {\n print (\"Hello, world!\\n\");\n}\n```\n@LIA.eval(`[\"main.vala\"]`, `valac main.vala -o main`, `./main`)\n\n### V : `@LIA.v`\n\nV is a statically typed, compiled programming language designed for simplicity, performance, and safety. It was created by Alexander Medvednikov and first released in 2020. V aims to be a lightweight language that is easy to learn and use, with a syntax that is straightforward and similar to Go and Python. It focuses on providing a high level of efficiency while maintaining readability and ease of use. V supports both procedural and functional programming paradigms and is designed to compile to native machine code, resulting in fast execution and minimal runtime dependencies. The backend here uses the V compiler to compile V code, ensuring efficient and reliable performance.\n\nFor more information, you can visit the [V programming language Wikipedia page](https://en.wikipedia.org/wiki/V_%28programming_language%29).\n\n---\n\n```v\nprintln(\"Hello World\")\n```\n@LIA.v\n\n---\n\nAdditionally, you can also use the `@LIA.v_withShell` macro, which will start a V shell after the code has been executed.\n\n```v\nprintln(\"Hello World\")\n```\n@LIA.v_withShell\n\n### Verilog : `@LIA.verilog`\n\nVerilog is a hardware description language (HDL) used for designing digital circuits and systems. It was first introduced in the 1980s and has since become a standard language for modeling and simulating digital circuits. Verilog is known for its simplicity, expressiveness, and support for both behavioral and structural modeling of hardware components. It is widely used in the semiconductor industry for designing integrated circuits, field-programmable gate arrays (FPGAs), and other digital systems. The backend here uses the Icarus Verilog simulator to execute Verilog code, ensuring compatibility and efficient simulation of digital circuits.\n\nFor more information, you can visit the [Verilog programming language Wikipedia page](https://en.wikipedia.org/wiki/Verilog).\n\n---\n\n```verilog\nmodule hello_world;\n initial begin\n $display(\"Hello, world!\");\n $finish;\n end\nendmodule\n```\n@LIA.verilog\n\n### VHDL : `@LIA.vhdl`\n\nVHDL (VHSIC Hardware Description Language) is a hardware description language used for designing digital circuits and systems. It was developed in the 1980s as part of the U.S. Department of Defense's VHSIC (Very High-Speed Integrated Circuit) program. VHDL is known for its versatility, expressiveness, and support for both behavioral and structural modeling of hardware components. It is widely used in the semiconductor industry for designing integrated circuits, field-programmable gate arrays (FPGAs), and other digital systems. The backend here uses the GHDL simulator to execute VHDL code, ensuring compatibility and efficient simulation of digital circuits.\n\nFor more information, you can visit the [VHDL programming language Wikipedia page](https://en.wikipedia.org/wiki/VHDL).\n\n---\n\n```vhdl\nlibrary ieee;\nuse ieee.std_logic_1164.all;\n\nentity hello_world is\nend hello_world;\n\narchitecture rtl of hello_world is\nbegin\n process\n begin\n report \"Hello, world!\";\n wait;\n end process;\nend rtl;\n```\n@LIA.vhdl(hello_world)\n\n### Zig : `@LIA.zig`\n\nZig is a general-purpose, statically typed programming language designed for robustness, optimality, and clarity. It was first released in 2016 by Andrew Kelley. Zig aims to offer a modern alternative to C with improved safety and performance features, including manual memory management, a comprehensive standard library, and support for cross-compilation. The language provides fine-grained control over system resources and emphasizes compile-time checks and correctness. Zig's syntax is designed to be simple and expressive, making it suitable for systems programming, embedded development, and performance-critical applications. The backend here uses the Zig compiler to compile Zig code, ensuring efficient execution and cross-platform compatibility.\n\nFor more information, you can visit the [Zig programming language Wikipedia page](https://en.wikipedia.org/wiki/Zig_%28programming_language%29).\n\n---\n\n```zig\nconst std = @import(\"std\");\n\npub fn main() void {\n std.io.getStdOut().writeAll(\n \"Hello World!\",\n ) catch unreachable;\n}\n```\n@LIA.zig\n\n## `@LIA.evalWithDebug`\n\nThis does basically the same as `@LIA.eval`, but it will add additional\nDebug-information about the CodeRunner status to the console.\n\n```c\n#include \n\nint main (void){\n\tint i = 0;\n\tint max = 0;\n\n\tprintf(\"How many hellos: \");\n\tscanf(\"%d\",&max);\n\n for(i=0; i= 10) {\n console.warn(\"could not establish connection\")\n this.error = \"could not establish connection to => \" + url\n return\n }\n\n this.ws = new WebSocket(url);\n\n const self = this\n\n const connectionTimeout = setTimeout(() => {\n self.ws.close();\n console.log(\"WebSocket connection timed out\");\n }, 5000);\n\n this.ws.onopen = function () {\n clearTimeout(connectionTimeout);\n self.log(\"connections established\");\n\n self.connected = true\n\n setInterval(function() {\n self.ws.send(\"ping\")\n }, 15000);\n }\n this.ws.onmessage = function (e) {\n // e.data contains received string.\n\n let data\n try {\n data = JSON.parse(e.data)\n } catch (e) {\n self.warn(\"received message could not be handled =>\", e.data)\n }\n if (data) {\n self.handlerdata.uid\n }\n }\n this.ws.onclose = function () {\n clearTimeout(connectionTimeout);\n self.connected = false\n self.warn(\"connection closed ... reconnecting\")\n\n setTimeout(function(){\n console.warn(\"....\", step+1)\n self.init(url, step+1)\n }, 1000)\n }\n this.ws.onerror = function (e) {\n clearTimeout(connectionTimeout);\n self.warn(\"an error has occurred\")\n }\n },\n log(...args) {\n window.console.log(\"CodeRunner:\", ...args)\n },\n warn(...args) {\n window.console.warn(\"CodeRunner:\", ...args)\n },\n handle(uid, callback) {\n this.handler[uid] = callback\n },\n send(uid, message, sender=null, restart=false) {\n const self = this\n if (this.connected) {\n message.uid = uid\n this.ws.send(JSON.stringify(message))\n } else if (this.error) {\n\n if(restart) {\n sender.lia(\"LIA: terminal\")\n this.error = \"\"\n this.init(this.url)\n setTimeout(function() {\n self.send(uid, message, sender, false)\n }, 2000)\n\n } else {\n //sender.lia(\"LIA: wait\")\n setTimeout(() => {\n sender.lia(\" \" + this.error)\n sender.lia(\" Maybe reloading fixes the problem ...\")\n sender.lia(\"LIA: stop\")\n }, 800)\n }\n } else {\n setTimeout(function() {\n self.send(uid, message, sender, false)\n }, 2000)\n\n if (sender) {\n\n sender.lia(\"LIA: terminal\")\n if (this.firstConnection) {\n this.firstConnection = false\n setTimeout(() => {\n sender.log(\"stream\", \"\", [\" Waking up execution server ...\\n\", \"This may take up to 30 seconds ...\\n\", \"Please be patient ...\\n\"])\n }, 100)\n } else {\n sender.log(\"stream\", \"\", \".\")\n }\n sender.lia(\"LIA: terminal\")\n }\n }\n }\n}\n\n//window.CodeRunner.init(\"wss://coderunner.informatik.tu-freiberg.de/\")\n//window.CodeRunner.init(\"ws://localhost:4000/\")\nwindow.CodeRunner.init(\"wss://ancient-hollows-41316.herokuapp.com/\")\n@end\n\n@LIA.ada: @LIA.eval(`[\"main.ada\"]`, `gnatmake main.ada`, `./main`)\n@LIA.algol: @LIA.eval(`[\"main.alg\"]`, `none`, `a68g main.alg`)\n@LIA.apl: @LIA.eval(`[\"main.apl\"]`, `none`, `dyalog -script main.apl`)\n@LIA.awk: @LIA.eval(`[\"main.awk\"]`, `none`, `awk -f main.awk`)\n@LIA.basic: @LIA.eval(`[\"main.bas\"]`, `none`, `bwbasic main.bas`)\n@LIA.c: @LIA.eval(`[\"main.c\"]`, `gcc -Wall main.c -o a.out`, `./a.out`)\n@LIA.clojure: @LIA.eval(`[\"main.clj\"]`, `none`, `clojure -M main.clj`)\n@LIA.clojure_withShell: @LIA.eval(`[\"main.clj\"]`, `none`, `clojure -M -i main.clj -r`)\n@LIA.cpp: @LIA.eval(`[\"main.cpp\"]`, `g++ main.cpp -o a.out`, `./a.out`)\n@LIA.cobol: @LIA.eval(`[\"main.cob\"]`, `cobc -x --free main.cob`, `./main`)\n@LIA.coq: @LIA.eval(`[\"file.v\"]`, `coqc file.v`, `coqtop -lv file.v`)\n@LIA.d: @LIA.eval(`[\"main.d\"]`, `gdc main.d`, `./a.out`)\n@LIA.elixir: @LIA.eval(`[\"main.exs\"]`, `none`, `elixir main.exs`)\n@LIA.elixir_withShell: @LIA.eval(`[\"main.exs\"]`, `none`, `iex main.exs`)\n@LIA.erlang: @LIA.eval(`[\"hello.erl\"]`, `erlc hello.erl`, `erl -noshell -s hello hello -s init stop`)\n@LIA.erlang_withShell: @LIA.eval(`[\"hello.erl\"]`, `erlc hello.erl`, `erl -noshell -s hello hello`)\n@LIA.forth: @LIA.eval(`[\"main.fs\"]`, `none`, `gforth main.fs -e BYE`)\n@LIA.forth_withShell: @LIA.eval(`[\"main.fs\"]`, `none`, `gforth main.fs`)\n@LIA.fortran: @LIA.eval(`[\"main.f90\"]`, `gfortran main.f90 -o a.out`, `./a.out`)\n@LIA.go: @LIA.eval(`[\"main.go\"]`, `go build main.go`, `./main`)\n@LIA.groovy: @LIA.eval(`[\"main.groovy\"]`, `none`, `groovy main.groovy`)\n@LIA.haskell: @LIA.eval(`[\"main.hs\"]`, `ghc main.hs -o main`, `./main`)\n@LIA.haskell_withShell: @LIA.eval(`[\"main.hs\"]`, `none`, `ghci main.hs`)\n@LIA.haxe: @LIA.eval(`[\"Main.hx\"]`, `none`, `haxe -main Main --interp`)\n@LIA.inform: @LIA.eval(`[\"main.inf\"]`, `inform -o main.inf > compile.log && [ -f \"main.z5\" ] || { cat compile.log >&2; exit 1; }`, `/usr/games/dfrotz main.z5`)\n@LIA.io: @LIA.eval(`[\"main.io\"]`, `none`, `io main.io`)\n@LIA.io_withShell: @LIA.eval(`[\"main.io\"]`, `none`, `io -i main.io`)\n@LIA.java: @LIA.eval(`[\"@0.java\"]`, `javac @0.java`, `java @0`)\n@LIA.julia: @LIA.eval(`[\"main.jl\"]`, `none`, `julia main.jl`)\n@LIA.julia_withShell: @LIA.eval(`[\"main.jl\"]`, `none`, `julia -i main.jl`)\n@LIA.kotlin: @LIA.eval(`[\"main.kt\"]`, `kotlinc main.kt -include-runtime -d main.jar`, `java -jar main.jar`)\n@LIA.lua: @LIA.eval(`[\"main.lua\"]`, `none`, `lua main.lua`)\n@LIA.mono: @LIA.eval(`[\"main.cs\"]`, `mcs main.cs`, `mono main.exe`)\n@LIA.nasm: @LIA.eval(`[\"main.asm\"]`, `nasm -felf64 main.asm && ld main.o`, `./a.out`)\n@LIA.nim: @LIA.eval(`[\"main.nim\"]`, `nim c main.nim`, `./main`)\n@LIA.nodejs: @LIA.eval(`[\"main.js\"]`, `none`, `node main.js`)\n@LIA.ocaml: @LIA.eval(`[\"main.ml\"]`, `none`, `ocaml main.ml`)\n@LIA.perl: @LIA.eval(`[\"main.pl\"]`, `perl -c main.pl`, `perl main.pl`)\n@LIA.perl_withShell: @LIA.eval(`[\"main.pl\"]`, `perl -c main.pl`, `perl -d main.pl`)\n@LIA.php: @LIA.eval(`[\"main.php\"]`, `none`, `php main.php`)\n@LIA.postscript: @LIA.eval(`[\"input.ps\"]`, `none`, `gs -sDEVICE=png16m -r300 -o output.png input.ps`)\n@LIA.prolog: @LIA.eval(`[\"main.pl\"]`, `none`, `swipl -s main.pl -g @0 -t halt`)\n@LIA.prolog_withShell: @LIA.eval(`[\"main.pl\"]`, `none`, `swipl -s main.pl`)\n@LIA.python: @LIA.python3\n@LIA.python_withShell: @LIA.python3_withShell\n@LIA.python2: @LIA.eval(`[\"main.py\"]`, `python2.7 -m compileall .`, `python2.7 main.pyc`)\n@LIA.python2_withShell: @LIA.eval(`[\"main.py\"]`, `python2.7 -m compileall .`, `python2.7 -i main.pyc`)\n@LIA.python3: @LIA.eval(`[\"main.py\"]`, `none`, `python3 main.py`)\n@LIA.python3_withShell: @LIA.eval(`[\"main.py\"]`, `none`, `python3 -i main.py`)\n@LIA.r: @LIA.eval(`[\"main.R\"]`, `none`, `Rscript main.R`)\n@LIA.r_withShell: @LIA.eval(`[\"main.R\"]`, `none`, `sh -c \"cat main.R - | R --interactive\"`)\n@LIA.racket: @LIA.eval(`[\"main.rkt\"]`, `none`, `racket main.rkt`)\n@LIA.ruby: @LIA.eval(`[\"main.rb\"]`, `none`, `ruby main.rb`)\n@LIA.ruby_withShell: @LIA.eval(`[\"main.rb\"]`, `none`, `irb --nomultiline -r ./main.rb`)\n@LIA.rust: @LIA.eval(`[\"main.rs\"]`, `rustc main.rs`, `./main`)\n@LIA.scala: @LIA.eval(`[\"@0.scala\"]`, `scalac @0.scala`, `scala @0`)\n@LIA.scheme: @LIA.eval(`[\"main.scm\"]`, `none`, `guile --no-auto-compile main.scm`)\n@LIA.selectscript: @LIA.eval(`[\"main.s2\"]`, `none`, `S2c -x main.s2`)\n@LIA.smalltalk: @LIA.eval(`[\"main.st\"]`, `none`, `gst main.st`)\n@LIA.tcl: @LIA.eval(`[\"main.tcl\"]`, `none`, `tclsh main.tcl`)\n@LIA.v: @LIA.eval(`[\"main.v\"]`, `v main.v`, `./main`)\n@LIA.v_withShell: @LIA.eval(`[\"main.v\"]`, `none`, `sh -c \"cat main.v - | v repl\"`)\n@LIA.verilog: @LIA.eval(`[\"main.v\"]`, `iverilog -o main.vvp main.v`, `vvp main.vvp`)\n@LIA.vhdl: @LIA.eval(`[\"@0.vhdl\"]`, `ghdl -a @0.vhdl && ghdl -e @0`, `ghdl -r @0`)\n@LIA.zig: @LIA.eval(`[\"main.zig\"]`, `zig build-exe ./main.zig -O ReleaseSmall`, `./main`)\n\n@LIA.dotnet\n```xml -project.csproj\n\n \n Exe\n net8.0\n enable\n enable\n \n\n```\n@LIA.eval(`[\"Program.cs\",\"project.csproj\"]`, `dotnet build -nologo`, `dotnet run`)\n@end\n\n@LIA.fsharp\n```xml -project.csproj\n\n \n Exe\n net8.0\n \n \n \n \n\n```\n@LIA.eval(`[\"Program.fs\", \"project.fsproj\"]`, `dotnet build -nologo`, `dotnet run`)\n@end\n\n@LIA.qsharp\n```xml -project.csproj\n\n \n Exe\n net8.0\n \n\n```\n@LIA.eval(`[\"Program.qs\", \"project.csproj\"]`, `dotnet build -nologo`, `dotnet run`)\n@end\n\n@LIA.eval: @LIA.eval_(false,`@0`,@1,@2,@3)\n\n@LIA.evalWithDebug: @LIA.eval_(true,`@0`,@1,@2,@3)\n\n@LIA.eval_\n\n@end\n````\n\n## Deployment\n\n### Heroku\n\nChange the Dockerfile to:\n\n``` yaml\n...\n# EXPOSE 8000\n\n# ENTRYPOINT python3 -m server\nCMD python3 -m server --host 0.0.0.0 --port $PORT\n```\n\nThe host has to be set to `0.0.0.0` and the port is set by heroku itself.\n\nAfterwards repeat the following steps:\n\n``` bash\n$ heroku container:login\n ...\n Login Succeeded\n\n$ heroku create\n Creating app... done, \u2b22 XXXXXX-XXXXXXX-XXXXXX\n https://XXXXXX-XXXXXXX-XXXXXX.herokuapp.com/ | https://git.heroku.com/XXXXXX-XXXXXXX-XXXXXX.git\n\n$ heroku container:push web\n === Building web (.../CodeRunner/Dockerfile)\n Sending build context to Docker daemon 4.633MB\n Step 1/35 : FROM ubuntu:kinetic\n ---> d6547859cd2f\n Step 2/35 : RUN DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing\n ---> Using cache\n ...\n\n Step 35/35 : CMD python3 -m server --host 0.0.0.0 --port $PORT\n ---> Running in bde2634a12ba\n ...\n\n Successfully built 50ec74c6e81f\n Successfully tagged registry.heroku.com/XXXXXX-XXXXXXX-XXXXXX/web:latest\n === Pushing web (.../CodeRunner/Dockerfile)\n Using default tag: latest\n The push refers to repository [registry.heroku.com/XXXXXX-XXXXXXX-XXXXXX/web]\n ...\n Your image has been successfully pushed. You can now release it with the 'container:release' command.\n\n$ heroku container:release web\n Releasing images web to XXXXXX-XXXXXXX-XXXXXX... done\n```",
"installation_instructions": null,
"categories": [
"Everything"
],
"owners": [],
"owner": null,
"code_snippets": {},
"evaluation_results": [],
"found_via_ownership_request": false,
"security_scans": [
{
"repo_url": "https://github.com/LiaScript/CodeRunner",
"repo_name": "CodeRunner",
"score": 95,
"risk_level": "low",
"score_explanation": "Score starts at 100, deducts points for security issues, and adds points for security best practices",
"scan_id": "5791b24f-ee4d-4ba5-8319-2a7abaa59d3e",
"mcp_app_id": "b73b76fb-26cd-401c-ad59-40288bd4576b",
"scan_time": "2025-06-19T14:57:08.816926+00:00",
"created_at": "2025-06-19T14:57:08.817724+00:00",
"updated_at": "2025-06-19T14:57:08.817724+00:00",
"findings": [
{
"finding_id": "2c07b254-66f8-4e5e-80c0-1832e2279970",
"message": "Use of subprocess with shell=True detected. This can be dangerous if used with untrusted input.",
"line": 62,
"created_at": "2025-06-19T14:57:08.817724+00:00",
"rule_id": "security-validator.scanner.rules.semgrep.dangerous-shell-true",
"scan_id": "5791b24f-ee4d-4ba5-8319-2a7abaa59d3e",
"type": "semgrep",
"severity": "ERROR",
"path": "compiler/helper.py",
"meta_info": {
"lines": " out = subprocess.run(cmd,\n cwd=cwd,\n capture_output=True,\n text=True,\n shell=True)",
"pattern": "",
"rule_name": "dangerous_code"
}
}
],
"vulnerabilities": []
}
]
}
}
Coderunner
A development server for running LiaScript code snippets