Seriously! According to the time command in fish, cldr (my program) takes around 4-5 ms to print files, tldr takes 80-100ms. (PS, on my server, cldr actually takes less than 1 ms to fetch the file, while tldr takes closer to 150 ms. That’s 150 times faster!!!)

This started a couple days ago when a friend of mine alerted me to the fact that the official tldr repo now takes ai contributions for their pages (aka the cheat sheet files that are printed) and for the actual program code. She then showed me a repo called ethical-tldr which does not allow for the use of ai contributions in the pages or program code.

However, their even though their client doesn’t allow vibe coding, it is still written in Python, which itself takes ai contributions.

So, I decided to learn C from scratch and make my own tldr client that’s faster and better than theirs in *every way! Introducing cldr! I am especially proud of the list and search functionality because the interface is just gorgeous.

Note, ABSOLUTELY NO AI was used in the making of this, I learned and wrote everything on my own in just the past 3 days, I don’t think I even copied much or any code from websites.

*There’s still like two things I haven’t implemented that the official client does, but they’re very minor and I’d be willing to bet that 99% of you won’t know the difference.

image

image

  • Girl Named ZERO@piefed.zeromedia.vipOP
    link
    fedilink
    English
    arrow-up
    23
    ·
    1 day ago

    Mostly just w3. Occasionally I had to look up some stuff for more “niche” use cases, but for the most part I just learned from w3.

    I already have experience with programming in general, so the hardest part was learning the syntax, and strings… oh god strings are so bad in C, I had to make a new function called strfmt that works like printf but just for returning a formatted string.

      • Girl Named ZERO@piefed.zeromedia.vipOP
        link
        fedilink
        English
        arrow-up
        13
        ·
        1 day ago

        yes! However, I found it very frustrating to use and it kept leading to ludicrous errors beyond my wildest dreams. So I made my own function that works better and easier.

      • Septimaeus@infosec.pub
        link
        fedilink
        arrow-up
        5
        ·
        23 hours ago

        Those are method names in C, so I’m afraid you’ll have to take it up with a guy named Dennis who isn’t very talkative these days.

        • potustheplant@feddit.nl
          link
          fedilink
          arrow-up
          4
          ·
          23 hours ago

          Not sure what you mean. You said that you had to make a new function and decided to call it “strfrm”. The standard is actually the opposite afaik. You should be more verbose and not use contractions. Something like “string_format” is far easier to read.

              • Girl Named ZERO@piefed.zeromedia.vipOP
                link
                fedilink
                English
                arrow-up
                3
                ·
                19 hours ago

                I was just following the naming convention as other string methods, like strlen, strcmp, strcat, (string length, string compare, and string concatenate, respectively), mine is string format, so I did strfmt!

                • potustheplant@feddit.nl
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  14 hours ago

                  You mean that you followed a pattern you noticed. The naming convention is (usually) snake case and with no contractions.