annotate src/requests.tp @ 26:18a043613dae

added guess response.
author William Morgan <bill@mrgn.org>
date Sat, 10 Aug 2013 18:39:45 -0700
parents bb80f86c5048
children a4bffcd381cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
79c1db5e7ebd sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff changeset
1 #{
18
a0e66161bde0 for bug investigation
William Morgan <bill@mrgn.org>
parents: 17
diff changeset
2
20
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
3 strJoin <- :str arr {
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
4 acc <- ""
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
5 arr foreach: :i el {
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
6 if: i = 0 {
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
7 acc <- (string: el)
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
8 } else: {
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
9 acc <- acc . ", " . (string: el)
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
10 }
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
11 }
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
12 acc
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
13 //arr fold: "" with: :acc el {acc . el}
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
14 }
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
15
18
a0e66161bde0 for bug investigation
William Morgan <bill@mrgn.org>
parents: 17
diff changeset
16 quote <- :str {
24
e1109e33b796 some work that probably needs to be trashed on requests.tp
Mike Pavone <pavone@retrodev.com>
parents: 23
diff changeset
17 "\"" . str . "\""
18
a0e66161bde0 for bug investigation
William Morgan <bill@mrgn.org>
parents: 17
diff changeset
18 }
a0e66161bde0 for bug investigation
William Morgan <bill@mrgn.org>
parents: 17
diff changeset
19
24
e1109e33b796 some work that probably needs to be trashed on requests.tp
Mike Pavone <pavone@retrodev.com>
parents: 23
diff changeset
20 println <- :str {
23
fcd7ae66a9ee cleanup.
William Morgan <bill@mrgn.org>
parents: 22
diff changeset
21 print: str . "\n"
fcd7ae66a9ee cleanup.
William Morgan <bill@mrgn.org>
parents: 22
diff changeset
22 }
fcd7ae66a9ee cleanup.
William Morgan <bill@mrgn.org>
parents: 22
diff changeset
23
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
24 evalId <- :id args {
12
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
25 #{
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
26 string <- {
20
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
27 idStr <- (quote: "id") . ":" . (quote: id)
92db3d1e8809 strJoin finally works.
William Morgan <bill@mrgn.org>
parents: 19
diff changeset
28 argsStr <- (quote: "arguments") . ":" . (quote: (strJoin: "," args))
18
a0e66161bde0 for bug investigation
William Morgan <bill@mrgn.org>
parents: 17
diff changeset
29 "{" . idStr . "," . argsStr . "}"
12
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
30 }
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
31 }
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
32 }
10
79c1db5e7ebd sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff changeset
33
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
34 evalProgram <- :program args {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
35 args <- args map: :el {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
36 "\"0x" . (hex: el) . "\""
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
37 }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
38 #{
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
39 string <- {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
40 progStr <- (quote: "program") . ":" . (quote: program)
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
41 argsStr <- (quote: "arguments") . ":[" . (strJoin: "," args) . "]"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
42 "{" . progStr . "," . argsStr . "}"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
43 }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
44 sendWithKey <- :key {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
45 print: "Sending: " . string . "\n"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
46 cli <- http client: "icfpc2013.cloudapp.net"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
47 resp <- cli post: string toPath: "/eval?auth=" . key withType: "application/json"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
48 evalResponse: resp
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
49 }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
50 }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
51 }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
52
15
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
53 guessRequest <- :id :prog {
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
54 #{
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
55 string <- {
17
566960135ea1 Small bit of cleanup now that the string escaping bug is fixed.
Mike Pavone <pavone@retrodev.com>
parents: 16
diff changeset
56 idStr <- "\"id\":\"" . id . "\""
566960135ea1 Small bit of cleanup now that the string escaping bug is fixed.
Mike Pavone <pavone@retrodev.com>
parents: 16
diff changeset
57 progStr <- "\"program\":\"" . prog . "\""
566960135ea1 Small bit of cleanup now that the string escaping bug is fixed.
Mike Pavone <pavone@retrodev.com>
parents: 16
diff changeset
58 "{" . idStr . "," . progStr . "}"
15
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
59 }
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
60 }
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
61 }
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
62
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
63 evalResponse <- :httpResp {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
64 _code <- httpResp statusCode
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
65 bod <- httpResp body
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
66 print: "Response code: " . (string: _code) . "\n"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
67 print: bod . "\n"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
68 decoded <- json decode: bod
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
69 _status <- "error"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
70 if: _code = 200 {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
71 _status <- decoded get: "status" withDefault: "error"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
72 } else: {
26
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
73 print: "http response gave error!, code was: " . _code
24
e1109e33b796 some work that probably needs to be trashed on requests.tp
Mike Pavone <pavone@retrodev.com>
parents: 23
diff changeset
74 }
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
75 if: _status = "ok" {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
76 _outputs <- (decoded get: "outputs" withDefault: #[]) map: :num {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
77 (num from: 2) parseHex64
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
78 }
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
79 #{
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
80 status <- { "ok" }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
81 outputs <- { _outputs }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
82 string <- {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
83 str <- "OK:"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
84 foreach: _outputs :idx val {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
85 str <- str . "\n" . (string: idx) . ": 0x" . (hex: val)
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
86 }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
87 str
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
88 }
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
89 print <- {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
90 print: string . "\n"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
91 }
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
92 }
24
e1109e33b796 some work that probably needs to be trashed on requests.tp
Mike Pavone <pavone@retrodev.com>
parents: 23
diff changeset
93 } else: {
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
94 _message <- decoded get: "message" withDefault: ""
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
95 #{
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
96 status <- { "error" }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
97 message <- { _message }
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
98 string <- {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
99 "Error: " . _message
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
100 }
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
101 print <- {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
102 print: string . "\n"
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
103 }
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
104 }
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
105 }
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
106 }
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
107
26
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
108 guessResponse <- :httpResp {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
109 _code <- httpResp statusCode
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
110 bod <- httpResp body
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
111 print: "Response code: " . (string: _code) . "\n"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
112 print: bod . "\n"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
113 decoded <- json decode: bod
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
114 _status <- "error"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
115 if: _code = 200 {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
116 _status <- decoded get: "status" withDefault: "error"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
117 } else: {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
118 print: "http response gave error!, code was: " . _code
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
119 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
120 if: _status = "win" {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
121 #{
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
122 status <- { "win" }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
123 string <- { "OK: win" }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
124 print <- {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
125 print: string . "\n"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
126 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
127 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
128 } else: { if: _status = "mismatch" {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
129
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
130 _values <- (decoded get: "values" withDefault: #[]) map: :num {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
131 (num from: 2) parseHex64
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
132 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
133 #{
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
134 status <- { "mismatch" }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
135 values <- { _values }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
136 string <- {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
137 str <- "OK:"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
138 foreach: _values :idx val {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
139 str <- str . "\n" . (string: idx) . ": 0x" . (hex: val)
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
140 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
141 str
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
142 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
143 print <- {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
144 print: string . "\n"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
145 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
146 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
147 } else: {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
148 _message <- decoded get: "message" withDefault: ""
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
149 #{
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
150 status <- { "error" }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
151 message <- { _message }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
152 string <- {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
153 "Error: " . _message
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
154 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
155 print <- {
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
156 print: string . "\n"
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
157 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
158 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
159 }} // end if
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
160 }
18a043613dae added guess response.
William Morgan <bill@mrgn.org>
parents: 25
diff changeset
161
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
162 main <- :args {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
163 print: ((evalId: "someId" #[1u64 2u64 3u64]) string) . "\n"
15
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
164 print: ((guessRequest: "someId" "someProg") string) . "\n"
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
165
25
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
166 if: (args length) > 1 {
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
167 key <- args get: 1
bb80f86c5048 Added code for sending and decoding the responses of evalRequests
Mike Pavone <pavone@retrodev.com>
parents: 24
diff changeset
168 print: ((evalProgram: "(lambda (input) (shl1 input))" #[1u64 0xEFFFFFFFFFFFFFu64]) sendWithKey: key)
22
a4837071b73d some attempts at parsing an eval response
William Morgan <bill@mrgn.org>
parents: 21
diff changeset
169 }
12
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
170 }
10
79c1db5e7ebd sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff changeset
171 }