-
Notifications
You must be signed in to change notification settings - Fork 191
Create my very own markdown file 😃 #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: cdl-08
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,266 @@ | ||||||
| # Helloworld Programs | ||||||
|
|
||||||
|  | ||||||
|
|
||||||
| We list below Helloworld programs for different programming languages, i.e. programs that print "Hello, World!". | ||||||
| The specified compiler or interpreter is required for each programming languages. | ||||||
|
|
||||||
| The table below summarizes the programs: | ||||||
|
|
||||||
| | Language | Language (Spec) Site | Section | Build / Run Toolchain | Debian / Ubuntu Packages | | ||||||
| |----------|----------------------|---------|-----------------------|--------------------------| | ||||||
| | C | [The Standard - C](https://www.iso-9899.info/wiki/The_Standard) | [C](#c) | GCC | `build-essential` | | ||||||
| | C++ | [The Standard - C++](https://isocpp.org/std/the-standard) | [C++](#c++) | GCC / G++ | `build-essential`, `g++` | | ||||||
| | Dlang | [D Programming Language: Home](https://dlang.org/) | [Dlang](#dlang) | GCC / GDC | `build-essential`, `gdc` | | ||||||
| | Go | [The Go Programming Language](https://go.dev/) | [Go](#go) | Go | `golang` | | ||||||
| | Rust | [Rust Programming Language](https://www.rust-lang.org/) | [Rust](#rust) | Rust (Crate) | `rustlang` | | ||||||
| | Java | [Java Programming Language](https://docs.oracle.com/javase/8/docs/technotes/guides/language/) | [Java](#java) | JDK | `openjdk-17-jdk` | | ||||||
| | x86_64 assembly | [x86 and amd64 instruction reference](https://www.felixcloutier.com/x86/) | [x86_64 Assembly](#x86_64-assembly) | GCC / GAS | `build-essential` | | ||||||
| | ARM64 assembly | [Arm A64 Instruction Set Architecture](https://developer.arm.com/documentation/ddi0596/latest/) | [ARM64 Assembly](#arm64-assembly) | GCC / GAS (AArch64) | `build-essential` | | ||||||
| | Bash | [Bash Reference Manual](https://www.gnu.org/s/bash/manual/bash.html) | [Bash](#bash) | Bash | `bash` | | ||||||
| | Python | [Welcome to Python.org](https://www.python.org/) | [Python](#python) | Python | `python` | | ||||||
| | Ruby | [Ruby Programming Language](https://www.ruby-lang.org/en/) | [Ruby](#ruby) | Ruby | `ruby` | | ||||||
| | PHP | [PHP: Hypertext Preprocessor](https://www.php.net/) | [PHP](#php) | PHP | `php` | | ||||||
| | Perl | [The Perl Programming Language](https://www.perl.org/) | [Perl](#perl) | Perl | `perl` | | ||||||
| | Lua | [The Programming Language Lua](https://www.lua.org/) | [Lua](#lua) | Lua | `lua` | | ||||||
|
|
||||||
| ## C | ||||||
|
|
||||||
| ```c | ||||||
| #include <stdio.h> | ||||||
|
|
||||||
| int main(void) | ||||||
| { | ||||||
| puts("Hello, World!"); | ||||||
| return 0; | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| Build with: | ||||||
|
|
||||||
| ```console | ||||||
| gcc -Wall -o helloworld helloworld.c | ||||||
| ``` | ||||||
|
|
||||||
| Run with: | ||||||
|
|
||||||
| ```console | ||||||
| ./helloworld | ||||||
| ``` | ||||||
|
|
||||||
| ## C++ | ||||||
|
|
||||||
| ```cpp | ||||||
| #include <iostream> | ||||||
|
|
||||||
| int main() | ||||||
| { | ||||||
| std::cout << "Hello, World!" << std::endl; | ||||||
| return 0; | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| Build with: | ||||||
|
|
||||||
| ```console | ||||||
| g++ -Wall -o helloworld helloworld.cpp | ||||||
| ``` | ||||||
|
|
||||||
| Run with: | ||||||
|
|
||||||
| ```console | ||||||
| ./helloworld | ||||||
| ``` | ||||||
|
|
||||||
| ## Dlang | ||||||
|
|
||||||
| ```dlang | ||||||
| import std.stdio; | ||||||
|
|
||||||
| void main() | ||||||
| { | ||||||
| writeln("Hello, World!"); | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| Build with: | ||||||
|
|
||||||
| ```console | ||||||
| gdc -Wall -o helloworld helloworld.cpp | ||||||
|
||||||
| gdc -Wall -o helloworld helloworld.cpp | |
| gdc -Wall -o helloworld helloworld.d |
Copilot
AI
Mar 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rust section: rustc hello.rs will produce a hello binary by default, but the instructions say to run ./helloworld. Either specify -o helloworld (or rename the output) or update the run command to match the produced binary.
Copilot
AI
Mar 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP section run instructions are incorrect: ./helloworld won’t run a PHP script directly unless it’s executable with a shebang and correct filename. Use php helloworld.php (or make the script executable and document that).
| ./helloworld | |
| php helloworld.php |
Copilot
AI
Mar 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perl snippet is missing a trailing semicolon, which makes it invalid Perl. Add the semicolon so the example runs as written.
| print("Hello, World!\n") | |
| print("Hello, World!\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: “for each programming languages” should be “for each programming language”.