Better HN
topnewbestaskshowjobs
Log inSign up

rpasquay

1 karma · joined Feb 28, 2020 (6y ago) · 6 submissions

Submissions

comment 7mo ago · link · parent

Nice game! Just having two thrusters fire at the same time sounds a bit distorted. Are you generating the engine noise procedurally?

comment 4y ago · link · parent

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 ?

comment 6y ago · link · parent

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. ?

comment 6y ago · link · parent

Thank you for the explanation!

comment 6y ago · link · parent

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 ?