Hello world/Newbie: Difference between revisions

Jakt
(Hello world/Newbie in FreeBASIC)
(Jakt)
Line 1,162:
 
A quicker alternative might be an [https://jsoftware.github.io/j-playground/bin/html2/ online version of J], if you are using a browser which supports [https://webassembly.org/ wasm].
 
=={{header|Jakt}}==
The Jakt compiler must be built from source; check [https://github.com/SerenityOS/jakt/blob/main/documentation/cmake-bootstrap.md the bootstrapping documentation] for the instructions.
As of writing, clang 14 seems to be the recommended version for compiling.
 
In summary, install cmake and run the following commands to build:
<syntaxhighlight lang="sh">
cmake -B build -GNinja
cmake --build build
</syntaxhighlight>
 
To compile hello world, save the following to hello.jakt:
<syntaxhighlight lang="jakt">
fn main() {
println("Hello world!")
}
</syntaxhighlight>
 
To compile it, run the following command in the directory containing hello.jakt.
<syntaxhighlight lang="sh">
jakt hello.jakt
</syntaxhighlight>
 
The built executable will be ./build/hello.
 
Specifying -cr will automatically run the program after building.
<syntaxhighlight lang="sh">
jakt -cr hello.jakt
</syntaxhighlight>
 
Output will go to the terminal.
 
=={{header|Java}}==
89

edits