GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    EVERYTHING'S COMPUTER (be@floss.social)'s status on Monday, 30-Dec-2024 11:57:59 JSTEVERYTHING'S COMPUTEREVERYTHING'S COMPUTER

    I'm translating some C++ to Rust and the original C++ code silently relies on unsigned integer overflow just... somehow working for this math??? 🙃 This function has tests which I've also translated to Rust, and the only way I can get the tests to pass is by preventing overflow using wider integer types in the intermediate math... u16::overflowing_mul does not do the trick so I don't understand how the C++ code is working??? 🤔

    https://github.com/FastLED/FastLED/blob/d5aaf65be19782f3e52b8b0fe38778f14376a293/src/lib8tion/scale8.h#L476

    In conversationabout 5 months ago from floss.socialpermalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
      FastLED/src/lib8tion/scale8.h at d5aaf65be19782f3e52b8b0fe38778f14376a293 · FastLED/FastLED
      The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github "issues&...
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.