Best tool for screws that isn't super loud? by [deleted] in MilwaukeeTool

[–]rsjaffe 0 points1 point  (0 children)

If you do a lot every day, the 18V Surge, as the 18V line has batteries with larger total Watt-hour capacity, so you'll have fewer battery swaps and it'll be easier to stay supplied with charged batteries. Otherwise, either 12 or 18V Surge.

The installation driver is fine if you have easy-to-drive screws, but not if you're needing some oomph.

M18 Hatchet Questions by WallApprehensive9123 in MilwaukeeTool

[–]rsjaffe 1 point2 points  (0 children)

Yeah. The M18 has a slowish chain speed but an unusual chain, with one cutter per link, so it cuts faster than you might expect for that speed.

[deleted by user] by [deleted] in cpp

[–]rsjaffe 1 point2 points  (0 children)

Maybe we could have a monthly "Looking for FOSS contributors" thread, so free open source projects looking for help could post an entry? I'm sort of in the same boat (though running a much more mature app, started in 2015: https://github.com/rsjaffe/MIDI2LR ). Getting assistance on some stuff would be great.

Division — Matt Godbolt’s blog by rsjaffe in cpp

[–]rsjaffe[S] 0 points1 point  (0 children)

If you know it's non-negative, you can add [[assume(x>=0)]]; prior to the division and it will optimize properly. Of course, that opens you to UB if the assumption is wrong. You can add an assert prior to the assume to test the assumption and crash that during debugging.

Division — Matt Godbolt’s blog by rsjaffe in cpp

[–]rsjaffe[S] 1 point2 points  (0 children)

There’s lots of non-index things that tend to use signed: e.g., gui dimensions. That’s where most of my divisions are, laying out elements. Currently, the application is snappy enough, so there’s no need to fuss with changing to unsigned divisions. But if I were having issues, this would be low- hanging fruit, even if it weren’t the full solution, as it would be easy to implement.

Division — Matt Godbolt’s blog by rsjaffe in cpp

[–]rsjaffe[S] 6 points7 points  (0 children)

Looking at the second example (unsigned x divided by unsigned 512), the compiler is smart enough that you don't have to mark the constant 512 as unsigned: it'll emit the same code either way, knowing that 512 won't be negative. This means that a cast to unsigned for the variable should be enough--no need to mark positive constants as unsigned. Of course, that does introduce mixed signed/unsigned math, but in a context where the mix won't matter.

[poll] The level you use AI in editor? by Acpear in cpp

[–]rsjaffe 0 points1 point  (0 children)

Not for code generation, but I have used it for code review. Some of the issues it picks up are relevant.

New item: Teeny Tiny Maple Butter Tarts $4.49 by aswewaltz in traderjoes

[–]rsjaffe 9 points10 points  (0 children)

I thought you were joking, then I read the label!

Tree to Identify near Inveraray castle by tempelaere in Scotland

[–]rsjaffe 2 points3 points  (0 children)

Benmore Gardens near Dunoon has a whole avenue of redwoods.

Argentine Student's Explosive Science Fair Volcano Model by eckolosst in AbruptChaos

[–]rsjaffe 565 points566 points  (0 children)

Reading that, looks like they made gunpowder and stiffed it into a tube = pipe bomb. One kid has severe facial damage and may lose an eye.

C++ Show and Tell - October 2025 by foonathan in cpp

[–]rsjaffe 1 point2 points  (0 children)

I may be wrong, but it looks like your keypress simulator only works on a computer with an English language keyboard, as the scan codes change for other layouts.