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

  • esa@discuss.tchncs.de
    link
    fedilink
    arrow-up
    19
    ·
    2 days ago

    You might want to have a glance at the OpenSSF compiler hardening guide, and maybe try out ASAN (-fsanitize=address).

    E.g. I get

    [nobody@bb14e99a9c8e cldr]$ ./build/cldr --update --language C.
    caution: filename not matched:  ethical-tldr/pages.C./*/*.md
    
    =================================================================
    ==454==ERROR: LeakSanitizer: detected memory leaks
    
    Direct leak of 4 byte(s) in 1 object(s) allocated from:
        #0 0x7fa48a32c0c1 in malloc (/usr/lib/libasan.so.8+0x12c0c1) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
        #1 0x7fa489e8be0f  (/usr/lib/libc.so.6+0x8be0f) (BuildId: 503200d7fda94a5dc6058d7e0694e5d1dcb2e372)
        #2 0x7fa48a2f2761 in vasprintf (/usr/lib/libasan.so.8+0xf2761) (BuildId: b8a4241051a1621937fdc46e867ba7ecb56d96ea)
        #3 0x561d84213d8c in strfmt (/home/nobody/cldr/build/cldr+0x6d8c) (BuildId: 2a0f13efc2c9b12a67e7dd810a2cbdfd1866e53d)
    
    SUMMARY: AddressSanitizer: 4 byte(s) leaked in 1 allocation(s).
    
    • Girl Named ZERO@piefed.zeromedia.vipOP
      link
      fedilink
      English
      arrow-up
      16
      ·
      edit-2
      18 hours ago

      Update to this, ~~I actually just fixed that bug, and ~~I went through the first section of the hardening guide. Changes are now pushed to main and I released v1.2.1

    • Girl Named ZERO@piefed.zeromedia.vipOP
      link
      fedilink
      English
      arrow-up
      17
      ·
      2 days ago

      Ah damn! That’s one of the things I had told myself I needed to make sure I checked, but I forgot! Thanks! I’ll look into this tomorrow. Like I said, I literally learned C over the last 3 days to make this, so I’m always happy to learn more!