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

  • fruitcantfly@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    11 hours ago

    You can call rm safer manner, but you’ll need to fork and use one of the execl functions directly. That way you don’t have to worry about escaping the path. The old implement would potentially delete unrelated data if the path contained whitespace, and could even execute arbitrary commands, since it essentially runs bash -c "rm -rf $path"

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

      Those are really good points! I’ve been sanitizing other inputs for shell breakage, but never considered checking this. Either way, I have since removed the rm -rf part of the code, instead opting to only use my “good” method of traversing the directory