SHARE
TWEET

Untitled

a guest Aug 19th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !
  2.      
  3. !
  4.      
  5. !
  6.      
  7. !
  8.      
  9. !
  10.      
  11. !
  12.      
  13. !
  14.      
  15. !
  16.      
  17. !
  18.      
  19. >-[-[-<]>>+<]>.>,[.<.>,]
  20.      
  21. ('!':).(>>=(:"!"))
  22.      
  23. REREEeRErEErREeeEeeeeEREEeeREEeereeREEEEeeEReee
  24.      
  25. 33
  26. ..
  27. ",@
  28.      
  29. I / O    stack
  30.                                   0,0,0,...
  31. 3 - pop * 10 + 3                  3,0,0,0,...
  32.   - 2 neighbours, forward
  33. 3 - pop * 10 + 3                  33,0,0,0,...
  34.   - 2 neighbours, forward
  35. . - pop & print chr          !    0,0,0,...
  36.   - T junction from the side
  37.   -   TOS==0, forward
  38. , - read chr or -1       L        76,0,0,0,...   or   -1,0,0,0
  39.   - T junction from the base
  40.   -   if TOS > 0 right:
  41. " -     no-op                     76,0,0,0,...
  42.   -     2 neighbours, forward
  43. . -     pop & print chr      L    0,0,0,...
  44.   -     T junction from the side
  45.   -       TOS==0, forward
  46. 3 -       ...back to the start
  47.   -   elif TOS == -1 left:
  48. @ -     exit                                          we're out!
  49.  
  50.  
  51.   * right, but on the first occasion (from above) we hit the wall and turn
  52.     around, so that's like a left
  53.      
  54. €'!Ć
  55.      
  56. A=!
  57. ?=?!
  58.      
  59. bash-5.0$ echo -ne '1 2 3 4 5 6n129591 129012 129127 129582nn0' | gema 'A=!;?=?!'
  60. !1! !2! !3! !4! !5! !6!
  61. !1!2!9!5!9!1! !1!2!9!0!1!2! !1!2!9!1!2!7! !1!2!9!5!8!2!
  62. !
  63. !0!
  64.      
  65. Ż”!ṁż
  66.      
  67. Ż”!ṁż - Main Link: list of characters, s   e.g. "abc"
  68.  ”!   - character '!'                           '!'
  69.    ṁ  - mould like:
  70. Ż     -   s with a zero prepended              "!!!!"
  71.     ż - zip together with s                    ["!a","!b","!c",'!']
  72.       - implicit (smashing) print              !a!b!c!
  73.      
  74. rP'!
  75.      
  76. ï'! i'!
  77.      
  78. '!',,@,.&'!'
  79.      
  80. õ.ø'!ý
  81.      
  82. É'!'!
  83.      
  84. É        for each character do the next 3 operations
  85.  '!      push single character "!"
  86.         swap top elements
  87.     '!   push single character "!"
  88.      
  89. '!,#@~,
  90.      
  91. ⭆S⁺!ι!
  92.      
  93. ⪫!!⪫S!
  94.      
  95. I&#9;I =INPUT&#9;:F(END)
  96. S&#9;I LEN(1) . X REM . I&#9;:F(O)
  97. &#9;O ='!' O X&#9;:(S)
  98. O&#9;OUTPUT =O '!'
  99. &#9;O =&#9;:(I)
  100. END
  101.      
  102. _z'!R
  103.      
  104. +!s+R!
  105.      
  106. Code | Explanation
  107. ----------+-------------------------------------
  108. +!s+R!  | Code
  109. +!s+R!Q | with implicit variables filled
  110. ----------+-------------------------------------
  111.      R  Q | For each d in input, replace d with:
  112.     +R!  |  d+"!"
  113.    s      | Join results on empty string
  114. +!       | Add "!" to beginning
  115.           | Print (implicit)
  116.      
  117. 붖다따삭바사빠맣삭붛
  118. 밙봆@뫃선차희져썬뻐
  119.      
  120. BB 01 00 53 59 BA 0B 01 B4 40 CD 21 4A 4B B4 3F CD 21 85 C0 74 09 B4 40 43 41 CD 21 49 EB EE C3
  121.      
  122. IDEAL
  123. MODEL   TINY
  124.  
  125. CODESEG
  126. ORG 100H
  127.  
  128. ;; DOSBox (tested with 0.74-2) didn't seem to handle Ctrl-Z as EOF
  129. ;; so uncomment the ";;" lines to run it there.
  130. MAIN:
  131.     MOV     BX,1
  132.     PUSH    BX
  133.     POP     CX
  134.     MOV     DX,OFFSET MAIN_1+1  ; The 21H in INT 21H
  135.     MOV     AH,40H
  136. MAIN_1:
  137.     INT     21H
  138.     DEC     DX
  139.     ;;PUSH  DX
  140.     ;;POP   SI
  141. IO_LOOP:
  142.     DEC     BX
  143.     MOV     AH,3FH
  144.     INT     21H
  145.     ;;; This should work on an non-emulated PC.
  146.     ;;;AAA      ; AL=0?
  147.     TEST    AX,AX
  148.     JZ      DONE
  149.     ;;CMP   [BYTE PTR SI],1AH
  150.     ;;JZ    DONE
  151.     MOV     AH,40H
  152.     INC     BX
  153.     INC     CX
  154.     INT     21H
  155.     DEC     CX
  156.     JMP     IO_LOOP
  157. DONE:
  158.     RET
  159. ENDS
  160. END MAIN
  161.      
  162. [N
  163. S S N
  164. _Create_Label_LOOP][S S S N
  165. _Push_0][S N
  166. S _Duplicate_0][T   N
  167. T   S _Read_STDIN_as_character][T   T   T   _Retrieve_input][S N
  168. S _Duplicate_input][S S S T S S T   N
  169. _Push_9_tab][T  S S T   _Subtract][N
  170. T   S S N
  171. _If_0_jump_to_Label_END][S S S T    S S S S T   N
  172. _Push_33_!][T   N
  173. S S _Print_as_character][T  N
  174. S S _Print_as_character][N
  175. S N
  176. N
  177. _Jump_to_Label_LOOP][N
  178. S S S N
  179. _Create_Label_END][S S S T  S S S S T   N
  180. _Push_33_!][T   N
  181. S S _Print_as_character]
  182.      
  183. Start LOOP:
  184.   Character c = STDIN as character
  185.   If(c == 't'):
  186.     Call function END
  187.   Print '!'
  188.   Print c
  189.   Go to next iteration of loop
  190.  
  191. function END:
  192.   print '!'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top