Make a Geiger Counter

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
8
down vote

favorite
1












A Geiger counter is a device that is used to detect radiation.



We will be making a Geiger counter program.



As we all know, when radiation hits a computer program it removes exactly 1 byte at random. So a Geiger counter program is a program that itself does nothing, but when any byte is removed the modified program prints beep, to indicate the presence of radiation.



Answers will be scored in bytes with fewer bytes being better. Answers must be at least 1 byte.



Your program may print beep with trailing a newline or print a single newline for empty output, so long as it does so consistently. Your program may also use a different case for beep such as BEEP, bEEP, or Beep so long as it does so consistently.







share|improve this question





















  • Related, Related.
    – W W
    20 hours ago










  • Can we change the case of beep. For example, is BEEP okay?
    – Jo King
    12 hours ago










  • *Geiger-Muller Tube connected to a counter ;)
    – Beta Decay
    11 hours ago










  • @JoKing Sure, that's ok too.
    – W W
    6 hours ago














up vote
8
down vote

favorite
1












A Geiger counter is a device that is used to detect radiation.



We will be making a Geiger counter program.



As we all know, when radiation hits a computer program it removes exactly 1 byte at random. So a Geiger counter program is a program that itself does nothing, but when any byte is removed the modified program prints beep, to indicate the presence of radiation.



Answers will be scored in bytes with fewer bytes being better. Answers must be at least 1 byte.



Your program may print beep with trailing a newline or print a single newline for empty output, so long as it does so consistently. Your program may also use a different case for beep such as BEEP, bEEP, or Beep so long as it does so consistently.







share|improve this question





















  • Related, Related.
    – W W
    20 hours ago










  • Can we change the case of beep. For example, is BEEP okay?
    – Jo King
    12 hours ago










  • *Geiger-Muller Tube connected to a counter ;)
    – Beta Decay
    11 hours ago










  • @JoKing Sure, that's ok too.
    – W W
    6 hours ago












up vote
8
down vote

favorite
1









up vote
8
down vote

favorite
1






1





A Geiger counter is a device that is used to detect radiation.



We will be making a Geiger counter program.



As we all know, when radiation hits a computer program it removes exactly 1 byte at random. So a Geiger counter program is a program that itself does nothing, but when any byte is removed the modified program prints beep, to indicate the presence of radiation.



Answers will be scored in bytes with fewer bytes being better. Answers must be at least 1 byte.



Your program may print beep with trailing a newline or print a single newline for empty output, so long as it does so consistently. Your program may also use a different case for beep such as BEEP, bEEP, or Beep so long as it does so consistently.







share|improve this question













A Geiger counter is a device that is used to detect radiation.



We will be making a Geiger counter program.



As we all know, when radiation hits a computer program it removes exactly 1 byte at random. So a Geiger counter program is a program that itself does nothing, but when any byte is removed the modified program prints beep, to indicate the presence of radiation.



Answers will be scored in bytes with fewer bytes being better. Answers must be at least 1 byte.



Your program may print beep with trailing a newline or print a single newline for empty output, so long as it does so consistently. Your program may also use a different case for beep such as BEEP, bEEP, or Beep so long as it does so consistently.









share|improve this question












share|improve this question




share|improve this question








edited 6 hours ago
























asked 20 hours ago









W W

34.3k10142337




34.3k10142337











  • Related, Related.
    – W W
    20 hours ago










  • Can we change the case of beep. For example, is BEEP okay?
    – Jo King
    12 hours ago










  • *Geiger-Muller Tube connected to a counter ;)
    – Beta Decay
    11 hours ago










  • @JoKing Sure, that's ok too.
    – W W
    6 hours ago
















  • Related, Related.
    – W W
    20 hours ago










  • Can we change the case of beep. For example, is BEEP okay?
    – Jo King
    12 hours ago










  • *Geiger-Muller Tube connected to a counter ;)
    – Beta Decay
    11 hours ago










  • @JoKing Sure, that's ok too.
    – W W
    6 hours ago















Related, Related.
– W W
20 hours ago




Related, Related.
– W W
20 hours ago












