Create helloworld.md#339
Conversation
Signed-off-by: ericsandu <eric_andrei.sandu@stud.acs.upb.ro>
There was a problem hiding this comment.
Pull request overview
Adds a new helloworld.md Markdown document intended to reproduce the GitHub-rendered view captured in helloworld-print.pdf, showcasing “Hello, World!” examples across multiple languages.
Changes:
- Introduces a new Markdown page with an image header, a language summary table, and per-language code blocks.
- Adds build/run instructions for each language example (some currently placeholders).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|  | ||
|
|
||
| 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. |
There was a problem hiding this comment.
Grammar: “for each programming languages” should be singular (“for each programming language”).
| The specified compiler or interpreter is required for each programming languages. | |
| The specified compiler or interpreter is required for each programming language. |
| Build with: | ||
|
|
||
| ```console | ||
| gdc -Wall -o helloworld helloworld.cpp |
There was a problem hiding this comment.
The D build command is compiling helloworld.cpp, but the D example (and the repo’s sample file) is .d. This command won’t work as written; update it to compile the D source file name consistently.
| gdc -Wall -o helloworld helloworld.cpp | |
| gdc -Wall -o helloworld helloworld.d |
| ## x86_64 Assembly | ||
|
|
||
| ```as | ||
| ``` | ||
|
|
||
| Build with: | ||
|
|
||
| ```console | ||
| TODO | ||
| ``` |
There was a problem hiding this comment.
The x86_64 Assembly section has an empty code block and TODO for the build command, so it doesn’t currently provide a runnable “Hello, World!” example. Either fill in the assembly source + toolchain commands or remove it from the summary table until it’s implemented.
| ```php | ||
| <?php | ||
| echo "Hello, World!" | ||
| ?> | ||
| ``` | ||
|
|
||
| Run with: | ||
|
|
||
| ```console | ||
| ./helloworld | ||
| ``` |
There was a problem hiding this comment.
The PHP example as written won’t run: echo "Hello, World!" is missing a terminating semicolon, and the run command ./helloworld doesn’t invoke PHP (unless you add a shebang and make the script executable). Update the snippet and run instructions so they work together.
| | 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++` | |
There was a problem hiding this comment.
The table link [C++](#c++) won’t resolve to the ## C++ header on GitHub (the generated header slug strips + and de-duplicates against ## C). Update the anchor to the actual generated slug for this header so the table link works.
| | C++ | [The Standard - C++](https://isocpp.org/std/the-standard) | [C++](#c++) | GCC / G++ | `build-essential`, `g++` | | |
| | C++ | [The Standard - C++](https://isocpp.org/std/the-standard) | [C++](#c-1) | GCC / G++ | `build-essential`, `g++` | |
|
|
||
| ```rs | ||
| fn main() { | ||
| println!("Hello, World"); |
There was a problem hiding this comment.
Rust snippet prints "Hello, World" (missing !) even though the doc intro says programs print "Hello, World!". If Rust is intended to match the others, update the string to include the exclamation mark.
| println!("Hello, World"); | |
| println!("Hello, World!"); |
| ```console | ||
| rustc hello.rs | ||
| ``` | ||
|
|
||
| Run with: | ||
|
|
||
| ```console | ||
| ./helloworld | ||
| ``` |
There was a problem hiding this comment.
The Rust build/run commands are inconsistent: rustc hello.rs doesn’t match the section’s helloworld naming, and running ./helloworld won’t work unless the output binary is explicitly named that way. Make the source filename and output name consistent with the run command.
| ## ARM64 Assembly | ||
|
|
||
| ```as | ||
| ``` | ||
|
|
||
| Build with: | ||
|
|
||
| ```console | ||
| TODO | ||
| ``` |
There was a problem hiding this comment.
The ARM64 Assembly section is also empty and has TODO for the build command. As written it can’t be followed to produce output; please add the actual example + commands or drop it from the table for now.
| ## Perl | ||
|
|
||
| ```pl | ||
| print("Hello, World!\n") |
There was a problem hiding this comment.
The Perl snippet is missing a trailing semicolon after the print(...) statement, which will cause a syntax error when run with perl. Add the semicolon so the example is valid.
| print("Hello, World!\n") | |
| print("Hello, World!\n"); |
Built a
helloworld.mdfile that complies 1/1 with the visual representation shown inhelloworld-print.pdf