805 Commits (b6abbf948c187d08bbb97ecdce46c57d9e1ef8c3)
 

Author SHA1 Message Date
Chris Boesch 496953e9a8 Compatibility checks temporarily disabled 1 year ago
Chris Boesch d864860201 Unit tests temporarily disabled 1 year ago
Chris Boesch a5a36337e8 Revised exercises due to the changes of Zig version 0.11.0-dev.3853 1 year ago
Chris Boesch c3aed336e7 Merge pull request #331 from ratfactor/tokenization
First tokenization exerice
1 year ago
Chris Boesch a2b0b976a6 First tokenization exerice. 1 year ago
Chris Boesch 2705e16c36 Merge pull request #329 from lorrding/refactor-var-to-const
Change `var` to `const` in some exercises
1 year ago
lording d52f360731 Update outdated comments 1 year ago
lording 3e502fe69b Merge branch 'main' into refactor-var-to-const 1 year ago
Chris Boesch 9499e12469 Merge pull request #328 from ratfactor/v3747
Changed to zig developer version 3747
1 year ago
lording d2d3dfa277 var to const when posssible 1 year ago
Chris Boesch bd4a48c3c9 Changed to zig developer version 3747. 1 year ago
Chris Boesch 40bedacfdf Merge pull request #327 from lorrding/patch_v0.11.0-dev.3747
Fix breaking change in builtin casts functions
1 year ago
lording ccb580f95d Fix broken builtin name in exercise 96 1 year ago
lording 39952817b3 Fix broken builtin name in exercise 36 1 year ago
Chris Boesch f09a87c348 Merge pull request #325 from ckafi/what-a-dilema
fix typo
1 year ago
Tobias Frilling 5984444489 fix typo 1 year ago
Chris Boesch 9c9671bb15 Merge pull request #323 from ratfactor/issue318
Issue318
1 year ago
Chris Boesch 2815574e35 Removed debug info. 1 year ago
Chris Boesch 7a16ed09ac Fixed missing comptime. 1 year ago
Chris Boesch cac5770e3c Merge pull request #321 from ratfactor/issue317
Fixed description of @addWithOverflow
1 year ago
Chris Boesch 33d3cc1647 Fixed description of @addWithOverflow 1 year ago
Chris Boesch 80c92e3c94 closes https://github.com/ratfactor/ziglings/pull/311 1 year ago
Chris Boesch 947d1e4fbb Update README.md
Added Tokenization as ToDo
1 year ago
Chris Boesch 79f2b62774 Merge pull request #313 from chrboesch/colors
Changed error text to bold.
1 year ago
Chris Boesch 9151557d39 Changed error text to bold. 1 year ago
Chris Boesch b84a2f5c69 Merge pull request #312 from pdietl/pdietl/fix_grammar
Change grammar: there's -> there are ex. 17
1 year ago
Chris Boesch 940482a07e Merge pull request #308 from perillo/refactor-zigling-step-more
Refactor ZiglingStep more
1 year ago
Pete Dietl edcf904ca2 Change grammar: there's -> there are ex. 17 1 year ago
Chris Boesch 1482b82500 changed version number 1 year ago
Chris Boesch 763cdb10ca Merge pull request #309 from pseudocc/main
change std.debug.TTY to std.io.tty
1 year ago
pseudoc 192bd2e803 change std.debug.TTY to std.io.tty
Zig commit:     0f6fa3f20b3b28958921bd63a9a9d96468455e9c

std: Move std.debug.{TTY.Config,detectTTYConfig} to std.io.tty

Also get rid of the TTY wrapper struct, which was exlusively used as a
namespace - this is done by the tty.zig root struct now.

detectTTYConfig has been renamed to just detectConfig, which is enough
given the new namespace. Additionally, a doc comment had been added.
1 year ago
Manlio Perillo 0b4ad6e99e build: use the old color style
In the `Zigling.printError` method, use a bold red color for the "error:"
string and a dim red color for the error message.

