Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)BC
Posts
9
Comments
346
Joined
2 yr. ago

Programming Circlejerk @programming.dev

When I found out even Rust needed the clib, it was like seeing an iron-clad fortress only to look closer and see it was being held up by sticks, ducktape, and prayers.

Programming @programming.dev

Rust tops a diverse list of implementation languages in projects getting NLnet grants, Python 2nd, C is alive, and C++ is half dead!

Rust @programming.dev

Rust tops a diverse list of implementation languages in projects getting NLnet grants, Python 2nd, C is alive, and C++ is half dead!

Rust @programming.dev

Koto: a simple and expressive programming language, usable as an extension language for Rust applications, or as a standalone scripting language

Programming @programming.dev

Koto: a simple and expressive programming language, usable as an extension language for Rust applications, or as a standalone scripting language

Rust @programming.dev

kdl 6.0.0-alpha.1 (first version with a KDL v2 implementation)

Rust @programming.dev

COSMIC ALPHA 1 Released (Desktop Environment Written In Rust From System76)

Rust @programming.dev

cushy v0.3.0 Released

Rust @programming.dev

slint 1.6.0 Released

  • Very quickly skimmed Cargo.toml and main.rs.

    • What's with the title-case name?
    • The name proximity to axum is also not cool.
    • You should mention that this is built on top of axum in the project description.
    • How did you end up using both lazy_static and once_cell, when OnceLock has been stable since 1.70 and axum's MSRV is 1.75?
    • Why did you copy-paste min-sized-rust flags?
    • You can actually print like this:
      rust
        
    println!("{proto}://{ip}:{port}");
    
    
      

    instead of

      rust
        
    println!("{0}://{1}:{2}", proto, ip, port);
    
    
      

    and the positional indices are redundant anyway.

    • Since you're depending on tracing, you should actually use tracing::error instead of eprintln!("❌ ...").

    Okay. I will stop here.

  • /mj this post was an experiment to see If I should start posting from my personal jerk archive here. But exactly as I expected and anticipated given the visibility in public feeds, this community has decent traffic, but none of the culture, or any familiarity whatsoever with the meta-ironic jerking style of the OG community. The lack of a separate meta sub/community is also not helpful since it forces users to /mj inline. But that separate community would have been public too, possibly compounding the problem.

  • Its called fetching it.

    No. I was specifically thinking of webfinger. That's Lemmy's (ActivityPub) way of checking if an id (user or community) exists or not. Then, an instance may "read" the remote community using its outbox (if requested), and a snapshot of that remote community would now exist in the local instance. That "snapshot" doesn't get updated unless another attempt is made to view the now known remote community, AND a certain period have passed (It was 24 hours the last time I looked). In that second time, a user may actually need to make a second request (refresh/retry) to see the updates, and may need to do that after a few seconds (depending on how busy/fast instances are).

    If at least one user however subscribes to that remote community, then the remote instance live-federates all updates from that community to the subscribed user's local instance, and all these issues/complications go away.

  • You need subscribers from instances, not views. Without subscribers, an instance may have an outdated version of your community without updates. People may see your community because someone pinged it recently, maybe via a search, and their instance grabbed your then outbox at that time.

    Ideal Federation is achieved when you have 2+ subscribers from every instance federating with your community instance. One subscriber would be enough too, but people choose to nuke there accounts sometimes, and Lemmy has the option to really erase an account as if it never existed 😉

    or whatever Lemmy calls it, haven't looked in a while.

  • Along the same vein, too many open source projects don’t factor in non-“gnu/linux” environments from the start.

    No one is entitled to anything from open-source projects.

    I spent time making sure one of my public tools was cross platform once. This was pre-Rust (a C project), and before CI runners were commonly available.

    I did manage it with relative ease, but Mac/mac (what is it now?) without hardware or VMware wasn't fun (or even supported/allowed). Windows was a space hog and it's a shit non-POSIX OS created by shits anyway, and Cygwin/MSYS wouldn't have cut it for multiple reasons including performance. The three major BSDs, however, were very easy (I had prior experience with FreeBSD, but it would have been easy in any case).

    People seem to have forgotten that doing open-source was supposed to be fun first and for most. Or rather, the new generation seems to never have gotten that memo.

    POSIX is usually where a good balance between fun and public service is struck. Whether Mac/mac is included depends on the project, AND the developers involved. With CLI tools, supporting Mac/mac is often easy, especially nowadays with CI runners. With GUIs, it's more complicated/situational.

    Windows support should always be seen as charity, not an obligation, for all projects where it's not the primary target platform.

  • Yeah, apologies for not communicating the issue clearly.

     
        
    cp config.example.toml config.toml
    ./y.sh prepare
    ./y.sh build --sysroot
    ./y.sh clean all
    # above commands finish with success
    # below, building succeeds, but it later fails with "error: failed to load source for dependency `rustc-std-workspace-alloc`
    ./y.sh test --release 
    
      

    And then trying to use the "release" build fails:

     
        
    % CHANNEL="release"  ./y.sh cargo build  --manifest-path tests/hello-world/Cargo.toml
    [BUILD] build system
        Finished `release` profile [optimized] target(s) in 0.03s
    Using `/tmp/rust/rustc_codegen_gcc/build/libgccjit/d6f5a708104a98199ac0f01a3b6b279a0f7c66d3` as path for libgccjit
       Compiling mylib v0.1.0 (/tmp/rust/rustc_codegen_gcc/tests/hello-world/mylib)
    error[E0463]: can't find crate for `std`
      |
      = note: the `x86_64-unknown-linux-gnu` target may not be installed
      = help: consider downloading the target with `rustup target add x86_64-unknown-linux-gnu`
      = help: consider building the standard library from source with `cargo build -Zbuild-std`
    
    For more information about this error, try `rustc --explain E0463`.
    error: could not compile `mylib` (lib) due to 1 previous error
    
      

    I will make sure to report issues directly in the future, although from account(s) not connected to this username.

  • Oh, and clean all doesn't work reliably. Since trying to build in release mode after building in debug mode then cleaning is weirdly broken.

    And It's not clear from the README how to build in release mode without running test --release. And the fact that all combinations of --release-sysroot and --release --sysroot and --release --release-sysroot exist doesn't help 😉

  • @[email protected]

    I gave this a try for the first time. Non-LTO build worked. But LTO build failed:

     
        
    x86_64-pc-linux-gnu-gcc-15.0.0: fatal error: ‘-fuse-linker-plugin’, but liblto_plugin.so not found
    
      

    I don't have the time to build gcc and test. But presumably, liblto_plugin.so should be included with libgccjit.so?

  • OSZAR »