From d05fa01f5beb12d06f4c461581b31a173d656cff Mon Sep 17 00:00:00 2001 From: ericsandu Date: Sat, 21 Mar 2026 12:31:46 +0200 Subject: [PATCH 1/4] Create helloworld.md Signed-off-by: ericsandu --- helloworld.md | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 helloworld.md diff --git a/helloworld.md b/helloworld.md new file mode 100644 index 0000000..7021e34 --- /dev/null +++ b/helloworld.md @@ -0,0 +1,266 @@ +# Helloworld Programs + +![helloworld](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](#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 + +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 + +```dlang +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 and run with: + +```console +go run helloworld.go +``` + +## Rust + +```rs +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 + +```as +``` + +Build with: + +```console +TODO +``` + +Run with: + +```console +./helloworld +``` + +TODO + +## ARM64 Assembly + +```as +``` + +Build with: + +```console +TODO +``` + +Run with: + +```console +./helloworld +``` + +## Bash + +```bash +echo "Hello, World!" +``` + +Run with: + +```console +bash helloworld.sh +``` + +## Python + +```py +print("Hello, World!") +``` + +Run with: + +```console +python helloworld.py +``` + +## Ruby + +```rb +puts "Hello, World!" +``` + +Run with: + +```console +ruby helloworld.rb +``` + +## PHP + +```php + +``` + +Run with: + +```console +./helloworld +``` + +## Perl + +```pl +print("Hello, World!\n") +``` + +Run with: + +```console +perl helloworld.pl +``` + +## Lua + +```lua +print("Hello, World!") +``` + +Run with: + +```console +lua helloworld.lua +``` From 624ab2a28ceed6a65866ee4601aba00f88e40306 Mon Sep 17 00:00:00 2001 From: ericsandu Date: Sun, 22 Mar 2026 13:54:21 +0200 Subject: [PATCH 2/4] Write my own silly markdown file about pizza :yum: Signed-off-by: ericsandu --- myownmarkdown.md | 155 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 myownmarkdown.md diff --git a/myownmarkdown.md b/myownmarkdown.md new file mode 100644 index 0000000..1a4be6e --- /dev/null +++ b/myownmarkdown.md @@ -0,0 +1,155 @@ +# My favorite food + +## Can you guess it? + +### No? + +Well here it is: + +![pizza](https://ptpimg.me/c4blk2.png) + +## Here are my top 3 favorite pizza types + +1. **Diavola** (I love me some spicy food) +1. **Quatro Formaggi** (Feels light to eat but still very filling) +1. **Hawaian** (Please don't kill me for liking pineapple :pleading_face:) + +## You like pizza too? Of course you do + +you'd have to be a psychopath to not like it + +### Here are some reasons why it's so enjoyed + +- *It's convenient* (You can always order a pizza) +- *It can be anything you want* (What can't you put on pizza) +- *It always works* (Breakfast, lunch or dinner, when can't you have pizza?) + +## Here's a cool table with ingredients + +| Vegan | Anything else :shrug: | +|-------|-----------------------| +| Tomatoes | Pepperoni | +| Garlic | Sausage | +| Oregano | Pork | +| Basil | Prosciutto | +| Parmesan | Bacon | + +## All programmers love pizza + +### So much that they even order it from the CLI + +Here is some cool Go code to do just that: [Original repository](https://github.com/harrybrwn/apizza) + +```go +package cmd + +import ( + "errors" + "fmt" + "log" + "os" + fp "path/filepath" + + "github.com/harrybrwn/apizza/cmd/cli" + "github.com/harrybrwn/apizza/cmd/commands" + "github.com/harrybrwn/apizza/pkg/config" + "github.com/spf13/cobra" + "gopkg.in/natefinch/lumberjack.v2" +) + +// Logger for the cmd package +var Logger = &lumberjack.Logger{ + Filename: "", + MaxSize: 25, // megabytes + MaxBackups: 10, // number of spare files + MaxAge: 365, //days + Compress: false, +} + +var ( + // Version is the cli version id (will be set as an ldflag) + version string + + // testing version change this with an ldflag + enableLog = "yes" +) + +// AllCommands returns a list of all the Commands. +func AllCommands(builder cli.Builder) []*cobra.Command { + return []*cobra.Command{ + commands.NewCartCmd(builder).Cmd(), + commands.NewConfigCmd(builder).Cmd(), + NewMenuCmd(builder).Cmd(), + commands.NewOrderCmd(builder).Cmd(), + commands.NewAddAddressCmd(builder, os.Stdin).Cmd(), + commands.NewCompletionCmd(builder), + } +} + +// Execute runs the root command +func Execute(args []string, dir string) (msg *ErrMsg) { + app := NewApp(os.Stdout) + err := app.Init(dir) + if err != nil { + return senderr(err, "Internal Error", 1) + } + + if enableLog == "yes" { + Logger.Filename = fp.Join(config.Folder(), "logs", "dev.log") + log.SetOutput(Logger) + } + + defer func() { + errmsg := senderr(app.Cleanup(), "Internal Error", 1) + if errmsg != nil { + // if we always set it the the return value will always + // be the same as errmsg + msg = errmsg + } + }() + + cmd := app.Cmd() + cmd.Version = version + cmd.SetArgs(args) + cmd.AddCommand(AllCommands(app)...) + return senderr(cmd.Execute(), "Error", 1) +} + +// ErrMsg is not actually an error but it is my way of +// containing an error with a message and an exit code. +type ErrMsg struct { + Msg string + Code int + Err error +} + +func senderr(e error, msg string, code int) *ErrMsg { + if e == nil { + return nil + } + return &ErrMsg{Msg: msg, Code: code, Err: e} +} + +var test = false + +func newTestCmd(b cli.Builder, valid bool) *cobra.Command { + return &cobra.Command{ + Use: "test", + Hidden: true, + RunE: func(cmd *cobra.Command, args []string) error { + if !valid { + return errors.New("no such command 'test'") + } + + db := b.DB() + fmt.Printf("%+v\n", db) + + m, _ := db.Map() + for k := range m { + fmt.Println(k) + } + return nil + }, + } +} +``` From 917a2f24817e432307c54e87ddcafdd3270fab22 Mon Sep 17 00:00:00 2001 From: Eric Andrei Sandu Date: Sun, 22 Mar 2026 15:28:15 +0200 Subject: [PATCH 3/4] Update myownmarkdown.md Fix typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- myownmarkdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myownmarkdown.md b/myownmarkdown.md index 1a4be6e..dbb39fa 100644 --- a/myownmarkdown.md +++ b/myownmarkdown.md @@ -11,7 +11,7 @@ Well here it is: ## Here are my top 3 favorite pizza types 1. **Diavola** (I love me some spicy food) -1. **Quatro Formaggi** (Feels light to eat but still very filling) +1. **Quattro Formaggi** (Feels light to eat but still very filling) 1. **Hawaian** (Please don't kill me for liking pineapple :pleading_face:) ## You like pizza too? Of course you do From 540e2c2e12607f1ad54b7810c134f0dee2bb51c6 Mon Sep 17 00:00:00 2001 From: Eric Andrei Sandu Date: Sun, 22 Mar 2026 15:28:29 +0200 Subject: [PATCH 4/4] Update myownmarkdown.md Fix typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- myownmarkdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myownmarkdown.md b/myownmarkdown.md index dbb39fa..6c6a40d 100644 --- a/myownmarkdown.md +++ b/myownmarkdown.md @@ -12,7 +12,7 @@ Well here it is: 1. **Diavola** (I love me some spicy food) 1. **Quattro Formaggi** (Feels light to eat but still very filling) -1. **Hawaian** (Please don't kill me for liking pineapple :pleading_face:) +1. **Hawaiian** (Please don't kill me for liking pineapple :pleading_face:) ## You like pizza too? Of course you do