[Question]
  [
Related to: [Make a ;# interpreter](https://codegolf.stackexchange.com/q/121921/2867) and [Generate ;# code](https://codegolf.stackexchange.com/q/122139/2867)
## `;#` - A Whirlwind Guide
This is a simple language with two commands. Its only data structure is an accumulator, which is initialized to 0.
1. **`;`** Increment the accumulator
2. **`#`** Calculate the value of the accumulator modulo 127, and print the corresponding ASCII character. Then, reset the accumulator to 0.
The source code may contain additional characters (printable ASCII + whitespace), but these are treated as comments and have no effect on program execution.
## Challenge
Since most computers do not come with `;#` preinstalled, it would be very useful to have a tool that can convert `;#` code into a different language. In this challenge, you shall write a program to accomplish this.
## Input
Some `;#` source code, taken via argument or STDIN. This source code may contain (comment) characters other than `;` or `#`.
## Output
Code, in the same language as your submission, which, when executed, prints/returns the same string as the original `;#` code. This resultant code may output a trailing newline after the target string, if that is more convenient for your language.
## Notes
One thing to look out for is escape sequences, such as code that prints backslashes or prints quote marks. Also look out for `;#` code that could contain things that look like keywords or commands in your language.
## Additional restrictions
All programs must terminate (I normally consider this a default, but someone asked about it so I'm stating it here).
## Examples
```
input: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#
output (python): print(";#")
input: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#
output (element): \'`
```
  
[Answer]
# [brainfuck](https://github.com/TryItOnline/tio-transpilers), 126 bytes
```
+++[->+++++<]>[->++++>+++<<],[+<++++++[-<++++>>------<]>[<]<<[>>>>>[--<--.++>]<+.-<.<<<<]>[->>-<<]>>[[-]<]>[>>++++[-->]<[<]],]
```
[Try it online!](https://tio.run/##nYxBCoBADAMf47Hb/YAhHyk9qCCI4EHw/Wu7@gBxDiUkaeZz2o71WvbWRMSUksD5yjyAFxP0JCpdkNrJJhwwJhaGao3YIVVREfQtagqaqadBPlsaxfj34q2N/xm@dG4 "brainfuck – Try It Online")
The output program will fail in the TIO implementation if the `;#` output exceeds 65536 characters. I also made a 130-byte version which outputs `[+]` instead of `<`, avoiding this problem:
```
++[------>++>+<<]>+++++<,[+<++++++[-<++++>>------<]>[<]<<[>>>>>[--<.>]<+++.---<.>.<++.--<<<<]>[->>-<<]>>[[-]<]>[>>++++[-->]<[<]],]
```
### Explanation
```
+++[->+++++<]>[->++++>+++<<]        initialize tape with 60 and 45
,[                                  for each input byte:
  +<++++++[-<++++>>------<]         subtract 35 (#) from byte
  >[<]<<[                           if byte was #
         >>>>>[--<--.++>]           output + (43) a number of times equal to accumulator
         <+.-<.<<<<                 output . (46) and < (60)
  ]
  >[->>-<<]>>                       subtract 24 from what's left of byte
  [[-]<]                            check difference and clear if nonzero
  >[                                if byte was originally 59 (;)
   >>++++[-->]<[<]                  add 4 to accumulator cell, then subtract 2 if nonzero. Since BF cells are mod 256, this creates an accumulator mod 127.
  ]
,]
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~76~~ 69 bytes
### Code
Input is surrounded by quotes.
```
for y in input('print').split("#")[:-1]:print`chr(y.count(";")%127)`,
```
[Try it online!](https://tio.run/nexus/python2#@5@WX6RQqZCZB0QFpSUa6gVFmXkl6pp6xQU5mSUaSspKmtFWuoaxVmDxhOSMIo1KveT80jygnLWSpqqhkblmgs7//0rWVALK1vQA9LFl2FtGqn3KA@X6QR0qo6mMXEuUlQA "Python 2 – TIO Nexus")
### Explanation
The first part of the output is essentially done by the input, using `input('print')`. We split the input on hashtags and discard the last element. We print the representation of **ord(y%127)**, where **y** is the number of occurrences of the semicolon. We append the `,` at the end of the print to make sure that this does not print a newline.
This would give the following Python code for the `Hello, World!`-program:
```
print'H' 'e' 'l' 'l' 'o' ',' ' ' 'W' 'o' 'r' 'l' 'd' '!'
```
Which can be [tried online](https://tio.run/nexus/python2#@19QlJlXou6hrqCeCsQ5UJwPxDpADILhUH4RVC4FiBXV//8HAA).
[Answer]
# Whitespace, 291 bytes
```
NSSTTNNSTNNSTNNSTTNNSSTSNSSNSNSTNTSTTTSSSTSSSTTNTSSTSNSNTSSSSNSSSTTSSSNTSSTNTSSSTNNSNTSNNSSSSSNSNNNSTSSNNSTSTNNSTSTNNSTSNNSTTNNSTSNNSTNNSTSTNNSTTNNSTNNSTNNSNTTNNSSSSTNNSTSSNNSTSNNSTTNNSTSNNSTSSNNSNTSNNSSTNSSSTSTSNTNSSNTNNSSSSNNSTNNSTNNSSNSSSTSSSSSNTNSSNTNNSSSTNNSTSNNSTSNNSSSNSSSTSSTNTNSSNTN
```
Replace S by space, T by tab and N by a newline.
Generating whitespace in whitespace is not the most efficient thing in the world. Generating any kind of dynamic code requires significant bit-twiddling which, in a language without bitwise operations, would cause the code size to explode. Therefore, this program does not attempt to do something smart, instead opting for just translating the source program one to one. It disassembles to the following:
```
early:
    call S
    call S
    call N
start:
    push  0
    dup
    ichr
    get
    push  35
    sub
    dup
    jz    hash
    push  24
    sub
    jz    semi
    jmp   start
hash:
    pop
    call SSS
    call TTT
    call TTT
    call T
    call N
    call T
    call S
    call TTT
    call N
    call S
    call S
    jmp   early
semi:
    call SSS
    call T
    call N
    call T
    call SSS
    jmp   start
N:
    push 10
    pchr
    ret
SSS:
    call S
    call S
S:
    push 32
    pchr
    ret
TTT:
    call T
    call T
T:
    push 9
    pchr
    ret
```
The code generated by the program looks like:
```
push  0
push  1
add
push  1
add
push  1
add
push  1
add
push  1
add
push  1
add
push  1
add
push  1
add
push  1
add
push  1
add
push  1
add
push  127
mod
pchr
push  0
push  1
add
...
```
[Answer]
# [V](https://github.com/DJMcMayhem/V), ~~19~~ ~~20~~ 28 bytes
Bugfix, broke if there was no `#` at the end
Bugfix, implemented `mod 127`
```
Í;û127}
éiA0Í#/0
ò/;
x
```
[Try it online!](https://tio.run/nexus/v#@3@41/rwbkMj81quwyszHcWkDaQP9yrri4kZcB3epG/NVcH4/781@UCZGDUA "V – TIO Nexus")
[Try Generated Code](https://tio.run/nexus/v#@58pZmopZmwqbfD/PwA "V – TIO Nexus")
Explanation:
```
Í;û127}                            ' Delete runs of 127 `;`s (mod 127)
éi                                 ' Insert an `i` in front of input
  A<C-v><esc>0<esc>                ' Append <esc>0 to input
                   Í#/<C-v><C-v>0  ' Replace all `#` with `<C-v>0`
ò                                  ' Recursively
 /;                                ' Go to the next `;`
<C-a>                              ' Increment the next number come across
```
In V, in insert mode, any ASCII character can be inserted by code by using `<C-v><Code>`. The V code replaces all `#` with `<C-v>0`, where the zero is a pseudo-accumulator per `#`. Each `#` resets the accumulator to 0 so having one per works out fine. Then the code does an increment for each semicolon found, which just increments the next number it finds, which would be the next accumulator. The `0` is appended to the end so that the instruction doesn't fail for `;`s without a following `#`.
Hexdump:
```
00000000: e969 4116 1b30 1bcd 232f 1616 300a f22f  .iA..0..#/..0../
00000010: 3b0a 7801                                ;.x.
```
[Answer]
## JavaScript (ES6), ~~101~~ 100 bytes
```
s=>`_=>'${s.replace(/[^#;]/g,``)}'.replace(/;*(#?)/g,(l,c)=>c&&String.fromCharCode(~-l.length%127))`
```
Given an input string, deletes all the unnecessary characters, then returns the source of the following function:
```
_=>'...'.replace(/;*(#?)/g,(l,c)=>c&&String.fromCharCode(~-l.length%127))
```
Where `...` represents the cleaned `;#` source. Edit: Saved 1 byte thanks to @l4m2.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~20 19 18~~ 16 bytes
-1 thanks to [Adnan](https://codegolf.stackexchange.com/users/34388/adnan)  
-2 thanks to [carusocomputing](https://codegolf.stackexchange.com/users/59376/carusocomputing)  
-2 thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen)
```
'#¡¨vy';¢ƵQ%„çJJ
```
[Try it online!](https://tio.run/##yy9OTMpM/f9fXfnQwkMryirVrQ8tOrY1UPVRw7zDy728/tfa6oXp/LemElC2pgegjy3D3jLi7FMeKDcPwrAYTVuUW5IIVAIA "05AB1E – Try It Online") (includes output of executed 05AB1E code)
```
'#¡              # Split on #
   ¨             # remove the last element
    vy           # For each...
      ';¢        #   count the number of ;s
         ƵQ%     #   Mod by 127
            „çJ  #   Push çJ
               J # Join stack and output implicitly
```
[Answer]
# [Python 2](https://docs.python.org/2/), 75 bytes
```
lambda s:"print"+`''.join(chr(x.count(';')%127)for x in s.split('#')[:-1])`
```
[Try it online!](https://tio.run/nexus/python2#S7ON@Z@TmJuUkqhQbKVUUJSZV6KknaCurpeVn5mnkZxRpFGhl5xfmleioW6trqlqaGSumZZfpFChkJmnUKxXXJCTCZRRVteMttI1jNVM@F@UWqxgq5AGVE0pULYeDEZYA/3GBQ4WBaDXuFIrUpNBjP8A "Python 2 – TIO Nexus") (includes output from executing the transpiled Python code)
Thanks to ovs for many many bytes!
## Explanation
This program transpiles the #; code by splitting on #s (`s.split('#')[:-1]`), counting the number of semicolons in each chunk mod 127 (`x.count(';')%127for x in ...`), and converting that into the respective ASCII character (`chr(...)`). That list is then concatenated (`''.join(...)`), converted into a Python representation of the string (the backticks) and inserted into a skeleton Python program for printing strings (`"print"+...`).
[Answer]
# [Haskell](https://www.haskell.org/), ~~106~~ 102 bytes
```
';'!(x:a)=x+1:a;'#'!a=0:a;_!a=a;h s="main=putStr"++(show$""++(toEnum.(`mod`127)<$>init(foldr(!)[0]s)))
```
[Try it online!](https://tio.run/##nZAxD4IwEIX3/oqjkNAGQ8DFhFo3N50cCZEmYEqEltAS@fcIamKcRN9yb3h39/JJYa5lXY@jz3yHDImgfAjiRDDf9R3Bo8mdpymYBMNxIyrF296ebIeDgBipbx6endV71TchyRtd5PF6Q7ferlKVJRddFx1xaBplhlI62tJYAxxSwOx/uUsyGMFLqyXPPvO/bn8t/L6XITRznCA0oj0CefI8KAhBUngAQuMd "Haskell – Try It Online")
**Ungolfed**
```
step ';' (x:acc) = x+1:acc
step '#' acc = 0:acc
step _ acc = acc;
semicolonHash s = toEnum . (`mod` 127) <$> init (foldr step [0] s)
toHaskell s = "main = putStr " ++ (show $ "" ++ semicolonHash s)
```
[Answer]
# [Cubically](https://github.com/aaronryank/cubically), ~~138~~ 137 bytes
```
+1/1+54@6:5+1/1+5@6/1+52@6:4/1+5@6:1/1+54@6:4/1+5@6:5+2/1+4@6(~-61/1=7&6+5/1+51=7?6{+3/1+5@6}:5+3/1+3=7?6{+52@6:5+1@6-1@6+1@6:5+2/1+4@6})
```
[Try it online!](https://tio.run/##Sy5NykxOzMmp/P9f21DfUNvUxMHMyhTCdDADkUZAARMI1wquAiZgqm0EZAFFNOp0zYCytuZqZtqmIEkg096sWtsYorAWqBLENIaIgg0F2uJgpgvEIBphUq3m///W5ANlYtQAAA)
Note: You may need to replace `&6` with `?6&` for it to work on TIO. `&6` is in the language spec, though.
### How it works
```
+1/1+54@6        Output 'R'
:5+1/1+5@6       Output '3'
/1+52@6          Output 'D'
:4/1+5@6         Output '1'
:1/1+54@6        Output 'R'
:4/1+5@6         Output '1'
:5+2/1+4@6       Output '+'
(                Loop indefinitely
  ~                Get next character
  -61/1=7&6        If input is -1 (EOF), exit program
  +5/1+51=7?6{     If input is `;`
    +3/1+5@6         Output '0'
  }                End if
  :5+3/1+3=7?6{   If input is '#'
    +52@6            Output '@'
    :5+1@6           Output '6'
    -1@6             Output '-'
    +1@6             Output '6'
    :5+2/1+4@6       Output '+'
  }                End if
)                End loop
```
Output program:
```
R3D1R1           Set top face to 1
+00...           Add top face to notepad, aka increment notepad
@6               Output notepad as character
-6               Set notepad to 0
...
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 33 bytes
```
{";"∧"+₁"|"#"∧"%₁₂₇g~ạw0"}ˢ;"0"↔c
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/pfXa6kUFKUmFdckJmTWqxQkq@gVG7/qG3Do6amh7s6ax9unfC/Wsla6VHHciXtR02NSjVKymCOKpADVPOoqT297uGuheUGSrWnF1krGSg9apuS/P9/tJI1@UCZGDVKOkrUUkU9Vw0VW4a9ZaTapzxQrh/UoTKaysi1RFkpFgA "Brachylog – Try It Online")
I felt too tired to explain this two years ago, but Razetime reminded me.
```
                           ;"0"↔c    Prepend a 0 to
{                        }ˢ          each element of the input
     "+₁"                            mapped to +₁
 ";"∧                                if it's a semicolon,
         |"#"                        if it's a hash
             ∧"%₁₂₇g~ạw0"            %₁₂₇g~ạw0,
                          ˢ          or nothing otherwise.
      +₁                             add 1
              %₁₂₇                   mod 127,
                  g~ạ                convert from codepoint to character,
                     w               print,
                      0              start over from 0
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~25 24 16~~ 15 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
-1 thanks to [caird coinheringaahing](https://codegolf.stackexchange.com/users/66833/caird-coinheringaahing)! (Use of `p` in place of `;€`)
```
ṣ”#Ṗċ€”;%127p”Ọ
```
A full program printing equivalent Jelly code (as a monadic link it returns a list of lists of mixed types).
The first example is at **[Try it online!](https://tio.run/##y0rNyan8///hzsWPGuYqP9w57Uj3o6Y1QLa1qqGReQGQ8XB3z////60JgOT83NzUvBI8KpStCYMQfxd/K@XiktK0NAA "Jelly – Try It Online")** which yields [this program](https://tio.run/nexus/jelly#@29q@XB3j7EpkPj/HwA "Jelly – Try It Online").
### How?
Counts up the `;`s in each run between `#`s takes each modulo 127 and appends a cast to ordinal instruction, the monadic `Ọ` atom, after each.
Jelly implicitly pipes each value to STDOUT as it runs through a program like that i.e. `72Ọ101Ọ108Ọ108Ọ111Ọ44Ọ32Ọ119Ọ111Ọ114Ọ108Ọ100Ọ33Ọ` would print `Hello, world!`.
```
ṣ”#Ṗċ€”;%127p”Ọ - Main link: list of characters
 ”#             - literal '#'
ṣ               - split the result at #s
   Ṗ            - pop (remove the last result, list of trailing non-# characters)
      ”;        - literal ';'
    ċ€          - count for €ach
        %127    - modulo 127 (vectorises)
             ”Ọ - literal 'Ọ' (Jelly's cast to ordinal monadic atom)
            p   - Cartesian product - making a list of lists like [[72,'Ọ'],[101,'Ọ'],...]
                - implicit print (this smashes, printing something like: 72Ọ101Ọ...)
```
A note regarding input: Jelly can take string input in Python format (it will first attempt to evaluate input as Python code). The empty program may be input as `""`, and the hash-only programs as `"#"`, `"##"`, etc. Escape sequences are required for input containing backslashes and quotes.
[Answer]
# C, ~~98~~ ~~96~~ ~~99~~ ~~98~~ 97 bytes
+3 bytes because I forgot C isn't interpreted :(
```
c,a;f(){printf("f(){puts(\"");for(;~c;c=getchar())c==59?a++:c==35?a=!printf(&a):a;puts("\");}");}
```
---
Running with:
```
echo ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#" | ./a.out
```
Will print:
```
f(){puts("Hello, World!");}
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 26 bytes
```
”‘x
f”;L%127Ç;“Ọø”
ṣ”#Ç€ṙ-
```
[Try it online!](https://tio.run/nexus/jelly#@/@oYe6jhhkVXGlAhrWPqqGR@eF260cNcx7u7jm8AyjG9XDnYiClfLj9UdOahztn6v7//98aDpLzc3NT80qsKQHKSOyAAGd3haD85OxiRYqMBAA "Jelly – TIO Nexus")
[And try that Jelly code here!](https://tio.run/nexus/jelly#@/9wd8/hHY8aZgw/NMx99v8/AA "Jelly – TIO Nexus")
```
ṣ”#Ç€ṙ-      Main link, input is a string of ";;;;;;#lala;;;;;;;;;#"
ṣ”#          Split input on char #
   Ç€        Call helper link 1 for each segment
     ṙ-      Rotate returns 1 to the right (SPLIT introduces an empty element which is moved up front)
f”;L%127Ç;“Ọø”  Helper link 1, determines the number of increments
f”;             Throw out all but semicolons
   L%127        Take the count mod 127
        Ç       Call helper 2
         ;“Ọø”  Add a Jelly link that prints characters and splits print statements
”‘x             Helper 2, receives the count of ;'s
”‘              Return the character ‘ (Jelly's increment command
  x             Once for each ; in the input
```
The Jelly output becomes code like `Ọø‘‘‘‘‘‘‘‘‘‘‘‘‘Ọø‘‘‘‘‘‘‘‘‘‘Ọø`, which prints chr(13)+chr(10)
[Answer]
# PHP, 72 bytes
```
for(;~$c=$argn[$i++];)echo[Z=>'$n++;',B=>'echo~$n=~chr($n%127);'][a^$c];
```
[Answer]
# ><>, ~~106~~ ~~81~~ 77 bytes
This is my first golf in ><> (fish)! A pretty interesting language I have to say. A lot of fun!
```
0n01.
>i:1+?!v:";"=?v"#"=?v
^ ;o";"<   .37<
^oo"1+"
^oooooooo'"~"1+%o0' <
```
[Answer]
# C# 169 Bytes
Golfed:
```
class P{static int Main(string[] args){var r="Console.Write(";foreach(var y in args[0].Split('#')){r+=(char)(-1+y.Split(';').Length%127);}System.Console.Write(r+");");}}
```
Human readable version:
```
class P
{
    static int Main(string[] args)
    {
        var r="Console.Write(\"";
        foreach (var y in args[0].Split('#'))
        {
            r +=(char)(-1+y.Split(';').Length% 127);
        }
        System.Console.Write(r+"\");");
    }
}
```
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf), 17 bytes
```
⌡(¶{gÉ'8=£♣(%$''\
```
[Try it online!](https://tio.run/##y00syUjPz0n7//9Rz0KNQ9uq0w93qlvYHlr8aOZiDVUVdfWY///VrckHysSoUedSJ0tVcn5ubmpeCVbF/wE "MathGolf – Try It Online")
## Explanation
```
⌡                      decrement twice
 (                     decrement
                       this transforms ";;;#;;#" -> "888 88 "
  ¶                    split string on spaces
   {                   foreach...
    gÉ                 filter using next 3 characters
      '8               push single character "8"
        =              pop(a, b), push(a==b)
                       this filters out all non-";"
         £             length of array/string with pop
          ♣            push 128
           (           decrement
            %          modulo
             $         pop(a), push ord(a) or char(a) (gets character with code)
              ''       push single character "'"
                \      swap top elements
```
Since any character can be put on the stack (and thus the output) using `'<char>`, this will output a sequence of such code blocks.
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~32~~ 28 bytes
```
35lF4$Yb"@g59=z]xv127\!&D99h
```
[Try it online!](https://tio.run/##y00syfn/39g0x81EJTJJySHd1NK2KraizNDIPEZRzcXSMuP/f3VlawhQVlZOTEoGMYBYHQA "MATL – Try It Online")
Completely different approach based on `strsplit` rather than an automaton-type program.
```
      Yb % strsplit
    4$   %  with 4 inputs, namely:
35       %   Split on '#'
  lF     %   Do not (F) collapse delimiters (l).
         %   And of course the implicit program input.
"@g    ] % Loop over strings, convert each to a normal char array
   59=z  % How many equal to 59 ';'?
xv!127\  % Delete last element, concatenate and flip to horizontal, mod 127
&D       % Convert to MATL representation
  99h    % Append a 'c' to output ASCII.
```
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal) `Ṫ`, 18 bytes
```
\#€Ṫƛ\;O₇‹%\C+\₴+,
```
Good, but definitely could be improved.
Outputs the codepoint, followed by a C to convert to a character, and then a print symbol.
[Try it Online!](http://lyxal.pythonanywhere.com?flags=%E1%B9%AA&code=%5C%23%E2%82%AC%E1%B9%AA%C6%9B%5C%3BO%E2%82%87%E2%80%B9%25%5CC%2B%5C%E2%82%B4%2B%2C&inputs=%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3Baaaaaaaaaaaaaaaaaaaaaaa%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%23%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%23&header=&footer=)
[Answer]
# [Nim](http://nim-lang.org/), 97 bytes
```
var a=0
for c in stdin.readAll:
 if c==';':a+=1
 if c=='#':echo "stdout.write chr ",a mod 127;a=0
```
[Try it online!](https://tio.run/##y8vM/f@/LLFIIdHWgCstv0ghWSEzT6G4JCUzT68oNTHFMSfHikshM00h2dZW3VrdKlHb1hDOV1a3Sk3OyFdQAqrPLy3RKy/KLElVSM4oUlDSSVTIzU9RMDQytwaa/P@/NflAmRg1AA "Nim – Try It Online")
[Example resulting code](https://tio.run/##y8vM/f@/uCQlv7REr7wosyRVITmjSMHUkgtDzNiU6/9/AA "Nim – Try It Online")
[Answer]
# [Thunno 2](https://github.com/Thunno/Thunno2), 16 [bytes](https://github.com/Thunno/Thunno2/blob/main/docs/codepage.md)
```
';'⁺Ṇ'#"ṇȷ%C¢"WṆ
```
[Try it online!](https://Not-Thonnu.github.io/run#aGVhZGVyPSZjb2RlPSclM0InJUUyJTgxJUJBJUUxJUI5JTg2JyUyMyUyMiVFMSVCOSU4NyVDOCVCNyUyNUMlQzIlQTIlMjJXJUUxJUI5JTg2JmZvb3Rlcj0maW5wdXQ9JTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTIzJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTNCJTIzJmZsYWdzPQ==)
or [verify the resulting Thunno 2 code](https://Not-Thonnu.github.io/run#aGVhZGVyPSZjb2RlPSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMiU4MSVCQSVFMSVCOSU4NyVDOCVCNyUyNUMlQzIlQTIlRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTIlODElQkElRTElQjklODclQzglQjclMjVDJUMyJUEyJmZvb3Rlcj0maW5wdXQ9JmZsYWdzPQ==)
#### Explanation
```
';'⁺Ṇ'#"ṇȷ%C¢"WṆ  '# Implicit input
';'⁺Ṇ              # Transliterate ";" -> "⁺"
   ⁺               #   Increment top of stack
                   #   (which starts at 0)
     '#"ṇȷ%C¢"WṆ  '# Transliterate "#" -> "ṇȷ%C¢"
        ṇȷ         #   Push compressed integer 127
          %        #   And modulo top of stack by that
           C       #   Cast to character using ASCII value
            ¢      #   And print it without a newline
                   # Implicit output
```
[Answer]
# [ARBLE](https://github.com/TehFlaminTaco/ARBLE), 57 bytes
```
"print%q"%gsub(a,".-#",#char(len(gsub(e,"[^;]",""))%128))
```
## Explained
```
"print%q"%gsub(a,".-#",#char(len(gsub(e,"[^;]",""))%128))
          gsub(a,".-#",                                 )  -- Replace all groups of characters followed by a # in the input with...
                                 gsub(e,"[^;]","")         -- Remove all non-; characters, removing comments
                             len(                 )        -- Effectively count all ; in the group
                        char(                      %128)   -- Modulo 128, convert to a char.
                       #                                   -- As a function. Effectively runs the ;# code.
"print%q"%                                                 -- returns a string consisting of print followed by the string-formatted ;# code.
```
[Try it online!](https://tio.run/##SyxKykn9/1@poCgzr0S1UEk1vbg0SSNRR0lPV1lJRzk5I7FIIyc1TwMsnKqjFB1nHauko6SkqalqaGShqfkfqNeafKBMjBolAA "ARBLE – Try It Online")
[Answer]
# [Actually](https://github.com/Mego/Seriously), 25 bytes
```
'#@s⌠';@c7╙D@%⌡MdX$"♂cΣ"o
```
[Try it online!](https://tio.run/nexus/actually#@6@u7FD8qGeBurVDsvmjqTNdHFQf9Sz0TYlQUXo0syn53GKl/P/WxyY5/FeyphJQtqYHoI8tw94yUu1THijXD@pQGU1l5FqSqKwEAA "Actually – TIO Nexus") (includes output from executing the transpiled Actually code)
Explanation:
```
'#@s⌠';@c7╙D@%⌡MdX$"♂cΣ"o
'#@s                       split on "#"
    ⌠';@c7╙D@%⌡M           for each chunk:
     ';@c                    count ";"s
         7╙D@%               mod by 127 (2**7-1)
                dX         discard last value
                  $        stringify
                   "♂cΣ"o  append "♂cΣ":
                    ♂c       convert each value to an ASCII character
                      Σ      concatenate
```
[Answer]
# [shortC](//github.com/aaronryank/shortC), 48 bytes
```
c,a;AR"AP\"");O;~c;c=G)c==59?a++:c==35?a=!R&a):a
```
[Answer]
# Fourier, 32 bytes
```
$(I~S{59}{`^`}S{35}{`%127a0`}&i)
```
[**Try it on FourIDE!**](https://beta-decay.github.io/editor/?code=JChJflN7NTl9e2BeYH1TezM1fXtgJTEyN2EwYH0maSk)
This was quite an easy challenge since Fourier is *basically* a superset of ;#:
```
;# command > Fourier equivalent
; > ^ (Increment the accumulator)
# > %127a0 (Modulo accumulator by 127, output corresponding code point and set accumulator to zero)
```
[Answer]
## CJam, 14 bytes
```
q'#/);';fe=:c`
```
Explanation:
```
q               e# Read input
 '#/            e# Split on '#'
    );          e# Delete last element
      ';fe=     e# Count occurrences of ';' in each
           :c   e# Convert each to character (code point)
             `  e# Escape
```
[Answer]
# APL, 31 bytes
```
{⍕'⎕UCS',⌽127|+/¨';'=⍵⊂⍨'#'=⍵}⌽
```
Output:
```
      ({⍕'⎕UCS',⌽127|+/¨';'=⍵⊂⍨'#'=⍵}⌽) ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#'
⎕UCS 59 35
      ⍝ evaluate the output
      ⍎({⍕'⎕UCS',⌽127|+/¨';'=⍵⊂⍨'#'=⍵}⌽) ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;#'
;#
```
Explanation:
* `⌽`: reverse the input
* `{`...`}`: pass it to this function:
	+ `⍵⊂⍨'#'=⍵`: partition at each `#` in the string (from the beginning, which is why it had to be reversed first)
	+ `+/¨';'=`: count the `;`s in each partition
	+ `127|`: modulo 127
	+ `⌽`: reverse it again
	+ `'⎕UCS',`: prepend the string `⎕UCS`, which is the Unicode function.
	+ `⍕`: string representation
[Answer]
# [Ruby](https://www.ruby-lang.org/), 47+1=48 bytes
```
$_=gsub(/.*?#/){"$><<#{$&.count(?;)%127}.chr;"}
```
+1 byte for `-p`.
[Try it online!](https://tio.run/##KypNqvz/XyXeNr24NElDX0/LXllfs1pJxc7GRrlaRU0vOb80r0TD3lpT1dDIvFYvOaPIWqn2/3/rQQXS8vNJUa4MpZOt861zgTDVOs@6BL9S8sG//IKSzPy84v@6BQA "Ruby – Try It Online")
-30 bytes thanks to [@manatwork](https://codegolf.stackexchange.com/users/4198/manatwork)!
[Answer]
# Pyth, ~~25~~ ~~23~~ 24 bytes
```
j\\+"jk["mC%/d\;127Pcw\#
```
*+1 bytes thanks to @FryAmTheEggman*
[Try it!](https://pyth.herokuapp.com/?code=j%5C%5C%2B%22jk%5B%22mC%25%2Fd%5C%3B127Pcw%5C%23&input=%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%23&test_suite=1&test_suite_input=%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%23%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%23%0A%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%23&debug=0)
handles characters that have to be escaped by only using 1-char-strings.
Sample outputs:
```
jk[\"
jk[\H\e\l\l\o\,\ \W\o\r\l\d\!
```
Uses [my ;# interpreter](https://codegolf.stackexchange.com/a/122025/56557).
[Answer]
# C, 150 bytes
```
#include<stdio.h>
c;n=0;main(){puts("#include<stdio.h>\nmain(){");while(~(c=getchar()))c-35?c-59?:n++:(printf("putchar(%d);",n%127)&(n=0));puts("}");}
```
Expanded:
```
#include<stdio.h>
c;
n=0;
main(){
        puts("#include<stdio.h>\nmain(){");
        while( ~(
            c=getchar()
        ))
                c-35?
                        c-59?
                                :
                                n++
                        :
                        ( printf("putchar(%d);",n%127)
                        &(n=0))
                ;
        puts("}");
}
```
It's a complete program that (should) terminate, ignore comments and produce always correct output code.
I assume EOF=-1
Tested on SystemResque-Cd 4.9.6, compiled with gcc 4.9.4
]