[-] trevor 6 points 2 days ago* (last edited 2 days ago)

Other than the example uses provided in the article, does anyone have any interesting ideas for how this could be used? The RUST_LOG=debug one looks like it'll be particularly useful as an easy way to see what network requests a given binary might be making.

[-] trevor 53 points 3 days ago
[-] trevor 3 points 3 days ago

They mean light mode. I think "flashbang mode" is pretty apt though.

[-] trevor 2 points 3 days ago* (last edited 3 days ago)

I just use Arc::clone() now that I know I can just throw the problematic data types on the heap easily. I'm sure there are "better" ways to do it, but ¯\_(ツ)_/¯

[-] trevor 6 points 3 days ago

As someone whose only other language was very beginner-level Python before learning Rust, the part about not treating the borrow checker as an adversary, but as a companion, mirrors the point at which I began rapidly improving.

I like to say that the Rust compiler rules are like having a senior engineer over your shoulders to help you avoid writing (certain kinds of) bad code.

There are still times when the borrow checker becomes my adversary (like needing to share data in threads), and it is painful, but they become less frequent over time.

[-] trevor 103 points 1 month ago

Firefox's version of MV3 explicitly supports the things that uBlock Origin needs to do. It's not the same as Google's malicious MV3 that was targeted at destroying adblockers.

It would be annoying if they removed MV2, but it wouldn't break things like it did for Chromium.

[-] trevor 172 points 1 month ago

Anything but properly supporting the Linux community 🤡

How have they still not learned that the largest intersection of the people that care about their core value proposition (game preservation, DRM-free, etc.) are Linux users?? It's not like they have to create the compatibility layers from scratch; Valve did it for them.

If they provided a launcher for Linux users, I'd actually buy shit from them. Yes, Heroic Launcher exists, but I'm not paying GOG for the work that the Heroic dev did. I want first-party support.

[-] trevor 114 points 3 months ago

I just hope Wayland has its accessibility shit together before then. There are people that still need to use X11 for their accessibility needs.

[-] trevor 77 points 4 months ago

They would still have disproportionate control over web standards. They should not be allowed to keep Chrome/Chromium under any circumstances.

[-] trevor 186 points 8 months ago

Lula is so fucking great. He's literally just backing up the courts that are applying the law fairly and as-written, which is more than I can say for most leaders.

[-] trevor 98 points 11 months ago* (last edited 11 months ago)

Here's a neat tip:

You can go to most publisher or developer pages on Steam and "ignore" them to prevent Steam from ever showing you their slop again.

Example:

  1. Go to: https://store.steampowered.com/developer/Ubisoft
  2. Click the "Settings" cog.
  3. "Ignore this creator"

You can do the same with EA, 2K, etc. Don't even give these parasites microseconds of your time when they release their next slop title.

10
submitted 1 year ago* (last edited 1 year ago) by trevor to c/docker@programming.dev

I am looking for something that can take a Dockerfile, like the following as an input:


FROM --platform=linux/amd64 debian:latest
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y curl unzip libsecret-1-0 jq
COPY entrypoint.sh .
ENTRYPOINT [ "/entrypoint.sh" ]

And produce a a multi-stage Dockerfile where the last stage is built from scratch, with the dependencies for the script in the ENTRYPOINT (or CMD) copied over, like this:


FROM --platform=linux/amd64 debian:latest as builder
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update && apt install -y curl unzip libsecret-1-0 jq

FROM --platform=linux/amd64 scratch as app
SHELL ["/bin/bash"]

# the binaries executed in entrypoint.sh
COPY --from=builder /bin/bash /bin/bash
COPY --from=builder /usr/bin/curl /usr/bin/curl
COPY --from=builder /usr/bin/jq /usr/bin/jq
COPY --from=builder /usr/bin/sleep /usr/bin/sleep

# shared libraries of the binaries
COPY --from=builder /lib/x86_64-linux-gnu/libjq.so.1 /lib/x86_64-linux-gnu/libjq.so.1
COPY --from=builder /lib/x86_64-linux-gnu/libcurl.so.4 /lib/x86_64-linux-gnu/libcurl.so.4
COPY --from=builder /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
# ...a bunch of other shared libs...

# entrypoint
COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]

I've had pretty decent success creating images like this manually (using ldd to find the dependencies) based on this blog. To my knowledge, there's nothing out there that automates producing an image built from scratch, specifically. If something like this doesn't exist, I'm willing to build it myself.

[-] trevor 86 points 2 years ago

Still more efficient on resource utilization than animal agriculture. If you hate almond milk for that reason, you should want the dairy industry completely abolished.

view more: next ›

trevor

joined 2 years ago