• 9 Posts
  • 332 Comments
Joined 3 years ago
cake
Cake day: February 1st, 2023

help-circle
  • Alright, I’m tired of this thread, so let’s get this over with.

    I know how an engine works, at least to some degree. I know why you need oil. I was pulling your (plural) legs.

    Part 1: The fact is that mechanics do try to make you buy stuff and services you don’t really need. It’s just a fact, they are salespeople, it’s their job to convince you to buy stuff. You don’t get to be upset when people say “those pesky mechanics are always trying to make you spend money”, because that is literally in the job description.

    Part 2: Unfortunately, we have built a society where everyone needs a car. So we have to make it so anyone can use a car effectively, not only car enthusiasts. Thinking that only some specially skilled and knowledgeable people should be allowed to drive is elitist bullshit. If as you say “these people should not own a car” but then we have made owning cars mandatory, means we have failed all those people as a society.

    “BuT iT’s NoT dAnGeRoUs, It’S oNlY fInAnCiAl”… And? Even having a car insurance is only a financial matter, and yet it’s illegal to drive without it.

    No get off your collective high horses.








  • edinbruh@feddit.ittoLemmy Shitpost@lemmy.worldShe was churning plastic
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    edit-2
    3 days ago

    I have a single piece of expensive clothes. I have never washed it because I wore it only once for my graduation.

    Plus, washing isn’t servicing. It’s just washing. I would also wash my car, sometimes.

    Treating with care is also not servicing. If I haven’t broken it, and it needs servicing, then it broke by itself. If it broke by itself, then it’s a scam and has no business being expensive, I will have to pay for repairing it anyway.

    Btw, comparing clothes to a car is a false analogy because they don’t cost nearly as much. And before you bring up some stupid expensive designer outfits, I refuse to acknowledge them as clothes, they are just shiny gimmicks for rich assholes






  • edinbruh@feddit.ittoProgrammer Humor@programming.devtype theory meme
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    10 days ago

    Yeah, I also only learned natural deduction, until I got to the languages course and the professor told us “this is similar to natural deduction, but different”.

    Personally I don’t like lean, I prefer coq. But that’s mostly the vibes, both are actually fine. Lean doesn’t do constructive logic, it does classic logic, but you have to give up program extraction for that. That’s why mathematicians are head over heels for lean.



  • Not at all. I would not expect any riir project to reimplement the entire stack in rust. This is not calling a random C dependency. This is literally calling the OS’s API. Literally there’s just this and the kernel.

    As you said its goal is to rewrite a C codebase. The C codebase is coreutils. The correct way to getuser is to use the OS’s API, which happens to be inside libc.so, which has nothing to do with coreutils, it’s an entirely different codebase. End of the story. The OS’s API needs to be exposed as a c library, because c is the only language that can be imported from any other language. If you were to rewrite it in rust, it would use extern 'C' and it could not be any other way. And uutils would still import it from libc.

    Maybe one day we’ll see a rust rewrite of libc (tho it doesn’t make much sense), but this has nothing to do with uutils.

    If you are asking for a rust wrapper around the correct way to getuser, you have literally posted it. You can find it in uutils.

    Also, being compliant is just being compliant. I wouldn’t expect it to be called something like POSIX.rs unless it were implementing every part of POSIX. Which is clearly not what we have here. Or are you suggesting that bash should be called POSIX.c, because it’s in c and it’s POSIX compliant?


  • Well, if you want to be pedantic, I’ll entertain you a bit more.

    You see, C and Unix were “born” together. So sometimes, POSIX intertwines them in weird ways. In this case, getlogin is declared in unistd.h because it’s part of the Unix standard API, however the POSIX standard states that it must be implemented in libc. So the POSIX compliant way to getlogin is to call into libc, which doesn’t need to be glibc, you could use musl and avoid the GNU dependencies. If rust’s stdlib were to offer a getlogin function, the proper approach would be to still call libc. It’s like if on windows you were to call into Win32 to getuser, except on *nix it’s the same file as libc.

    If you want to replace the getlogin implementation, the POSIX compliant place to do it is not in coreutils but in libc, like the aforementioned musl library does.

    So the key here is that getlogin is not art of the c system API. It is actually part of the POSIX APIs, it is just “located” inside of libc, which by the way, does not need to be GNU if you are concerned with uutils’ philosophy.