Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Bernie (codewiz@mstdn.io)'s status on Wednesday, 21-Jun-2023 14:33:15 UTC Bernie Bernie

    A friend of mine minified Bitshift Variations in C Minor down to 179 bytes:

    gcc -xc -oa -<<<'i;n;g(m,t,o){m=("GTj?TG?5"[7&t]+!(n&12|t&2)*9)*i>>o&m&24;}main(s){for(;;putchar(g(8,n=s>>4,8)+g(n,n^s/8,6)+g(n/3,n+s/2%3,6)+g(n/5,n-s%3,5)))s=++i>>10;}';./a|aplay

    #bytebeat #programming #codegolf #chiptune

    In conversation Wednesday, 21-Jun-2023 14:33:15 UTC from mstdn.io permalink
    • Bernie (codewiz@mstdn.io)'s status on Wednesday, 21-Jun-2023 15:29:17 UTC Bernie Bernie
      in reply to

      For those who can't directly enjoy the compact format, here's a pre-rendered version... but several orders of magnitude larger:
      https://soundcloud.com/robertskmiles/bitshift-variations-in-c-minor
      #bytebeat #chiptune

      In conversation Wednesday, 21-Jun-2023 15:29:17 UTC permalink

      Attachments

      1. Bitshift Variations in C Minor by robertskmiles
        from robertskmiles
        echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(i,n,s){for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -&&./a.out|aplay
    • Bernie (codewiz@mstdn.io)'s status on Thursday, 22-Jun-2023 08:19:30 UTC Bernie Bernie
      in reply to
      • Benoit

      @benoit No longer 179 bytes though...

      In conversation Thursday, 22-Jun-2023 08:19:30 UTC permalink
    • Benoit (benoit@toots.benpro.fr)'s status on Thursday, 22-Jun-2023 08:19:33 UTC Benoit Benoit
      in reply to

      @codewiz I don't have alsa-utils on my machine but I have sox, so I can use:

      ./a | play -t raw -r 16k -e signed -b 16 -c 1 -

      In conversation Thursday, 22-Jun-2023 08:19:33 UTC permalink
    • Benoit (benoit@toots.benpro.fr)'s status on Thursday, 22-Jun-2023 08:19:36 UTC Benoit Benoit
      in reply to

      @codewiz aplay? People still use alsa tools? :D

      In conversation Thursday, 22-Jun-2023 08:19:36 UTC permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.