187
submitted 4 days ago* (last edited 1 day ago) by girlnamedzero@piefed.zeromedia.vip to c/opensource@programming.dev

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

you are viewing a single comment's thread
view the rest of the comments
[-] logi@lemmy.world 25 points 4 days ago

So... C code is faster than python. We knew that. Thanks for the better performing rewrite. Now do it in rust 🤓

[-] inari@piefed.zip 27 points 4 days ago
[-] syklemil@discuss.tchncs.de 26 points 4 days ago
[-] Creat@discuss.tchncs.de 20 points 4 days ago

In all distros I've recently used this is what gets installed when you install the "tldr" package with the package manager. And for good reason.

[-] sem@piefed.blahaj.zone 4 points 4 days ago

What is the reason?

[-] syklemil@discuss.tchncs.de 4 points 4 days ago

I'll admit I have no idea what makes one of the Rust implementations preferable over the other. Nor can I go looking at the code myself now that GitHub has hosed itself again

[-] RedSnt@feddit.dk 1 points 3 days ago* (last edited 3 days ago)

Gotta love projects with a properly commented config file that makes it easy to modify its defaults.

[-] AceSLS@ani.social 12 points 4 days ago
[-] kieron115@startrek.website 3 points 4 days ago

I was gonna post this as well, this comes with CachyOS by default.

[-] Valmond@lemmy.dbzer0.com 0 points 4 days ago

Why in rust? I mean it would be less faster, right? If speed is of the essence ofc.

[-] logi@lemmy.world 4 points 4 days ago

Because "rewrite it in rust" is its own meme and needs no particular reasoning.

[-] communism@lemmy.ml 4 points 4 days ago

Performance of compiled Rust and compiled C are comparable. Of course, compiling Rust is slower though.

Yeah, but it's slower because it has compile-time safeguards and guardrails that eliminate some families of really dangerous memory and IPC errors.

[-] endless_nameless@lemmy.world 3 points 4 days ago

The performance metrics are cool (though unscientific) but speed is definitely NOT of the essence lmfao

TLDR is not a high throughput real time application. You run it like once per use, probably at a rate of less than once per day. Then you spend a minute reading the output. We're talking about minutes-per-year time savings here.

[-] Kangae_Hishiryo@scribe.disroot.org 2 points 4 days ago* (last edited 3 days ago)

Actually not. Rust can be even faster than C, although it's generally similar in performance to C. The point is that it's more secure because of the way it handles memory.

this post was submitted on 23 Sep 2026
187 points (93.1% liked)

Opensource

6762 readers
65 users here now

A community for discussion about open source software! Ask questions, share knowledge, share news, or post interesting stuff related to it!

CreditsIcon base by Lorc under CC BY 3.0 with modifications to add a gradient

⠀


founded 3 years ago
MODERATORS