From 007f4d655b54f164bbe64c67f0cdd5971f578925 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sat, 21 Jan 2023 23:26:53 +0100 Subject: [PATCH 1/4] the_end function added --- build.zig | 4 ++++ exercises/the_end.zig | 6 ++++++ patches/patches/the_end.patch | 0 3 files changed, 10 insertions(+) create mode 100644 exercises/the_end.zig create mode 100644 patches/patches/the_end.patch diff --git a/build.zig b/build.zig index 2f84fbb..b3f254a 100644 --- a/build.zig +++ b/build.zig @@ -460,6 +460,10 @@ const exercises = [_]Exercise{ // .output = "ABCDEF", // .@"async" = true, // }, + .{ + .main_file = "the_end.zig", + .output = "This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", + }, }; /// Check the zig version to make sure it can compile the examples properly. diff --git a/exercises/the_end.zig b/exercises/the_end.zig new file mode 100644 index 0000000..d6b29e0 --- /dev/null +++ b/exercises/the_end.zig @@ -0,0 +1,6 @@ +// This is the end for now! +// More exercises will follow... + +pub fn main() void { + @import("std").debug.print("This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", .{}); +} diff --git a/patches/patches/the_end.patch b/patches/patches/the_end.patch new file mode 100644 index 0000000..e69de29 From 419b388f8dbd50876fd07ecc003b3fb790a4e028 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sat, 21 Jan 2023 23:54:11 +0100 Subject: [PATCH 2/4] fix mac error --- exercises/the_end.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/the_end.zig b/exercises/the_end.zig index d6b29e0..4ff2449 100644 --- a/exercises/the_end.zig +++ b/exercises/the_end.zig @@ -1,6 +1,8 @@ // This is the end for now! // More exercises will follow... +const print = @import("std").debug.print; + pub fn main() void { - @import("std").debug.print("This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", .{}); + print("\nThis is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.\n", .{}); } From 9d9dc1dacfa43c8c029a1829ee14e34c70ca6d12 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 22 Jan 2023 13:12:53 +0100 Subject: [PATCH 3/4] changed 'the_end' to '999_the_end' --- build.zig | 2 +- exercises/{the_end.zig => 999_the_end.zig} | 0 patches/patches/{the_end.patch => 999_the_end.patch} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename exercises/{the_end.zig => 999_the_end.zig} (100%) rename patches/patches/{the_end.patch => 999_the_end.patch} (100%) diff --git a/build.zig b/build.zig index b3f254a..3943d01 100644 --- a/build.zig +++ b/build.zig @@ -461,7 +461,7 @@ const exercises = [_]Exercise{ // .@"async" = true, // }, .{ - .main_file = "the_end.zig", + .main_file = "999_the_end.zig", .output = "This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", }, }; diff --git a/exercises/the_end.zig b/exercises/999_the_end.zig similarity index 100% rename from exercises/the_end.zig rename to exercises/999_the_end.zig diff --git a/patches/patches/the_end.patch b/patches/patches/999_the_end.patch similarity index 100% rename from patches/patches/the_end.patch rename to patches/patches/999_the_end.patch From 0616cc43035d96b05f545edbd01a1147c0f3ff6d Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Sun, 22 Jan 2023 13:34:46 +0100 Subject: [PATCH 4/4] try to fix mac error --- patches/patches/999_the_end.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patches/patches/999_the_end.patch b/patches/patches/999_the_end.patch index e69de29..ae674da 100644 --- a/patches/patches/999_the_end.patch +++ b/patches/patches/999_the_end.patch @@ -0,0 +1,2 @@ +8a9 +> // gollum's line ;-)