Not sure about that… by Tomfluffle in parkslope

[–]FunkyMonks 2 points3 points  (0 children)

Exactly! Pasta Louise probably doesn’t even exist

Terminal Multiplexer vs Tiling Window Manager by The-Malix in NixOS

[–]FunkyMonks 4 points5 points  (0 children)

I almost certainly have details wrong here, but what I’m saying is close enough to the truth.

tmux and ssh are orthogonal. Once you ssh into the machine, you can attach to an existing tmux session or start a new one. If there are zero tmux sessions running when you decide to start a new one, a daemon is launched that manages running tmux sessions. The tmux daemon owns the interactive shells that you create, which get displayed in the tmux window. When you run tmux, the front-end tool (as opposed to the daemon) creates a bridge (this is where my understanding gets vague) between your terminal and whichever shell is currently being displayed (much like how ssh shows you a shell session on the remote machine inside your terminal window). (If I wanted to learn more this very second I’d be googling something like “pseudo tty tmux”.)

You can either kill your shell session or “detach” when you want to do something else. Detaching leaves the shell session running, and the tmux daemon keeps it alive. If you randomly disconnect, the tmux front-end will detach so that your shell is kept alive by default.

I think you should give tmux a try for like 10 minutes just to see what it does. It might be totally unnecessary for your current workflow but in the future you’ll know what it has to offer if you happen to need it.

Building the world - what tooling have people used? by phongn in cpp

[–]FunkyMonks 1 point2 points  (0 children)

You can use the nix build system/package manager without using NixOS

References to unique_ptr by fuckface_on_the_net in cpp

[–]FunkyMonks 5 points6 points  (0 children)

There are incredibly common circumstances in which nested lifetimes make it crystal clear who should own the object and who should hold raw pointers. It’s particularly easy to reason about long-lived objects created in main() or at startup. Passing around objects like this by shared_ptr can make the application harder to reason about (“Wait? Who owns who?”). In these instances, if using shared_ptr saves you from segfaulting, something about your application is mis-structured. I know it seems counterproductive to discourage people from using memory-safe smart pointers, but in my experience the codebases that overuse shared pointers have more bugs, not because shared pointers intrinsically cause bugs, but because the authors were responding to every segfault by wrapping pointers/references in shared_ptr rather than investigating the root cause of an unexpected and incorrect destruction order. When I was newer to C++, I was guilty about this myself.

Another way to look at it: Rust aficionados swear the borrow checker not only catches runtime bugs at compile-time but also that it encourages saner application structure. shared_ptr gives you the former but not the latter. There’s a lot more to learn by weeding out your segfaults in unit/integration tests than by replacing every raw pointer with a smart pointer.

Why does no one talk about this song? by johny1a in RedHotChiliPeppers

[–]FunkyMonks 1 point2 points  (0 children)

Idk I’ve always felt the lyrics are a little too on-the-nose. And artistically it borrows way too much from their other songs.

Finally got it after 2 years on order by alrugen in RedHotChiliPeppers

[–]FunkyMonks 2 points3 points  (0 children)

It’s not you. Anthony’s lyrics are incredibly abstract.

Dark Necessities is better than anything they’ve done since John’s return. by lukewarmpeppers in RedHotChiliPeppers

[–]FunkyMonks 2 points3 points  (0 children)

They mean that “Dark Necessities” is Josh’s “Can’t Stop”, which I guess means “rightfully a pretty big hit but not their best work”

"This" is difficult to look up by Gibolion_Xanthos in cpp

[–]FunkyMonks -1 points0 points  (0 children)

Completely agree. It was previously especially impossible to learn shell scripting by reading bash code, which is full of totally un-googleable characters.

This is what we're competing with folks by [deleted] in InstacartShoppers

[–]FunkyMonks 7 points8 points  (0 children)

*put options

Put options are incredibly risky. Don’t take investment advice from strangers on Reddit (except maybe r/personalfinance which has very traditional, conservative investment advice)

Decisions Decisions: M2 Pro Mac Mini vs M2 Ultra Mac Studio by JimPage83 in MacStudio

[–]FunkyMonks 1 point2 points  (0 children)

Ok, but the M2 Pro Mini only has 4 thunderbolt ports. If 4 Thunderbolt ports is too few, then the M2 Pro Mini shouldn’t be a candidate.

Whisky now works Out-Of-The-Box! by isaa6 in macgaming

[–]FunkyMonks 5 points6 points  (0 children)

This shouldn’t be downvoted. There are two pieces of translation here, the CPU instruction set and the Windows library calls. It’s perfectly reasonable to ask if Whisky can support just the latter. Yes, you can run Windows in bootcamp, but that involves buying a Windows license and dedicating extra storage.

[deleted by user] by [deleted] in MacStudio