Can we change the case of beep. For example, is BEEP okay?
– Jo King
12 hours ago




Can we change the case of beep. For example, is BEEP okay?
– Jo King
12 hours ago












*Geiger-Muller Tube connected to a counter ;)
– Beta Decay
11 hours ago




*Geiger-Muller Tube connected to a counter ;)
– Beta Decay
11 hours ago












@JoKing Sure, that's ok too.
– W W
6 hours ago




@JoKing Sure, that's ok too.
– W W
6 hours ago










2 Answers
2






active

oldest

votes

















up vote
9
down vote














Hexagony, 38 bytes



.....;p;<>b;e;/<b;e;;p...@@.......;@..


Try it online!



Verification program.






share|improve this answer






























    up vote
    9
    down vote














    Lost, 303 293 263 253 238 bytes



    v^^"peeb"</"beepvv"((>@@>>%%>>(((((([[[[[[[
    >>>>>>>>>>//>>>>>>>>>>>>>>/>>/>>>>>>>>>>>>>>\
    >>>>>>>>>//>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>>\
    >//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
    >>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>


    Try it online!



    Verification script (borrowed from user 202729's answer). Unfortunately this can only test half of the code at a time, but rest assured I've tested the whole program.



    Ouch, this was a tough one. I'll quote WW's deleted answer:




    Lost is perhaps the most interesting language for this challenge. In
    Lost the start location and direction of the pointer is entirely
    random, thus to make deterministic programs you must account for every
    possible start location and direction. At the same time, by the nature
    of this challenge you must also account for any single byte being
    removed.




    Unfortunately, his answer didn't take into account removing newlines, which screwed everything up.



    Explanation:



    (note that a few bytes might be off here and there)



    First let's talk about the general structure of the code:



    v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[ Processing line
    >>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\ Beep line
    >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up beep line
    >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up return line
    >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>> Return line


    Everything but the processing line must be entirely composed of either > or one of /. Why? Well, as an example, let's remove a newline:



    v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[>>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\
    >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
    >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\
    >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>


    The first line is now way longer than the rest of the block. If a pointer were to spawn on a non->/ character with vertical movement, then it would get stuck in an infinite loop.




    The biggest radiation detector part is the section at the end of each line.



     
    \
    >\
    >>\
    >>>


    Normally an IP passing through this from the first line would exit out the last line. However, if any character on the line is removed, then that line shifts down one, e.g:



     
    \
    >\
    >\
    >>>


    And the IP instead exits out the line that is missing a byte (with the exception of the last line, where it exits out the second to last).



    From there, each of the first four lines will redirect to the second line:



    v
    >>>>>>>>>>>
    >>>>>>>>>//
    >//


    Which will then lead into either one of the two beepers.



    v^^"peeb"<</"beepvv"((>
    >>>>>>>>>>>//


    If any of the bytes in the first beeper have been removed, then it instead goes to the second:



    v^^"peb"<</"beepvv"((>
    >>>>>>>>>>>//


    Both beepers then lead back to the first line and the terminating @.



    Some other miscellaneous parts:



    The (((((([[[[[[[ is used to clear the stack when the pointer starts inside a pair of quotes and ends up pushing the whole first line to stack. It has to be so unfortunately long because the first newline can be removed to make the first line twice the size. Experimenting in generating the beep using arithmetic instead of quotes ended up longer.



    The s and /s scattered across the lines are there to golf bytes in the top line of code by redirecting






    share|improve this answer























      Your Answer




      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
      );
      );
      , "mathjax-editing");

      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "200"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f169960%2fmake-a-geiger-counter%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      9
      down vote














      Hexagony, 38 bytes



      .....;p;<>b;e;/<b;e;;p...@@.......;@..


      Try it online!



      Verification program.






      share|improve this answer



























        up vote
        9
        down vote














        Hexagony, 38 bytes



        .....;p;<>b;e;/<b;e;;p...@@.......;@..


        Try it online!



        Verification program.






        share|improve this answer

























          up vote
          9
          down vote










          up vote
          9
          down vote










          Hexagony, 38 bytes



          .....;p;<>b;e;/<b;e;;p...@@.......;@..


          Try it online!



          Verification program.






          share|improve this answer
















          Hexagony, 38 bytes



          .....;p;<>b;e;/<b;e;;p...@@.......;@..


          Try it online!



          Verification program.







          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited 17 hours ago


























          answered 17 hours ago









          user202729

          11.9k12246




          11.9k12246




















              up vote
              9
              down vote














              Lost, 303 293 263 253 238 bytes



              v^^"peeb"</"beepvv"((>@@>>%%>>(((((([[[[[[[
              >>>>>>>>>>//>>>>>>>>>>>>>>/>>/>>>>>>>>>>>>>>\
              >>>>>>>>>//>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>>\
              >//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
              >>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>


              Try it online!



              Verification script (borrowed from user 202729's answer). Unfortunately this can only test half of the code at a time, but rest assured I've tested the whole program.



              Ouch, this was a tough one. I'll quote WW's deleted answer:




              Lost is perhaps the most interesting language for this challenge. In
              Lost the start location and direction of the pointer is entirely
              random, thus to make deterministic programs you must account for every
              possible start location and direction. At the same time, by the nature
              of this challenge you must also account for any single byte being
              removed.




              Unfortunately, his answer didn't take into account removing newlines, which screwed everything up.



              Explanation:



              (note that a few bytes might be off here and there)



              First let's talk about the general structure of the code:



              v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[ Processing line
              >>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\ Beep line
              >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up beep line
              >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up return line
              >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>> Return line


              Everything but the processing line must be entirely composed of either > or one of /. Why? Well, as an example, let's remove a newline:



              v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[>>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\
              >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
              >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\
              >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>


              The first line is now way longer than the rest of the block. If a pointer were to spawn on a non->/ character with vertical movement, then it would get stuck in an infinite loop.




              The biggest radiation detector part is the section at the end of each line.



               
              \
              >\
              >>\
              >>>


              Normally an IP passing through this from the first line would exit out the last line. However, if any character on the line is removed, then that line shifts down one, e.g:



               
              \
              >\
              >\
              >>>


              And the IP instead exits out the line that is missing a byte (with the exception of the last line, where it exits out the second to last).



              From there, each of the first four lines will redirect to the second line:



              v
              >>>>>>>>>>>
              >>>>>>>>>//
              >//


              Which will then lead into either one of the two beepers.



              v^^"peeb"<</"beepvv"((>
              >>>>>>>>>>>//


              If any of the bytes in the first beeper have been removed, then it instead goes to the second:



              v^^"peb"<</"beepvv"((>
              >>>>>>>>>>>//


              Both beepers then lead back to the first line and the terminating @.



              Some other miscellaneous parts:



              The (((((([[[[[[[ is used to clear the stack when the pointer starts inside a pair of quotes and ends up pushing the whole first line to stack. It has to be so unfortunately long because the first newline can be removed to make the first line twice the size. Experimenting in generating the beep using arithmetic instead of quotes ended up longer.



              The s and /s scattered across the lines are there to golf bytes in the top line of code by redirecting






              share|improve this answer



























                up vote
                9
                down vote














                Lost, 303 293 263 253 238 bytes



                v^^"peeb"</"beepvv"((>@@>>%%>>(((((([[[[[[[
                >>>>>>>>>>//>>>>>>>>>>>>>>/>>/>>>>>>>>>>>>>>\
                >>>>>>>>>//>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>>\
                >//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
                >>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>


                Try it online!



                Verification script (borrowed from user 202729's answer). Unfortunately this can only test half of the code at a time, but rest assured I've tested the whole program.



                Ouch, this was a tough one. I'll quote WW's deleted answer:




                Lost is perhaps the most interesting language for this challenge. In
                Lost the start location and direction of the pointer is entirely
                random, thus to make deterministic programs you must account for every
                possible start location and direction. At the same time, by the nature
                of this challenge you must also account for any single byte being
                removed.




                Unfortunately, his answer didn't take into account removing newlines, which screwed everything up.



                Explanation:



                (note that a few bytes might be off here and there)



                First let's talk about the general structure of the code:



                v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[ Processing line
                >>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\ Beep line
                >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up beep line
                >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up return line
                >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>> Return line


                Everything but the processing line must be entirely composed of either > or one of /. Why? Well, as an example, let's remove a newline:



                v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[>>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\
                >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
                >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\
                >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>


                The first line is now way longer than the rest of the block. If a pointer were to spawn on a non->/ character with vertical movement, then it would get stuck in an infinite loop.




                The biggest radiation detector part is the section at the end of each line.



                 
                \
                >\
                >>\
                >>>


                Normally an IP passing through this from the first line would exit out the last line. However, if any character on the line is removed, then that line shifts down one, e.g:



                 
                \
                >\
                >\
                >>>


                And the IP instead exits out the line that is missing a byte (with the exception of the last line, where it exits out the second to last).



                From there, each of the first four lines will redirect to the second line:



                v
                >>>>>>>>>>>
                >>>>>>>>>//
                >//


                Which will then lead into either one of the two beepers.



                v^^"peeb"<</"beepvv"((>
                >>>>>>>>>>>//


                If any of the bytes in the first beeper have been removed, then it instead goes to the second:



                v^^"peb"<</"beepvv"((>
                >>>>>>>>>>>//


                Both beepers then lead back to the first line and the terminating @.



                Some other miscellaneous parts:



                The (((((([[[[[[[ is used to clear the stack when the pointer starts inside a pair of quotes and ends up pushing the whole first line to stack. It has to be so unfortunately long because the first newline can be removed to make the first line twice the size. Experimenting in generating the beep using arithmetic instead of quotes ended up longer.



                The s and /s scattered across the lines are there to golf bytes in the top line of code by redirecting






                share|improve this answer

























                  up vote
                  9
                  down vote










                  up vote
                  9
                  down vote










                  Lost, 303 293 263 253 238 bytes



                  v^^"peeb"</"beepvv"((>@@>>%%>>(((((([[[[[[[
                  >>>>>>>>>>//>>>>>>>>>>>>>>/>>/>>>>>>>>>>>>>>\
                  >>>>>>>>>//>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>>\
                  >//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
                  >>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>


                  Try it online!



                  Verification script (borrowed from user 202729's answer). Unfortunately this can only test half of the code at a time, but rest assured I've tested the whole program.



                  Ouch, this was a tough one. I'll quote WW's deleted answer:




                  Lost is perhaps the most interesting language for this challenge. In
                  Lost the start location and direction of the pointer is entirely
                  random, thus to make deterministic programs you must account for every
                  possible start location and direction. At the same time, by the nature
                  of this challenge you must also account for any single byte being
                  removed.




                  Unfortunately, his answer didn't take into account removing newlines, which screwed everything up.



                  Explanation:



                  (note that a few bytes might be off here and there)



                  First let's talk about the general structure of the code:



                  v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[ Processing line
                  >>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\ Beep line
                  >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up beep line
                  >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up return line
                  >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>> Return line


                  Everything but the processing line must be entirely composed of either > or one of /. Why? Well, as an example, let's remove a newline:



                  v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[>>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\
                  >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
                  >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\
                  >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>


                  The first line is now way longer than the rest of the block. If a pointer were to spawn on a non->/ character with vertical movement, then it would get stuck in an infinite loop.




                  The biggest radiation detector part is the section at the end of each line.



                   
                  \
                  >\
                  >>\
                  >>>


                  Normally an IP passing through this from the first line would exit out the last line. However, if any character on the line is removed, then that line shifts down one, e.g:



                   
                  \
                  >\
                  >\
                  >>>


                  And the IP instead exits out the line that is missing a byte (with the exception of the last line, where it exits out the second to last).



                  From there, each of the first four lines will redirect to the second line:



                  v
                  >>>>>>>>>>>
                  >>>>>>>>>//
                  >//


                  Which will then lead into either one of the two beepers.



                  v^^"peeb"<</"beepvv"((>
                  >>>>>>>>>>>//


                  If any of the bytes in the first beeper have been removed, then it instead goes to the second:



                  v^^"peb"<</"beepvv"((>
                  >>>>>>>>>>>//


                  Both beepers then lead back to the first line and the terminating @.



                  Some other miscellaneous parts:



                  The (((((([[[[[[[ is used to clear the stack when the pointer starts inside a pair of quotes and ends up pushing the whole first line to stack. It has to be so unfortunately long because the first newline can be removed to make the first line twice the size. Experimenting in generating the beep using arithmetic instead of quotes ended up longer.



                  The s and /s scattered across the lines are there to golf bytes in the top line of code by redirecting






                  share|improve this answer
















                  Lost, 303 293 263 253 238 bytes



                  v^^"peeb"</"beepvv"((>@@>>%%>>(((((([[[[[[[
                  >>>>>>>>>>//>>>>>>>>>>>>>>/>>/>>>>>>>>>>>>>>\
                  >>>>>>>>>//>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>>\
                  >//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
                  >>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>


                  Try it online!



                  Verification script (borrowed from user 202729's answer). Unfortunately this can only test half of the code at a time, but rest assured I've tested the whole program.



                  Ouch, this was a tough one. I'll quote WW's deleted answer:




                  Lost is perhaps the most interesting language for this challenge. In
                  Lost the start location and direction of the pointer is entirely
                  random, thus to make deterministic programs you must account for every
                  possible start location and direction. At the same time, by the nature
                  of this challenge you must also account for any single byte being
                  removed.




                  Unfortunately, his answer didn't take into account removing newlines, which screwed everything up.



                  Explanation:



                  (note that a few bytes might be off here and there)



                  First let's talk about the general structure of the code:



                  v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[ Processing line
                  >>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\ Beep line
                  >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up beep line
                  >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\ Back-up return line
                  >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>> Return line


                  Everything but the processing line must be entirely composed of either > or one of /. Why? Well, as an example, let's remove a newline:



                  v^^"peeb"<</"beepvv"((>>>@@>>%%>>(((((([[[[[[[>>>>>>>>>>>//>>>>>>>>>>>>>>>>>>>/>>>>>>>>>>>>>>\
                  >>>>>>>>>//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\
                  >//>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>>\
                  >>>>>>>>>>>>>>>>>>>>>>>>\>>>>>>>>>>>>>>>>>>>>>>>


                  The first line is now way longer than the rest of the block. If a pointer were to spawn on a non->/ character with vertical movement, then it would get stuck in an infinite loop.




                  The biggest radiation detector part is the section at the end of each line.



                   
                  \
                  >\
                  >>\
                  >>>


                  Normally an IP passing through this from the first line would exit out the last line. However, if any character on the line is removed, then that line shifts down one, e.g:



                   
                  \
                  >\
                  >\
                  >>>


                  And the IP instead exits out the line that is missing a byte (with the exception of the last line, where it exits out the second to last).



                  From there, each of the first four lines will redirect to the second line:



                  v
                  >>>>>>>>>>>
                  >>>>>>>>>//
                  >//


                  Which will then lead into either one of the two beepers.



                  v^^"peeb"<</"beepvv"((>
                  >>>>>>>>>>>//


                  If any of the bytes in the first beeper have been removed, then it instead goes to the second:



                  v^^"peb"<</"beepvv"((>
                  >>>>>>>>>>>//


                  Both beepers then lead back to the first line and the terminating @.



                  Some other miscellaneous parts:



                  The (((((([[[[[[[ is used to clear the stack when the pointer starts inside a pair of quotes and ends up pushing the whole first line to stack. It has to be so unfortunately long because the first newline can be removed to make the first line twice the size. Experimenting in generating the beep using arithmetic instead of quotes ended up longer.



                  The s and /s scattered across the lines are there to golf bytes in the top line of code by redirecting







                  share|improve this answer















                  share|improve this answer



                  share|improve this answer








                  edited 11 hours ago


























                  answered 13 hours ago









                  Jo King

                  11.4k13671




                  11.4k13671






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f169960%2fmake-a-geiger-counter%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      pylint3 and pip3 broken

                      Missing snmpget and snmpwalk

                      How to enroll fingerprints to Ubuntu 17.10 with VFS491