~kylep/visual-cell-lang

8967a588c85a488b4f7f6e120e07acb1094456b4 — Kyle Perik 1 year, 7 months ago 8afdd9c
Fix example code
1 files changed, 1 insertions(+), 1 deletions(-)

M examples/snake.json
M examples/snake.json => examples/snake.json +1 -1
@@ 1,1 1,1 @@
{"boxes":[{"width":5,"height":3,"inputs":{},"outputs":["t"],"clicked":false,"label":"","pos":{"x":16,"y":10},"type":"tick","js":true,"data":{}},{"width":5,"height":3,"inputs":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#tail","lst","#direction","get","vecadd","dup","#p","out","#tail","que","#tail","len","equ","#10","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}},"outputs":["p","c"],"clicked":false,"label":"","pos":{"x":13,"y":16},"type":"snake3","init":{"codes":["#1","int","#0","int","vec","#direction","kep","#tail","arr","#0","int","#0","int","vec","#tail","que"],"branches":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#tail","lst","#direction","get","vecadd","dup","#p","out","#tail","que","#tail","len","equ","#10","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}}},"code":"snake3\nd i -> p c\n\n#1 int #0 int vec\n#direction kep\n\n#tail arr\n#0 int #0 int vec\n#tail que\n\ndef d:\n  val #direction kep\n  \n\ndef i:\n  #tail lst #direction get vecadd\n  dup #p out\n  #tail que\n  #tail len equ #10\n  #pop jcn\n  def pop:\n    #tail pop #c out\n  ","js":false,"data":{"direction":{"x":1,"y":0},"tail":[{"x":106,"y":0}]},"triggered":false,"failed":false},{"width":5,"height":3,"inputs":{},"outputs":["c"],"clicked":false,"label":"","pos":{"x":8,"y":5},"type":"keyboard","js":true,"data":{}},{"width":5,"height":3,"inputs":{},"outputs":["v"],"clicked":false,"label":"","pos":{"x":9,"y":10},"type":"wasdDir2","data":{},"js":true,"triggered":false},{"width":20,"height":20,"inputs":{},"outputs":[],"clicked":false,"label":"","pos":{"x":5,"y":22},"type":"screen","js":true,"data":{},"triggered":false}],"connections":[{"startOutput":"t","endInput":"i","start":{"x":18.5,"y":13},"end":{"x":16.333333333333332,"y":16},"startBoxIndex":0,"endBoxIndex":1},{"startOutput":"c","endInput":"c","start":{"x":10.5,"y":8},"end":{"x":11.5,"y":10},"startBoxIndex":2,"endBoxIndex":3},{"startOutput":"v","endInput":"d","start":{"x":11.5,"y":13},"end":{"x":14.666666666666666,"y":16},"startBoxIndex":3,"endBoxIndex":1},{"startOutput":"p","endInput":"p","start":{"x":14.666666666666666,"y":19},"end":{"x":11.666666666666666,"y":22},"startBoxIndex":1,"endBoxIndex":4},{"startOutput":"c","endInput":"c","start":{"x":16.333333333333332,"y":19},"end":{"x":18.333333333333332,"y":22},"startBoxIndex":1,"endBoxIndex":4}],"customDefinitions":{"test":{"init":{"codes":["#0","int","#counter","kep","#sin","arr","#0.000","flt","#sin","que","#0.309","flt","#sin","que","#0.588","flt","#sin","que","#0.809","flt","#sin","que","#0.951","flt","#sin","que","#1.000","flt","#sin","que","#0.951","flt","#sin","que","#0.809","flt","#sin","que","#0.588","flt","#sin","que","#0.309","flt","#sin","que","#0.000","flt","#sin","que","#-0.309","flt","#sin","que","#-0.588","flt","#sin","que","#-0.809","flt","#sin","que","#-0.951","flt","#sin","que","#-1.000","flt","#sin","que","#-0.951","flt","#sin","que","#-0.809","flt","#sin","que","#-0.588","flt","#sin","que","#-0.309","flt","#sin","que"],"branches":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}}},"inputs":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}},"outputs":["p"],"code":"test\ni -> p\n\n#0 int #counter kep\n\n#sin arr #0.000 flt #sin que #0.309 flt #sin que #0.588 flt #sin que #0.809 flt #sin que #0.951 flt #sin que #1.000 flt #sin que #0.951 flt #sin que #0.809 flt #sin que #0.588 flt #sin que #0.309 flt #sin que #0.000 flt #sin que #-0.309 flt #sin que #-0.588 flt #sin que #-0.809 flt #sin que #-0.951 flt #sin que #-1.000 flt #sin que #-0.951 flt #sin que #-0.809 flt #sin que #-0.588 flt #sin que #-0.309 flt #sin que\n\ndef i:\n  #counter get\n  #.1 flt add\n  #20 int mod\n  dup #counter kep\n  dup #sinat jmp\n  swp #5 int add\n  #sinat jmp\n  vec\n  #20 int\n  vecmul\n  #p out\n  \n  def sinat:\n    dup dup\n    #1 int add\n    flr #20 int mod\n    #sin at\n    swp #1 int mod mul\n    \n    swp dup\n    flr #20 int mod\n    #sin at\n    swp #1 int mod\n    #1 int swp sub mul\n    add\n  \n"},"delay":{"init":{"codes":["#tail","arr","#30","int","#number","kep"],"branches":{"v":{"codes":["val","#tail","que","#tail","len","#number","get","gth","#pop","jcn","#tail","len","#number","get","gth","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#v","out"],"branches":{}}}},"n":{"codes":["val","#number","kep"],"branches":{}}}},"inputs":{"v":{"codes":["val","#tail","que","#tail","len","#number","get","gth","#pop","jcn","#tail","len","#number","get","gth","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#v","out"],"branches":{}}}},"n":{"codes":["val","#number","kep"],"branches":{}}},"outputs":["v"],"code":"delay\nv n -> v\n\n#tail arr\n#30 int #number kep\n\ndef v:\n  val #tail que\n  #tail len #number get gth\n  #pop jcn\n  #tail len #number get gth\n  #pop jcn\n  def pop:\n    #tail pop #v out\n  \n\ndef n:\n  val #number kep"},"walkCircle":{"init":{"codes":["#0","int","#counter","kep","#sin","arr","#0.000","flt","#sin","que","#0.309","flt","#sin","que","#0.588","flt","#sin","que","#0.809","flt","#sin","que","#0.951","flt","#sin","que","#1.000","flt","#sin","que","#0.951","flt","#sin","que","#0.809","flt","#sin","que","#0.588","flt","#sin","que","#0.309","flt","#sin","que","#0.000","flt","#sin","que","#-0.309","flt","#sin","que","#-0.588","flt","#sin","que","#-0.809","flt","#sin","que","#-0.951","flt","#sin","que","#-1.000","flt","#sin","que","#-0.951","flt","#sin","que","#-0.809","flt","#sin","que","#-0.588","flt","#sin","que","#-0.309","flt","#sin","que"],"branches":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}}},"inputs":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}},"outputs":["p"],"code":"walkCircle\ni -> p\n\n#0 int #counter kep\n\n#sin arr #0.000 flt #sin que #0.309 flt #sin que #0.588 flt #sin que #0.809 flt #sin que #0.951 flt #sin que #1.000 flt #sin que #0.951 flt #sin que #0.809 flt #sin que #0.588 flt #sin que #0.309 flt #sin que #0.000 flt #sin que #-0.309 flt #sin que #-0.588 flt #sin que #-0.809 flt #sin que #-0.951 flt #sin que #-1.000 flt #sin que #-0.951 flt #sin que #-0.809 flt #sin que #-0.588 flt #sin que #-0.309 flt #sin que\n\ndef i:\n  #counter get\n  #.1 flt add\n  #20 int mod\n  dup #counter kep\n  dup #sinat jmp\n  swp #5 int add\n  #sinat jmp\n  vec\n  #20 int\n  vecmul\n  #p out\n  \n  def sinat:\n    dup dup\n    #1 int add\n    flr #20 int mod\n    #sin at\n    swp #1 int mod mul\n    \n    swp dup\n    flr #20 int mod\n    #sin at\n    swp #1 int mod\n    #1 int swp sub mul\n    add"},"snake":{"init":{"codes":["#0","int","#1","int","vec","#direction","kep","#tail","arr","#0","int","#1","int","vec","#tail","que"],"branches":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#direction","get","#tail","lst","vecadd","dup","#tail","que","#p","out","#11","int","#tail","len","equ","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}}},"inputs":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#direction","get","#tail","lst","vecadd","dup","#tail","que","#p","out","#11","int","#tail","len","equ","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}},"outputs":["p","c"],"code":"snake\nd i -> p c\n\n#0 int #1 int vec\n#direction kep\n\n#tail arr\n#0 int #1 int vec\n#tail que\n\ndef d:\n  val #direction kep\n\ndef i:\n  #direction get #tail lst vecadd\n  dup #tail que\n  #p out\n  #11 int #tail len equ #pop jcn\n  def pop:\n    #tail pop #c out"},"snake2":{"init":{"codes":[],"branches":{}},"inputs":{"v":"","i":""},"outputs":["p","c"],"code":"snake2\nv i -> p c"},"snake3":{"init":{"codes":["#1","int","#0","int","vec","#direction","kep","#tail","arr","#0","int","#0","int","vec","#tail","que"],"branches":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#tail","lst","#direction","get","vecadd","dup","#p","out","#tail","que","#tail","len","equ","#10","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}}},"inputs":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#tail","lst","#direction","get","vecadd","dup","#p","out","#tail","que","#tail","len","equ","#10","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}},"outputs":["p","c"],"code":"snake3\nd i -> p c\n\n#1 int #0 int vec\n#direction kep\n\n#tail arr\n#0 int #0 int vec\n#tail que\n\ndef d:\n  val #direction kep\n  \n\ndef i:\n  #tail lst #direction get vecadd\n  dup #p out\n  #tail que\n  #tail len equ #10\n  #pop jcn\n  def pop:\n    #tail pop #c out\n  "}}}
{"boxes":[{"width":5,"height":3,"inputs":{},"outputs":["t"],"clicked":false,"label":"","pos":{"x":16,"y":10},"type":"tick","js":true,"data":{}},{"width":5,"height":3,"inputs":{},"outputs":["c"],"clicked":false,"label":"","pos":{"x":8,"y":5},"type":"keyboard","js":true,"data":{}},{"width":5,"height":3,"inputs":{},"outputs":["v"],"clicked":false,"label":"","pos":{"x":9,"y":10},"type":"wasdDir2","data":{},"js":true,"triggered":false},{"width":15,"height":12,"inputs":{},"outputs":["m"],"clicked":false,"label":"","pos":{"x":9,"y":21},"type":"screen","js":true,"data":{},"triggered":true},{"width":5,"height":3,"inputs":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#direction","get","#tail","lst","vecadd","dup","#tail","que","#p","out","#11","int","#tail","len","equ","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}},"outputs":["p","c"],"clicked":false,"label":"","pos":{"x":14,"y":15},"type":"snake","init":{"codes":["#0","int","#1","int","vec","#direction","kep","#tail","arr","#0","int","#1","int","vec","#tail","que"],"branches":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#direction","get","#tail","lst","vecadd","dup","#tail","que","#p","out","#11","int","#tail","len","equ","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}}},"code":"snake\nd i -> p c\n\n#0 int #1 int vec\n#direction kep\n\n#tail arr\n#0 int #1 int vec\n#tail que\n\ndef d:\n  val #direction kep\n\ndef i:\n  #direction get #tail lst vecadd\n  dup #tail que\n  #p out\n  #11 int #tail len equ\n  #pop jcn\n  def pop:\n    #tail pop #c out","js":false,"data":{"direction":{"x":0,"y":-1},"tail":[{"x":172,"y":554},{"x":172,"y":553},{"x":172,"y":552},{"x":172,"y":551},{"x":172,"y":550},{"x":172,"y":549},{"x":172,"y":548},{"x":172,"y":547},{"x":172,"y":546},{"x":172,"y":545}]},"triggered":true}],"connections":[{"startOutput":"c","endInput":"c","start":{"x":10.5,"y":8},"end":{"x":11.5,"y":10},"startBoxIndex":1,"endBoxIndex":2},{"startOutput":"v","endInput":"d","start":{"x":11.5,"y":13},"end":{"x":15.666666666666666,"y":15},"startBoxIndex":2,"endBoxIndex":4},{"startOutput":"t","endInput":"i","start":{"x":18.5,"y":13},"end":{"x":17.333333333333332,"y":15},"startBoxIndex":0,"endBoxIndex":4},{"startOutput":"p","endInput":"p","start":{"x":15.666666666666666,"y":18},"end":{"x":14,"y":21},"startBoxIndex":4,"endBoxIndex":3},{"startOutput":"c","endInput":"c","start":{"x":17.333333333333332,"y":18},"end":{"x":19,"y":21},"startBoxIndex":4,"endBoxIndex":3}],"customDefinitions":{"test":{"init":{"codes":["#0","int","#counter","kep","#sin","arr","#0.000","flt","#sin","que","#0.309","flt","#sin","que","#0.588","flt","#sin","que","#0.809","flt","#sin","que","#0.951","flt","#sin","que","#1.000","flt","#sin","que","#0.951","flt","#sin","que","#0.809","flt","#sin","que","#0.588","flt","#sin","que","#0.309","flt","#sin","que","#0.000","flt","#sin","que","#-0.309","flt","#sin","que","#-0.588","flt","#sin","que","#-0.809","flt","#sin","que","#-0.951","flt","#sin","que","#-1.000","flt","#sin","que","#-0.951","flt","#sin","que","#-0.809","flt","#sin","que","#-0.588","flt","#sin","que","#-0.309","flt","#sin","que"],"branches":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}}},"inputs":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}},"outputs":["p"],"code":"test\ni -> p\n\n#0 int #counter kep\n\n#sin arr #0.000 flt #sin que #0.309 flt #sin que #0.588 flt #sin que #0.809 flt #sin que #0.951 flt #sin que #1.000 flt #sin que #0.951 flt #sin que #0.809 flt #sin que #0.588 flt #sin que #0.309 flt #sin que #0.000 flt #sin que #-0.309 flt #sin que #-0.588 flt #sin que #-0.809 flt #sin que #-0.951 flt #sin que #-1.000 flt #sin que #-0.951 flt #sin que #-0.809 flt #sin que #-0.588 flt #sin que #-0.309 flt #sin que\n\ndef i:\n  #counter get\n  #.1 flt add\n  #20 int mod\n  dup #counter kep\n  dup #sinat jmp\n  swp #5 int add\n  #sinat jmp\n  vec\n  #20 int\n  vecmul\n  #p out\n  \n  def sinat:\n    dup dup\n    #1 int add\n    flr #20 int mod\n    #sin at\n    swp #1 int mod mul\n    \n    swp dup\n    flr #20 int mod\n    #sin at\n    swp #1 int mod\n    #1 int swp sub mul\n    add\n  \n"},"delay":{"init":{"codes":["#tail","arr","#30","int","#number","kep"],"branches":{"v":{"codes":["val","#tail","que","#tail","len","#number","get","gth","#pop","jcn","#tail","len","#number","get","gth","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#v","out"],"branches":{}}}},"n":{"codes":["val","#number","kep"],"branches":{}}}},"inputs":{"v":{"codes":["val","#tail","que","#tail","len","#number","get","gth","#pop","jcn","#tail","len","#number","get","gth","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#v","out"],"branches":{}}}},"n":{"codes":["val","#number","kep"],"branches":{}}},"outputs":["v"],"code":"delay\nv n -> v\n\n#tail arr\n#30 int #number kep\n\ndef v:\n  val #tail que\n  #tail len #number get gth\n  #pop jcn\n  #tail len #number get gth\n  #pop jcn\n  def pop:\n    #tail pop #v out\n  \n\ndef n:\n  val #number kep"},"walkCircle":{"init":{"codes":["#0","int","#counter","kep","#sin","arr","#0.000","flt","#sin","que","#0.309","flt","#sin","que","#0.588","flt","#sin","que","#0.809","flt","#sin","que","#0.951","flt","#sin","que","#1.000","flt","#sin","que","#0.951","flt","#sin","que","#0.809","flt","#sin","que","#0.588","flt","#sin","que","#0.309","flt","#sin","que","#0.000","flt","#sin","que","#-0.309","flt","#sin","que","#-0.588","flt","#sin","que","#-0.809","flt","#sin","que","#-0.951","flt","#sin","que","#-1.000","flt","#sin","que","#-0.951","flt","#sin","que","#-0.809","flt","#sin","que","#-0.588","flt","#sin","que","#-0.309","flt","#sin","que"],"branches":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}}},"inputs":{"i":{"codes":["#counter","get","#.1","flt","add","#20","int","mod","dup","#counter","kep","dup","#sinat","jmp","swp","#5","int","add","#sinat","jmp","vec","#20","int","vecmul","#p","out"],"branches":{"sinat":{"codes":["dup","dup","#1","int","add","flr","#20","int","mod","#sin","at","swp","#1","int","mod","mul","swp","dup","flr","#20","int","mod","#sin","at","swp","#1","int","mod","#1","int","swp","sub","mul","add"],"branches":{}}}}},"outputs":["p"],"code":"walkCircle\ni -> p\n\n#0 int #counter kep\n\n#sin arr #0.000 flt #sin que #0.309 flt #sin que #0.588 flt #sin que #0.809 flt #sin que #0.951 flt #sin que #1.000 flt #sin que #0.951 flt #sin que #0.809 flt #sin que #0.588 flt #sin que #0.309 flt #sin que #0.000 flt #sin que #-0.309 flt #sin que #-0.588 flt #sin que #-0.809 flt #sin que #-0.951 flt #sin que #-1.000 flt #sin que #-0.951 flt #sin que #-0.809 flt #sin que #-0.588 flt #sin que #-0.309 flt #sin que\n\ndef i:\n  #counter get\n  #.1 flt add\n  #20 int mod\n  dup #counter kep\n  dup #sinat jmp\n  swp #5 int add\n  #sinat jmp\n  vec\n  #20 int\n  vecmul\n  #p out\n  \n  def sinat:\n    dup dup\n    #1 int add\n    flr #20 int mod\n    #sin at\n    swp #1 int mod mul\n    \n    swp dup\n    flr #20 int mod\n    #sin at\n    swp #1 int mod\n    #1 int swp sub mul\n    add"},"snake":{"init":{"codes":["#0","int","#1","int","vec","#direction","kep","#tail","arr","#0","int","#1","int","vec","#tail","que"],"branches":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#direction","get","#tail","lst","vecadd","dup","#tail","que","#p","out","#11","int","#tail","len","equ","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}}},"inputs":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#direction","get","#tail","lst","vecadd","dup","#tail","que","#p","out","#11","int","#tail","len","equ","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}},"outputs":["p","c"],"code":"snake\nd i -> p c\n\n#0 int #1 int vec\n#direction kep\n\n#tail arr\n#0 int #1 int vec\n#tail que\n\ndef d:\n  val #direction kep\n\ndef i:\n  #direction get #tail lst vecadd\n  dup #tail que\n  #p out\n  #11 int #tail len equ\n  #pop jcn\n  def pop:\n    #tail pop #c out"},"snake2":{"init":{"codes":[],"branches":{}},"inputs":{"v":"","i":""},"outputs":["p","c"],"code":"snake2\nv i -> p c"},"snake3":{"init":{"codes":["#1","int","#0","int","vec","#direction","kep","#tail","arr","#0","int","#0","int","vec","#tail","que"],"branches":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#tail","lst","#direction","get","vecadd","dup","#p","out","#tail","que","#tail","len","#10","int","gth","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}}},"inputs":{"d":{"codes":["val","#direction","kep"],"branches":{}},"i":{"codes":["#tail","lst","#direction","get","vecadd","dup","#p","out","#tail","que","#tail","len","#10","int","gth","#pop","jcn"],"branches":{"pop":{"codes":["#tail","pop","#c","out"],"branches":{}}}}},"outputs":["p","c"],"code":"snake3\nd i -> p c\n\n#1 int #0 int vec\n#direction kep\n\n#tail arr\n#0 int #0 int vec\n#tail que\n\ndef d:\n  val #direction kep\n\ndef i:\n  #tail lst #direction get vecadd\n  dup #p out\n  #tail que\n  #tail len #10 int gth\n  #pop jcn\n  def pop:\n    #tail pop #c out\n"}}}