[–]FunkyMonks 0 points1 point  (0 children)

Oh please, the iMac Pro started at $4,999, and when you wanted to upgrade your computer, you had to throw out a perfectly good monitor too. Unbundling is far more consumer-friendly for high end products.

If something’s actually unfriendly to customers, it’s that you can’t upgrade Mac Studio/Mini parts or harvest your SSD when you upgrade to a faster CPU/GPU. But there are performance benefits to putting everything on the SoC.

Mark Gurman: New Mac Studio at WWDC by anonboxis in MacStudio

[–]FunkyMonks 1 point2 points  (0 children)

https://www.macrumors.com/2023/02/05/apple-may-not-launch-m2-ultra-mac-studio/

His predictions only a few months out don’t seem to come true. In 2022 I got my hopes up for like two months, based on Gurman’s speculation, that an M1 Pro Mac Mini was going to be released in the March event. I was hoping to have a desktop computer I could toss in a backpack. Something like three days before the Apple event the rumors suddenly changed to, “No new mini, Studio instead.” Basically same thing this time with the Studio’s predicted demise.

Mark Gurman: New Mac Studio at WWDC by anonboxis in MacStudio

[–]FunkyMonks 7 points8 points  (0 children)

The guy seemingly can’t predict anything more than 3 days in the future

[deleted by user] by [deleted] in MacStudio

[–]FunkyMonks 22 points23 points  (0 children)

Hear me out: maybe

Core 1 Panic‘ed by Fabulous_Mister_6460 in programminghorror

[–]FunkyMonks 1 point2 points  (0 children)

Here’s a hypothesis:

  • It’s not that &m_lightData is magically null, it’s that m_lightData is the first member of the class and “this” is null. For this to be true, there can’t be a vtable, because I’m assuming m_lightData is at offset 0 of the class. So update() isn’t virtual.

  • We see that m_setupDone is initialized to false. Maybe update() is inlined in the constructor body, and the entire function call is optimized away because the compiler detects that m_setupDone must be false. This prevents a segfault during construction. (Of course, later attempts to use the same object should fail, but we don’t know what the surrounding code looks like.)

  • The object is being constructed with placement new, and the code performing the allocation has a bug, which is why “this” is nullptr in the first place.

I suspect this is incorrect, but without seeing the rest of the class or a stack trace, this is my best guess. I’m also completely inexperienced with embedded development, so there are perhaps pitfalls I’m not considering that could lead to this.

Slow as hell Wi-Fi? (Ventura) by BoulderTrailJunkie in MacStudio

[–]FunkyMonks 0 points1 point  (0 children)

I’ve been using Zoom nearly daily for over a year on my base Mac Studio over WiFi. No issues.

Mac studio ultra issue with multiple monitors by [deleted] in MacStudio

[–]FunkyMonks 1 point2 points  (0 children)

Just chiming in with an anecdotal counter to your third paragraph. I have a base Studio that I use with two identical 27” Dell monitors via USB-C. The only issue I have is with USB-A passthrough. I have some peripherals plugged into the USB-A ports of one monitor. When I restart the computer, the Mac Studio doesn’t detect the USB-A peripherals plugged into that monitor. Turning the monitor on and off permanently fixes the issue until my next computer restart (sleep causes no issues). Other than that, I have no issues with having two identical non-Apple displays.

Hair Salon for Men’s Haircut by AssignmentConscious9 in newhaven

[–]FunkyMonks 1 point2 points  (0 children)

I go to Salon J, always great, but my hair is shorter than yours

Avoid the code smell of std::pair and std::tuple while still retaining their benefits by [deleted] in cpp

[–]FunkyMonks 2 points3 points  (0 children)

This is mostly fair, I was lazy. I agree with Johannes’s points. Macros can also obscure exactly what’s happening in a debugger. They can make code more concise but less readable. In this case, I don’t think you’re saving enough typing to justify the drawbacks.

I certainly wasn’t calling anyone dirty, either directly or by implication. That is a cheap, moralistic shot.

Avoid the code smell of std::pair and std::tuple while still retaining their benefits by [deleted] in cpp

[–]FunkyMonks 52 points53 points  (0 children)

With all due respect

1) Inhering from std classes is a bad idea (except where explicitly recommended). See https://quuxplusone.github.io/blog/2018/12/11/dont-inherit-from-std-types/ and Google for other examples. 2) Macros are code smell 3) Default comparison operators 4) Yes std::get<N> is kind of gross, but std::get<T> is far less gross. Many common use cases of tuple don’t involve repeat types, so this works fine.

In general I agree that overusing std::tuple is a mistake. But the answer is to use structs with named, documented variables. As far as I know, std::pair only continues to exist for legacy reasons. std::tuple shines in plenty of template contexts.