427
average c++ dev (programming.dev)

I don't think that casting a range of bits as some other arbitrary type "is a bug nobody sees coming".

C++ compilers also warn you that this is likely an issue and will fail to compile if configured to do so. But it will let you do it if you really want to.

That's why I love C++

you are viewing a single comment's thread
view the rest of the comments
[-] qaz@lemmy.world 7 points 4 days ago* (last edited 4 days ago)

https://github.com/Shadlock0133/cargo-vibe

I thought it was a joke, but this is actually viable and even configurable

By default, cargo-vibe will, on success, vibe full strength for 3 seconds.

You can change that by setting CARGO_VIBE_PATTERN environment variable. For example, to set it vibe for 1.5 second on 20% strength, you can do:

CARGO_VIBE_PATTERN="0.2 1.5s" cargo vibe <cmd>

You can also set full patterns of vibes to run, by separating them with slashes /. Here is one example:

CARGO_VIBE_PATTERN="0.4 1s/0.6 1s/0.8 0.75s/1.0 0.25s"

Wait, there's more! https://github.com/funkeleinhorn/cargo-shock

To let Cargo Shock trigger your shock collar use: cargo shock build

To use it everytime you can alias cargo="cargo shock".

Cargo Shock can also be combined with other tools like Cargo Mommy and Cargo Vibe like this: cargo mommy vibe shock build ...

And they have a really slick site: https://openshock.org/

this post was submitted on 22 Jul 2025
427 points (98.2% liked)

Programmer Humor

25282 readers
599 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS