• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle

  • Vorpal@lemmyrs.orgtoRust Programming@lemmy.mlDid you try Mold?
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Debug builds link in <.4 seconds.

    With such a small program I expected fixed costs to dominate. Not surprising there is no or almost no difference. You really have to go to cases where linking takes 10s of seconds to see scaling difference, even between ld.bfd and ld.gold.

    I did those sort of measurements for my work at the time (a few years ago, before mold was a thing). I have not had the cause or opportunity to measure lld or mold however. Maybe it isn’t faster than lld (certainly it seems so for small projects), but I don’t think these result say anything useful about larger programs.

    The best option is not to take the word of others (myself included) however, but measure on your own application and see which is the best option in your case.

    If you however do want to measure linking something big, look at something like Chromium. That isn’t rust code though. Not sure what a suitably large rust project would be.


    1. With a total build time of less than 2 minutes, my guess is that link time is fairly small. At work we have a c++ project that takes around 40 minutes to build. Only in the incremental case does link time dominate (upwards of 10 seconds with gold, haven’t tried lld or mold).

    2. My understanding is that mold supposedly has more scalable data structures and algorithms (better complexity). Thus for small links there likely will be little difference. So you need to measure it on your actual use case to see if it makes a difference.

    3. mold supposedly can take more advantage of multi core. How many cores did you run on? Again this will likely not show for small links, since there is also overhead in splitting work across threads.


  • Some additional thoughts (responding to myself here):

    Say what I think with as neutral tone as possible and leave it at that

    A hypothetical person might respond to this “But I have strong feelings on subject X!”

    To which I respond: consider what effect your words will have. Inflammatory words will just entrench people’s position more, in both camps. People on the fence are likely to walk away from the whole thing out of disgust (especially if both sides behave that way) or take the side of your opposition.

    Reasoned arguments in neutral tone however will rarely change the opinion of those who strongly disagree with you (there is a slim chance). But it might strike a chord with those who are on the fence.

    A tendency for debates to get polarised is a general problem in modern society in my opinion, not just in Rust. Not just politics. Not just media. Pretty much everywhere. I have seen it here on lemmyrs.org as well in the discussion of the drama around lib.rs. But I don’t think calling out specific instances would do any good (rather the opposite in fact, as it might easily be interpreted as an attack on the posters person).


  • Well, Rust is MIT + Apache 2.0, so they can do this. It isn’t copyleft.

    Personally I consider it a a shame that rust and it’s ecosystem isn’t at least weakly copyleft (e.g. LGPL or MPL) though there are some good reasons not to use those specifically. (LGPL isn’t not well defined if you don’t use dynamic linking, MPL is younger than rust, but would have been an excellent fit otherwise). And the ecosystem follows the leader for the most part.

    But that is neither here nor there, and I’m not interested in arguing about licenses on the Internet. :)


  • Disclaimer: I love the lib.rs search and general UI. I don’t like crypto currencies.

    I think the way to avoid drama is to be very clear and transparent in communication. In this case I think a way to do this would be to label data that lib.rs synthesised. Maybe a asterix next to corrected categories that on mouse over (long press on phones) says something like “inferred by lib.rs due to missing data”? Exact wording could certainly be improved, and might differ on context. Perhaps the synthesised data could be a different colour as well to stand out.

    Having a list of packages that were filtered out might also help. Here I’m thinking a simple text file (set to not be indexed in robots.txt) with all the package names that have filtered along with the reason listed (e.g. “auto detected name squat”). Anyone interested could download the file and take a look, as well as contact you for corrections.

    Ranking algorithms is harder to be transparent about (and it is not my field of expertise), so I can’t offer any advise here. Perhaps nothing is needed?



  • Vorpal@lemmyrs.orgtoRust Lang@lemmyrs.orgLibs.rs is now closed source
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    1
    ·
    edit-2
    1 year ago

    All this drama is sad. I like lib.rs, it has better search results and easier to use UI than crates.io.

    If it was me who ran it (and it isn’t) I’d probably include crypto results but put a big banner on top of their pages (and small ones in their search results) about me distancing myself from that. The crucial thing I belive is to make it clear what is happening, and to communicate clearly and transparently.

    I wouldn’t reuse “deprecated” tag, nor use derogatory wording in general. While i agree with the sentiment that crypto is a major problem and rather useless, some of the wording lib.rs has used is rather loaded, and feels like it can be interpreted as akin to name calling.

    I found that the best way to reduce drama in my life is to not get sucked in. Say what I think with as neutral tone as possible and leave it at that. Not always easy, but I strive for it (which is what I’m attempting to do here, and why I rewrote some parts of this post after reading it and thinking about how it could be interpreted).

    Additionally, I hope the author will reconsider the move to closed source, because I dont think that will solve anything. Rather it risks adding fuel to the fire, since people wanting to argue will point to this and say “look, we have no idea how it works any more, you can’t trust it” (or even worse things).