• 15 Posts
  • 1.1K Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • I think you dont fully understand how c compilers ( gcc specifically ) work when using multi file projects

    They don’t. C compilers compile single files produced by the c preprocessor (resolving all #includes), they have no concept of multi-file projects. That’s a thing for the build system, such as make, and it needs dependency information from the preprocessor to do its job (cpp -M), and once it has that it has to act correctly on them which is often completely broken because people don’t understand make. Like using it recursively, bad idea. In the wild, a random C project at work you’ll come across needs a full rebuild to build cleanly. Things have gotten better with things like cmake getting more popular but the whole thing is still brittle. GNU autohell certainly makes nothing better, ever.

    Also, anything using IL will always have an abi,

    Everything will always have an ABI because ABI is just API in the target language, whatever that may be. If your program is compiled and can run it uses an ABI.

    Wasm is wasm, and you only need an exposed interface

    The core wasm abi is less capable than the C abi: You get scalar values and pointers, that’s it. No structs, no nothing, memory layout is completely unspecified. The component model allows compilers to say “so I’m laying out strings like this and structs like that” giving linkers a chance to say “yeah I can generate glue code between you two”.

    Again, i like the idea of rust, but it has a long way to go to be viable atm.

    C isn’t even close to being viable according to your standards people just have gotten used to the jank.

    And it has many pitfalls to avoid so it doesnt become the hot mess that is any framework based on node.js

    Rust doesn’t have portable dylibs precisely because it isn’t a hot mess. Because it’s actual work to do it properly. Unlike everyone else. Meanwhile It speaks the local C ABI fluently (they differ by architecture and operating system, btw), which isn’t a thing that can be said about many languages that aren’t C.


    Differently put: What, precisely, do you want to do? Have you any actual use-case for your doubts, or are they spooks?


  • It’s a lacking point yes but unless you want to use a closed-source library it’s also a non-issue, which is why it has never been given priority. It’s not like language semantics would prevent portable dylibs it’s that there’s more important fronts to improve Rust on. A proper solution would take quite some engineering effort, and do note that C doesn’t have a proper solution either it just lets you link stuff up willy-nilly and then crash. Rust is actually in a better position to implement a proper solution than C is.

    The “big project” thing is a red herring given that rust compiles incrementally. I know it is technically possible to not rebuild everything from scratch in C but the code has to specifically written to not break assumptions your build system makes while rust is happily re-using the compilation results for one function in a file while discarding those of another because actual dependencies are actually tracked. Out of the box.

    Speaking of large Rust projects and proper type-safe linking: The WebAssembly folks are hashing out their Component Model which isn’t really limited to compiling to wasm, in principle: Big picture it’s a way to programmatically specify ABIs and even derive ABI translation code. That might be a good option as a rust-specific solution would be, well, rust-specific and when you engineer something that can support multiple versions of a language you can just as well engineer a bit more and have something cross-language.



  • The Rustinomicon has a chapter on it. The basics are quite simple: Declare non-opaque types to use layout matching the C ABI, export/import functions, some wibbles around name mangling. Option<T> vs. null pointers. Where things get a bit more involved is unwinding, but then you’re at the end of it, nothing should be shocking to anyone having written C.

    As to how Rusty it is… not very. I mean Rust has first-class FFI support, but the way FFI stuff is written is necessarily unidiomatic because you’re basically writing C in Rust syntax and you won’t get out of declaring your own functions `unsafe’ before you read the rest of the Rustinomicon to understand what properties you need to ensure because the nice and shiny parts of Rust assume them.





  • Again: But what if it isn’t butthurt, but actual strategic consideration. You’re refusing to consider people having any motive but that which you assume them to have at first impression, presumably the one out of which you would go for such a mode of action. But other people aren’t you, and very well might choose their actions based on completely different principles. Who are you to tell them that they are wrong? “But muh they’re butthurt” is not an answer to that question, you’re only restating your premise.


  • Ok I’ll bite: You disapprove of the method of protest they chose, but how can you be sure of their underlying emotional/rational motives? As analogy, consider workers: They have the option to protest in front of the HQ, or they have the option to strike, and keep scabs out. Would you say that workers choosing the latter are “childish little entitled pussies”, after all, that’s a denial of service attack, or would you say that it is possible, in at least principle, that those kinds of attacks represent a well-considered strategic choice?

    If such rationale is possible, how can you be sure that whoever launched the DDOS did act out of childish emotion, instead of cold-blooded calculation? You, we, can still disapprove of the use of violence in this case (because, say, proportionality) but that’s a consideration orthogonal as to whether we’re talking about adult or puerile behaviour.

    That all being said, can you now understand why leading with that kind of language might not get the best reaction, and is sub-optimal when it comes to you expressing your condemnation of DDOS attacks, or convincing anyone else of that stance. It lacks consideration.


  • The onus isn’t on them to cater to everyone. If it can’t be used using Linux, deal with it like a grown up and find something else to do.

    You went far beyond “ddos’ers are silly boogers”, which I agreed with, but delegitimised critique of Rockstar in general: You told Linux gamers to stop playing: “Find something else to do”. Don’t motte and bailey now.

    Your words, they get interpreted. In specific contexts. Failing to acknowledge that those contexts can differ from whatever the context is in the privacy of your own mind is a failure of both theory of mind and communication on your part and, going out on half a limb here, probably the reason why everyone around you seems so hostile. Read the room. Don’t fall into the trap of thinking that you are right because what you say is met with hostility, rather, work towards having what you think is right accepted with gratitude. For starters, don’t go on tirades – which starting an argument with “butthurt little pussy” definitely is no matter how correct your assessment of the situation may or may not be. Develop tact.



  • The onus isn’t on them to cater to everyone.

    Gazillions of people have been playing on Linux, in particular on the Steam Deck, for ages. Those are paying customers. They pulled the plug on that without warning and without need, technical or otherwise, people are pissed. Depending on jurisdiction, Rockstar might be in for at least refunds.

    I don’t condone ddos’ing either and what I also don’t condone is you saying “oh the only reason people are pissed is because they can’t cheat”. Now that is, if I’m charitable, ignorant, and allthewhile you have the gall to accuse others of arrogance. Nuanced my ass to be that you’d first have to acknowledge basic contextual facts about the matter. Getting downvoted is also not “the ignorant sheeple not understanding your brilliance”. Get your head out of your arse and look in the mirror.




  • So you can find things by “that spicy chicken recipe” instead of having to remember what it was actually called, or slog through a gazillion chicken recipes in your history when you realise that “spicy” was nowhere in the name. Basically stemming/thesaurus search on steroids.

    It’s quite likely to be opt-in as I imagine ingesting the sites you’re looking at is a significant computational load. The translators are also opt-in, there’s enough stuff inbuilt to detect languages but not to translate, you have to download those models first. And they’re quite good btw.

    Another thing I could see them offering is stuff like tl;dr bot. It’s probably not for everyone, but I definitely can see that it can be a useful feature for many people.