HNHacker News
TopNewBestAskShowJobs

rpasquay

1 karma · joined February 28, 2020

submissionscomments
rpasquay··on Show HN: Moon simulator game, ray-casting
Nice game! Just having two thrusters fire at the same time sounds a bit distorted. Are you generating the engine noise procedurally?
rpasquay··on The x86 architecture is the weirdo, part 2
I did not understand why on x86 Windows/MSVC cannot implement exceptions the same way as it was done for other architectures. I read that on x64 a different approach is used ("table based" - sounds to me like the "unwind code" approach mentioned in the article). Is this not possible no x86 for some reason ?
rpasquay··on Stanford CS248: Implement an SVG Rasterizer
Is there any good book/resource about how all that fancy stuff you can use in Inkscape/Illustrator is actually implemented in terms of rendering. E.g. how are curves and lines with a thickness rendered or shapes that are defined by boolean operations etc. ?
rpasquay··on TOML for Modern C++
Thank you for the explanation!
rpasquay··on TOML for Modern C++
I'm a bit surprised by this snippet from the "Traversing and manipulating data" example:

  for (auto& elem : *arr) {
      // visitation helps deal with the polymorphic nature of TOML data
      elem.visit([=](auto&& el) noexcept
      {
          if constexpr (toml::is_number<decltype(el)>)
              (*el)++;
          else if constexpr (toml::is_string<decltype(el)>)
              el = "five"sv;
      });
  }
I thought constexpr would work at compile time but how can the compile here inside a loop "know" when this labmda will encounter an int or a string ?