@fasterthanlime@hachyderm.io titelbild
@fasterthanlime@hachyderm.io avatar

fasterthanlime

@fasterthanlime@hachyderm.io

hi, I'm amos! 🦀 I make articles & videos about how computers work 🐻‍❄ cool bear's less cool counterpart ✨ be kind

Dieses Profil is von einem föderierten Server und möglicherweise unvollständig. Auf der Original-Instanz anzeigen

fasterthanlime , an Random Englisch
@fasterthanlime@hachyderm.io avatar

I'm reading up about C++ move semantics and I don't understand why anybody in the history of humankind has ever tried defending this language.

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

me: please move this
clang++: I copied this, do you like this?
me: no, please MOVE this
clang++: hey you deleted the copy constructor
me: yes. I need you to move this.
clang++: have you tried not deleting the copy constructor

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

clearly I don't know what I'm doing in this instance, but I'm not convinced anyone else does, either

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

please

you cannot be serious

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

anyway this is my dumb attempt: https://gist.github.com/fasterthanlime/d6f560833d7971fbeabf49f041aa21ae

I'm just trying to make the second call to take_ownership be a compiler error. is that possible?

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@deoxys314 😭

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

okay so what I want is impossible?

like... "take this handle away from me so I can't mistakenly use it again (and check that at compile time)" is not possible in the standard of our lord C++23? best we can do is "transplant its innards to another location and error out if we try to re-use its old shell?"

can I quote y'all on this?

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@arnelson Thanks, this does help a lot!

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@dotstdy All right, I hate it, but it makes sense. Thank you.

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@vitaut Are we speaking from experience orrrr

fasterthanlime , (Bearbeitet ) an Random Englisch
@fasterthanlime@hachyderm.io avatar

Well, I'm curious now — macOS users, are you a "developer" and do you have Finder set to "show hidden files"?

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

The reason I made this poll is because someone told me "everyone who's into tech has that enabled".

That's funny to me, since the only places I worry about "hidden files" are my code editor and the terminal.

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@Tak How long have you been on macOS? I was super frustrated that it wasn't more like the Windows Explorer until I gave in and started learning the shortcuts — I'm reasonably okay with it now

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@janl yup yup

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@dysfun no! If I want to edit my dotfiles, I open a new terminal (either WezTerm or the terminal integrated into my code editor), and then open it in lunarvim or my GUI code editor.

If I don't know the one I'm looking for, I do l (aliased to ls --color=always -lhA) to find it!

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@dpom (haha that's why I obsessively "quote all the things", sometimes even with backquotes)

edit: removed extra esses

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@gsuberland I feel like this makes a lot of sense on Windows, where you often have no choice but to look behind the curtain as a developer, but I feel like it's not as necessary on Mac OS, so that's specifically why I'm curious

  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • haupteingang
  • Alle Magazine