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

"99 is enough for anybody" (I only zero-padded two digits) #18

Closed
ratfactor opened this issue Feb 14, 2021 · 3 comments
Closed

"99 is enough for anybody" (I only zero-padded two digits) #18

ratfactor opened this issue Feb 14, 2021 · 3 comments
Labels
predicament Disaster looms

Comments

@ratfactor
Copy link
Owner

ratfactor commented Feb 14, 2021

Rather than hem and haw about it in the beginning, I went ahead and started these with two digit padding. But at this rate, I might run out of two-digit numbers before I'm even done with the language itself, let alone the standard library!

01_hello.zig
02_std.zig
...
98_unfragulating.zig
99_unfragulating2.zig

The other problem is inserting new items. Changing the order of items is even worse, but obviously won't ever be needed because this order is objectively perfect as is. 😆

I thought about leaving the exercises un-numbered, which would allow me to change the order or insert new topics easily. But I really like the fact that you can go into the exercises directory and see the order plain as day.

Triple Digit Number Options:

  1. When I hit 100, go ahead and call it 100_foo.zig and it'll alpha-sort between 09 and 11 or
  2. When I hit 100, rename 01-99 to 001-099 and assume there will never be more than 999 ziglings.

If the filenames are to be triple-digit, I'd rather bite the bullet sooner rather than later.

Move/Insertion Options:

  1. If something needs to be inserted, number it with a decimal: 12.1_while2.1.zig or
  2. Renumber everything after the inserted item.

I have a strong aversion to renumbering anything at any time because it will screw up existing written references to specific exercises (in commits and mentions internal or external to the project). In general, I really like the ability to refer to the exercises by absolute number and being able to count on that not changing.

@ratfactor ratfactor added the predicament Disaster looms label Feb 15, 2021
@lukeholder
Copy link

lukeholder commented Mar 1, 2021

Move to 4 digits now! There may be 1,000 but there will never be 10,000 :)

Joking of course, I think triple digits would be fine. Better sooner than later.

@ratfactor
Copy link
Owner Author

@lukeholder Ha ha, thanks for the input. I think you're right, it needs to be done and soon.

In addition to renaming the files, I think the build script that controls all of this should understand/allow exercise numbers without leading zeroes as input from the user. I don't personally mind typing 01 through 09, but I draw the line at 001 through 099. :-)

I'll look into this soon and when I'm ready, I'll add another comment. Anybody else who happens to read this is welcome to claim the work if I haven't yet!

ratfactor added a commit that referenced this issue Mar 13, 2021
When I hit 999 exercises, I will finally have reached the ultimate
state of soteriological release and no more exercises will be needed.
The cycle will be complete. All that will be left is perfect quietude,
freedom, and highest happiness.
@ratfactor
Copy link
Owner Author

It is done. Now we meditate.

☁️ 000 🌩️

vamega pushed a commit to vamega/ziglings that referenced this issue Jul 25, 2023
When I hit 999 exercises, I will finally have reached the ultimate
state of soteriological release and no more exercises will be needed.
The cycle will be complete. All that will be left is perfect quietude,
freedom, and highest happiness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
predicament Disaster looms
Projects
None yet
Development

No branches or pull requests

2 participants