From 7aea86a46a8732c66f84937c7aaf21f662b9fffa Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:48:14 +1200 Subject: [PATCH 1/6] impr(quotes): add zig code quotes (@norwd) --- frontend/static/quotes/code_zig.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 frontend/static/quotes/code_zig.json diff --git a/frontend/static/quotes/code_zig.json b/frontend/static/quotes/code_zig.json new file mode 100644 index 000000000000..35564340b0b9 --- /dev/null +++ b/frontend/static/quotes/code_zig.json @@ -0,0 +1,11 @@ +{ + "language": "code_zig", + "groups": [ + [0, 100], + [101, 300], + [301, 600], + [601, 9999] + ], + "quotes": [ + ] +} From e8d3dc05d5cbb5d9d4e5c9065ceebc2f85186752 Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:28:07 +1200 Subject: [PATCH 2/6] impr(quotes): add some zig code quotes (@norwd) --- frontend/static/quotes/code_zig.json | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/frontend/static/quotes/code_zig.json b/frontend/static/quotes/code_zig.json index 35564340b0b9..f87b69e4450f 100644 --- a/frontend/static/quotes/code_zig.json +++ b/frontend/static/quotes/code_zig.json @@ -7,5 +7,35 @@ [601, 9999] ], "quotes": [ + { + "text": "const std = @import(\"std\");\n\npub fn main() !void {\n\tstd.debug.print(\"Hello, World!\\n\", .{});\n}", + "source": "https://zig.guide/getting-started/hello-world", + "length": 94, + "id": 1 + }, + { + "text": "pub fn isLeapYear(year: u32) bool {\n\treturn year % 4 == 0 and (year % 100 != 0 or year % 400 == 0);\n}", + "source": "https://exercism.org/tracks/zig/exercises/leap", + "length": 102, + "id": , + }, + { + "text": "const print = @import(\"std\").debug.print;\n\npub fn main() void {\n\tvar x: u32 = undefined;\n\tvar y: u32 = undefined;\n\tvar z: u32 = undefined;\n\n\tconst tuple = .{ 1, 2, 3 };\n\n\tx, y, z = tuple;\n\n\tprint(\"tuple: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n\n\tconst array = [_]u32{ 4, 5, 6 };\n\n\tx, y, z = array;\n\n\tprint(\"array: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n\n\tconst vector: @Vector(3, u32) = .{ 7, 8, 9 };\n\n\tx, y, z = vector;\n\n\tprint(\"vector: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n}", + "source": "https://ziglang.org/documentation/master/#Destructuring", + "length": 480, + "id": 3 + }, + { + "text": "const std = @import(\"std\");\n\ntest \"expect this to fail\" {\n\ttry std.testing.expect(false);\n}\n\ntest \"expect this to succeed\" {\n\ttry std.testing.expect(true);\n}\n\ntest \"expect this to be skipped\" {\n\treturn error.SkipZigTest;\n}", + "source": "https://ziglang.org/documentation/master/#Zig-Test", + "length": 213, + "id": 4 + }, + { + "text": "pub const ComputationError = error{IllegalArgument};\n\npub fn steps(number: usize) anyerror!usize {\n\tif (number <= 0) {\n\t\treturn error.IllegalArgument;\n\t}\n\n\tif (number == 1) {\n\t\treturn 0;\n\t}\n\n\treturn try steps(switch (number % 2) {\n\t\t0 => number / 2,\n\t\t1 => number * 3 + 1,\n\t\telse => unreachable,\n\t}) + 1;\n}", + "source": "https://exercism.org/tracks/zig/exercises/collatz-conjecture", + "length": 306, + "id": 5 + } ] } From 05778716baee43245480e22eb898087b8e9e1f08 Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:34:40 +1200 Subject: [PATCH 3/6] fix: correct missing quote id number (@norwd) --- frontend/static/quotes/code_zig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/static/quotes/code_zig.json b/frontend/static/quotes/code_zig.json index f87b69e4450f..7b91bff4bca4 100644 --- a/frontend/static/quotes/code_zig.json +++ b/frontend/static/quotes/code_zig.json @@ -17,7 +17,7 @@ "text": "pub fn isLeapYear(year: u32) bool {\n\treturn year % 4 == 0 and (year % 100 != 0 or year % 400 == 0);\n}", "source": "https://exercism.org/tracks/zig/exercises/leap", "length": 102, - "id": , + "id": 2, }, { "text": "const print = @import(\"std\").debug.print;\n\npub fn main() void {\n\tvar x: u32 = undefined;\n\tvar y: u32 = undefined;\n\tvar z: u32 = undefined;\n\n\tconst tuple = .{ 1, 2, 3 };\n\n\tx, y, z = tuple;\n\n\tprint(\"tuple: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n\n\tconst array = [_]u32{ 4, 5, 6 };\n\n\tx, y, z = array;\n\n\tprint(\"array: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n\n\tconst vector: @Vector(3, u32) = .{ 7, 8, 9 };\n\n\tx, y, z = vector;\n\n\tprint(\"vector: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n}", From f3d6da6026ced853c4b1d2a63ea31baf563d7df4 Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:38:30 +1200 Subject: [PATCH 4/6] fix: correct json formatting (@norwd) --- frontend/static/quotes/code_zig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/static/quotes/code_zig.json b/frontend/static/quotes/code_zig.json index 7b91bff4bca4..2333fbc85831 100644 --- a/frontend/static/quotes/code_zig.json +++ b/frontend/static/quotes/code_zig.json @@ -17,9 +17,9 @@ "text": "pub fn isLeapYear(year: u32) bool {\n\treturn year % 4 == 0 and (year % 100 != 0 or year % 400 == 0);\n}", "source": "https://exercism.org/tracks/zig/exercises/leap", "length": 102, - "id": 2, + "id": 2 }, - { + { "text": "const print = @import(\"std\").debug.print;\n\npub fn main() void {\n\tvar x: u32 = undefined;\n\tvar y: u32 = undefined;\n\tvar z: u32 = undefined;\n\n\tconst tuple = .{ 1, 2, 3 };\n\n\tx, y, z = tuple;\n\n\tprint(\"tuple: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n\n\tconst array = [_]u32{ 4, 5, 6 };\n\n\tx, y, z = array;\n\n\tprint(\"array: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n\n\tconst vector: @Vector(3, u32) = .{ 7, 8, 9 };\n\n\tx, y, z = vector;\n\n\tprint(\"vector: x = {}, y = {}, z = {}\\n\", .{x, y, z});\n}", "source": "https://ziglang.org/documentation/master/#Destructuring", "length": 480, From bac95567912b8c1a31d396441580cb0e90ec2ae7 Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:41:19 +1200 Subject: [PATCH 5/6] fix: correct manually counted quote lengths (@norwd) --- frontend/static/quotes/code_zig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/static/quotes/code_zig.json b/frontend/static/quotes/code_zig.json index 2333fbc85831..cfb141a6d0df 100644 --- a/frontend/static/quotes/code_zig.json +++ b/frontend/static/quotes/code_zig.json @@ -16,7 +16,7 @@ { "text": "pub fn isLeapYear(year: u32) bool {\n\treturn year % 4 == 0 and (year % 100 != 0 or year % 400 == 0);\n}", "source": "https://exercism.org/tracks/zig/exercises/leap", - "length": 102, + "length": 101, "id": 2 }, { @@ -28,7 +28,7 @@ { "text": "const std = @import(\"std\");\n\ntest \"expect this to fail\" {\n\ttry std.testing.expect(false);\n}\n\ntest \"expect this to succeed\" {\n\ttry std.testing.expect(true);\n}\n\ntest \"expect this to be skipped\" {\n\treturn error.SkipZigTest;\n}", "source": "https://ziglang.org/documentation/master/#Zig-Test", - "length": 213, + "length": 222, "id": 4 }, { From abfafbda125bf0c8494d265c60f99c9c800549cb Mon Sep 17 00:00:00 2001 From: "Y. Meyer-Norwood" <106889957+norwd@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:46:16 +1200 Subject: [PATCH 6/6] fix: make indentation consistent (@norwd) --- frontend/static/quotes/code_zig.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/static/quotes/code_zig.json b/frontend/static/quotes/code_zig.json index cfb141a6d0df..f7d59444ea85 100644 --- a/frontend/static/quotes/code_zig.json +++ b/frontend/static/quotes/code_zig.json @@ -7,13 +7,13 @@ [601, 9999] ], "quotes": [ - { + { "text": "const std = @import(\"std\");\n\npub fn main() !void {\n\tstd.debug.print(\"Hello, World!\\n\", .{});\n}", "source": "https://zig.guide/getting-started/hello-world", "length": 94, "id": 1 }, - { + { "text": "pub fn isLeapYear(year: u32) bool {\n\treturn year % 4 == 0 and (year % 100 != 0 or year % 400 == 0);\n}", "source": "https://exercism.org/tracks/zig/exercises/leap", "length": 101, @@ -25,13 +25,13 @@ "length": 480, "id": 3 }, - { + { "text": "const std = @import(\"std\");\n\ntest \"expect this to fail\" {\n\ttry std.testing.expect(false);\n}\n\ntest \"expect this to succeed\" {\n\ttry std.testing.expect(true);\n}\n\ntest \"expect this to be skipped\" {\n\treturn error.SkipZigTest;\n}", "source": "https://ziglang.org/documentation/master/#Zig-Test", "length": 222, "id": 4 }, - { + { "text": "pub const ComputationError = error{IllegalArgument};\n\npub fn steps(number: usize) anyerror!usize {\n\tif (number <= 0) {\n\t\treturn error.IllegalArgument;\n\t}\n\n\tif (number == 1) {\n\t\treturn 0;\n\t}\n\n\treturn try steps(switch (number % 2) {\n\t\t0 => number / 2,\n\t\t1 => number * 3 + 1,\n\t\telse => unreachable,\n\t}) + 1;\n}", "source": "https://exercism.org/tracks/zig/exercises/collatz-conjecture", "length": 306,