diff --git a/README.md b/README.md index bbbf366..6ab48c8 100644 --- a/README.md +++ b/README.md @@ -177,11 +177,17 @@ Create the `helloworld.md` file that will generate that precise GitHub view. Make sure you do the following: 1. Start by creating a branch where you do your work. + Use `helloworld` for the branch name: + + ```console + git checkout -b helloworld + ``` + This will be the branch **from** where you will create a pull request. As usual, the future pull request will target your assigned branch in the [upstream repository](https://github.com/rosedu/workshop-markdown). 1. Copy-paste contents from the PDF file. - Do not write programs by hand. + Open the `helloworld-print.pdf` file in a PDF viewer, select text, copy in the `helloworld.md` file. 1. Use correct syntax items for typewriter format, links to sections, code snippet format, tables. See [the GitHub Markdown spec](https://github.github.com/gfm/). @@ -195,21 +201,18 @@ Make sure you do the following: After each push, check the GitHub view of the work branch in your fork of the GitHub repository. -1. After completing the task, submit the `helloworld.md` Markdown file as part of a pull request. - -Follow the instructions above to create the pull request. -Make sure you have good commit messages and a good pull request description. + Check the contents of the `helloworld.md` file on your GitHub fork and see if it is now rendered correctly. -Target the pull request **to** your assigned branch. +1. After completing the task, submit the `helloworld.md` Markdown file as part of a pull request. -Ask the instructors to review your pull request. -Make updates as required. -Have your pull request approved and merged on top of your assigned branch. + Follow the instructions above to create the pull request. + Make sure you have good commit messages and a good pull request description. -Check the GitHub web view of the [upstream repository](https://github.com/rosedu/workshop-markdown) for your assigned branch. -Click on the button with `main` (the branch button) and select your branch. + Target the pull request **to** your assigned branch. -Check the contents of the `helloworld.md` file and see if it is now rendered correctly. +1. Ask the instructors to review your pull request. + Make updates as required. + Have your pull request approved and merged on top of your assigned branch. ### Clean Up After Pull Request diff --git a/helloworld.md b/helloworld.md new file mode 100644 index 0000000..579e9ce --- /dev/null +++ b/helloworld.md @@ -0,0 +1,237 @@ +# Helloworld Programs + +![](./helloworld.png) + +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]() | GCC | build-essential | +| C++ | [The Standard - C++](https://isocpp.org/std/the-standard) | [C++]() | GCC / G++ | build-essential , g++ | +| Dlang | [D Programming Language: Home](https://dlang.org/) | [Dlang]() | GCC / GDC | build-essential , gdc | +| Go | [The Go Programming Language](https://go.dev/) | [Go]() | Go | golang | +| Rust | [Rust Programming Language](https://www.rust-lang.org/) | [Rust]() | Rust(Crate) | rustlang | +| Java | [Java Programming Language](https://docs.oracle.com/javase/8/docs/technotes/guides/language/) | [Java]() | JDK | openjdk-17-jdk | +| x86_64 assembly | [x86 and amd64 instruction reference](instruction) | [x86_x64 Assembly]() | GCC / GAS | build-essential | +| ARM64 assembly | [Arm A64 Instruction Set Architecture](https://developer.arm.com/documentation/ddi0596/latest/) | [ARM64 Assembly]() | GCC / GAS(Aarch64) | build-essential | +| Bash | [Bash Reference Manual](Reference) | [Bash]() | Bash | Bash | +| Python | [Welcome to Python.org](https://www.python.org/) | [Python]() | Python | Python | +| Ruby | [Ruby Programing Language](https://www.ruby-lang.org/en/) | [Ruby]() | Ruby | Ruby | +| PHP | [PHP: Hypertext Preprocessor](https://www.php.net/) | [PHP]() | PHP | PHP | +| Perl | [The Perl Programming Language](https://www.perl.org/) | [Perl]() | Perl | Perl | +| Lua | [The Programming Language Lua](https://www.lua.org/) | [Lua]() | Lua | Lua | + +## C +```c +#include + +int main(void) +{ + puts("Hello, World!"); + return 0; +} +``` + +### Build with: +```console +gcc -Wall -o helloworld helloworld.c +``` + +### Run with: +```console +./helloworld +``` + +## C++ + +```cpp +#include + +int main() +{ + std::cout << "Hello, World!" << std::endl; + return 0; +} +``` + +### Build with: +```console +g++ -Wall -o helloworld helloworld.cpp +``` + +### Run with: +```console +./helloworld +``` + +## Dlang + +```d +import std.stdio; +void main() +{ + writeln("Hello, World!"); +} +``` + +### Build with: +```console +gdc -Wall -o helloworld helloworld.cpp +``` + +### Run with: +```console +./helloworld +``` + +## Go + +```go +package main +import "fmt" +func main() { + fmt.Println("Hello, World!") +} +``` + +### Build with: +```console +go run helloworld.go +``` + +### Build and run with: +```console +go run helloworld.go +``` + +## Rust + +```rust +fn main() { + println!("Hello, World"); +} +``` + +### Build with: +```console +rustc hello.rs +``` + +### Run with: +```console +./helloworld +``` + +## Java + +```java +public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World!"); + } +} +``` + +### Build with: +```console +javac HelloWorld.java +``` + +### Run with: +```console +java HelloWorld +``` + +## x86_64 Assembly + +### Build with: +```console +TODO +``` + +### Run with: +```console +./helloworld +``` + +## ARM64 Assembly + +### Build with: +```console +TODO +``` + +### Run with: +```console +./helloworld +``` + +## Bash + +```console +echo "Hello, World!" +``` + +### Run with: +```console +bash helloworld.sh +``` + +## Python + +```console +print("Hello, World!") +``` + +### Run with: +```console +python helloworld.py +``` + +## Ruby + +```console +puts "Hello, World!" +``` + +### Run with: +```console +ruby helloworld.rb +``` + +## PHP + +```console + +``` + +### Run with: +```console +./helloworld +``` + +## Perl + +```console +print("Hello, World!\n") +``` + +### Run with: +```console +perl helloworld.pl +``` + +## Lua + +```console +print("Hello, World!") +``` + +### Run with: +```console +lua helloworld.lua +``` \ No newline at end of file