about summary refs log tree commit diff stats
path: root/archive/2.transect/ex8.k2
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-08-02 11:51:29 -0700
committerKartik Agaram <vc@akkartik.com>2020-08-02 11:51:29 -0700
commit1b79f705b9975a3293fd111c5dc129e887dc01c0 (patch)
treefbef915a5cc42fe113d8ecd334c8fcefb145e1db /archive/2.transect/ex8.k2
parent7d33cce06956614cf4a4a01f4a362dc097eea647 (diff)
downloadmu-1b79f705b9975a3293fd111c5dc129e887dc01c0.tar.gz
6702
Diffstat (limited to 'archive/2.transect/ex8.k2')
0 files changed, 0 insertions, 0 deletions
.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/env python
"""
You can use this tool to find out values of keypresses
"""

from curses import *

sep = '; '

@wrapper
def main(w):
	while True:
		w.addstr(str(w.getch()) + sep)
und-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
parse/0: instruction: run
parse/0:   ingredient: {name: "
    1:integer <- copy 13:literal
  ", value: 0, type: 0, properties: ["
    1:integer <- copy 13:literal
  ": "literal-string"]}
parse/0: instruction: memory-should-contain
parse/0:   ingredient: {name: "
    1 <- 13
  ", value: 0, type: 0, properties: ["
    1 <- 13
  ": "literal-string"]}
parse/0: instruction: run
parse/0:   ingredient: {name: "
    2:integer <- copy 13:literal
  ", value: 0, type: 0, properties: ["
    2:integer <- copy 13:literal
  ": "literal-string"]}
parse/0: instruction: memory-should-contain
parse/0:   ingredient: {name: "
    1 <- 13
    2 <- 13
  ", value: 0, type: 0, properties: ["
    1 <- 13
    2 <- 13
  ": "literal-string"]}
after-brace/0: recipe foo
after-brace/0: run ...
after-brace/0: memory-should-contain ...
after-brace/0: run ...
after-brace/0: memory-should-contain ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: foo
run/0: instruction foo/0
run/0: run/42 {name: "
    1:integer <- copy 13:literal
  ", value: 0, type: 0, properties: ["
    1:integer <- copy 13:literal
  ": "literal-string"]}
parse/0: instruction: copy
parse/0:   ingredient: {name: "13", value: 0, type: 0, properties: ["13": "literal"]}
parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
after-brace/0: recipe run1001
after-brace/0: copy ...
run/0: instruction run1001/0
run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- copy/1 {name: "13", value: 13, type: 0, properties: ["13": "literal"]}
run/0: ingredient 0 is 13
mem/0: storing 13 in location 1
run/0: instruction foo/1
run/0: memory-should-contain/43 {name: "
    1 <- 13
  ", value: 0, type: 0, properties: ["
    1 <- 13
  ": "literal-string"]}
run/0: checking location 1
run/0: instruction foo/2
run/0: run/42 {name: "
    2:integer <- copy 13:literal
  ", value: 0, type: 0, properties: ["
    2:integer <- copy 13:literal
  ": "literal-string"]}
parse/0: instruction: copy
parse/0:   ingredient: {name: "13", value: 0, type: 0, properties: ["13": "literal"]}
parse/0:   product: {name: "2", value: 0, type: 1, properties: ["2": "integer"]}
after-brace/0: recipe run1002
after-brace/0: copy ...
run/0: instruction run1002/0
run/0: {name: "2", value: 2, type: 1, properties: ["2": "integer"]} <- copy/1 {name: "13", value: 13, type: 0, properties: ["13": "literal"]}
run/0: ingredient 0 is 13
mem/0: storing 13 in location 2
run/0: instruction foo/3
run/0: memory-should-contain/43 {name: "
    1 <- 13
    2 <- 13
  ", value: 0, type: 0, properties: ["
    1 <- 13
    2 <- 13
  ": "literal-string"]}
run/0: checking location 1
run/0: checking location 2