Commit Graph

222 Commits

Author SHA1 Message Date
Justus Klausecker 16a794fbee 111/112: Add exercises for packed structs/unions
The first exercise introduces the `packed` keyword as an alternative for
bitwise operations. Its main goals are establishing a solid understanding
of field order and conveying the fact that packed containers are basically
integers.
It introduces the concept of container layouts and briefly explains the
default `auto` layout before introducing the `packed` layout (but doesn't
touch `extern` at all).
The exercise also presents a real-world use case for packed containers,
namely LZ4 frame descriptors.
Furthermore it covers equality comparisons between packed containers.

The second exercise talks about switch statements with packed containers
and goes into some more detail on packed unions.
2026-03-13 11:21:03 +01:00
Chris Boesch 1be6fcd7db Merge pull request 'improve grammar in 103_tokenization' (#365) from pebose/exercises:improve-grammar into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/365
2026-02-27 19:54:41 +01:00
Chris Boesch 88510735e1 Merge branch 'main' into emphasize-for-loop-range 2026-02-27 19:43:31 +01:00
Paul Ebose dc71c2cd06 update patch file for 095_for3 2026-02-27 19:34:53 +01:00
Paul Ebose 7d03b8464d update patch file for 103_tokenization 2026-02-27 19:27:04 +01:00
Chris Boesch 908109df2d Merge pull request 'add hint that @field() works differently on types and values' (#367) from pebose/exercises:add-hint-to-exercise-82 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/367
2026-02-27 19:17:59 +01:00
Paul Ebose 9db32388e3 update patch file 2026-02-27 13:11:03 +01:00
Paul Ebose 53f7e015cb update patch file 2026-02-27 13:09:54 +01:00
Chris Boesch 1e552a1dd6 I/O improvements 2026-01-09 22:56:23 +01:00
Chris Boesch f87097ae54 minor typos 2026-01-04 14:17:27 +01:00
Chris Boesch af2a30e6da change io explanation 2025-12-30 13:40:24 +01:00
Chris Boesch 3a645ac9db exc. 107 migrated 2025-12-28 21:19:31 +01:00
Chris Boesch 4340642f3c exc. 106 migrated 2025-12-28 20:40:31 +01:00
Chris Boesch 8f9daa12b2 exc. 34 migrated 2025-12-28 14:46:23 +01:00
Chris Boesch b33fd5a744 exc. 26 migrated 2025-12-28 01:55:06 +01:00
Chris Boesch 21f86f07ad migrated build and test 2025-12-27 23:44:12 +01:00
Chris Boesch 274a49aa53 Added art description 2025-12-07 22:53:34 +01:00
Chris Boesch 757826d45a changed 1 to 42 for better understanding 2025-11-28 14:42:58 +01:00
Chris Boesch dc416b6c5a changed 'sleep' to async I/O 2025-11-28 14:22:51 +01:00
Chris Boesch 39e346303c Merge branch 'psd-fix' 2025-11-15 19:23:27 +01:00
Chris Boesch 11d8172136 forgotten thread-sleep fix added 2025-11-15 19:14:36 +01:00
Chris Boesch 189376944c fixed path for freeBSD 2025-11-15 17:58:27 +01:00
Chris Boesch 850700e68e pause slightly extended for faster computers 2025-11-01 15:59:07 +01:00
Chris Boesch 147ff302ec fixed more changes due to new I/O API 2025-11-01 15:46:31 +01:00
Adam Wheeler a5622fd5a8 update patch for 102 to match 2025-10-24 12:58:11 -04:00
Chris Boesch 837e6aba3b Fixed description to decimal and scientific notation 2025-10-17 17:59:57 +02:00
Chris Boesch c7e59864ca Fixed conversion from kg to tons 2025-10-03 13:30:14 +02:00
Chris Boesch e422e24215 fixes some minor typos 2025-08-24 19:26:30 +02:00
Chris Boesch ed2f76e960 Added patch files. 2025-07-22 10:08:24 +02:00
Chris Boesch cb0a1a027f Removed patch files for async because of new formating errors. 2025-07-21 21:05:45 +02:00
Chris Boesch 451e1a3739 Fixes the changes in zig's struct.fields 2025-06-17 14:07:31 +02:00
Chris Boesch 761fb1a501 Changed the values for better understanding 2025-05-12 21:36:37 +02:00
Jost Alemann 522b4673a4 fix: typos 2025-03-20 21:24:40 +01:00
Chris Boesch 02edb1f5c6 Merge branch 'main' into patch_rectify 2025-03-14 21:04:11 +00:00
Yevhen Babiichuk (DustDFG) 1a9b7ec342 Rectify 106 and 107 patches
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2025-03-14 22:26:20 +02:00
Yevhen Babiichuk (DustDFG) 6f3cdcf018 Update type info for StructField type in 082
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2025-03-14 16:47:27 +02:00
mz0 a22f1df0a1 Shuttle weight fixed w.r.t. issue-211 2025-03-03 20:32:41 +04:00
Chris Boesch 7382949018 Shuttle weight fixed 2025-02-14 09:17:16 +01:00
Alexander Sisco 20596bc290 converted 110 to a quiz (quiz 9) 2025-02-10 21:33:15 -08:00
Chris Boesch 838fb4ab9d Merge branch 'main' into bit_man3 2025-02-09 20:58:41 +00:00
Chris Boesch c1777f47d5 Added delte_progress additional to the end of eowyn 2025-02-09 21:42:31 +01:00
Chris Boesch c02e6ead16 Added deletion of progress.txt for eowyn 2025-02-09 21:31:07 +01:00
Alexander Sisco 1478d41801 added patch file for exercise 110 2025-02-08 13:15:48 -08:00
Zorgatone 6b29634279 Fix patch after print alias fix in 100_fo4.zig 2025-01-07 15:26:04 +00:00
David Pape 26978cb2d3 Fix typo vaild → valid 2025-01-04 21:40:19 +01:00
innerviewer 83e00872b8 Added patch file. 2024-11-09 20:36:47 +01:00
Chris Boesch 0d9458807e Deleted unnecessary pointer. 2024-11-08 22:48:37 +01:00
Chris Boesch 37a0f42621 Fixed link to format source code. 2024-11-07 21:45:47 +01:00
Chris Boesch bfed660020 Fixed formating, created patch file. 2024-11-07 15:01:59 +01:00
bgthompson 46e8fc0b61 line ending format patch attempt 2024-11-07 13:42:53 +10:00