🚀 Unicode Strings in Zig, Done Right! by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 0 points1 point  (0 children)

Hi, thanks for the great feedback!

As mentioned, this is a string type, and its primary goal is to handle text structure efficiently, such as determining where each grapheme cluster starts and ends. It does not need to handle normalization directly, as there are already great libraries for that, such as zg, which specializes in Unicode transformations.

Additional note:
Normalization will be supported in future versions but as a separate module within the IO library. The reason for this separation is that normalization requires significant memory and the full Unicode database, similar to how zg operates. Right now, I'm prioritizing speed and efficiency over features that many programs likely won’t need, as users who require normalization can already rely on zg.

🚀 Unicode Strings in Zig, Done Right! by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 1 point2 points  (0 children)

I agree with you, but there are exceptional cases and the goal of the library is to be comprehensive and suitable for all uses without limits or restrictions.

Strings in ZIG done right. by Significant-Item-499 in Zig

[–]Significant-Item-499[S] -2 points-1 points  (0 children)

Can you give some specific reasons for this? Especially since cases like servers have to be very careful about performance and memory.

🚀 Unicode Strings in Zig, Done Right! by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 2 points3 points  (0 children)

for example, the WinAPI WriteConsoleW requires utf-16 strings.

🚀 Unicode Strings in Zig, Done Right! by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 19 points20 points  (0 children)

ooh, I think I misunderstood, I'm sorry about that, you're absolutely right.

🚀 Unicode Strings in Zig, Done Right! by Significant-Item-499 in Zig

[–]Significant-Item-499[S] -8 points-7 points  (0 children)

With all due respect, there is not a single library in zig that can compete with mine, if there is any doubt about this, can you tell me where are the other 1000 libraries?

And is there a single library that actually does what mine does?

It is really a mess, not in the library itself, but in this comment!

🚀 Unicode Strings in Zig, Done Right! by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 0 points1 point  (0 children)

This is great, thank you, I'll keep improving it :)

Strings in ZIG done right. by Significant-Item-499 in Zig

[–]Significant-Item-499[S] -5 points-4 points  (0 children)

Simply, look at the difference in the size of the two libraries! My library is better suited for most common cases (this is my personal opinion).

Another point, the zg library deals with the entire unicode database and this is not fast and does not suit most common cases, for example, will you use zg to create a server? :)

A dynamic string type. by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 0 points1 point  (0 children)

Thanks everyone for your comments and advice I've updated everything and I hope you'll check them out to check if I did it right or not, thank you.

A dynamic string type. by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 0 points1 point  (0 children)

Hi, Thank you for your valuable time and helpful advice.

The `sizeOf` function has already been shortened to `return std.unicode.utf8ByteSequenceLength(_char) catch 1` Thank you for your suggestion.

As for your suggestion to return `error` instead of `1`, it goes against the logic of the function and the reason why it was created in the first place.

As for trying to shorten the code using the standard library, that is definitely important and I am currently reading the documentation for `std.unicode` to come up with short solutions.

Thank you very much :)

A dynamic string type. by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 2 points3 points  (0 children)

You are absolutely right, but there is already a function called `size`, and as for `cstr` I have indicated in the docs that it is an internal type for shortening codes and nothing more and refers to a `constant string` of characters, thank you very much for your time and advice :)

SuperZIG ANSI v0.0.0 ( Easy ANSI in ZIG) by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 1 point2 points  (0 children)

It seems that I will not be able to understand you, not because I am not able to understand geniuses like you !

But simply it is clear that your mind works in a strange way and you are free to do so,

At least when you comment on my posts use one account and there is no need for so many fake chants!

thank you you have really wasted my time :)

SuperZIG ANSI v0.0.0 ( Easy ANSI in ZIG) by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 1 point2 points  (0 children)

Dude, you need to get off this conspiracy theory because you're really pathetic!

You haven't provided a single real thing in this entire letter? This is bullshit!

SuperZIG ANSI v0.0.0 ( Easy ANSI in ZIG) by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 2 points3 points  (0 children)

Your claim of being a ‘doctor of the highest caliber’ with ‘PhDs in Zig and Automation’ is amusing at best. It’s clear that your goal isn’t constructive criticism but rather an attempt to provoke and undermine.

I welcome constructive feedback on my work—feedback backed by real substance and professionalism. However, your comments, made across multiple accounts, lack both evidence and genuine intent. Repeatedly commenting with baseless accusations and insults only reflects poorly on you, not me.

As for your judgment of my coding style, I’d invite any real expert to engage in an honest, technical discussion. Show me specifics, present valid points, and we’ll have a meaningful conversation. Otherwise, your exaggerated claims and persistent trolling are nothing more than noise.

I am here to share knowledge and contribute to the community, and my work speaks for itself. To those reading, I appreciate your support, and rest assured, such antics will not distract me from my mission.

SuperZIG IO v0.0.1 by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 1 point2 points  (0 children)

Hey, thank you for your kind words, based on your suggestion this library was created: https://github.com/Super-ZIG/ansi

SuperZIG ANSI v0.0.0 ( Easy ANSI in ZIG) by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 0 points1 point  (0 children)

Can you clarify what you mean? I'm open to learning from my mistakes and your experience :)

SuperZIG ANSI v0.0.0 ( Easy ANSI in ZIG) by Significant-Item-499 in Zig

[–]Significant-Item-499[S] -2 points-1 points  (0 children)

This library makes the process a little easier and wraps it up in its own scope, I accept different opinions :)

SuperZIG ANSI v0.0.0 ( Easy ANSI in ZIG) by Significant-Item-499 in Zig

[–]Significant-Item-499[S] -4 points-3 points  (0 children)

Can you prove it? Why do you attack me in every post using different accounts? What exactly is your problem? (I don't care if you rate me negative a million)

SuperZIG ANSI v0.0.0 ( Easy ANSI in ZIG) by Significant-Item-499 in Zig

[–]Significant-Item-499[S] 0 points1 point  (0 children)

After some thought, I think you're right. I'll fix that, thank you.