In the `Zigling.check_output` method, use the old color style.
1 year ago
Manlio Perillo 3e38a4fc84 build: in `ZiglingStep.check_output` panic in case of OOM
This is necessary since, when trimLines returns `std.mem.Allocator.Error`,
no error message will be displayed to the user.

An alternative is to use `std.Build.Step.fail`, but using @panic("OOM")
is simpler and consistent with existing code.
1 year ago
Manlio Perillo d0de9e5348 build: use `std.Build.Step.fail` to report errors
Have all error messages handled in a single place (printError), by using
the `std.Build.Step.fail` method.  Ensure that the first letter in the
error message is lower case and remove coloring, since it is done in the
`ZiglingStep.printError` method.

Additionally, in the `ZiglingStep.check_test` method, remove trailing
whitespace from stderr.
1 year ago
Manlio Perillo 699f877bd5 build: remove `ZiglingStep.eval`
Remove the `ZiglingStep.eval` method and the src/ipc.zig source code.
Use `Step.evalZigProcess`, instead. This greatly simplifies the code.

Print the error messages and error bundle in `ZiglingStep.make`, both in
case of error and success.

Additionally, remove the `ZiglingStep.is_testing` field, since it is no
longer necessary.
1 year ago
Chris Boesch 282c50834a Merge pull request #305 from perillo/improve-run-test
Improve running tests
1 year ago
Manlio Perillo 54d5186982 Enable again the unit tests 1 year ago
Manlio Perillo 9ab9ebf33f Refactor testing support
Following the implementation in `std.Build.Step.Compile, add the Kind
type to differentiate between a normal executable and a test executable
running zig tests.  Replace `Exercise.run_test` field with `kind`.

Compile the exercise in both the exe and test cases, reducing code
duplication.

Add the `check_output` and `check_test` methods in ZiglingStep, in order
to differentiate the code checking a normal executable and a test
executable.

Update the tests to correctly check both the exe and test cases.  Remove
the temporary code added in commit 832772c.
1 year ago
Chris Boesch 3dafa3518b Update README.md
Marked 'testing' as finished.
1 year ago
Chris Boesch 5cbaa0441f Merge pull request #304 from chrboesch/testing_exercise
Added testing exercise.
1 year ago
Chris Boesch 76ee4eb043 Unit tests temporarily disabled. 1 year ago
Chris Boesch c3a73b8e2b Added testing exercise. 1 year ago
Chris Boesch 4c6b6b94e4 Merge pull request #300 from perillo/simplify-build
Simplify build.zig
1 year ago
Manlio Perillo 8deb6b4d95 build: remove extra comment for named mode
It was added in commit 879eeb6 (Execution of test exercises added.).
1 year ago
Manlio Perillo e7f62940eb tests: improve test case 3
Update test case 3 to check all exercises with an hint.
1 year ago
Manlio Perillo 1c184c2681 build: remove the install and uninstall steps
They are no longer used.
1 year ago
Manlio Perillo c393debe44 build: improve the help message in ZiglingStep
Add the Mode enum, so that ZiglingStep can detect if it was called in
normal mode or in named mode.

Update the help method to print the correct message based on the current
build mode.
1 year ago
Manlio Perillo 9b7ef7d8cf build: remove unused declarations
Remove the `Exercise.addExecutable` method and the `SkipStep` struct, since
they are no longer used.
1 year ago
Manlio Perillo 0304dc3d37 build: show the logo in named mode
When running `zig build -Dn=n`, ensure that the logo is printed.

Update the tests.

Closes #214
1 year ago
Manlio Perillo dc2539ec4e build: simplify the named build mode
Remove the following steps, since they are rarely (if never) used and
only increase the complexity of the `build.zig` file:

 - install step (zig build -Dn=n install)
 - test step (zig build -Dn=n test)
 - start step (zig build -Dn=n start)

The only remaining step is the default zigling step (zig build -Dn=n),
where the user can choose the exercise to solve.

Update the tests.  Additionally, update CheckNamedStep and CheckStep so
that they can share the same functions.

Closes #299
1 year ago