HNHacker News
TopNewBestAskShowJobs

affenape

36 karma · joined December 31, 2024

submissionscomments
affenape··on Move in C++ without a std:move
It did for sure, but the problem with C++ is its heritage, specifically that structures can be self-referential. For instance, the Rust's url::Url type has to use usize offsets for tracking the location of each of its components. Conversely, in C++, someone could have already created a similar Url type that would use std::string for the buffer and char pointers for the component locations. As such, you cannot simply memcpy from one struct into another and forget the former as std::string could have its own in-place storage and that would invalidate all pointers - you'll need to define a move constructor instead.
affenape··on Escape IntelliJ: Scala and Kotlin LSPs on Emacs Eglot
I've tried using RustRover over WSL2 multiple times with every new release, but it's been a huge disappointment every time. My fans constantly spin like crazy, memory vanishes into thin air, and typing is super laggy - it even overwrites random sections of the file sometimes. On top of that, the built-in terminal is totally unusable because it craps out and freezes the app whenever there's a large output.

PyCharm, on the other hand, was always great to use. But since VS Code gives me pretty much everything I need for my daily work without demanding too much from my system, I've finally moved away from JetBrains.

affenape··on C++26 is done: ISO C++ standards meeting Trip Report
From the proposal, I see a bunch of new keywords and rules - alright given the language's heritage. But what happens if I "relocate" a variable value - would a "shell" remain or how exactly C++ is supposed to handle this:

  auto value = create_value();
  if (some_cond) {
    consume_value(std::move(value)); // not sure whether it's move here, but I guess my point is clear
  }

  use_value(value);
affenape··on C++26 is done: ISO C++ standards meeting Trip Report
Finally, reflection has arrived, five years after I last touched a line in c++. I wonder how long would it take the committee, if ever, to introduce destructing move.
affenape··on Looking at Unity made me understand the point of C++ coroutines
Not necessarily. A coroutine encapsulates the entire state machine, which might pe a PITA to implement otherwise. Say, if I have a stateful network connection, that requires initialization and periodic encryption secret renewal, a coroutine implementation would be much slimmer than that of a state machine with explicit states.
affenape··on Migrating to Positron, a next-generation data science IDE for Python and R
> A %PRODUCTNAME% next generation editor/ide is released

> Look inside

> VS Code

affenape··on Nvidia's new 'robot brain' goes on sale for $3,499
Can it run doom? Can it make doom come true?
affenape··on Microsoft Flight Simulator 2024: WebAssembly SDK
For something having 2024 in its name I expected a more consistent error handling, but guess what:

* some functions like fsRenderCreate return 0 or 1 depending on the operation result;

* some like fsMapViewCreate say that a value less than 0 is returned on error;

* fsIOOpen says you should also consult with the fsIOGetLastError function on failure.

Hope somebody considers adding the errno.

affenape··on Material 3 Expressive
Yikes... everything looks like jelly. Best served with Comic Sans MS.
affenape··on Nuclear fusion: WEST beats the world record for plasma duration
Would be really NICE.