Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I am Lucky Today Also

I am Lucky Today Also

Scheduled Pinned Locked Moved The Lounge
algorithms
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BernardIE5317
    wrote on last edited by
    #1

    I gave up on figuring out an algorithm to shift bits of an arbitrarily long buffer so I asked Perplexity. Its' answer was not correct but it got me started. The reworked code almost works. All that remains is getting the byte order correct. I will finish it after watching a movie.

    H D 2 Replies Last reply
    0
    • B BernardIE5317

      I gave up on figuring out an algorithm to shift bits of an arbitrarily long buffer so I asked Perplexity. Its' answer was not correct but it got me started. The reworked code almost works. All that remains is getting the byte order correct. I will finish it after watching a movie.

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #2

      htcw_bits/include/htcw_bits.hpp at master · codewitch-honey-crisis/htcw_bits · GitHub[^] This has shift_left and shift_right which work on arbitrary buffers

      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

      1 Reply Last reply
      0
      • B BernardIE5317

        I gave up on figuring out an algorithm to shift bits of an arbitrarily long buffer so I asked Perplexity. Its' answer was not correct but it got me started. The reworked code almost works. All that remains is getting the byte order correct. I will finish it after watching a movie.

        D Offline
        D Offline
        dandy72
        wrote on last edited by
        #3

        BernardIE5317 wrote:

        Its' answer was not correct but it got me started

        There's been numerous times where I couldn't figure out how to invoke some obscure API with little or no documentation, and some AI got me started. I never take for granted anything it comes up with will work, so I review and test everything carefully instead of blindly cutting and pasting into my code, so it does have its uses (and clearly, its limitations). Obscure APIs, or writing boilerplate code that I've written a million times before, but can't be bothered to remember at that particular instant (or to refactor once and for all into something reusable, but that's a separate matter) :-)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups