Skip to content
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

(Proposal) A cookbook style flavour for ziglearn #22

Open
timmyjose opened this issue Jun 28, 2020 · 4 comments
Open

(Proposal) A cookbook style flavour for ziglearn #22

timmyjose opened this issue Jun 28, 2020 · 4 comments
Labels

Comments

@timmyjose
Copy link

First of all, thanks for creating this resource. This has been personally useful for me!

In fact, as I was studying some of the snippets (readers/writers, for instance), I realised that this fits in very well with a cookbook style of approach. The canonical example I can give is the wonderful Lisp cookbook.

I know (and agree with the fact) that "cookbook" seems to have a very particular connotation in modern usage, but I feel that that does not detract too much from the overall idea. To illustrate, from the same link, a sample chapter on threads.

Perhaps you could consider this cookbook approach since the chapters themselves already contain very useful (and runnable!) example code. I believe quite strongly that such a resource will become indispensable very soon.

@timmyjose
Copy link
Author

Not apropos, but the part on implementing a custom Writer was super useful for me. Thanks!

@schroffl
Copy link

schroffl commented Jul 1, 2020

I've read the term "Cookbook" a lot of times before, but I just noticed that I'm not exactly sure what it means.
Does it just contain snippets and simple explanations for common things? Like "Loops, iteration, mapping" in the LISP example you posted?

If so, I love the idea. When starting out with Zig there were a lot of things for me where I had to look at the source to get a grasp. Having a basic overview would be awesome.

@Sobeston
Copy link
Owner

Sobeston commented Jul 1, 2020

I intend things to be largely dominated by examples, with longer (albeit concise) examples in chapter 2 similar to the writer implementation one. I'm not sure what kinds of changes would be made here

@timmyjose
Copy link
Author

Does it just contain snippets and simple explanations for common things? Like "Loops, iteration, mapping" in the LISP example you posted?

Yes! That's exactly what it is. Some examples may have some extended explanations, but all within the same context.

The contents you have are already more or less along the same lines. Perhaps just the table of contents et al would need a bit of tweaking to find the relevant sections more easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants