Skip Navigation
Bash Script to compile a single rust script, execute the binary and delete the binary
  • Allow me to retort with an all-in-one self build script, along with pass-through args and exitcode.

    #!/bin/sh
    out=$(mktemp)
    sed -e '0,/^#SELFBUILD$/d' "$0" | rustc --o "$out" - && "$out" "$@"
    status=$?
    rm -f "$out"
    exit "$status"
    #SELFBUILD
    
    fn main() {
        dbg!(std::env::args());
        println!("hello rust");
        std::process::exit(2);
    }
    

    P.S. I have no idea why you'd want that, as it's a terribly inefficient way to ship code, but it's a fascinating glimpse at how we used to do self-extract archives decades ago.

  • CPC policy hypotheticals: Canadians see a balanced budget, longer jail time as ‘good’; defunding CBC as ‘bad’ -
  • Sadly, longer jail time is purely placebo. Plenty of studies show jail time has no incidence on crime rate. Sure, locking people for longer would delay recidivism, but we could do better than that.

    It's not about logic though. Longer jail time proponents do lean on the emotional argument of a few anecdotal cases or recidivism. This tend to make flashy headlines and stick with the population.

  • Bloc Québécois won’t support Pierre Poilievre’s non-confidence motion
  • I don't have confidence in any majority government. The elected party doing as they want and ignoring part of the electorate is a failure of democracy. Every motion should be evaluated on its merit, not through agreements of party support. In that sense, the likelihood of a majority Conservative after an election would be a bad thing.

  • crowdStrikeIsAVerbNow
  • The opinion of Linux desktop users (or any users really) do not count in the enterprise world. Somehow, if management bought in on the Crowdstrike rootkit bandwagon, you'll see it on corporate hardware. It doesn't matter if it's a bad plan; it doesn't matter if it gives an American company a backdoor to all you infrastructure; if the CISO decides everyone gets it, everyone get it.

    The only thing you can really do as a lowly employee is keep any such device away from any personal info or network as if it's infected by malware (which I would argue is exactly what it is).

  • Damn Linux Users
  • As a developer, I really don't like how Wayland has fractured the ecosystem. Competing immature protocols are still all over the place while the immobility of x11 has spoiled us for years. It's getting better, but in the meantime I can still write an x11 app which will work mostly everywhere (thanks to xwayland), whereas a wayland app may not work everywhere (not on X11, and not on compositors which don't implement the right combinations of protocols).

  • How do people without a phone sign into CRA? It requires a phone number now
  • It seems like they also have a "password grid" multi-factor option that you can print. I hate seeing custom authentication schemes (or insecure ones like SMS) instead of standards like OATH-TOTP, but I do applaud having accessibility options.

  • Canada excluded from Google's expansion of AI chatbot Bard
  • This! I see the hype around AI and it's like everyone has lost their mind. You wouldn't accept a statistical study without sampling info (dataset size, origin, selection, filtering, bias, reproductibility, etc). Why would we not ask the same with LLM or generative AI? It's like everyone got so excited about models built on large datasets that they forgot we already had procedures for handling data.

  • Report: Canada saw over 30,000 tech workers immigrate while losing nearly 1,700 to the US
  • You might be surprised how inefficient banks can be when it comes to tech. As years go by I see an increase of tech workers but a decrease of experienced or competent ones. My view is those competent tech workers tend to be more expensive than Canadian companies are willing to pay, thus end up hiring 10x the staff. The banks simply have more money to waste that way and thus are doing so by hiring a lot of tech workers.

  • 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/)EL
    ElectricMoose @lemmy.world
    Posts 0
    Comments 17