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

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

Conversation

Notices

  1. Embed this notice
    EVERYTHING'S COMPUTER (be@floss.social)'s status on Monday, 30-Dec-2024 11:57:58 JST EVERYTHING'S COMPUTER EVERYTHING'S COMPUTER
    in reply to

    Does overflowing a uint16_t on 32 bit MCUs just work by treating it as a size_t/uint32_t? This function works on 8 bit AVR microcontrollers, but those have their own assembler implementation rather than the C++... 🤷

    In conversation about 4 months ago from floss.social permalink
    • Embed this notice
      EVERYTHING'S COMPUTER (be@floss.social)'s status on Monday, 30-Dec-2024 11:57:59 JST EVERYTHING'S COMPUTER EVERYTHING'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 conversation about 4 months ago permalink

      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&...
      alcinnz repeated this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • 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.