-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ziglings executable? #296
Comments
@ratfactor Recently I was thinking of writing a I'm also interested in how the patch files are created. Should |
One problem is how avoid confusing the users if there are both the |
RustlingsI think we can definitely look at Rustlings for UI inspiration. But I'm not at all concerned about trying to emulate it. We can do whatever works best for us. build.zig vs ziglings.zigThe README will need to make it clear what to do to get started. We can also put big comments at the top of both files as needed. The goal is whatever we think would be the clearest and simplest thing for the learner. Can we have the ziglings executable end up in the root dir? Then the beginning steps could be:
Followed by just I'm very open to suggestion. Patches:Originally, the patches were created by copying the broken exercise into a directory called The (For my own convenience, I also have two Bash aliases locally: Along with the original Creating proper patch files for the canonical |
build.zig vs ziglings.zigMy initial concern is what to do with the current As for the bootstrap problem, it is possible to specify the A different approach to build + exec it to use
The advantage is that
The disadvantage is that this is not the usual workflow for a Zig project. |
I forgot about patches. @ratfactor wrote that he wold like to remove the use of The problem is how to heal exercises. A possible solution is to save (in About patche creation, I would first create the exercise in |
👍
In fact, I see this as somewhat problematic, because Ziglings as a programming tutorial currently conveys "real" compilation feeling.
I do not know if it is necessary, because it will only used from a) exercise developer and b) our test scripts.
That's how I always work.
There is a guy who wrote recently one: https://github.com/Jonxslays/zwatch |
The original
ziglings
"driver" was a simple Bash script.Using the build system is really cool because:
However, I think it's also safe to say that by trying to accomplish a good Ziglings experience with the build system has been like playing in hard mode. (Maybe it's not as hard as writing Advent of Code solutions in a Makefile, but it's pretty hard.)
Can we just make a
ziglings.zig
that compiles when you runbuild zig
and runs immediately?Not only would we have completely control over the "normal" learner experience, it would also make additional options and tooling much easier:
patch
because our use case is so simple: Replacing whole lines - we don't even need line numbers, just find-and-replace.(Honestly, I've stopped even using the
gollum
script recently because it was less work to just write the patch by hand. This would be even easier if we didn't have line numbers at all.)rustlings watch
)To be clear: I'm deeply grateful for the astounding amount of work that has gone into making the build.zig file do as much as it does. I think that effort would produce a pretty awesome stand-alone executable!
The text was updated successfully, but these errors were encountered: