on master help sign in
51 files changed+2296−1539
since splitsnapshots
unifiedsplit
TODO.md+5−2 desk/lib/bintree.hoon−8 desk/lib/interlist.hoon+21−7 desk/lib/lua.hoon+1−2 desk/lib/lua/interpreter.hoon+554 desk/lib/lua/parser.hoon+143−40 desk/lib/lua/printer.hoon+13−9 desk/lib/lua/utils.hoon+2 desk/lib/st.hoon+32−3 desk/res/lua/bar.lua+23 desk/res/lua/baz.lua+6 desk/res/lua/cycled/all.lua+11−11 desk/res/lua/cycled/api.lua+83−83 desk/res/lua/cycled/attrib.lua+57−57 desk/res/lua/cycled/bar.lua+2 desk/res/lua/cycled/big.lua+8−8 desk/res/lua/cycled/bitwise.lua+95−95 desk/res/lua/cycled/bwcoercion.lua+2−2 desk/res/lua/cycled/calls.lua+37−37 desk/res/lua/cycled/closure.lua+10−10 desk/res/lua/cycled/code.lua+78−78 desk/res/lua/cycled/constructs.lua+33−33 desk/res/lua/cycled/coroutine.lua+71−71 desk/res/lua/cycled/cstack.lua+6−6 desk/res/lua/cycled/db.lua+67−67 desk/res/lua/cycled/errors.lua+29−29 desk/res/lua/cycled/events.lua+57−57 desk/res/lua/cycled/files.lua+83−83 desk/res/lua/cycled/foo.lua+1−1 desk/res/lua/cycled/gc.lua+13−13 desk/res/lua/cycled/gengc.lua+15−15 desk/res/lua/cycled/goto.lua+11−11 desk/res/lua/cycled/heavy.lua+15−15 desk/res/lua/cycled/literals.lua+14−14 desk/res/lua/cycled/locals.lua+55−55 desk/res/lua/cycled/main.lua+6−6 desk/res/lua/cycled/math.lua+279−279 desk/res/lua/cycled/nextvar.lua+102−102 desk/res/lua/cycled/pm.lua+25−25 desk/res/lua/cycled/sort.lua+27−27 desk/res/lua/cycled/strings.lua+73−73 desk/res/lua/cycled/tpack.lua+36−36 desk/res/lua/cycled/tracegc.lua+1−1 desk/res/lua/cycled/utf8.lua+40−40 desk/res/lua/cycled/vararg.lua+9−9 desk/res/lua/cycled/verybig.lua+5−5 desk/res/lua/foo.lua+2−2 desk/sur/interlist.hoon+8 desk/sur/lua.hoon+3−3 desk/ted/eval-lua.hoon+19 desk/ted/test-lua.hoon+8−9
TODO.md+5−2
@@ -4,5 +4,8 @@
44- [x] any string apart from the basic string with no escapes
55- [x] check if int fits in int or make it a float
66- [x] should `print-blok` have `do`-`end`? This is fucked.
7−- [ ] binary operator priority
8−- [ ] ^ should be higher priority than unary ops
7+- [x] binary operator priority
8+- [x] ^ should be higher priority than unary ops
9+- [x] Unifiy parened exprs
10+- [ ] pow
11+- [ ] attributes
desk/lib/bintree.hoondeleted−8
@@ -1,8 +0,0 @@
1−|%
2−++ bintree
3− |$ [node leaf]
4− $%
5− [%node l=(bintree node leaf) n=node r=(bintree node leaf)]
6− [%leaf leaf]
7− ==
8−--
desk/lib/interlist.hoon+21−7
@@ -1,10 +1,24 @@
1+/- *interlist
12=<
23|%
3−++ interlist
4− |$ [sep val]
5− $%
6− [%double =val =sep tail=(interlist sep val)]
7− [%single =val]
4+++ new
5+ |* [a=* b=(list [* *])]
6+ ^- (interlist _?<(?=(~ b) -.i.b) _a)
7+ ?~ b single+a
8+ double+[a -.i.b (new +.i.b t.b)]
9+++ turn-inter
10+ |* [l=(interlist) f=$-(* *)]
11+ ^- (interlist _$:f _?>(?=(%single -.l) +.l))
12+ ?- -.l
13+ %single [%single +.l]
14+ %double [%double val.l (f sep.l) $(l tail.l)]
15+ ==
16+++ turn
17+ |* [l=(interlist) f=$-(* *)]
18+ ^- (interlist _?>(?=(%double -.l) sep.l) _$:f)
19+ ?- -.l
20+ %single single+(f +.l)
21+ %double double+[(f val.l) sep.l $(l tail.l)]
822 ==
923++ reverse
1024 |* l=(interlist)
@@ -39,7 +53,7 @@
3953 [%double v +.tail -.tail]
4054 ;~(plug v (star ;~(plug s v)))
4155++ split-left-on
42− |* [is-pivot=$-(* *) l=(interlist)]
56+ |* [is-pivot=$-(* ?) l=(interlist)]
4357 ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
4458 ?- -.l
4559 %single ~
@@ -50,7 +64,7 @@
5064 `[[%double val.l sep.l lhs.u.rest] pivot.u.rest rhs.u.rest]
5165 ==
5266++ split-right-on
53− |* [is-pivot=$-(* *) l=(interlist * *)]
67+ |* [is-pivot=$-(* ?) l=(interlist * *)]
5468 ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
5569 %+ bind (split-left-on is-pivot (reverse l))
5670 |* [a=(interlist * *) b=* c=(interlist * *)] [(reverse c) b (reverse a)]
desk/lib/lua.hoon+1−2
@@ -1,2 +1 @@
1−|%
2−--
1+/+ lua-interpreter
desk/lib/lua/interpreter.hoonnew file+554
@@ -0,0 +1,554 @@
1+/- *lua
2+/+ st
3+=<
4+|= =chunk
5+((eval-chunk chunk) *state)
6+|%
7+++ eval-chunk
8+ |= =chunk
9+ ^- (eval-m value)
10+ ?- -.chunk
11+ %blok (eval-blok +.chunk)
12+ ==
13+++ object-id |$ obj @
14+++ objects
15+ |$ obj [objs=(map (object-id obj) obj) next-id=(object-id obj)]
16++$ value
17+ $%
18+ [%table val=(object-id table) meta=(unit (object-id table))]
19+ [%string string]
20+ [%num numeral]
21+ [%multires (lest value)]
22+ [%true ~]
23+ [%false ~]
24+ [%nil ~]
25+ ==
26++$ lval
27+ $%
28+ [%var name]
29+ [%table-field (object-id table) value]
30+ ==
31++$ table (map value value)
32++$ state
33+ $:
34+ tables=$~([(malt ~[[0 *table]]) 1] (objects table))
35+ global-env=table
36+ local-envs=$~(~[(malt ~[['_ENV' table+[0 ~]]])] (lest (map name value)))
37+ ==
38+++ eval-m
39+ |$ [val]
40+ $-(state [st=state val=val])
41+++ pure
42+ |* x=*
43+ ^- (eval-m _x)
44+ |=(st=state [st x])
45+++ bind
46+ |* =mold
47+ |* [prev=(eval-m) cont=$-(* (eval-m mold))]
48+ ^+ $:cont
49+ |= st=state
50+ =/ [st=state val=_val:$:prev] (prev st)
51+ ((cont val) st)
52+++ get-state
53+ ^- (eval-m state)
54+ |= st=state
55+ [st st]
56+++ set-state
57+ |= st=state
58+ ^- (eval-m ~)
59+ |= state
60+ [st ~]
61+++ eval-blok
62+ =<
63+ |= =blok
64+ ^- (eval-m value)
65+ %- with-local
66+ =/ body body.blok
67+ |-
68+ ^- (eval-m value)
69+ ?~ body
70+ ?~ ret.blok (pure nil+~)
71+ ?~ u.ret.blok (pure nil+~)
72+ ;< rets=(lest value) bind (eval-exprlist u.u.ret.blok)
73+ (pure (multires rets))
74+ ;< ~ bind (eval-stat i.body)
75+ ;< ret=value bind $(body t.body)
76+ (pure ret)
77+ |%
78+ ++ with-local
79+ |* act=(eval-m)
80+ ^- _act
81+ ;< ~ bind push-local
82+ ;< res=_val:$:act bind act
83+ ;< ~ bind pop-local
84+ (pure res)
85+ ++ push-local
86+ ^- (eval-m ~)
87+ |= st=state
88+ =. local-envs.st [*(map name value) local-envs.st]
89+ [st ~]
90+ ++ pop-local
91+ ^- (eval-m ~)
92+ |= st=state
93+ =. local-envs.st
94+ ?~ t.local-envs.st !!
95+ t.local-envs.st
96+ [st ~]
97+ --
98+++ multires
99+ |= vals=(lest value)
100+ ^- value
101+ ?~ t.vals i.vals
102+ multires+vals
103+++ eval-exprlist
104+ |= vals=exprlist
105+ ^- (eval-m (lest value))
106+ ;< val=value bind (eval-expr i.vals)
107+ ?~ t.vals (pure [val ~])
108+ ;< tail=(list value) bind $(vals t.vals)
109+ (pure [val tail])
110+++ eval-stat
111+ |= =stat
112+ ^- (eval-m ~)
113+ ?+ -.stat !!
114+ %asmnt
115+ ;< lhs=(lest lval) bind (process-varlist +<.stat)
116+ ;< rhs=(lest value) bind (eval-exprlist +>.stat)
117+ =/ asmnts (zip lhs (normalize-multires-exprlist rhs))
118+ |-
119+ ?~ asmnts (pure ~)
120+ ;< * bind
121+ ?- -<.i.asmnts
122+ %var ((set-var ->.i.asmnts) +.i.asmnts)
123+ %table-field
124+ ;< tabl=table bind (get-table ->-.i.asmnts)
125+ (set-table ->-.i.asmnts (~(put by tabl) ->+.i.asmnts +.i.asmnts))
126+ ==
127+ $(asmnts t.asmnts)
128+ %local-asmnt
129+ =/ lhs=(list name)
130+ %+ turn attrnamelist.stat
131+ |= [=name attr=(unit attrib)]
132+ ?> ?=(~ attr)
133+ name
134+ ;< actual-values=(list [name value]) bind
135+ ?~ rhs.stat (pure ~)
136+ ;< rhs=(list value) bind (eval-exprlist u.rhs.stat)
137+ (pure (zip lhs rhs))
138+ ;< st=state bind get-state
139+ =. i.local-envs.st
140+ %- ~(uni by i.local-envs.st)
141+ %- malt
142+ (weld (turn lhs |=(=name [name `value`nil+~])) actual-values)
143+ (set-state st)
144+ ==
145+++ set-var
146+ |= var=name
147+ |= val=value
148+ ^- (eval-m ~)
149+ ;< envs=(list (map name value)) bind get-local-envs
150+ =/ new-envs=(unit (lest (map name value)))
151+ |-
152+ ^- (unit (lest (map name value)))
153+ ?~ envs ~
154+ ?. (~(has by i.envs) var)
155+ =/ rest $(envs t.envs)
156+ ?~ rest ~
157+ `[i.envs u.rest]
158+ `[(~(put by i.envs) var val) t.envs]
159+ ^- (eval-m ~)
160+ ?. ?=(~ new-envs)
161+ |= st=state
162+ =. local-envs.st u.new-envs
163+ [st ~]
164+ =/ global-env (need ((get-from-local-envs envs) '_ENV'))
165+ :: TODO: proper error
166+ ?+ -.global-env !!
167+ %table
168+ ;< tabl=table bind (get-table +<.global-env)
169+ (set-table +<.global-env (~(put by tabl) (string-val var) val))
170+ ==
171+++ normalize-multires-exprlist
172+ |= vals=(list value)
173+ ^- (list value)
174+ ?~ vals ~
175+ ?~ t.vals ~[(normalize-multires i.vals)]
176+ [i.vals $(vals t.vals)]
177+++ normalize-multires
178+ |= val=value
179+ ^- value
180+ ?+ -.val val
181+ %multires
182+ =/ res=(lest value)
183+ =/ vals=(lest value) +.val
184+ |-
185+ ?~ t.vals
186+ =/ tail=value (normalize-multires i.vals)
187+ ?: ?=(%multires -.tail) +.tail [tail ~]
188+ [i.vals $(vals t.vals)]
189+ ?~ t.res i.res
190+ multires+res
191+ ==
192+++ process-varlist
193+ =<
194+ |= =varlist
195+ ^- (eval-m (lest lval))
196+ ;< val=lval bind (process-var i.varlist)
197+ ?~ t.varlist (pure ~[val])
198+ ;< tail=(list lval) bind $(varlist t.varlist)
199+ (pure [val tail])
200+ |%
201+ ++ process-var
202+ |= =var
203+ ^- (eval-m lval)
204+ ?- -.var
205+ %name (pure var++.var)
206+ %indexed
207+ ;< prefix=value bind (eval-prefix-expr +<.var)
208+ ;< idx=value bind (eval-expr +>.var)
209+ :: TODO: proper error
210+ ?. ?=(%table -.prefix) !!
211+ (pure table-field+[val.prefix idx])
212+ %dot
213+ ;< prefix=value bind (eval-prefix-expr +<.var)
214+ :: TODO: proper error
215+ ?. ?=(%table -.prefix) !!
216+ (pure table-field+[val.prefix (string-val +>.var)])
217+ ==
218+ --
219+++ eval-expr
220+ |= =expr
221+ ^- (eval-m value)
222+ ?+ -.expr !!
223+ %false (pure expr)
224+ %true (pure expr)
225+ %nil (pure expr)
226+ %string (pure expr)
227+ %num (pure expr)
228+ %binop (eval-binop +.expr)
229+ %prefix-expr (eval-prefix-expr +.expr)
230+ %unop (eval-unop +.expr)
231+ %table
232+ ;< tabl-id=(object-id table) bind (eval-table +.expr)
233+ (pure table+[tabl-id ~])
234+ ==
235+++ eval-table
236+ |= tabl=^table
237+ =<
238+ ^- (eval-m (object-id table))
239+ ;< felds=(list [value value]) bind
240+ =/ counter 1
241+ |-
242+ ?~ tabl (pure ~)
243+ ?- -.i.tabl
244+ %keyed
245+ ;< k=value bind (eval-expr +<.i.tabl)
246+ ;< v=value bind (eval-expr +>.i.tabl)
247+ ;< tail=(list [value value]) bind $(tabl t.tabl)
248+ (pure [[k v] tail])
249+ %unkeyed
250+ ;< v=value bind (eval-expr +.i.tabl)
251+ ?: &(?=(~ t.tabl) ?=(%multires -.v))
252+ =/ vals=(list value) +.v
253+ %- pure
254+ ^- (list [value value])
255+ |-
256+ ?~ vals ~
257+ [[num+int+(new:st counter) i.vals] $(vals t.vals, counter +(counter))]
258+ ;< tail=(list [value value]) bind $(tabl t.tabl, counter +(counter))
259+ (pure [[num+int+(new:st counter) v] tail])
260+ ==
261+ (new-table (malt felds))
262+ |%
263+ --
264+++ eval-unop
265+ |= [op=unop =expr]
266+ ^- (eval-m value)
267+ ?+ op !!
268+ %minus
269+ ;< val=value bind (eval-expr expr)
270+ ;< num=numeral bind (assert-numeral val)
271+ %- pure
272+ ?- -.num
273+ %int num+int+(neg:st +.num)
274+ %float num+float+(sub:rd *@rd +.num)
275+ ==
276+ %not
277+ ;< val=value bind (eval-expr expr)
278+ %- pure
279+ ?: (falsy val) [%false ~] [%true ~]
280+ %sig
281+ ;< val=value bind (eval-expr expr)
282+ ;< n=numeral bind (assert-numeral val)
283+ ;< i=@st bind (to-int n)
284+ %- pure
285+ num+int+(mix i mask:st)
286+ ==
287+++ eval-binop
288+ |= [lhs=expr op=binop rhs=expr]
289+ ^- (eval-m value)
290+ =<
291+ ?+ op !!
292+ %add
293+ ;< lhs=value bind (eval-expr lhs)
294+ ;< rhs=value bind (eval-expr rhs)
295+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
296+ %- pure
297+ :- %num
298+ ?- -.unified
299+ %i :- %int (add:st a.unified b.unified)
300+ %f :- %float (add:rd a.unified b.unified)
301+ ==
302+ %sub
303+ ;< lhs=value bind (eval-expr lhs)
304+ ;< rhs=value bind (eval-expr rhs)
305+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
306+ %- pure
307+ :- %num
308+ ?- -.unified
309+ %i :- %int (sub:st a.unified b.unified)
310+ %f :- %float (sub:rd a.unified b.unified)
311+ ==
312+ %mul
313+ ;< lhs=value bind (eval-expr lhs)
314+ ;< rhs=value bind (eval-expr rhs)
315+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
316+ %- pure
317+ :- %num
318+ ?- -.unified
319+ %i :- %int (mul:st a.unified b.unified)
320+ %f :- %float (mul:rd a.unified b.unified)
321+ ==
322+ %int-div
323+ ;< lhs=value bind (eval-expr lhs)
324+ ;< rhs=value bind (eval-expr rhs)
325+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
326+ %- pure
327+ :- %num
328+ ?- -.unified
329+ %i :- %int (div:st +.unified)
330+ %f :- %float (int-div-float +.unified)
331+ ==
332+ %mod
333+ ;< lhs=value bind (eval-expr lhs)
334+ ;< rhs=value bind (eval-expr rhs)
335+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
336+ %- pure
337+ :- %num
338+ ?- -.unified
339+ %i :- %int (mod:st +.unified)
340+ %f
341+ :- %float
342+ (sub:rd a.unified (mul:rd (int-div-float +.unified) b.unified))
343+ ==
344+ %div
345+ ;< lhs=value bind (eval-expr lhs)
346+ ;< rhs=value bind (eval-expr rhs)
347+ ;< lhs=numeral bind (assert-numeral lhs)
348+ ;< rhs=numeral bind (assert-numeral rhs)
349+ %- pure num+float+(div:rd (to-float lhs) (to-float rhs))
350+ %exp !!
351+ %band
352+ ;< lhs=value bind (eval-expr lhs)
353+ ;< rhs=value bind (eval-expr rhs)
354+ ;< lhs=numeral bind (assert-numeral lhs)
355+ ;< rhs=numeral bind (assert-numeral rhs)
356+ ;< lhs=@st bind (to-int lhs)
357+ ;< rhs=@st bind (to-int rhs)
358+ %- pure
359+ num+int+(dis lhs rhs)
360+ %bor
361+ ;< lhs=value bind (eval-expr lhs)
362+ ;< rhs=value bind (eval-expr rhs)
363+ ;< lhs=numeral bind (assert-numeral lhs)
364+ ;< rhs=numeral bind (assert-numeral rhs)
365+ ;< lhs=@st bind (to-int lhs)
366+ ;< rhs=@st bind (to-int rhs)
367+ %- pure
368+ num+int+(con lhs rhs)
369+ %bxor
370+ ;< lhs=value bind (eval-expr lhs)
371+ ;< rhs=value bind (eval-expr rhs)
372+ ;< lhs=numeral bind (assert-numeral lhs)
373+ ;< rhs=numeral bind (assert-numeral rhs)
374+ ;< lhs=@st bind (to-int lhs)
375+ ;< rhs=@st bind (to-int rhs)
376+ %- pure
377+ num+int+(mix lhs rhs)
378+ %rshft
379+ ;< lhs=value bind (eval-expr lhs)
380+ ;< rhs=value bind (eval-expr rhs)
381+ ;< lhs=numeral bind (assert-numeral lhs)
382+ ;< rhs=numeral bind (assert-numeral rhs)
383+ ;< lhs=@st bind (to-int lhs)
384+ ;< rhs=@st bind (to-int rhs)
385+ %- pure
386+ num+int+(dis mask:st (?:((sig:st rhs) lsh rsh) [0 (abs:st rhs)] lhs))
387+ %lshft
388+ ;< lhs=value bind (eval-expr lhs)
389+ ;< rhs=value bind (eval-expr rhs)
390+ ;< lhs=numeral bind (assert-numeral lhs)
391+ ;< rhs=numeral bind (assert-numeral rhs)
392+ ;< lhs=@st bind (to-int lhs)
393+ ;< rhs=@st bind (to-int rhs)
394+ %- pure
395+ num+int+(dis mask:st (?:((sig:st rhs) rsh lsh) [0 (abs:st rhs)] lhs))
396+ %or
397+ ;< lhs=value bind (eval-expr lhs)
398+ ?. (falsy lhs) (pure lhs)
399+ (eval-expr rhs)
400+ %and
401+ ;< lhs=value bind (eval-expr lhs)
402+ ?: (falsy lhs) (pure lhs)
403+ (eval-expr rhs)
404+ ==
405+ |%
406+ ++ show-numeral
407+ |= n=numeral
408+ ^- tape
409+ ?- -.n
410+ %int (scow %s (to-s:st +.n))
411+ %float (scow %rd +.n)
412+ ==
413+ ++ int-div-float
414+ |= [a=@rd b=@rd]
415+ =/ whole=(unit @s) (~(toi rd %d) (div:rd a b))
416+ ?~ whole (div:rd .~0 .~0)
417+ (san:rd u.whole)
418+ +$ unified-numerals $%([%i a=@st b=@st] [%f a=@rd b=@rd])
419+ ++ unify-numeral-values
420+ |= [a=value b=value]
421+ ^- (eval-m unified-numerals)
422+ ;< a=numeral bind (assert-numeral a)
423+ ;< b=numeral bind (assert-numeral b)
424+ (pure (unify-numerals a b))
425+ ++ unify-numerals
426+ |= [a=numeral b=numeral]
427+ ^- unified-numerals
428+ ?: &(?=(%int -.a) ?=(%int -.b)) [%i +.a +.b]
429+ [%f (to-float a) (to-float b)]
430+ ++ to-float
431+ |= n=numeral
432+ ^- @rd
433+ ?: ?=(%float -.n) +.n
434+ (san:rd (to-s:st +.n))
435+ --
436+++ to-int
437+ |= n=numeral
438+ ^- (eval-m @st)
439+ ?: ?=(%int -.n) (pure +.n)
440+ =/ i=(unit @s) (toi:rd +.n)
441+ :: TODO: proper error
442+ ?~ i !!
443+ =/ i u.i
444+ =/ cycled (san:rd i)
445+ :: TODO: proper error
446+ :: checks that we don't lose any information
447+ ?. =(+.n cycled) !!
448+ (pure (from-s:st i))
449+++ falsy
450+ |= v=value
451+ ^- ?
452+ ?+ -.v |
453+ %false &
454+ %nil &
455+ ==
456+++ assert-numeral
457+ |= [a=value]
458+ ^- (eval-m numeral)
459+ :: TODO: throw a proper error
460+ ?. ?=(%num -.a) !!
461+ (pure +.a)
462+++ eval-prefix-expr
463+ |= =prefix-expr
464+ ^- (eval-m value)
465+ ?- -.prefix-expr
466+ %expr (eval-expr +.prefix-expr)
467+ %call (eval-functioncall +.prefix-expr)
468+ %var
469+ ?- +<.prefix-expr
470+ %name (lookup-var +>.prefix-expr)
471+ %dot
472+ ;< tabl=value bind (eval-prefix-expr +>-.prefix-expr)
473+ (lookup-table-field tabl (string-val +>+.prefix-expr))
474+ %indexed
475+ ;< tabl=value bind (eval-prefix-expr +>-.prefix-expr)
476+ ;< idx=value bind (eval-expr +>+.prefix-expr)
477+ (lookup-table-field tabl idx)
478+ ==
479+ ==
480+++ lookup-table-field
481+ |= [val=value fild=value]
482+ ^- (eval-m value)
483+ :: TODO: proper error
484+ ?+ -.val !!
485+ %table
486+ ;< tabl=table bind (get-table val.val)
487+ =/ res (~(get by tabl) fild)
488+ :: TODO: error
489+ ?~ res !!
490+ (pure u.res)
491+ ==
492+++ lookup-var
493+ |= =name
494+ ^- (eval-m value)
495+ ;< envs=(list (map ^name value)) bind get-local-envs
496+ =/ get-local (get-from-local-envs envs)
497+ =/ local=(unit value) (get-local name)
498+ ?. ?=(~ local) (pure u.local)
499+ =/ global-env (get-local '_ENV')
500+ ?~ global-env !!
501+ (lookup-table-field u.global-env (string-val name))
502+++ get-from-local-envs
503+ |= envs=(list (map name value))
504+ |= =name
505+ ^- (unit value)
506+ ?~ envs ~
507+ =/ val=(unit value) (~(get by i.envs) name)
508+ ?~ val $(envs t.envs)
509+ val
510+++ string-val
511+ |= val=@t
512+ ^- value
513+ string+(trip val)
514+++ get
515+ |* f=$-(state *)
516+ ^- (eval-m _$:f)
517+ |= st=state
518+ [st (f st)]
519+++ get-table
520+ |= id=(object-id table)
521+ ^- (eval-m table)
522+ ;< tables=(objects table) bind
523+ %- get |=(st=state tables.st)
524+ =/ table (~(get by objs.tables) id)
525+ :: TODO: proper error
526+ ?~ table !!
527+ (pure u.table)
528+++ set-table
529+ |= [id=(object-id table) tabl=table]
530+ ^- (eval-m ~)
531+ |= st=state
532+ =. objs.tables.st (~(put by objs.tables.st) id tabl)
533+ [st ~]
534+++ get-local-envs
535+ ^- (eval-m (list (map name value)))
536+ %- get |=(st=state local-envs.st)
537+++ eval-functioncall
538+ |= =functioncall
539+ ^- (eval-m value)
540+ !!
541+++ new-table
542+ |= tabl=table
543+ ^- (eval-m (object-id table))
544+ |= st=state
545+ =/ id next-id.tables.st
546+ =. next-id.tables.st +(id)
547+ =. objs.tables.st (~(put by objs.tables.st) id tabl)
548+ [st id]
549+++ zip
550+ |* [lhs=(list) rhs=(list)]
551+ ^- (list [_?<(?=(~ lhs) i.lhs) _?<(?=(~ rhs) i.rhs)])
552+ ?: |(?=(~ lhs) ?=(~ rhs)) ~
553+ [[i.lhs i.rhs] $(lhs t.lhs, rhs t.rhs)]
554+--
desk/lib/lua/parser.hoon+143−40
@@ -1,12 +1,12 @@
11/- *lua
2+/- *interlist
23/+ st
3−/+ interlist
4−/+ *bintree
4+/+ inter=interlist
55=<
66apex
77|%
88++ apex
9− %^ tnee %apex ast
9+ %^ tnee %apex chunk
1010 ;~ pfix
1111 %- punt
1212 ;~ plug
@@ -33,7 +33,7 @@ apex
3333 parse-numeral
3434 ::
3535 %+ cook
36− |=(=prefix-expr [%prefix-expr prefix-expr])
36+ |=(=prefix-expr (unwrap-prefix [%prefix-expr prefix-expr]))
3737 (knee *prefix-expr |.(parse-prefix-expr))
3838 ::
3939 %+ cook
@@ -54,38 +54,38 @@ apex
5454 parse-funcbody
5555 ==
5656 ::
57− %+ cook |= [=unop =expr] [%unop unop expr]
58− ;~ plug
59− ;~ pose
60− ;~ sfix
61− ;~ pose
62− (cold %minus (just '-'))
63− (cold %sig (just '~'))
64− (cold %hax (just '#'))
65− ==
66− ws
67− ==
68− ;~ sfix
69− (cold %not (jest 'not'))
70− ;~(less parse-name ws)
71− ==
72− ==
73− %+ knee *expr |.(parse-expr)
74− ==
7557 ==
7658:: Parse expressions separated by binary operators
7759::
7860++ parse-expr-list
79− %^ tnee %parse-expr-list (interlist:interlist binop expr)
80− %+ parse:interlist (ifix [ws ws] parse-binop) parse-atomic-expr
81−:: TODO: This is mock and should take operator priority into account.
82−::
61+ %^ tnee %parse-expr-list ,(interlist binop [(list unop) expr])
62+ %+ parse:inter (ifix [ws ws] parse-binop)
63+ ;~ plug
64+ %- star
65+ ;~ pose
66+ ;~ sfix
67+ ;~ pose
68+ (cold %minus (just '-'))
69+ (cold %sig (just '~'))
70+ (cold %hax (just '#'))
71+ ==
72+ ws
73+ ==
74+ ;~ sfix
75+ (cold %not (jest 'not'))
76+ ;~(less parse-name ws)
77+ ==
78+ ==
79+ ::
80+ parse-atomic-expr
81+ ==
8382++ process-expr-list
8483 =<
85− |= l=(interlist:interlist binop expr)
84+ |= l=(interlist binop [(list unop) expr])
8685 ^- expr
8786 %- strip-tree
88− %- (process-left-assoc ~[%pow])
87+ %- (process-right-assoc ~[%pow])
88+ %- process-unops
8989 %- (process-left-assoc ~[%mul %div %int-div %mod])
9090 %- (process-left-assoc ~[%add %sub])
9191 %- (process-right-assoc ~[%concat])
@@ -96,47 +96,145 @@ apex
9696 %- (process-left-assoc ~[%lt %gt %lteq %gteq %neq %eq])
9797 %- (process-left-assoc ~[%and])
9898 %- (process-left-assoc ~[%or])
99− [%leaf l]
99+ (preprocess-tree l)
100100 |%
101+ +$ working-tree
102+ $%
103+ [%node l=working-tree n=binop r=working-tree]
104+ [%branch b=unop t=working-tree]
105+ [%tbd-unop l=(list [=expr =binop]) =unop r=working-tree]
106+ [%unoped l=(list [=expr =binop]) r=working-tree]
107+ [%leaf (interlist binop expr)]
108+ ==
109+ ++ preprocess-tree
110+ |= l=(interlist binop [(list unop) expr])
111+ ^- working-tree
112+ =/ splitted (find-unop l)
113+ ?~ splitted leaf+(turn:inter l |=([* =expr] expr))
114+ tbd-unop+[l.u.splitted unop.u.splitted $(l r.u.splitted)]
115+ ++ apply-unops
116+ |= [unops=(list unop) =expr]
117+ ^+ expr
118+ ?~ unops expr
119+ [%unop i.unops $(unops t.unops)]
101120 ++ strip-tree
102− |= tree=(bintree binop (interlist:interlist binop expr))
121+ |= tree=working-tree
103122 ^- expr
104123 ?- -.tree
105124 %leaf ?> ?=(%single +<.tree) +>.tree
106125 %node [%binop $(tree l.tree) n.tree $(tree r.tree)]
126+ %branch [%unop b.tree $(tree t.tree)]
127+ %tbd-unop !!
128+ %unoped ?> =(~ l.tree) $(tree r.tree)
107129 ==
130+ ++ find-unop
131+ |= l=(interlist binop [(list unop) expr])
132+ ^- (unit [l=(list [=expr =binop]) =unop r=(interlist binop [(list unop) expr])])
133+ ?- -.l
134+ %single
135+ ?~ +<.l ~
136+ %- some
137+ [~ i.-.val.l single+[t.-.val.l +.val.l]]
138+ %double
139+ ?~ -.val.l
140+ %+ ^^bind $(l tail.l)
141+ |= [k=(list [expr binop]) =unop tail=(interlist binop [(list unop) expr])]
142+ [[[+.val.l sep.l] k] unop tail]
143+ %- some
144+ [~ i.-.val.l double+[[t.-.val.l +.val.l] sep.l tail.l]]
145+ ==
146+ ++ process-unops
147+ |= tree=working-tree
148+ ^- working-tree
149+ ?- -.tree
150+ %node node+[$(tree l.tree) n.tree $(tree r.tree)]
151+ %branch branch+[b.tree $(tree t.tree)]
152+ %tbd-unop unoped+[l.tree branch+[unop.tree $(tree r.tree)]]
153+ %leaf tree
154+ %unoped unoped+[l.tree $(tree r.tree)]
155+ ==
156+ ++ split-left-unop-list
157+ |= [is-pivot=$-(binop ?) l=(list [=expr =binop])]
158+ ^- (unit [l=(interlist binop expr) =binop r=(list [=expr =binop])])
159+ ?~ l ~
160+ ?: (is-pivot binop.i.l) `[single+expr.i.l binop.i.l t.l]
161+ =/ rest $(l t.l)
162+ ?~ rest ~
163+ `[double+[expr.i.l binop.i.l -.u.rest] +.u.rest]
164+ ++ split-right-unop-list
165+ |= [is-pivot=$-(binop ?) l=(list [=expr =binop])]
166+ ^- (unit [l=(interlist binop expr) =binop r=(list [=expr =binop])])
167+ =/ reversed=(unit [l=(list [=binop =expr]) =binop r=(interlist binop expr)])
168+ =/ l=(list [=binop =expr]) (flop (turn l swap))
169+ |-
170+ ?~ l ~
171+ ?: (is-pivot binop.i.l) `[~ binop.i.l (new:inter expr.i.l t.l)]
172+ =/ rest=(unit [l=(list [=binop =expr]) =binop r=(interlist binop expr)]) $(l t.l)
173+ ?~ rest ~
174+ `[[i.l l.u.rest] +.u.rest]
175+ ?~ reversed ~
176+ `[(reverse:inter r.u.reversed) binop.u.reversed (turn (flop l.u.reversed) swap)]
177+ ++ swap |*([a=* b=*] [b a])
108178 ++ process-right-assoc
109179 |= ops=(lest binop)
110− |= tree=(bintree binop (interlist:interlist binop expr))
111− ^+ tree
180+ |= tree=working-tree
181+ ^- working-tree
112182 ?- -.tree
113183 %leaf
114184 =/ l +.tree
115185 |-
116− =/ splitted (split-left-on:interlist |=(op=binop (elem op ops)) l)
186+ =/ splitted (split-left-on:inter |=(op=binop (elem op ops)) l)
117187 ?~ splitted [%leaf l]
118188 [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
189+ %branch branch+[b.tree $(tree t.tree)]
190+ %tbd-unop
191+ =/ splitted
192+ (split-left-unop-list |=(op=binop (elem op ops)) l.tree)
193+ ?~ splitted tbd-unop+[l.tree unop.tree $(tree r.tree)]
194+ $(tree [%node $(tree leaf+l.u.splitted) binop.u.splitted tbd-unop+[r.u.splitted +>.tree]])
119195 %node
120196 [%node $(tree l.tree) n.tree $(tree r.tree)]
197+ %unoped
198+ =/ splitted
199+ (split-left-unop-list |=(op=binop (elem op ops)) l.tree)
200+ ?~ splitted unoped+[l.tree $(tree r.tree)]
201+ [%node $(tree leaf+l.u.splitted) binop.u.splitted $(tree unoped+[r.u.splitted r.tree])]
121202 ==
122203 ++ process-left-assoc
123204 |= ops=(lest binop)
124− |= tree=(bintree binop (interlist:interlist binop expr))
125− ^+ tree
205+ |= tree=working-tree
206+ ^- working-tree
126207 ?- -.tree
127208 %leaf
128209 =/ l +.tree
129210 |-
130− =/ splitted (split-right-on:interlist |=(op=binop (elem op ops)) l)
211+ ^- working-tree
212+ =/ splitted (split-right-on:inter |=(op=binop (elem op ops)) l)
131213 ?~ splitted [%leaf l]
132214 [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
215+ %tbd-unop
216+ =/ splitted
217+ (split-right-unop-list |=(op=binop (elem op ops)) l.tree)
218+ ?~ splitted tbd-unop+[l.tree unop.tree $(tree r.tree)]
219+ $(tree [%node $(tree leaf+l.u.splitted) binop.u.splitted tbd-unop+[r.u.splitted +>.tree]])
133220 %node
134221 [%node $(tree l.tree) n.tree $(tree r.tree)]
222+ %branch
223+ [%branch b.tree $(tree t.tree)]
224+ %unoped
225+ =/ splitted
226+ (split-right-unop-list |=(op=binop (elem op ops)) l.tree)
227+ ?~ splitted unoped+[l.tree $(tree r.tree)]
228+ [%node $(tree leaf+l.u.splitted) binop.u.splitted $(tree unoped+[r.u.splitted +>.tree])]
135229 ==
136230 --
137231++ parse-expr
138232 %^ tnee %parse-expr expr
139− %+ cook process-expr-list parse-expr-list
233+ %+ cook unwrap-prefix
234+ ;~ pose
235+ %+ cook process-expr-list parse-expr-list
236+ (ifix [;~(plug (just '(') ws) ;~(plug ws (just ')'))] (knee *expr |.(parse-expr)))
237+ ==
140238++ parse-parened-expr
141239 %^ tnee %parse-parened-expr prefix-expr
142240 %+ cook
@@ -470,7 +568,7 @@ apex
470568++ parse-local-asmnt
471569 %^ tnee %parse-local-asmnt local-asmnt
472570 %+ cook
473− |= [* * =attnamelist rhs=(unit explist)] [attnamelist rhs]
571+ |= [* * =attrnamelist rhs=(unit explist)] [attrnamelist rhs]
474572 ;~ plug
475573 (jest 'local')
476574 wss
@@ -484,7 +582,7 @@ apex
484582 ==
485583 ==
486584++ parse-attnamelist
487− %^ tnee %parse-attnamelist attnamelist
585+ %^ tnee %parse-attnamelist attrnamelist
488586 %+ most (ifix [ws ws] com)
489587 ;~ plug
490588 parse-name
@@ -769,7 +867,7 @@ apex
769867 ;~(less keyword ;~(plug name-fst-char (star name-char)))
770868++ bind
771869 |* =mold
772− |* [prev=rule cont=$-(mold rule)]
870+ |* [prev=rule cont=$-(* rule)]
773871 |= =nail
774872 =/ prev-edge (prev nail)
775873 ?~ q.prev-edge prev-edge
@@ -960,4 +1058,9 @@ apex
9601058 |= [nedl=* stak=(list *)]
9611059 ^- ?
9621060 ?=(^ (find ~[nedl] stak))
1061+++ unwrap-prefix
1062+ |= x=expr
1063+ ^- expr
1064+ ?: ?=([%prefix-expr %expr *] x) $(x +>.x)
1065+ x
9631066--
desk/lib/lua/printer.hoon+13−9
@@ -6,10 +6,10 @@ print
66:: AST
77::
88++ print
9− |= [=ast]
9+ |= [=chunk]
1010 ^- tape
11− ?- -.ast
12− %blok (print-blok +.ast)
11+ ?- -.chunk
12+ %blok (print-blok +.chunk)
1313 ==
1414:: Expr
1515::
@@ -40,9 +40,11 @@ print
4040 %unop
4141 %- zing
4242 :~
43+ "("
4344 (print-unop +<.expr)
4445 " "
4546 (print-expr +>.expr)
47+ ")"
4648 ==
4749 ==
4850:: unop
@@ -189,7 +191,9 @@ print
189191 |= [=prefix-expr]
190192 ?- -.prefix-expr
191193 %var (print-var +.prefix-expr)
192− %expr
194+ %expr
195+ :: since binops already have parens
196+ ?: ?=(%binop +<.prefix-expr) (print-expr +.prefix-expr)
193197 %- zing
194198 :~
195199 "("
@@ -260,7 +264,7 @@ print
260264 %- zing
261265 :~
262266 "local "
263− (print-attnamelist attnamelist.local-asmnt)
267+ (print-attrnamelist attrnamelist.local-asmnt)
264268 ?~ rhs.local-asmnt ""
265269 %- zing
266270 :~
@@ -268,13 +272,13 @@ print
268272 (print-explist u.rhs.local-asmnt)
269273 ==
270274 ==
271−:: attnamelist
275+:: attrnamelist
272276::
273−++ print-attnamelist
274− |= =attnamelist
277+++ print-attrnamelist
278+ |= =attrnamelist
275279 ^- tape
276280 %- commaed
277− %+ turn attnamelist
281+ %+ turn attrnamelist
278282 |= [=name attr=(unit attrib)]
279283 %- zing
280284 :~
desk/lib/lua/utils.hoonnew file+2
@@ -0,0 +1,2 @@
1+|%
2+--
desk/lib/st.hoon+32−3
@@ -11,6 +11,15 @@
1111 |= x=@st
1212 ^- @s
1313 (new:si ?!((sig x)) (abs x))
14+++ from-s
15+ |= x=@s
16+ ^- @st
17+ %- ?. (syn:si x) neg |=(x=@st x)
18+ (dis abs-mask (abs:si x))
19+++ neg
20+ |= x=@st
21+ ^- @st
22+ (dis mask +((mix mask x)))
1423++ sig
1524 |= x=@st
1625 ^- ?
@@ -18,8 +27,7 @@
1827++ abs
1928 |= x=@st
2029 ^- @u
21− ?. (sig x) `@u`x
22− (dis mask +((mix mask x)))
30+ ?. (sig x) `@u`x `@u`(neg x)
2331++ inc
2432 |= x=@st
2533 ^- @st
@@ -28,8 +36,29 @@
2836 |= [x=@st y=@st]
2937 ^- @st
3038 (dis mask (^add x y))
39+++ sub
40+ |= [x=@st y=@st]
41+ ^- @st
42+ (from-s (dif:si (to-s x) (to-s y)))
43+++ mul
44+ |= [x=@st y=@st]
45+ ^- @st
46+ (from-s (pro:si (to-s x) (to-s y)))
47+++ div
48+ |= [x=@st y=@st]
49+ ^- @st
50+ =/ [x=@s y=@s] [(to-s x) (to-s y)]
51+ =/ fra (fra:si x y)
52+ =/ res (from-s fra)
53+ ?: |(=(0 (rem:si x y)) (syn:si fra)) res
54+ (dec res)
55+++ mod
56+ |= [x=@st y=@st]
57+ ^- @st
58+ (sub x (mul (div x y) y))
59+++ mask 0xffff.ffff.ffff.ffff
3160--
3261|%
33−++ mask 0xffff.ffff.ffff.ffff
62+++ abs-mask 0x7fff.ffff.ffff.ffff
3463++ sign-mask 0x8000.0000.0000.0000
3564--
desk/res/lua/bar.luanew file+23
@@ -0,0 +1,23 @@
1+assert(010 .. 020 .. -030 == "1020-30")
2+x = - 2 ^ - 3^4
3+
4+x = 1
5+
6+print(_ENV)
7+print(_ENV._ENV)
8+
9+local foo = _ENV
10+
11+-- local x = 8
12+
13+do
14+ _ENV = {x = 2, print = print}
15+ -- local x = 3
16+ print(x)
17+ print(_ENV)
18+end
19+
20+print(_ENV)
21+print(_ENV._ENV)
22+
23+print(foo._ENV)
desk/res/lua/baz.luanew file+6
@@ -0,0 +1,6 @@
1+x = 8
2+
3+local y = x + 3
4+
5+
6+return y / 2
desk/res/lua/cycled/all.lua+11−11
@@ -32,9 +32,9 @@ local collectgarbage = collectgarbage
3232do
3333local msgs = {}
3434function Message(m)
35−if not _nomsg then
35+if (not _nomsg) then
3636print(m)
37−msgs[# (msgs + 0x1)]=string.sub(m,0x3,- 0x3)
37+msgs[(# (msgs + 0x1))]=string.sub(m,0x3,(- 0x3))
3838end
3939end
4040assert(os.setlocale("\u{43}"))
@@ -59,11 +59,11 @@ end
5959end
6060local Cstacklevel
6161local showmem
62−if not T then
62+if (not T) then
6363local max = 0x0
6464showmem=function ()
6565local m = (collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400)
66−max=((((m > max)) and m) or max)
66+max=(((m > max) and m) or max)
6767print(format("\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{2d}\u{2d}\u{20}\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}\u{25}\u{73}\u{2c}\u{20}\u{6d}\u{61}\u{78}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}\u{25}\u{73}\u{20}\u{2d}\u{2d}\u{2d}\u{2d}\u{a}",F(m),F(max)))
6868end
6969Cstacklevel=function ()
@@ -115,7 +115,7 @@ dofile("\u{67}\u{65}\u{6e}\u{67}\u{63}\u{2e}\u{6c}\u{75}\u{61}")
115115assert((dofile("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == 0x5))
116116dofile("\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
117117dofile("\u{63}\u{6f}\u{64}\u{65}\u{2e}\u{6c}\u{75}\u{61}",true)
118−if not _G._soft then
118+if (not _G._soft) then
119119report("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")
120120local f = coroutine.wrap(assert(loadfile("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")))
121121assert((f() == "\u{62}"))
@@ -139,7 +139,7 @@ assert((dofile("\u{76}\u{65}\u{72}\u{79}\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{6
139139;
140140collectgarbage()
141141dofile("\u{66}\u{69}\u{6c}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
142−if # (msgs > 0x0) then
142+if (# (msgs > 0x0)) then
143143local m = table.concat(msgs,"\u{a}\u{20}\u{20}")
144144warn("\u{23}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{70}\u{65}\u{72}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{3a}\u{a}\u{20}\u{20}",m,"\u{a}")
145145end
@@ -163,7 +163,7 @@ end
163163local _G,showmem,print,format,clock,time,difftime,assert,open,warn = _G,showmem,print,string.format,os.clock,os.time,os.difftime,assert,io.open,warn
164164local fname = ((T and "\u{74}\u{69}\u{6d}\u{65}\u{2d}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{78}\u{74}") or "\u{74}\u{69}\u{6d}\u{65}\u{2e}\u{74}\u{78}\u{74}")
165165local lasttime
166−if not usertests then
166+if (not usertests) then
167167local f = io.open(fname)
168168if f then
169169lasttime=assert(tonumber(f:read("\u{61}")))
@@ -176,7 +176,7 @@ end
176176print("\u{63}\u{6c}\u{65}\u{61}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{6c}\u{21}\u{21}\u{21}\u{21}")
177177for n in pairs(_G)
178178do
179−if not ({["\u{5f}\u{5f}\u{5f}\u{47}\u{6c}\u{6f}\u{62}"] = 0x1,["\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = 0x1})[n] then
179+if (not ({["\u{5f}\u{5f}\u{5f}\u{47}\u{6c}\u{6f}\u{62}"] = 0x1,["\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = 0x1})[n]) then
180180_G[n]=undef
181181end
182182end
@@ -191,11 +191,11 @@ showmem()
191191local clocktime = (clock() - initclock)
192192walltime=difftime(time(),walltime)
193193print(format("\u{a}\u{a}\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{73}\u{20}\u{28}\u{77}\u{61}\u{6c}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{67}\u{73}\u{29}\u{a}",clocktime,walltime))
194−if not usertests then
194+if (not usertests) then
195195lasttime=(lasttime or clocktime)
196−local diff = (((clocktime - lasttime)) / lasttime)
196+local diff = ((clocktime - lasttime) / lasttime)
197197local tolerance = 0.05
198−if (((diff >= tolerance) or (diff <= - tolerance))) then
198+if ((diff >= tolerance) or (diff <= (- tolerance))) then
199199warn(format("\u{23}\u{74}\u{69}\u{6d}\u{65}\u{20}\u{64}\u{69}\u{66}\u{66}\u{65}\u{72}\u{65}\u{6e}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{3a}\u{20}\u{25}\u{2b}\u{2e}\u{31}\u{66}\u{25}\u{25}",(diff * 0x64)))
200200end
201201assert(open(fname,"\u{77}")):write(clocktime):close()
desk/res/lua/cycled/api.lua+83−83
@@ -1,5 +1,5 @@
11if (T == nil) then
2−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
2+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
33return
44end
55local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
@@ -7,7 +7,7 @@ local pack = table.pack
77local MEMERRMSG = "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"
88local function tcheck
99(t1,t2)
10−assert((t1.n == (((t2.n or # t2)) + 0x1)))
10+assert((t1.n == ((t2.n or (# t2)) + 0x1)))
1111for i = 0x2, t1.n
1212do
1313assert((t1[i] == t2[(i - 0x1)]))
@@ -16,7 +16,7 @@ end
1616local function checkerr
1717(msg,f, ...)
1818local stat,err = pcall(f,...)
19−assert(not (stat and string.find(err,msg)))
19+assert((not (stat and string.find(err,msg))))
2020end
2121print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{43}\u{20}\u{41}\u{50}\u{49}")
2222local a = T.testC("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
@@ -24,21 +24,21 @@ assert((a == debug.getregistry()))
2424assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0xa))
2525assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
2626assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
27−assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") < - 0xa))
27+assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") < (- 0xa)))
2828a=T.d2s(12458954321123.0)
2929assert((a == string.pack("\u{64}",12458954321123.0)))
3030assert((T.s2d(a) == 12458954321123.0))
3131local a,b,c = T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
32−assert((((a == 0x2) and (b == 0x3)) and not c))
32+assert((((a == 0x2) and (b == 0x3)) and (not c)))
3333local f = T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
3434a,b,c=f()
35−assert((((a == 0x2) and (b == 0x3)) and not c))
35+assert((((a == 0x2) and (b == 0x3)) and (not c)))
3636a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
3737assert((((a == b) and (a == true)) and (c == false)))
3838a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
3939assert((((a == false) and (b == true)) and (c == false)))
4040a,b,c=T.testC("\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,0x14,0x1e,0x28)
41−assert((((a == 0x28) and (b == 0x5)) and not c))
41+assert((((a == 0x28) and (b == 0x5)) and (not c)))
4242local t = pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3))
4343tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3})
4444t=pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}\u{3b}\u{20}\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}",0x3,0x1,0x17))
@@ -61,7 +61,7 @@ t=pack(T.testC("\u{63}\u{6f}\u{70}\u{79}\u{20}\u{2d}\u{33}\u{20}\u{2d}\u{31}\u{3
6161tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3,0x4,0x3})
6262do
6363local t = {0xa,0x14,0x1e,0x28,0x32,0x3c}
64−for i = - 0x6, 0x6
64+for i = (- 0x6), 0x6
6565do
6666local s = string.format("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{32}\u{20}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{37}",i)
6767local t1 = pack(T.testC(s,0xa,0x14,0x1e,0x28,0x32,0x3c))
@@ -113,12 +113,12 @@ local a = {T.testC("\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}
113113assert(((((a[0x2] == 0xe) and (a[0x3] == "\u{61}\u{33}\u{31}")) and (a[0x4] == nil)) and (_G.AA == "\u{61}\u{33}\u{31}")))
114114_G.AA,_G.BB=nil
115115assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
116−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xa))
117−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xc8))
116+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xa)))
117+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xc8)))
118118assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
119119assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
120−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xa))
121−assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 0xc8))
120+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xa)))
121+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xc8)))
122122assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
123123assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x2,0x0) == (10.0 / 0x0)))
124124a=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
@@ -130,7 +130,7 @@ assert(((a == 0xd) and (math.type(a) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{
130130a=assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
131131assert(((a == 0xd) and (math.type(a) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")))
132132a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
133−assert(((a == 0x1) and (b == - (0xa and (c == "\u{35}")))))
133+assert(((a == 0x1) and (b == (- (0xa and (c == "\u{35}"))))))
134134local mt = {["\u{5f}\u{5f}\u{61}\u{64}\u{64}"] = function (a,b)
135135return setmetatable({(a[0x1] + b[0x1])},mt)
136136end,["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}"] = function (a,b)
@@ -138,23 +138,23 @@ return setmetatable({(a[0x1] % b[0x1])},mt)
138138end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a)
139139return setmetatable({(a[0x1] * 0x2)},mt)
140140end}
141−a,b,c=setmetatable({0x4},mt),setmetatable({0x8},mt),setmetatable({- 0x3},mt)
141+a,b,c=setmetatable({0x4},mt),setmetatable({0x8},mt),setmetatable({(- 0x3)},mt)
142142local x,y,z = T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,a,b)
143143assert((((x == 0xa) and (y[0x1] == 0xc)) and (z == nil)))
144−assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,c)[0x1] == (0x4 % - 0x3)))
145−assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,a,c)[0x1] == (0x8 % ((0x4 + ((- 0x3) * 0x2))))))
144+assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,c)[0x1] == (0x4 % (- 0x3))))
145+assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,a,c)[0x1] == (0x8 % (0x4 + ((- 0x3) * 0x2)))))
146146checkerr("\u{64}\u{69}\u{76}\u{69}\u{64}\u{65}\u{20}\u{62}\u{79}\u{20}\u{7a}\u{65}\u{72}\u{6f}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}",0xa,0x0)
147147checkerr("\u{25}\u{25}\u{30}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}",0xa,0x0)
148148assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
149149assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
150−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
150+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2)))
151151assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
152152assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x4,0x2,0x2,0x3,0x2,0x2))
153−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{2d}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{34}","\u{32}","\u{32}","\u{33}","\u{32}","\u{32}"))
154−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{33}","\u{32}","\u{32}","\u{34}","\u{32}","\u{32}"))
155−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{31}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
156−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{39}\u{20}\u{31}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
157−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{39}\u{20}\u{39}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
153+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{2d}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{34}","\u{32}","\u{32}","\u{33}","\u{32}","\u{32}")))
154+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{33}","\u{32}","\u{32}","\u{34}","\u{32}","\u{32}")))
155+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{31}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
156+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{39}\u{20}\u{31}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
157+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{39}\u{20}\u{39}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
158158local b = {["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
159159return (a[0x1] < b[0x1])
160160end}
@@ -219,7 +219,7 @@ n=(n or 0x2)
219219local prog = "\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{63}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{38}\u{a}\u{20}\u{20}"
220220prog=string.format(prog,n,n,n,n,n,n,n,n)
221221local a,b,c,d,e,f,g,h = T.testC(prog,x)
222−return (((((((B(a) + B(b)) + B(c)) + B(d)) + B(e)) + B(f)) + B(g)) + ((0x64 * B(h))))
222+return (((((((B(a) + B(b)) + B(c)) + B(d)) + B(e)) + B(f)) + B(g)) + (0x64 * B(h)))
223223end
224224assert((count(0x3) == 0x2))
225225assert((count("\u{61}\u{6c}\u{6f}") == 0x1))
@@ -286,13 +286,13 @@ assert((T.checkpanic("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{6
286286T.totalmem((T.totalmem() + 0x2710))
287287assert((T.checkpanic("\u{6e}\u{65}\u{77}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{30}\u{30}\u{30}\u{30}") == MEMERRMSG))
288288T.totalmem(0x0)
289−if not _soft then
289+if (not _soft) then
290290local msg = T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{66}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}")
291291assert(string.find(msg,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
292292end
293293assert((T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{59}\u{20}\u{3d}\u{20}\u{27}\u{68}\u{6f}\u{27}\u{3b}\u{20}\u{65}\u{6e}\u{64}\u{7d}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{68}\u{69}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{a}\u{20}\u{20}","\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{6f}\u{72}\u{69}\u{67}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}") == "\u{68}\u{69}\u{68}\u{6f}"))
294294end
295−if not _soft then
295+if (not _soft) then
296296print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
297297collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
298298checkerr("\u{58}\u{58}\u{58}\u{58}",T.testC,"\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{31}\u{30}\u{30}\u{30}\u{30}\u{32}\u{33}\u{20}\u{58}\u{58}\u{58}\u{58}")
@@ -303,19 +303,19 @@ collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
303303print("\u{2b}")
304304end
305305local lim = ((_soft and 0x1f4) or 0x2ee0)
306−local prog = {("\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}" .. ((((lim * 0x2) + 0x64)) .. "\u{6d}\u{73}\u{67}")),"\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}"}
306+local prog = {("\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}" .. (((lim * 0x2) + 0x64) .. "\u{6d}\u{73}\u{67}")),"\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}"}
307307for i = 0x1, lim
308308do
309−prog[# (prog + 0x1)]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. i)
310−prog[# (prog + 0x1)]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. (i * 0xa))
309+prog[(# (prog + 0x1))]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. i)
310+prog[(# (prog + 0x1))]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. (i * 0xa))
311311end
312−prog[# (prog + 0x1)]="\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{32}"
313−prog[# (prog + 0x1)]=("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}" .. - (((0x2 * lim) + 0x2)))
312+prog[(# (prog + 0x1))]="\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{32}"
313+prog[(# (prog + 0x1))]=("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}" .. (- ((0x2 * lim) + 0x2)))
314314for i = 0x1, lim
315315do
316−prog[# (prog + 0x1)]=("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}" .. - (((0x2 * (((lim - i) + 0x1))) + 0x1)))
316+prog[(# (prog + 0x1))]=("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}" .. (- ((0x2 * ((lim - i) + 0x1)) + 0x1)))
317317end
318−prog[# (prog + 0x1)]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}"
318+prog[(# (prog + 0x1))]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}"
319319prog=table.concat(prog,"\u{3b}")
320320local g,t = T.testC(prog)
321321assert((g == _G))
@@ -337,7 +337,7 @@ _G.XX=nil
337337local function check3
338338(p, ...)
339339local arg = {...}
340−assert(# (arg == 0x3))
340+assert((# (arg == 0x3)))
341341assert(string.find(arg[0x3],p))
342342end
343343check3("\u{3a}\u{31}\u{3a}",T.testC("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{78}\u{3d}"))
@@ -349,9 +349,9 @@ local th = coroutine.create(function ()
349349
350350end)
351351local stt,err = pcall(T.testC,th,code)
352−assert(not (stt and string.find(err,msg)))
352+assert((not (stt and string.find(err,msg))))
353353end
354−if not _soft then
354+if (not _soft) then
355355collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
356356checkerrnopro("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}","\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{61}\u{6c}\u{6c}")
357357print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{75}\u{6e}\u{70}\u{72}\u{6f}\u{74}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")
@@ -376,35 +376,35 @@ local a = {}
376376a[a]=0xa
377377local prog = "\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
378378local res = {T.testC(prog,a)}
379−assert(# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa)))
379+assert((# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa))))
380380local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
381381local res = {T.testC(prog,a,0x14)}
382382assert((a[a] == 0x14))
383−assert(# ((res == 0x1) and (res[0x1] == prog)))
383+assert((# ((res == 0x1) and (res[0x1] == prog))))
384384a[a]=0xa
385385local prog = "\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
386386local res = {T.testC(prog,a)}
387−assert(# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa)))
387+assert((# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa))))
388388local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
389389local res = {T.testC(prog,a,0x14)}
390390assert((a[a] == 0x14))
391−assert(# ((res == 0x1) and (res[0x1] == prog)))
391+assert((# ((res == 0x1) and (res[0x1] == prog))))
392392local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
393393local res = {T.testC(prog,0x1e,a)}
394394assert((a[0x1e] == a))
395−assert(# ((res == 0x1) and (res[0x1] == prog)))
395+assert((# ((res == 0x1) and (res[0x1] == prog))))
396396local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
397397local res = {T.testC(prog,0x28,a)}
398398assert((a[0x28] == a))
399−assert(# ((res == 0x1) and (res[0x1] == prog)))
399+assert((# ((res == 0x1) and (res[0x1] == prog))))
400400local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{31}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
401401local res = {T.testC(prog,a)}
402402assert((a[0x64] == a))
403−assert(# ((res == 0x1) and (res[0x1] == prog)))
403+assert((# ((res == 0x1) and (res[0x1] == prog))))
404404local prog = "\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{32}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
405405local res = {T.testC(prog,a)}
406406assert((a[0xc8] == a))
407−assert(# ((res == 0x1) and (res[0x1] == prog)))
407+assert((# ((res == 0x1) and (res[0x1] == prog))))
408408end
409409a={["\u{78}"] = 0x0,["\u{79}"] = 0xc}
410410x,y=T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{34}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a,0x3,"\u{79}",0x4,"\u{78}")
@@ -484,7 +484,7 @@ do
484484assert((A(("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"):format(i)) == 0xa))
485485end
486486assert(A("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
487−assert(not A("\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
487+assert((not A("\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
488488end
489489checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",debug.setuservalue,0x3,{})
490490checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{69}\u{6c}",debug.setuservalue,nil,{})
@@ -496,10 +496,10 @@ local v,p = debug.getuservalue(b,i)
496496assert(((v == nil) and p))
497497end
498498do
499−local v,p = debug.getuservalue(b,- 0x2)
500−assert(((v == nil) and not p))
499+local v,p = debug.getuservalue(b,(- 0x2))
500+assert(((v == nil) and (not p)))
501501local v,p = debug.getuservalue(b,0xb)
502−assert(((v == nil) and not p))
502+assert(((v == nil) and (not p)))
503503end
504504local t = {true,false,4.56,print,{},b,"\u{58}\u{59}\u{5a}"}
505505for k,v in ipairs(t)
@@ -511,7 +511,7 @@ do
511511local v1,p = debug.getuservalue(b,k)
512512assert(((v1 == v) and p))
513513end
514−assert(not debug.getuservalue(0x4))
514+assert((not debug.getuservalue(0x4)))
515515debug.setuservalue(b,function ()
516516return 0xa
517517end,0xa)
@@ -551,10 +551,10 @@ for i = 0x1, Lim
551551do
552552Arr[i]=T.ref({})
553553end
554−assert((T.ref(nil) == - (0x1 and (T.getref(- 0x1) == nil))))
555−T.unref(- 0x1)
554+assert((T.ref(nil) == (- (0x1 and (T.getref((- 0x1)) == nil)))))
555+T.unref((- 0x1))
556556;
557−T.unref(- 0x1)
557+T.unref((- 0x1))
558558for i = 0x1, Lim
559559do
560560T.unref(Arr[i])
@@ -578,7 +578,7 @@ do
578578T.unref(Arr[i])
579579end
580580assert((type(T.getref(Arr[0x2])) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
581−assert((T.getref(- 0x1) == nil))
581+assert((T.getref((- 0x1)) == nil))
582582a=T.ref({})
583583collectgarbage()
584584assert((type(T.getref(a)) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
@@ -595,7 +595,7 @@ local d = T.newuserdata(0x64)
595595d=nil
596596assert((debug.getmetatable(x).__gc == F))
597597assert(load("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{7b}\u{7d}\u{29}"))()
598−assert(not collectgarbage())
598+assert((not collectgarbage()))
599599local dummy = {}
600600if (A ~= nil) then
601601assert((type(A) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"))
@@ -686,7 +686,7 @@ T.unref(e)
686686;
687687T.unref(f)
688688collectgarbage()
689−assert(# ((cl == 0x1) and (cl[0x1] == nc)))
689+assert((# ((cl == 0x1) and (cl[0x1] == nc))))
690690x=T.getref(d)
691691assert(((type(x) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (debug.getmetatable(x) == tt)))
692692x=nil
@@ -700,11 +700,11 @@ local n5 = T.newuserdata(0x0)
700700debug.setmetatable(n5,{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
701701n5=T.udataval(n5)
702702collectgarbage()
703−assert(# (cl == 0x4))
703+assert((# (cl == 0x4)))
704704assert((((cl[0x2] == n5) and (cl[0x3] == nb)) and (cl[0x4] == na)))
705705collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
706706a,na={},{}
707−for i = 0x1e, 0x1, - 0x1
707+for i = 0x1e, 0x1, (- 0x1)
708708do
709709a[i]=T.newuserdata(0x0)
710710debug.setmetatable(a[i],{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
@@ -714,7 +714,7 @@ cl={}
714714a=nil
715715;
716716collectgarbage()
717−assert(# (cl == 0x1e))
717+assert((# (cl == 0x1e)))
718718for i = 0x1, 0x1e
719719do
720720assert((cl[i] == na[i]))
@@ -732,19 +732,19 @@ cl={}
732732a={[x] = 0x1}
733733x=T.udataval(x)
734734collectgarbage()
735−assert(# (cl == 0x0))
735+assert((# (cl == 0x0)))
736736for n in pairs(a)
737737do
738738a[n]=undef
739739end
740740collectgarbage()
741−assert(# ((cl == 0x1) and (cl[0x1] == x)))
741+assert((# ((cl == 0x1) and (cl[0x1] == x))))
742742assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",print,0x1,print,0x14))
743743assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{33}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{61}\u{6c}\u{6f}","\u{61}\u{6c}\u{6f}"))
744744assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",nil,nil))
745−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",{},{}))
746−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
747−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3))
745+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",{},{})))
746+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
747+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3)))
748748do
749749local map = {}
750750local t = {["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
@@ -760,7 +760,7 @@ end
760760assert((f(0xa) == f(0xa)))
761761assert((f(0xa) ~= f(0xb)))
762762assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0xa)))
763−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0x14)))
763+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0x14))))
764764t.__eq=nil
765765assert((f(0xa) ~= f(0xa)))
766766end
@@ -839,7 +839,7 @@ T.closestate(T.newstate())
839839L1=T.newstate()
840840assert(L1)
841841assert((T.doremote(L1,"\u{58}\u{3d}\u{27}\u{61}\u{27}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{27}") == "\u{61}"))
842−assert(# (pack(T.doremote(L1,"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{2c}\u{20}\u{33}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{66}\u{28}\u{29}")) == 0x0))
842+assert((# (pack(T.doremote(L1,"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{2c}\u{20}\u{33}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{66}\u{28}\u{29}")) == 0x0)))
843843a,b=T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{28}\u{29}")
844844assert(((a == "\u{61}\u{6c}\u{6f}") and (b == "\u{33}")))
845845T.doremote(L1,"\u{5f}\u{45}\u{52}\u{52}\u{4f}\u{52}\u{4d}\u{45}\u{53}\u{53}\u{41}\u{47}\u{45}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}")
@@ -866,27 +866,27 @@ local openresource = {}
866866local function newresource
867867()
868868local x = setmetatable({0xa},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (y)
869−assert((openresource[# openresource] == y))
870−openresource[# openresource]=nil
869+assert((openresource[(# openresource)] == y))
870+openresource[(# openresource)]=nil
871871y[0x1]=(y[0x1] + 0x1)
872872end})
873−openresource[# (openresource + 0x1)]=x
873+openresource[(# (openresource + 0x1))]=x
874874return x
875875end
876876local a,b = T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{62}\u{65}\u{20}\u{69}\u{67}\u{6e}\u{6f}\u{72}\u{65}\u{64}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)
877877assert(((a[0x1] == 0xb) and (b == nil)))
878−assert(# (openresource == 0x0))
878+assert((# (openresource == 0x0)))
879879local a = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)}
880880assert(((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (a[0x2][0x1] == 0xb)))
881−assert(# (openresource == 0x0))
881+assert((# (openresource == 0x0)))
882882local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{69}\u{73}\u{20}\u{74}\u{68}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}"),newresource)
883883assert(((a == false) and (b[0x1] == 0xb)))
884−assert(# (openresource == 0x0))
884+assert((# (openresource == 0x0)))
885885local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{72}\u{61}\u{69}\u{73}\u{65}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{62}\u{6f}\u{72}\u{74}\u{20}\u{20}\u{23}\u{20}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{65}\u{78}\u{65}\u{63}\u{75}\u{74}\u{65}\u{64}\u{a}\u{20}\u{20}"))
886886assert(((a == false) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")))
887887local function check
888888(n)
889−assert(# (openresource == n))
889+assert((# (openresource == n)))
890890end
891891_ENV.xxx=true
892892local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{34}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{22}\u{78}\u{78}\u{78}\u{22}\u{20}\u{20}\u{23}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{6f}\u{70}\u{2e}\u{20}\u{65}\u{72}\u{61}\u{73}\u{65}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
@@ -894,7 +894,7 @@ assert(((a == 0x3) and (_ENV.xxx == nil)))
894894local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
895895assert((a == 0x3))
896896local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}"))
897−assert(not (a and string.find(b,"\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
897+assert((not (a and string.find(b,"\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}"))))
898898end
899899print("\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{2d}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}")
900900checkerr("\u{62}\u{6c}\u{6f}\u{63}\u{6b}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{62}\u{69}\u{67}",T.newuserdata,math.maxinteger)
@@ -1029,7 +1029,7 @@ testamem("\u{67}\u{73}\u{75}\u{62}",function ()
10291029local a,b = string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{28}\u{61}\u{29}",function (x)
10301030return (x .. "\u{62}")
10311031end)
1032−return ((a == "\u{61}\u{62}\u{6c}\u{6f}\u{20}\u{61}\u{62}\u{6c}\u{6f}"))
1032+return (a == "\u{61}\u{62}\u{6c}\u{6f}\u{20}\u{61}\u{62}\u{6c}\u{6f}")
10331033end)
10341034testamem("\u{64}\u{75}\u{6d}\u{70}\u{2f}\u{75}\u{6e}\u{64}\u{75}\u{6d}\u{70}",function ()
10351035local a = load(testprog)
@@ -1041,10 +1041,10 @@ _G.AA=nil
10411041local t = os.tmpname()
10421042testamem("\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
10431043local f = assert(io.open(t,"\u{77}"))
1044−assert(not io.open("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}"))
1044+assert((not io.open("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}")))
10451045io.close(f)
10461046;
1047−return not loadfile("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}")
1047+return (not loadfile("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}"))
10481048end)
10491049assert(os.remove(t))
10501050testamem("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
@@ -1055,11 +1055,11 @@ a[i]=i
10551055;
10561056a[(i .. "\u{61}")]={}
10571057end
1058−return (((type(a[(lim .. "\u{61}")]) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and (a[lim] == lim)))
1058+return ((type(a[(lim .. "\u{61}")]) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and (a[lim] == lim))
10591059end)
10601060testamem("\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{6f}\u{72}\u{73}",function ()
10611061local a = {0xa,0x14,0x1e,0x28,0x32,["\u{61}"] = 0x1,["\u{62}"] = 0x2,["\u{63}"] = 0x3,["\u{64}"] = 0x4,["\u{65}"] = 0x5}
1062−return (((type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and (a.e == 0x5)))
1062+return ((type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and (a.e == 0x5))
10631063end)
10641064local a = 0x1
10651065local close = nil
@@ -1069,7 +1069,7 @@ return function (x)
10691069return (b + x)
10701070end
10711071end
1072−return ((close(0x2)(0x4) == 0x6))
1072+return (close(0x2)(0x4) == 0x6)
10731073end)
10741074testamem("\u{75}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}",function ()
10751075local a = coroutine.wrap(function ()
@@ -1121,7 +1121,7 @@ end
11211121do
11221122local L = T.newstate()
11231123T.loadlib(L)
1124−local res = (T.doremote(L,"\u{20}\u{20}\u{20}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{5f}\u{47}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{54}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{54}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{20}\u{31}\u{30}\u{30}\u{30}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{5b}\u{69}\u{5d}\u{20}\u{3d}\u{20}\u{27}\u{69}\u{27}\u{20}\u{2e}\u{2e}\u{20}\u{69}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{2c}\u{20}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{30}\u{30}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{6e}\u{20}\u{2d}\u{20}\u{31}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{31}\u{38}\u{30}\u{29}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{2c}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{38}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{65}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{6f}\u{20}\u{74}\u{68}\u{65}\u{79}\u{20}\u{6b}\u{65}\u{70}\u{74}\u{20}\u{74}\u{68}\u{65}\u{69}\u{72}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{28}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{32}\u{2c}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}\u{a}\u{20}\u{20}"))
1124+local res = T.doremote(L,"\u{20}\u{20}\u{20}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{5f}\u{47}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{54}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{54}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{20}\u{31}\u{30}\u{30}\u{30}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{5b}\u{69}\u{5d}\u{20}\u{3d}\u{20}\u{27}\u{69}\u{27}\u{20}\u{2e}\u{2e}\u{20}\u{69}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{2c}\u{20}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{30}\u{30}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{6e}\u{20}\u{2d}\u{20}\u{31}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{31}\u{38}\u{30}\u{29}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{2c}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{38}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{65}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{6f}\u{20}\u{74}\u{68}\u{65}\u{79}\u{20}\u{6b}\u{65}\u{70}\u{74}\u{20}\u{74}\u{68}\u{65}\u{69}\u{72}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{28}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{32}\u{2c}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}\u{a}\u{20}\u{20}")
11251125assert((res == "\u{6f}\u{6b}"))
11261126T.closestate(L)
11271127end
@@ -1140,7 +1140,7 @@ assert((gsub("\u{2e}\u{2e}\u{2e}","\u{2e}\u{2e}\u{2e}","") == ""))
11401140local mt_xuxu,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
11411141assert((((type(mt_xuxu) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and res) and (top == 0x3)))
11421142local d,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1143−assert(((mt_xuxu == d) and not (res and (top == 0x3))))
1143+assert(((mt_xuxu == d) and (not (res and (top == 0x3)))))
11441144d,res,top=T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
11451145assert((((mt_xuxu ~= d) and res) and (top == 0x3)))
11461146x=T.newuserdata(0x0)
@@ -1152,11 +1152,11 @@ assert((getmetatable(x) == mt_xuxu))
11521152local res1,res2,top = T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{20}\u{20}\u{20}\u{9}\u{20}\u{9}\u{9}\u{9}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
11531153assert(((res1 and res2) and (top == 0x4)))
11541154res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1155−assert(not (res1 and not (res2 and (top == 0x4))))
1155+assert((not (res1 and (not (res2 and (top == 0x4))))))
11561156res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1157−assert(not (res1 and not (res2 and (top == 0x4))))
1157+assert((not (res1 and (not (res2 and (top == 0x4))))))
11581158res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",y)
1159−assert(not (res1 and not (res2 and (top == 0x4))))
1159+assert((not (res1 and (not (res2 and (top == 0x4))))))
11601160do
11611161local r = debug.getregistry()
11621162assert(((r.xuxu == mt_xuxu) and (r.xuxu1 == d)))
desk/res/lua/cycled/attrib.lua+57−57
@@ -18,19 +18,19 @@ for i = 0x1, max
1818do
1919t[i]=string.rep("\u{3f}",((i % 0xa) + 0x1))
2020end
21−t[# (t + 0x1)]="\u{3b}"
21+t[(# (t + 0x1))]="\u{3b}"
2222local path = table.concat(t,"\u{3b}")
2323local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
24−assert(not ((s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",0xa))) and # (string.gsub(err,"\u{5b}\u{5e}\u{a}\u{5d}","") >= max)))
24+assert((not ((s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",0xa))) and (# (string.gsub(err,"\u{5b}\u{5e}\u{a}\u{5d}","") >= max)))))
2525local path = string.rep("\u{3f}",max)
2626local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
27−assert(not (s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",max))))
27+assert((not (s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",max)))))
2828end
2929do
3030local oldpath = package.path
3131package.path={}
3232local s,err = pcall(require,"\u{6e}\u{6f}\u{2d}\u{73}\u{75}\u{63}\u{68}\u{2d}\u{66}\u{69}\u{6c}\u{65}")
33−assert(not (s and string.find(err,"\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}")))
33+assert((not (s and string.find(err,"\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}"))))
3434package.path=oldpath
3535end
3636do
@@ -46,7 +46,7 @@ package.path=oldpath
4646package.cpath=oldcpath
4747end
4848print("\u{2b}")
49−if not _port then
49+if (not _port) then
5050local dirsep = string.match(package.config,"\u{5e}\u{28}\u{5b}\u{5e}\u{a}\u{5d}\u{2b}\u{29}\u{a}")
5151local DIR = ("\u{6c}\u{69}\u{62}\u{73}" .. dirsep)
5252local function D
@@ -56,7 +56,7 @@ return (DIR .. x)
5656end
5757local function DC
5858(x)
59−local ext = ((((dirsep == "\u{5c}")) and "\u{2e}\u{64}\u{6c}\u{6c}") or "\u{2e}\u{73}\u{6f}")
59+local ext = (((dirsep == "\u{5c}") and "\u{2e}\u{64}\u{6c}\u{6c}") or "\u{2e}\u{73}\u{6f}")
6060return D((x .. ext))
6161end
6262local function createfiles
@@ -100,9 +100,9 @@ end
100100local a = require("\u{6e}\u{61}\u{6d}\u{65}\u{73}")
101101assert(((a[0x1] == "\u{6e}\u{61}\u{6d}\u{65}\u{73}") and (a[0x2] == D("\u{6e}\u{61}\u{6d}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}"))))
102102local st,msg = pcall(require,"\u{65}\u{72}\u{72}")
103−assert(not ((st and string.find(msg,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{6d}\u{65}\u{74}\u{69}\u{63}")) and (B == 0xf)))
103+assert((not ((st and string.find(msg,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{6d}\u{65}\u{74}\u{69}\u{63}")) and (B == 0xf))))
104104st,msg=pcall(require,"\u{73}\u{79}\u{6e}\u{65}\u{72}\u{72}")
105−assert(not (st and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}")))
105+assert((not (st and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}"))))
106106assert((package.searchpath("\u{43}",package.path) == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
107107assert((require("\u{43}") == 0x19))
108108assert((require("\u{43}") == 0x19))
@@ -149,9 +149,9 @@ assert(((require("\u{50}\u{31}") == m) and (m.AA == 0xa)))
149149removefiles(files)
150150AA=nil
151151package.path=""
152−assert(not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}"))
152+assert((not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}")))
153153package.path="\u{3f}\u{3f}\u{0}\u{3f}"
154−assert(not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{31}"))
154+assert((not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{31}")))
155155package.path=oldpath
156156local fname = "\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{32}"
157157local m,err = pcall(require,fname)
@@ -164,27 +164,27 @@ do
164164local searchers = package.searchers
165165package.searchers=0x3
166166local st,msg = pcall(require,"\u{61}")
167−assert(not (st and string.find(msg,"\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}")))
167+assert((not (st and string.find(msg,"\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}"))))
168168package.searchers=searchers
169169end
170170local function import
171171(...)
172172local f = {...}
173173return function (m)
174−for i = 0x1, # f
174+for i = 0x1, (# f)
175175do
176176m[f[i]]=_G[f[i]]
177177end
178178end
179179end
180−assert(not pcall(module,"\u{58}\u{55}\u{58}\u{55}"))
180+assert((not pcall(module,"\u{58}\u{55}\u{58}\u{55}")))
181181local p = ""
182182local st,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),"\u{2a}")
183−if not st then
183+if (not st) then
184184local f,err,when = package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
185−assert(not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{61}\u{62}\u{73}\u{65}\u{6e}\u{74}")))
185+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{61}\u{62}\u{73}\u{65}\u{6e}\u{74}"))))
186186;
187−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{64}\u{79}\u{6e}\u{61}\u{6d}\u{69}\u{63}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
187+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{64}\u{79}\u{6e}\u{61}\u{6d}\u{69}\u{63}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
188188print(err,when)
189189else
190190local f = assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{6f}\u{6e}\u{65}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
@@ -193,9 +193,9 @@ assert(((a == 0x19) and (b == 0xf)))
193193f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{66}\u{75}\u{6e}\u{63}")))
194194assert((f(0xa,0x14) == "\u{31}\u{30}\u{25}\u{32}\u{30}\u{a}"))
195195local f,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{78}\u{75}\u{78}\u{75}"))
196−assert(not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{69}\u{6e}\u{69}\u{74}")))
196+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{69}\u{6e}\u{69}\u{74}"))))
197197f,err,when=package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
198−assert(not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{6f}\u{70}\u{65}\u{6e}")))
198+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{6f}\u{70}\u{65}\u{6e}"))))
199199f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}\u{31}"),(p .. "\u{6c}\u{75}\u{61}\u{6f}\u{70}\u{65}\u{6e}\u{5f}\u{6c}\u{69}\u{62}\u{31}\u{31}")))
200200assert((f() == "\u{65}\u{78}\u{70}\u{6f}\u{72}\u{74}\u{65}\u{64}"))
201201package.cpath=DC("\u{3f}")
@@ -264,36 +264,36 @@ assert((((a == 0x0) and (b == 0x5)) and (c == 0x1)))
264264a,b,c=0x0,0x5,f(0x0)
265265assert((((a == 0x0) and (b == 0x5)) and (c == nil)))
266266end
267−local a,b,c,d = (0x1 and nil),(0x1 or nil),((0x1 and ((nil or 0x1)))),0x6
268−assert(not (((a and b) and c) and (d == 0x6)))
267+local a,b,c,d = (0x1 and nil),(0x1 or nil),(0x1 and (nil or 0x1)),0x6
268+assert((not (((a and b) and c) and (d == 0x6))))
269269d=0x14
270270a,b,c,d=f()
271271assert(((((a == 0xa) and (b == 0xb)) and (c == 0xc)) and (d == nil)))
272272a,b=f(),0x1,0x2,0x3,f()
273273assert(((a == 0xa) and (b == 0x1)))
274274assert((((a < b) == false) and ((a > b) == true)))
275−assert((((0xa and 0x2)) == 0x2))
276−assert((((0xa or 0x2)) == 0xa))
277−assert((((0xa or assert(nil))) == 0xa))
278−assert(not ((nil and assert(nil))))
279−assert((((nil or "\u{61}\u{6c}\u{6f}")) == "\u{61}\u{6c}\u{6f}"))
280−assert((((nil and 0xa)) == nil))
281−assert((((false and 0xa)) == false))
282−assert((((true or 0xa)) == true))
283−assert((((false or 0xa)) == 0xa))
275+assert(((0xa and 0x2) == 0x2))
276+assert(((0xa or 0x2) == 0xa))
277+assert(((0xa or assert(nil)) == 0xa))
278+assert((not (nil and assert(nil))))
279+assert(((nil or "\u{61}\u{6c}\u{6f}") == "\u{61}\u{6c}\u{6f}"))
280+assert(((nil and 0xa) == nil))
281+assert(((false and 0xa) == false))
282+assert(((true or 0xa) == true))
283+assert(((false or 0xa) == 0xa))
284284assert((false ~= nil))
285285assert((nil ~= false))
286−assert(not (nil == true))
287−assert(not not (nil == false))
288−assert(not not (0x1 == true))
289−assert(not not (a == true))
290−assert(not not (((0x6 or nil)) == true))
291−assert(not not (((nil and 0x38)) == false))
292−assert(not not (((nil and true)) == false))
293−assert(not (0xa == false))
294−assert(not ({} == false))
295−assert(not (0.5 == false))
296−assert(not ("\u{78}" == false))
286+assert((not (nil == true)))
287+assert((not (not (nil == false))))
288+assert((not (not (0x1 == true))))
289+assert((not (not (a == true))))
290+assert((not (not ((0x6 or nil) == true))))
291+assert((not (not ((nil and 0x38) == false))))
292+assert((not (not ((nil and true) == false))))
293+assert((not (0xa == false)))
294+assert((not ({} == false)))
295+assert((not (0.5 == false)))
296+assert((not ("\u{78}" == false)))
297297assert(({} ~= {}))
298298print("\u{2b}")
299299a={}
@@ -304,7 +304,7 @@ function f(a)
304304return a
305305end
306306local a = {}
307−for i = 0xbb8, - 0xbb8, - 0x1
307+for i = 0xbb8, (- 0xbb8), (- 0x1)
308308do
309309a[(i + 0.0)]=i
310310;
@@ -314,8 +314,8 @@ a[1e31]="\u{61}\u{6c}\u{6f}"
314314a[true]=0xa
315315;
316316a[false]=0x14
317−assert((((a[1e31] == "\u{61}\u{6c}\u{6f}") and (a[not 0x1] == 0x14)) and (a[(0xa < 0x14)] == 0xa)))
318−for i = 0xbb8, - 0xbb8, - 0x1
317+assert((((a[1e31] == "\u{61}\u{6c}\u{6f}") and (a[(not 0x1)] == 0x14)) and (a[(0xa < 0x14)] == 0xa)))
318+for i = 0xbb8, (- 0xbb8), (- 0x1)
319319do
320320assert((a[i] == i))
321321;
@@ -325,20 +325,20 @@ a[f]=print
325325a[a]=a
326326assert((a[a][a][a][a][print] == assert))
327327a[print]((a[a[f]] == a[print]))
328−assert(not pcall(function ()
328+assert((not pcall(function ()
329329local a = {}
330330;
331331a[nil]=0xa
332−end))
333−assert(not pcall(function ()
332+end)))
333+assert((not pcall(function ()
334334local a = {[nil] = 0xa}
335−end))
335+end)))
336336assert((a[nil] == undef))
337337a=nil
338338local a,b,c
339−a={0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,[- 0x3] = "\u{61}",[f] = print,["\u{61}"] = "\u{61}",["\u{62}"] = "\u{61}\u{62}"}
340−a,a.x,a.y=a,a[- 0x3]
341−assert((((((a[0x1] == 0xa) and (a[- 0x3] == a.a)) and (a[f] == print)) and (a.x == "\u{61}")) and not a.y))
339+a={0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,[(- 0x3)] = "\u{61}",[f] = print,["\u{61}"] = "\u{61}",["\u{62}"] = "\u{61}\u{62}"}
340+a,a.x,a.y=a,a[(- 0x3)]
341+assert((((((a[0x1] == 0xa) and (a[(- 0x3)] == a.a)) and (a[f] == print)) and (a.x == "\u{61}")) and (not a.y)))
342342a[0x1],f(a)[0x2],b,c={["\u{61}\u{6c}\u{6f}"] = assert},0xa,a[0x1],a[f],0x6,0xa,0x17,f(a),0x2
343343a[0x1].alo((((a[0x2] == 0xa) and (b == 0xa)) and (c == print)))
344344a.aVeryLongName012345678901234567890123456789012345678901234567890123456789=0xa
@@ -354,10 +354,10 @@ local _ENV <const> = 0xb
354354X="\u{68}\u{69}"
355355end
356356local st,msg = pcall(foo)
357−assert(not (st and string.find(msg,"\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
357+assert((not (st and string.find(msg,"\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
358358end
359359local maxint = math.maxinteger
360−while ((maxint ~= ((maxint + 0.0))) or (((maxint - 0x1)) ~= ((maxint - 1.0)))) do
360+while ((maxint ~= (maxint + 0.0)) or ((maxint - 0x1) ~= (maxint - 1.0))) do
361361maxint=(maxint // 0x2)
362362end
363363local maxintF = (maxint + 0.0)
@@ -366,14 +366,14 @@ a[maxintF]=0xa
366366;
367367a[(maxintF - 1.0)]=0xb
368368;
369−a[- maxintF]=0xc
369+a[(- maxintF)]=0xc
370370;
371−a[- (maxintF + 1.0)]=0xd
371+a[(- (maxintF + 1.0))]=0xd
372372;
373−assert(((((a[maxint] == 0xa) and (a[(maxint - 0x1)] == 0xb)) and (a[- maxint] == 0xc)) and (a[- (maxint + 0x1)] == 0xd)))
373+assert(((((a[maxint] == 0xa) and (a[(maxint - 0x1)] == 0xb)) and (a[(- maxint)] == 0xc)) and (a[(- (maxint + 0x1))] == 0xd)))
374374a[maxint]=0x14
375−a[- maxint]=0x16
376−assert(((((a[maxintF] == 0x14) and (a[(maxintF - 1.0)] == 0xb)) and (a[- maxintF] == 0x16)) and (a[- (maxintF + 1.0)] == 0xd)))
375+a[(- maxint)]=0x16
376+assert(((((a[maxintF] == 0x14) and (a[(maxintF - 1.0)] == 0xb)) and (a[(- maxintF)] == 0x16)) and (a[(- (maxintF + 1.0))] == 0xd)))
377377a=nil
378378do
379379local a,i,j,b
desk/res/lua/cycled/bar.luanew file+2
@@ -0,0 +1,2 @@
1+assert((0xa .. (0x14 .. (- (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}")))))
2+x=(- (0x2 ^ (- (0x3 ^ 0x4))))
desk/res/lua/cycled/big.lua+8−8
@@ -7,12 +7,12 @@ local lim = ((0x2 ^ 0x12) + 0x3e8)
77local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{7b}\u{30}"}
88for i = 0x1, lim
99do
10−prog[# (prog + 0x1)]=i
10+prog[(# (prog + 0x1))]=i
1111end
12−prog[# (prog + 0x1)]="\u{7d}\u{a}"
13−prog[# (prog + 0x1)]="\u{58}\u{20}\u{3d}\u{20}\u{79}\u{a}"
14−prog[# (prog + 0x1)]=("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{58}\u{5b}\u{25}\u{64}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{25}\u{64}\u{29}"):format((lim - 0x1),(lim - 0x2))
15−prog[# (prog + 0x1)]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{30}"
12+prog[(# (prog + 0x1))]="\u{7d}\u{a}"
13+prog[(# (prog + 0x1))]="\u{58}\u{20}\u{3d}\u{20}\u{79}\u{a}"
14+prog[(# (prog + 0x1))]=("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{58}\u{5b}\u{25}\u{64}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{25}\u{64}\u{29}"):format((lim - 0x1),(lim - 0x2))
15+prog[(# (prog + 0x1))]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{30}"
1616prog=table.concat(prog,"\u{3b}")
1717local env = {["\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = string,["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert}
1818local f = assert(load(prog,nil,nil,env))
@@ -45,12 +45,12 @@ getmetatable(env).__newindex=function ()
4545
4646end
4747local e,m = pcall(f)
48−assert(not (e and m:find("\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{58}\u{27}")))
48+assert((not (e and m:find("\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{58}\u{27}"))))
4949getmetatable(env).__newindex=function ()
5050error("\u{68}\u{69}")
5151end
5252local e,m = xpcall(f,debug.traceback)
53−assert(not (e and m:find("\u{27}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{27}")))
53+assert((not (e and m:find("\u{27}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{27}"))))
5454f,X=nil
5555coroutine.yield("\u{62}")
5656if ((0x2 ^ 0x20) == 0x0) then
@@ -61,7 +61,7 @@ assert(((repstrings * ssize) > (2.0 ^ 0x20)))
6161local longs = string.rep("\u{0}",ssize)
6262local rep = assert(load(("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{2e}\u{2e}\u{2e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. string.rep("\u{61}",repstrings,"\u{2e}\u{2e}"))))
6363local a,b = pcall(rep,longs)
64−assert(not (a and string.find(b,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))
64+assert((not (a and string.find(b,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))))
6565end
6666print("\u{4f}\u{4b}")
6767return "\u{61}"
desk/res/lua/cycled/bitwise.lua+95−95
@@ -1,15 +1,15 @@
11print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
22require("\u{62}\u{77}\u{63}\u{6f}\u{65}\u{72}\u{63}\u{69}\u{6f}\u{6e}")
33local numbits = (string.packsize("\u{6a}") * 0x8)
4−assert(~ (0x0 == - 0x1))
5−assert((((0x1 << ((numbits - 0x1)))) == math.mininteger))
4+assert((~ (0x0 == (- 0x1))))
5+assert(((0x1 << (numbits - 0x1)) == math.mininteger))
66local a,b,c,d
77a=0xffffffffffffffff
8−assert((a == - (0x1 and (a & - ((0x1 == a) and ((a & 0x23) == 0x23))))))
8+assert((a == (- (0x1 and (a & (- ((0x1 == a) and ((a & 0x23) == 0x23))))))))
99a=0xf0f0f0f0f0f0f0f0
10−assert((a | - (0x1 == - 0x1)))
11−assert(((((a ~ a) == 0x0) and ((a ~ 0x0) == a)) and (a ~ ~ (a == - 0x1))))
12−assert(((a >> 0x4) == ~ a))
10+assert((a | (- (0x1 == (- 0x1)))))
11+assert(((((a ~ a) == 0x0) and ((a ~ 0x0) == a)) and (a ~ (~ (a == (- 0x1))))))
12+assert(((a >> 0x4) == (~ a)))
1313a=0xf0
1414;
1515b=0xcc
@@ -34,13 +34,13 @@ c=0xaa000000
3434;
3535d=0xfd000000
3636assert(((a | (b ~ (c & d))) == 0xf4000000))
37−assert(~ ~ ((a == a) and ~ (a == - ((0x1 ~ a) and - (d == ~ (d + 0x1))))))
37+assert((~ (~ ((a == a) and (~ (a == (- ((0x1 ~ a) and (- (d == (~ (d + 0x1))))))))))))
3838a=(a << 0x20)
3939b=(b << 0x20)
4040c=(c << 0x20)
4141d=(d << 0x20)
4242assert(((a | (b ~ (c & d))) == (0xf4000000 << 0x20)))
43−assert(~ ~ ((a == a) and ~ (a == - ((0x1 ~ a) and - (d == ~ (d + 0x1))))))
43+assert((~ (~ ((a == a) and (~ (a == (- ((0x1 ~ a) and (- (d == (~ (d + 0x1))))))))))))
4444do
4545local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3e}\u{3e}\u{20}\u{25}\u{64}",math.maxinteger)
4646assert((load(code)() == 0x0))
@@ -51,55 +51,55 @@ assert((load(code)() == 0x0))
5151local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{25}\u{64}",math.mininteger)
5252assert((load(code)() == 0x0))
5353end
54−assert(- (((0x1 >> 0x1) == (((0x1 << ((numbits - 0x1)))) - 0x1)) and ((0x1 << 0x1f) == 0x80000000)))
55−assert(- ((0x1 >> ((numbits - 0x1))) == 0x1))
56−assert(- (((0x1 >> numbits) == 0x0) and - (0x1 >> - ((numbits == 0x0) and - (((0x1 << numbits) == 0x0) and - (0x1 << - (numbits == 0x0)))))))
54+assert((- (((0x1 >> 0x1) == ((0x1 << (numbits - 0x1)) - 0x1)) and ((0x1 << 0x1f) == 0x80000000))))
55+assert((- ((0x1 >> (numbits - 0x1)) == 0x1)))
56+assert((- (((0x1 >> numbits) == 0x0) and (- (0x1 >> (- ((numbits == 0x0) and (- (((0x1 << numbits) == 0x0) and (- (0x1 << (- (numbits == 0x0)))))))))))))
5757assert(((0x1 >> math.mininteger) == 0x0))
5858assert(((0x1 >> math.maxinteger) == 0x0))
5959assert(((0x1 << math.mininteger) == 0x0))
6060assert(((0x1 << math.maxinteger) == 0x0))
61−assert((((((0x2 ^ 0x1e) - 0x1)) << (0x2 ^ 0x1e)) == 0x0))
62−assert((((((0x2 ^ 0x1e) - 0x1)) >> (0x2 ^ 0x1e)) == 0x0))
63−assert((0x1 >> - ((0x3 == (0x1 << 0x3)) and ((0x3e8 >> 0x5) == (0x3e8 << - 0x5)))))
64−assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}" | 0x0) == - 0x1))
65−assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}" & "\u{2d}\u{31}") == - 0x2))
61+assert(((((0x2 ^ 0x1e) - 0x1) << (0x2 ^ 0x1e)) == 0x0))
62+assert(((((0x2 ^ 0x1e) - 0x1) >> (0x2 ^ 0x1e)) == 0x0))
63+assert((0x1 >> (- ((0x3 == (0x1 << 0x3)) and ((0x3e8 >> 0x5) == (0x3e8 << (- 0x5)))))))
64+assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}" | 0x0) == (- 0x1)))
65+assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}" & "\u{2d}\u{31}") == (- 0x2)))
6666assert((("\u{20}\u{9}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}\u{a}\u{9}" & "\u{2d}\u{31}") == 0x2))
67−assert((("\u{20}\u{20}\u{20}\u{a}\u{20}\u{20}\u{2d}\u{34}\u{35}\u{20}\u{20}\u{9}\u{20}" >> "\u{20}\u{20}\u{2d}\u{32}\u{20}\u{20}") == - (0x2d * 0x4)))
67+assert((("\u{20}\u{20}\u{20}\u{a}\u{20}\u{20}\u{2d}\u{34}\u{35}\u{20}\u{20}\u{9}\u{20}" >> "\u{20}\u{20}\u{2d}\u{32}\u{20}\u{20}") == (- (0x2d * 0x4))))
6868assert((("\u{31}\u{32}\u{33}\u{34}\u{2e}\u{30}" << "\u{35}\u{2e}\u{30}") == (0x4d2 * 0x20)))
6969assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" ~ "\u{30}\u{78}\u{41}\u{41}\u{41}\u{41}") == 0x5555))
70−assert(~ ("\u{30}\u{78}\u{30}\u{2e}\u{30}\u{30}\u{30}\u{70}\u{34}" == - 0x1))
71−assert((((("\u{37}" .. 0x3)) << 0x1) == 0x92))
72−assert(((0xffffffff >> ((0x1 .. "\u{39}"))) == 0x1fff))
73−assert(((0xa | ((0x1 .. "\u{39}"))) == 0x1b))
70+assert((~ ("\u{30}\u{78}\u{30}\u{2e}\u{30}\u{30}\u{30}\u{70}\u{34}" == (- 0x1))))
71+assert(((("\u{37}" .. 0x3) << 0x1) == 0x92))
72+assert(((0xffffffff >> (0x1 .. "\u{39}")) == 0x1fff))
73+assert(((0xa | (0x1 .. "\u{39}")) == 0x1b))
7474do
7575local st,msg = pcall(function ()
7676return (0x4 & "\u{61}")
7777end)
7878assert(string.find(msg,"\u{27}\u{62}\u{61}\u{6e}\u{64}\u{27}"))
7979local st,msg = pcall(function ()
80−return ~ "\u{61}"
80+return (~ "\u{61}")
8181end)
8282assert(string.find(msg,"\u{27}\u{62}\u{6e}\u{6f}\u{74}\u{27}"))
8383end
84−assert(not pcall(function ()
84+assert((not pcall(function ()
8585return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" | 0x0)
86−end))
87−assert(not pcall(function ()
86+end)))
87+assert((not pcall(function ()
8888return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{0}" | 0x0)
89−end))
89+end)))
9090print("\u{2b}")
9191package.preload.bit32=function ()
9292local bit = {}
9393function bit.bnot(a)
94−return ~ (a & 0xffffffff)
94+return (~ (a & 0xffffffff))
9595end
9696function bit.band(x,y,z, ...)
97−if not z then
98−return (((((x or - 0x1)) & ((y or - 0x1)))) & 0xffffffff)
97+if (not z) then
98+return (((x or (- 0x1)) & (y or (- 0x1))) & 0xffffffff)
9999else
100100local arg = {...}
101101local res = ((x & y) & z)
102−for i = 0x1, # arg
102+for i = 0x1, (# arg)
103103do
104104res=(res & arg[i])
105105end
@@ -107,12 +107,12 @@ return (res & 0xffffffff)
107107end
108108end
109109function bit.bor(x,y,z, ...)
110−if not z then
111−return (((((x or 0x0)) | ((y or 0x0)))) & 0xffffffff)
110+if (not z) then
111+return (((x or 0x0) | (y or 0x0)) & 0xffffffff)
112112else
113113local arg = {...}
114114local res = ((x | y) | z)
115−for i = 0x1, # arg
115+for i = 0x1, (# arg)
116116do
117117res=(res | arg[i])
118118end
@@ -120,12 +120,12 @@ return (res & 0xffffffff)
120120end
121121end
122122function bit.bxor(x,y,z, ...)
123−if not z then
124−return (((((x or 0x0)) ~ ((y or 0x0)))) & 0xffffffff)
123+if (not z) then
124+return (((x or 0x0) ~ (y or 0x0)) & 0xffffffff)
125125else
126126local arg = {...}
127127local res = ((x ~ y) ~ z)
128−for i = 0x1, # arg
128+for i = 0x1, (# arg)
129129do
130130res=(res ~ arg[i])
131131end
@@ -136,27 +136,27 @@ function bit.btest(...)
136136return (bit.band(...) ~= 0x0)
137137end
138138function bit.lshift(a,b)
139−return (((((a & 0xffffffff)) << b)) & 0xffffffff)
139+return (((a & 0xffffffff) << b) & 0xffffffff)
140140end
141141function bit.rshift(a,b)
142−return (((((a & 0xffffffff)) >> b)) & 0xffffffff)
142+return (((a & 0xffffffff) >> b) & 0xffffffff)
143143end
144144function bit.arshift(a,b)
145145a=(a & 0xffffffff)
146−if ((b <= 0x0) or (((a & 0x80000000)) == 0x0)) then
147−return (((a >> b)) & 0xffffffff)
146+if ((b <= 0x0) or ((a & 0x80000000) == 0x0)) then
147+return ((a >> b) & 0xffffffff)
148148else
149−return (((((a >> b)) | ~ ((0xffffffff >> b)))) & 0xffffffff)
149+return (((a >> b) | (~ (0xffffffff >> b))) & 0xffffffff)
150150end
151151end
152152function bit.lrotate(a,b)
153153b=(b & 0x1f)
154154a=(a & 0xffffffff)
155−a=(((a << b)) | ((a >> ((0x20 - b)))))
155+a=((a << b) | (a >> (0x20 - b)))
156156return (a & 0xffffffff)
157157end
158158function bit.rrotate(a,b)
159−return bit.lrotate(a,- b)
159+return bit.lrotate(a,(- b))
160160end
161161local function checkfield
162162(f,w)
@@ -164,16 +164,16 @@ w=(w or 0x1)
164164assert((f >= 0x0),"\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{65}\u{67}\u{61}\u{74}\u{69}\u{76}\u{65}")
165165assert((w > 0x0),"\u{77}\u{69}\u{64}\u{74}\u{68}\u{20}\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{76}\u{65}")
166166assert(((f + w) <= 0x20),"\u{74}\u{72}\u{79}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{63}\u{63}\u{65}\u{73}\u{73}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{20}\u{62}\u{69}\u{74}\u{73}")
167−return f,~ (- (0x1 << w))
167+return f,(~ (- (0x1 << w)))
168168end
169169function bit.extract(a,f,w)
170170local f,mask = checkfield(f,w)
171−return (((a >> f)) & mask)
171+return ((a >> f) & mask)
172172end
173173function bit.replace(a,v,f,w)
174174local f,mask = checkfield(f,w)
175175v=(v & mask)
176−a=(((a & ~ ((mask << f)))) | ((v << f)))
176+a=((a & (~ (mask << f))) | (v << f))
177177return (a & 0xffffffff)
178178end
179179return bit
@@ -186,56 +186,56 @@ assert((bit32.bor() == 0x0))
186186assert((bit32.bxor() == 0x0))
187187assert((bit32.band() == bit32.band(0xffffffff)))
188188assert((bit32.band(0x1,0x2) == 0x0))
189−assert((bit32.band(- 0x1) == 0xffffffff))
190−assert((bit32.band((((0x1 << 0x21)) - 0x1)) == 0xffffffff))
191−assert((bit32.band(- (((0x1 << 0x21)) - 0x1)) == 0xffffffff))
192−assert((bit32.band((((0x1 << 0x21)) + 0x1)) == 0x1))
193−assert((bit32.band(- (((0x1 << 0x21)) + 0x1)) == 0x1))
194−assert((bit32.band(- ((0x1 << 0x28))) == 0x0))
189+assert((bit32.band((- 0x1)) == 0xffffffff))
190+assert((bit32.band(((0x1 << 0x21) - 0x1)) == 0xffffffff))
191+assert((bit32.band((- ((0x1 << 0x21) - 0x1))) == 0xffffffff))
192+assert((bit32.band(((0x1 << 0x21) + 0x1)) == 0x1))
193+assert((bit32.band((- ((0x1 << 0x21) + 0x1))) == 0x1))
194+assert((bit32.band((- (0x1 << 0x28))) == 0x0))
195195assert((bit32.band((0x1 << 0x28)) == 0x0))
196−assert((bit32.band(- (((0x1 << 0x28)) - 0x2)) == 0xfffffffe))
197−assert((bit32.band((((0x1 << 0x28)) - 0x4)) == 0xfffffffc))
198−assert((bit32.lrotate(0x0,- 0x1) == 0x0))
196+assert((bit32.band((- ((0x1 << 0x28) - 0x2))) == 0xfffffffe))
197+assert((bit32.band(((0x1 << 0x28) - 0x4)) == 0xfffffffc))
198+assert((bit32.lrotate(0x0,(- 0x1)) == 0x0))
199199assert((bit32.lrotate(0x0,0x7) == 0x0))
200200assert((bit32.lrotate(0x12345678,0x0) == 0x12345678))
201201assert((bit32.lrotate(0x12345678,0x20) == 0x12345678))
202202assert((bit32.lrotate(0x12345678,0x4) == 0x23456781))
203−assert((bit32.rrotate(0x12345678,- 0x4) == 0x23456781))
204−assert((bit32.lrotate(0x12345678,- 0x8) == 0x78123456))
203+assert((bit32.rrotate(0x12345678,(- 0x4)) == 0x23456781))
204+assert((bit32.lrotate(0x12345678,(- 0x8)) == 0x78123456))
205205assert((bit32.rrotate(0x12345678,0x8) == 0x78123456))
206206assert((bit32.lrotate(0xaaaaaaaa,0x2) == 0xaaaaaaaa))
207−assert((bit32.lrotate(0xaaaaaaaa,- 0x2) == 0xaaaaaaaa))
208−for i = - 0x32, 0x32
207+assert((bit32.lrotate(0xaaaaaaaa,(- 0x2)) == 0xaaaaaaaa))
208+for i = (- 0x32), 0x32
209209do
210210assert((bit32.lrotate(0x89abcdef,i) == bit32.lrotate(0x89abcdef,(i % 0x20))))
211211end
212212assert((bit32.lshift(0x12345678,0x4) == 0x23456780))
213213assert((bit32.lshift(0x12345678,0x8) == 0x34567800))
214−assert((bit32.lshift(0x12345678,- 0x4) == 0x1234567))
215−assert((bit32.lshift(0x12345678,- 0x8) == 0x123456))
214+assert((bit32.lshift(0x12345678,(- 0x4)) == 0x1234567))
215+assert((bit32.lshift(0x12345678,(- 0x8)) == 0x123456))
216216assert((bit32.lshift(0x12345678,0x20) == 0x0))
217−assert((bit32.lshift(0x12345678,- 0x20) == 0x0))
217+assert((bit32.lshift(0x12345678,(- 0x20)) == 0x0))
218218assert((bit32.rshift(0x12345678,0x4) == 0x1234567))
219219assert((bit32.rshift(0x12345678,0x8) == 0x123456))
220220assert((bit32.rshift(0x12345678,0x20) == 0x0))
221−assert((bit32.rshift(0x12345678,- 0x20) == 0x0))
221+assert((bit32.rshift(0x12345678,(- 0x20)) == 0x0))
222222assert((bit32.arshift(0x12345678,0x0) == 0x12345678))
223223assert((bit32.arshift(0x12345678,0x1) == (0x12345678 // 0x2)))
224−assert((bit32.arshift(0x12345678,- 0x1) == (0x12345678 * 0x2)))
225−assert((bit32.arshift(- 0x1,0x1) == 0xffffffff))
226−assert((bit32.arshift(- 0x1,0x18) == 0xffffffff))
227−assert((bit32.arshift(- 0x1,0x20) == 0xffffffff))
228−assert((bit32.arshift(- 0x1,- 0x1) == bit32.band(- (0x1 * 0x2),0xffffffff)))
224+assert((bit32.arshift(0x12345678,(- 0x1)) == (0x12345678 * 0x2)))
225+assert((bit32.arshift((- 0x1),0x1) == 0xffffffff))
226+assert((bit32.arshift((- 0x1),0x18) == 0xffffffff))
227+assert((bit32.arshift((- 0x1),0x20) == 0xffffffff))
228+assert((bit32.arshift((- 0x1),(- 0x1)) == bit32.band((- (0x1 * 0x2)),0xffffffff)))
229229assert(((0x12345678 << 0x4) == 0x123456780))
230230assert(((0x12345678 << 0x8) == 0x1234567800))
231−assert((0x12345678 << - (0x4 == 0x1234567)))
232−assert((0x12345678 << - (0x8 == 0x123456)))
231+assert((0x12345678 << (- (0x4 == 0x1234567))))
232+assert((0x12345678 << (- (0x8 == 0x123456))))
233233assert(((0x12345678 << 0x20) == 0x1234567800000000))
234−assert((0x12345678 << - (0x20 == 0x0)))
234+assert((0x12345678 << (- (0x20 == 0x0))))
235235assert(((0x12345678 >> 0x4) == 0x1234567))
236236assert(((0x12345678 >> 0x8) == 0x123456))
237237assert(((0x12345678 >> 0x20) == 0x0))
238−assert((0x12345678 >> - (0x20 == 0x1234567800000000)))
238+assert((0x12345678 >> (- (0x20 == 0x1234567800000000))))
239239print("\u{2b}")
240240local c = {0x0,0x1,0x2,0x3,0xa,0x80000000,0xaaaaaaaa,0x55555555,0xffffffff,0x7fffffff}
241241for _,b in pairs(c)
@@ -243,16 +243,16 @@ do
243243assert((bit32.band(b) == b))
244244assert((bit32.band(b,b) == b))
245245assert((bit32.band(b,b,b,b) == b))
246−assert((bit32.btest(b,b) == ((b ~= 0x0))))
246+assert((bit32.btest(b,b) == (b ~= 0x0)))
247247assert((bit32.band(b,b,b) == b))
248−assert((bit32.band(b,b,b,~ b) == 0x0))
249−assert((bit32.btest(b,b,b) == ((b ~= 0x0))))
248+assert((bit32.band(b,b,b,(~ b)) == 0x0))
249+assert((bit32.btest(b,b,b) == (b ~= 0x0)))
250250assert((bit32.band(b,bit32.bnot(b)) == 0x0))
251251assert((bit32.bor(b,bit32.bnot(b)) == bit32.bnot(0x0)))
252252assert((bit32.bor(b) == b))
253253assert((bit32.bor(b,b) == b))
254254assert((bit32.bor(b,b,b) == b))
255−assert((bit32.bor(b,b,0x0,~ b) == 0xffffffff))
255+assert((bit32.bor(b,b,0x0,(~ b)) == 0xffffffff))
256256assert((bit32.bxor(b) == b))
257257assert((bit32.bxor(b,b) == 0x0))
258258assert((bit32.bxor(b,b,b) == b))
@@ -260,27 +260,27 @@ assert((bit32.bxor(b,b,b,b) == 0x0))
260260assert((bit32.bxor(b,0x0) == b))
261261assert((bit32.bnot(b) ~= b))
262262assert((bit32.bnot(bit32.bnot(b)) == b))
263−assert((bit32.bnot(b) == ((((0x1 << 0x20)) - 0x1) - b)))
263+assert((bit32.bnot(b) == (((0x1 << 0x20) - 0x1) - b)))
264264assert((bit32.lrotate(b,0x20) == b))
265265assert((bit32.rrotate(b,0x20) == b))
266−assert((bit32.lshift(bit32.lshift(b,- 0x4),0x4) == bit32.band(b,bit32.bnot(0xf))))
267−assert((bit32.rshift(bit32.rshift(b,0x4),- 0x4) == bit32.band(b,bit32.bnot(0xf))))
266+assert((bit32.lshift(bit32.lshift(b,(- 0x4)),0x4) == bit32.band(b,bit32.bnot(0xf))))
267+assert((bit32.rshift(bit32.rshift(b,0x4),(- 0x4)) == bit32.band(b,bit32.bnot(0xf))))
268268end
269269c={0x0,0x1,0x2,0x3,0xa,0x800000,0xaaaaaa,0x555555,0xffffff,0x7fffff}
270270for _,b in pairs(c)
271271do
272−for i = - 0x28, 0x28
272+for i = (- 0x28), 0x28
273273do
274274local x = bit32.lshift(b,i)
275275local y = math.floor(math.fmod((b * (2.0 ^ i)),(2.0 ^ 0x20)))
276276assert((math.fmod((x - y),(2.0 ^ 0x20)) == 0x0))
277277end
278278end
279−assert(not pcall(bit32.band,{}))
280−assert(not pcall(bit32.bnot,"\u{61}"))
281−assert(not pcall(bit32.lshift,0x2d))
282−assert(not pcall(bit32.lshift,0x2d,print))
283−assert(not pcall(bit32.rshift,0x2d,print))
279+assert((not pcall(bit32.band,{})))
280+assert((not pcall(bit32.bnot,"\u{61}")))
281+assert((not pcall(bit32.lshift,0x2d)))
282+assert((not pcall(bit32.lshift,0x2d,print)))
283+assert((not pcall(bit32.rshift,0x2d,print)))
284284print("\u{2b}")
285285assert((bit32.extract(0x12345678,0x0,0x4) == 0x8))
286286assert((bit32.extract(0x12345678,0x4,0x4) == 0x7))
@@ -288,22 +288,22 @@ assert((bit32.extract(0xa0001111,0x1c,0x4) == 0xa))
288288assert((bit32.extract(0xa0001111,0x1f,0x1) == 0x1))
289289assert((bit32.extract(0x50000111,0x1f,0x1) == 0x0))
290290assert((bit32.extract(0xf2345679,0x0,0x20) == 0xf2345679))
291−assert(not pcall(bit32.extract,0x0,- 0x1))
292−assert(not pcall(bit32.extract,0x0,0x20))
293−assert(not pcall(bit32.extract,0x0,0x0,0x21))
294−assert(not pcall(bit32.extract,0x0,0x1f,0x2))
291+assert((not pcall(bit32.extract,0x0,(- 0x1))))
292+assert((not pcall(bit32.extract,0x0,0x20)))
293+assert((not pcall(bit32.extract,0x0,0x0,0x21)))
294+assert((not pcall(bit32.extract,0x0,0x1f,0x2)))
295295assert((bit32.replace(0x12345678,0x5,0x1c,0x4) == 0x52345678))
296296assert((bit32.replace(0x12345678,0x87654321,0x0,0x20) == 0x87654321))
297297assert((bit32.replace(0x0,0x1,0x2) == (0x2 ^ 0x2)))
298−assert((bit32.replace(0x0,- 0x1,0x4) == (0x2 ^ 0x4)))
299−assert((bit32.replace(- 0x1,0x0,0x1f) == (((0x1 << 0x1f)) - 0x1)))
300−assert((bit32.replace(- 0x1,0x0,0x1,0x2) == (((0x1 << 0x20)) - 0x7)))
298+assert((bit32.replace(0x0,(- 0x1),0x4) == (0x2 ^ 0x4)))
299+assert((bit32.replace((- 0x1),0x0,0x1f) == ((0x1 << 0x1f) - 0x1)))
300+assert((bit32.replace((- 0x1),0x0,0x1,0x2) == ((0x1 << 0x20) - 0x7)))
301301assert((bit32.bor(3.0) == 0x3))
302−assert((bit32.bor(- 4.0) == 0xfffffffc))
302+assert((bit32.bor((- 4.0)) == 0xfffffffc))
303303if (((2.0 ^ 0x32) < ((2.0 ^ 0x32) + 1.0)) and ((2.0 ^ 0x32) < (- (0x1 >> 0x1)))) then
304304assert((bit32.bor(((2.0 ^ 0x20) - 5.0)) == 0xfffffffb))
305−assert((bit32.bor(- ((2.0 ^ 0x20) - 6.0)) == 0xfffffffa))
305+assert((bit32.bor((- ((2.0 ^ 0x20) - 6.0))) == 0xfffffffa))
306306assert((bit32.bor(((2.0 ^ 0x30) - 5.0)) == 0xfffffffb))
307−assert((bit32.bor(- ((2.0 ^ 0x30) - 6.0)) == 0xfffffffa))
307+assert((bit32.bor((- ((2.0 ^ 0x30) - 6.0))) == 0xfffffffa))
308308end
309309print("\u{4f}\u{4b}")
desk/res/lua/cycled/bwcoercion.lua+2−2
@@ -6,7 +6,7 @@ _ENV=nil
66local function toint
77(x)
88x=tonumber(x)
9−if not x then
9+if (not x) then
1010return false
1111end
1212return tointeger(x)
@@ -55,5 +55,5 @@ return ((y and (x >> y)) or x)
5555end
5656smt.__bnot=function (x)
5757local x,y = checkargs(x,x,"\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}")
58−return (y and ~ (x or x))
58+return (y and (~ (x or x)))
5959end
desk/res/lua/cycled/calls.lua+37−37
@@ -2,14 +2,14 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{75}\u{6e}\u{63}\
22local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
33assert((type((0x1 < 0x2)) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}"))
44assert(((type(true) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}") and (type(false) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}")))
5−assert((((((type(nil) == "\u{6e}\u{69}\u{6c}") and (type(- 0x3) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")) and (type("\u{78}") == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type({}) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (type(type) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
5+assert((((((type(nil) == "\u{6e}\u{69}\u{6c}") and (type((- 0x3)) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")) and (type("\u{78}") == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type({}) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (type(type) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
66assert((type(assert) == type(print)))
77local function f
88(x)
99return a:x(x)
1010end
1111assert((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
12−assert(not pcall(type))
12+assert((not pcall(type)))
1313fact=false
1414do
1515local res = 0x1
@@ -34,11 +34,11 @@ function a.y(x)
3434return (x + self)
3535end
3636assert(((a:x(0x1) + 0xa) == a.y(0x1)))
37−a.t={["\u{69}"] = - 0x64}
37+a.t={["\u{69}"] = (- 0x64)}
3838a["\u{74}"].x=function (self,a,b)
3939return ((self.i + a) + b)
4040end
41−assert((a.t:x(0x2,0x3) == - 0x5f))
41+assert((a.t:x(0x2,0x3) == (- 0x5f)))
4242do
4343local a = {["\u{78}"] = 0x0}
4444function a:add(x)
@@ -102,7 +102,7 @@ do
102102local function dummy
103103(n)
104104if (n > 0x0) then
105−assert(not pcall(err_on_n,n))
105+assert((not pcall(err_on_n,n)))
106106dummy((n - 0x1))
107107end
108108end
@@ -145,8 +145,8 @@ local function foo1
145145(x)
146146return foo(0xa,x,(x + 0x1))
147147end
148−local a,b,c = foo1(- 0x2)
149−assert(((a == 0xa) and (b == - (0x2 and (c == - 0x1)))))
148+local a,b,c = foo1((- 0x2))
149+assert(((a == 0xa) and (b == (- (0x2 and (c == (- 0x1)))))))
150150local t = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = foo})
151151local function foo2
152152(x)
@@ -172,13 +172,13 @@ local function foo1
172172return foo(...)
173173end
174174local a,b,c = foo1()
175−assert((((X == nil) and (Y == nil)) and # (A == 0x0)))
175+assert((((X == nil) and (Y == nil)) and (# (A == 0x0))))
176176a,b,c=foo1(0xa)
177−assert((((X == 0xa) and (Y == nil)) and # (A == 0x0)))
177+assert((((X == 0xa) and (Y == nil)) and (# (A == 0x0))))
178178a,b,c=foo1(0xa,0x14)
179−assert((((X == 0xa) and (Y == 0x14)) and # (A == 0x0)))
179+assert((((X == 0xa) and (Y == 0x14)) and (# (A == 0x0))))
180180a,b,c=foo1(0xa,0x14,0x1e)
181−assert((((X == 0xa) and (Y == 0x14)) and # ((A == 0x1) and (A[0x1] == 0x1e))))
181+assert((((X == 0xa) and (Y == 0x14)) and (# ((A == 0x1) and (A[0x1] == 0x1e)))))
182182end
183183do
184184local function loop
@@ -186,7 +186,7 @@ local function loop
186186assert(pcall(loop))
187187end
188188local err,msg = xpcall(loop,loop)
189−assert(not (err and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}")))
189+assert((not (err and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}"))))
190190end
191191do
192192local n = 0x2710
@@ -267,20 +267,20 @@ print("\u{2b}")
267267local function unlpack
268268(t,i)
269269i=(i or 0x1)
270−if ((i <= # t)) then
270+if (i <= (# t)) then
271271return t[i],unlpack(t,(i + 0x1))
272272end
273273end
274274local function equaltab
275275(t1,t2)
276−assert(# (t1 == # t2))
277−for i = 0x1, # t1
276+assert((# (t1 == (# t2))))
277+for i = 0x1, (# t1)
278278do
279279assert((t1[i] == t2[i]))
280280end
281281end
282282local pack = function (...)
283−return (table.pack(...))
283+return table.pack(...)
284284end
285285local function f
286286()
@@ -294,12 +294,12 @@ local a,b,c,d = unlpack({0x1,0x2,0x3})
294294assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
295295a={0x1,0x2,0x3,0x4,false,0xa,"\u{61}\u{6c}\u{6f}",false,assert}
296296equaltab(pack(unlpack(a)),a)
297−equaltab(pack(unlpack(a),- 0x1),{0x1,- 0x1})
297+equaltab(pack(unlpack(a),(- 0x1)),{0x1,(- 0x1)})
298298a,b,c,d=ret2(f()),ret2(f())
299299assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
300300a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
301301assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
302−a,b,c,d=unlpack(pack(ret2(f()),(ret2(f()))))
302+a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
303303assert(((((a == 0x1) and (b == 0x1)) and (c == nil)) and (d == nil)))
304304a=ret2({unlpack({0x1,0x2,0x3}),unlpack({0x3,0x2,0x1}),unlpack({"\u{61}","\u{62}"})})
305305assert(((((a[0x1] == 0x1) and (a[0x2] == 0x3)) and (a[0x3] == "\u{61}")) and (a[0x4] == "\u{62}")))
@@ -321,7 +321,7 @@ end
321321end
322322local function cannotload
323323(msg,a,b)
324−assert(not (a and string.find(b,msg)))
324+assert((not (a and string.find(b,msg))))
325325end
326326a=assert(load(read1(x),"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{74}",_G))
327327assert(((a() == "\u{0}") and (_G.x == 0x21)))
@@ -332,9 +332,9 @@ a=assert(load(function ()
332332return nil
333333end))
334334a()
335−assert(not load(function ()
335+assert((not load(function ()
336336return true
337−end))
337+end)))
338338local t = {nil,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{33}"}
339339f,msg=load(function ()
340340return table.remove(t,0x1)
@@ -357,7 +357,7 @@ assert(((a() == 0x1) and (_G.x == 0x1)))
357357cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(read1(x),nil,"\u{74}"))
358358cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(x,nil,"\u{74}"))
359359_G.x=nil
360−assert(not pcall(string.dump,print))
360+assert((not pcall(string.dump,print)))
361361cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load(read1("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}")))
362362cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}"))
363363cannotload("\u{68}\u{68}\u{69}",load(function ()
@@ -399,7 +399,7 @@ assert((x() == nil))
399399assert((debug.setupvalue(x,0x1,"\u{68}\u{69}") == "\u{61}"))
400400assert((x() == "\u{68}\u{69}"))
401401assert((debug.setupvalue(x,0x2,0xd) == "\u{62}"))
402−assert(not debug.setupvalue(x,0x3,0xa))
402+assert((not debug.setupvalue(x,0x3,0xa)))
403403x("\u{73}\u{65}\u{74}")
404404assert((x() == 0x17))
405405x("\u{73}\u{65}\u{74}")
@@ -409,22 +409,22 @@ local nup = 0xc8
409409local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{31}"}
410410for i = 0x2, nup
411411do
412−prog[# (prog + 0x1)]=("\u{2c}\u{20}\u{61}" .. i)
412+prog[(# (prog + 0x1))]=("\u{2c}\u{20}\u{61}" .. i)
413413end
414−prog[# (prog + 0x1)]="\u{20}\u{3d}\u{20}\u{31}"
414+prog[(# (prog + 0x1))]="\u{20}\u{3d}\u{20}\u{31}"
415415for i = 0x2, nup
416416do
417−prog[# (prog + 0x1)]=("\u{2c}\u{20}" .. i)
417+prog[(# (prog + 0x1))]=("\u{2c}\u{20}" .. i)
418418end
419419local sum = 0x1
420−prog[# (prog + 0x1)]="\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{31}"
420+prog[(# (prog + 0x1))]="\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{31}"
421421for i = 0x2, nup
422422do
423−prog[# (prog + 0x1)]=("\u{20}\u{2b}\u{20}\u{61}" .. i)
423+prog[(# (prog + 0x1))]=("\u{20}\u{2b}\u{20}\u{61}" .. i)
424424;
425425sum=(sum + i)
426426end
427−prog[# (prog + 0x1)]="\u{20}\u{65}\u{6e}\u{64}"
427+prog[(# (prog + 0x1))]="\u{20}\u{65}\u{6e}\u{64}"
428428prog=table.concat(prog)
429429local f = assert(load(prog))()
430430assert((f() == sum))
@@ -473,19 +473,19 @@ local s2 = "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{6e}\u
473473return (a + (b * 0x3))
474474end)
475475assert((assert(load(c))() == 0xa))
476−assert((string.sub(c,0x1,# header) == header))
477−local ci,cn = string.unpack("\u{6a}\u{6e}",c,# (header + 0x1))
476+assert((string.sub(c,0x1,(# header)) == header))
477+local ci,cn = string.unpack("\u{6a}\u{6e}",c,(# (header + 0x1)))
478478assert(((ci == 0x5678) and (cn == 370.5)))
479−for i = 0x1, # header
479+for i = 0x1, (# header)
480480do
481−local s = (string.sub(c,0x1,(i - 0x1)) .. (string.char((string.byte(string.sub(c,i,i)) + 0x1)) .. string.sub(c,(i + 0x1),- 0x1)))
482−assert(# (s == # c))
483−assert(not load(s))
481+local s = (string.sub(c,0x1,(i - 0x1)) .. (string.char((string.byte(string.sub(c,i,i)) + 0x1)) .. string.sub(c,(i + 0x1),(- 0x1))))
482+assert((# (s == (# c))))
483+assert((not load(s)))
484484end
485−for i = 0x1, # (c - 0x1)
485+for i = 0x1, (# (c - 0x1))
486486do
487487local st,msg = load(string.sub(c,0x1,i))
488−assert(not (st and string.find(msg,"\u{74}\u{72}\u{75}\u{6e}\u{63}\u{61}\u{74}\u{65}\u{64}")))
488+assert((not (st and string.find(msg,"\u{74}\u{72}\u{75}\u{6e}\u{63}\u{61}\u{74}\u{65}\u{64}"))))
489489end
490490end
491491print("\u{4f}\u{4b}")
desk/res/lua/cycled/closure.lua+10−10
@@ -87,7 +87,7 @@ assert((a[0x3].get() == 0x3))
8787assert((a[0x2].get() == "\u{61}"))
8888a={}
8989local t = {"\u{61}","\u{62}"}
90−for i = 0x1, # t
90+for i = 0x1, (# t)
9191do
9292local k = t[i]
9393a[i]={["\u{73}\u{65}\u{74}"] = function (x,y)
@@ -118,7 +118,7 @@ end
118118break
119119end
120120assert((f() == 0x1))
121−for k = 0x1, # t
121+for k = 0x1, (# t)
122122do
123123local v = t[k]
124124f=function ()
@@ -132,7 +132,7 @@ local b
132132function f(x)
133133local first = 0x1
134134while 0x1 do
135−if ((x == 0x3) and not first) then
135+if ((x == 0x3) and (not first)) then
136136return
137137end
138138local a = "\u{78}\u{75}\u{78}\u{75}"
@@ -303,7 +303,7 @@ end
303303end
304304assert(debug.upvalueid(foo1,0x1))
305305assert(debug.upvalueid(foo1,0x2))
306−assert(not debug.upvalueid(foo1,0x3))
306+assert((not debug.upvalueid(foo1,0x3)))
307307assert((debug.upvalueid(foo1,0x1) == debug.upvalueid(foo2,0x2)))
308308assert((debug.upvalueid(foo1,0x2) == debug.upvalueid(foo2,0x1)))
309309assert(debug.upvalueid(foo3,0x1))
@@ -318,10 +318,10 @@ debug.upvaluejoin(foo3,0x2,foo2,0x1)
318318assert((foo3() == (0xa + 0x5)))
319319debug.upvaluejoin(foo3,0x2,foo2,0x2)
320320assert((foo3() == (0xa + 0x3)))
321−assert(not pcall(debug.upvaluejoin,foo1,0x3,foo2,0x1))
322−assert(not pcall(debug.upvaluejoin,foo1,0x1,foo2,0x3))
323−assert(not pcall(debug.upvaluejoin,foo1,0x0,foo2,0x1))
324−assert(not pcall(debug.upvaluejoin,print,0x1,foo2,0x1))
325−assert(not pcall(debug.upvaluejoin,{},0x1,foo2,0x1))
326−assert(not pcall(debug.upvaluejoin,foo1,0x1,print,0x1))
321+assert((not pcall(debug.upvaluejoin,foo1,0x3,foo2,0x1)))
322+assert((not pcall(debug.upvaluejoin,foo1,0x1,foo2,0x3)))
323+assert((not pcall(debug.upvaluejoin,foo1,0x0,foo2,0x1)))
324+assert((not pcall(debug.upvaluejoin,print,0x1,foo2,0x1)))
325+assert((not pcall(debug.upvaluejoin,{},0x1,foo2,0x1)))
326+assert((not pcall(debug.upvaluejoin,foo1,0x1,print,0x1)))
327327print("\u{4f}\u{4b}")
desk/res/lua/cycled/code.lua+78−78
@@ -1,5 +1,5 @@
11if (T == nil) then
2−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{70}\u{63}\u{6f}\u{64}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
2+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{70}\u{63}\u{6f}\u{64}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
33return
44end
55print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{64}\u{65}\u{20}\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6d}\u{69}\u{7a}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
@@ -7,7 +7,7 @@ local k0aux <const> = 0x0
77local k0 <const> = k0aux
88local k1 <const> = 0x1
99local k3 <const> = 0x3
10−local k6 <const> = (k3 + ((k3 << k0)))
10+local k6 <const> = (k3 + (k3 << k0))
1111local kFF0 <const> = 0xff0
1212local k3_78 <const> = 3.78
1313local x,k3_78_4 <const> = 0xa,(k3_78 / 0x4)
@@ -28,8 +28,8 @@ end
2828local function checkKlist
2929(func,list)
3030local k = T.listk(func)
31−assert(# (k == # list))
32−for i = 0x1, # k
31+assert((# (k == (# list))))
32+for i = 0x1, (# k)
3333do
3434assert(((k[i] == list[i]) and (math.type(k[i]) == math.type(list[i]))))
3535end
@@ -43,20 +43,20 @@ a=0x0
4343;
4444a=0.0
4545;
46−a=- (0x7 + 0x7)
46+a=(- (0x7 + 0x7))
4747a=(k3_78 / 0x4)
4848;
4949a=k3_78_4
50−a=- (k3_78 / 0x4)
50+a=(- (k3_78 / 0x4))
5151;
5252a=(k3_78 / 0x4)
5353;
54−a=- (3.78 / 0x4)
55−a=- (3.79 / 0x4)
54+a=(- (3.78 / 0x4))
55+a=(- (3.79 / 0x4))
5656;
5757a=0.0
5858;
59−a=- 0x0
59+a=(- 0x0)
6060;
6161a=k3
6262;
@@ -66,18 +66,18 @@ a=0x3
6666;
6767a=3.0
6868end
69−checkKlist(foo,{(3.78 / 0x4),- (3.78 / 0x4),- (3.79 / 0x4)})
69+checkKlist(foo,{(3.78 / 0x4),(- (3.78 / 0x4)),(- (3.79 / 0x4))})
7070foo=function (f,a)
7171f((0x64 * 0x3e8))
7272f((100.0 * 0x3e8))
73−f(- (0x64 * 0x3e8))
74−f(- (0x64 * 1e3))
73+f((- (0x64 * 0x3e8)))
74+f((- (0x64 * 1e3)))
7575f(0x186a0)
7676f(1e5)
77−f(- 0x186a0)
78−f(- 1e5)
77+f((- 0x186a0))
78+f((- 1e5))
7979end
80−checkKlist(foo,{0x186a0,1e5,- 0x186a0,- 1e5})
80+checkKlist(foo,{0x186a0,1e5,(- 0x186a0),(- 1e5)})
8181foo=function (t,a)
8282t[a]=0x1
8383;
@@ -106,12 +106,12 @@ local function check
106106(f, ...)
107107local arg = {...}
108108local c = T.listcode(f)
109−for i = 0x1, # arg
109+for i = 0x1, (# arg)
110110do
111111local opcode = string.match(c[i],"\u{25}\u{75}\u{25}\u{77}\u{2b}")
112112assert((arg[i] == opcode))
113113end
114−assert((c[# (arg + 0x2)] == undef))
114+assert((c[(# (arg + 0x2))] == undef))
115115end
116116local function checkR
117117(f,p,r, ...)
@@ -123,8 +123,8 @@ local function checkequal
123123(a,b)
124124a=T.listcode(a)
125125b=T.listcode(b)
126−assert(# (a == # b))
127−for i = 0x1, # a
126+assert((# (a == (# b))))
127+for i = 0x1, (# a)
128128do
129129a[i]=string.gsub(a[i],"\u{25}\u{62}\u{28}\u{29}","")
130130b[i]=string.gsub(b[i],"\u{25}\u{62}\u{28}\u{29}","")
@@ -187,12 +187,12 @@ return a
187187end,"\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
188188check(function ()
189189while kTrue do
190−local a = - 0x1
190+local a = (- 0x1)
191191end
192192end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
193193check(function ()
194194while 0x1 do
195−local a = - 0x1
195+local a = (- 0x1)
196196end
197197end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
198198check(function ()
@@ -204,21 +204,21 @@ check(function (a,b,c,d)
204204return (a .. (b .. (c .. d)))
205205end,"\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{43}\u{4f}\u{4e}\u{43}\u{41}\u{54}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
206206check(function ()
207−return not not nil
207+return (not (not nil))
208208end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
209209check(function ()
210−return not not kFalse
210+return (not (not kFalse))
211211end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
212212check(function ()
213−return not not true
213+return (not (not true))
214214end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
215215check(function ()
216−return not not k3
216+return (not (not k3))
217217end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
218218check(function ()
219219local a,b,c,d
220220a=(b * a)
221−c.x,a[b]=- (((((a + (d / b)) - a[b])) ^ a.x)),b
221+c.x,a[b]=(- (((a + (d / b)) - a[b]) ^ a.x)),b
222222end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{4d}\u{55}\u{4c}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{44}\u{49}\u{56}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{41}\u{44}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{55}\u{42}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{50}\u{4f}\u{57}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{55}\u{4e}\u{4d}","\u{53}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
223223check(function ()
224224local a,b
@@ -249,10 +249,10 @@ return 0x2
249249end
250250end,0x1,0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
251251checkR(function (a)
252−if - (4.0 == a) then
252+if (- (4.0 == a)) then
253253return 0x2
254254end
255−end,- 0x4,0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
255+end,(- 0x4),0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
256256checkR(function (a)
257257if (a == "\u{68}\u{69}") then
258258return 0x2
@@ -264,25 +264,25 @@ return 0x2
264264end
265265end,0x1,nil,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
266266checkR(function (a)
267−if - (0x2710 == a) then
267+if (- (0x2710 == a)) then
268268return 0x2
269269end
270−end,- 0x2710,0x2,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
270+end,(- 0x2710),0x2,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
271271checkR(function (a)
272−if - (0xa <= a) then
272+if (- (0xa <= a)) then
273273return 0x2
274274end
275−end,- 0xa,0x2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
275+end,(- 0xa),0x2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
276276checkR(function (a)
277277if (128.0 > a) then
278278return 0x2
279279end
280280end,0x81,nil,"\u{4c}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
281281checkR(function (a)
282−if - (127.0 < a) then
282+if (- (127.0 < a)) then
283283return 0x2
284284end
285−end,- 0x7f,nil,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
285+end,(- 0x7f),nil,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
286286checkR(function (a)
287287if (0xa < a) then
288288return 0x2
@@ -333,51 +333,51 @@ checkI(function ()
333333return k0
334334end,0x0)
335335checkI(function ()
336−return - (k0 // 0x1)
336+return (- (k0 // 0x1))
337337end,0x0)
338338checkK(function ()
339−return (0x3 ^ - 0x1)
339+return (0x3 ^ (- 0x1))
340340end,(0x1 / 0x3))
341341checkK(function ()
342−return (((0x1 + 0x1)) ^ ((0x32 + 0x32)))
342+return ((0x1 + 0x1) ^ (0x32 + 0x32))
343343end,(0x2 ^ 0x64))
344344checkK(function ()
345−return ((- 0x2) ^ ((0x1f - 0x2)))
346−end,- (0x20000000 + 0.0))
345+return ((- 0x2) ^ (0x1f - 0x2))
346+end,(- (0x20000000 + 0.0)))
347347checkF(function ()
348348return ((- ((k3 ^ 0x0) + 0x5)) // 3.0)
349349end,1.0)
350350checkI(function ()
351−return - (k3 % 0x5)
351+return (- (k3 % 0x5))
352352end,0x2)
353353checkF(function ()
354−return - ((((((((2.0 ^ 0x8) + - (- 0x1))) % 0x8)) / 0x2) * 0x4) - 0x3)
355−end,- 5.0)
354+return (- ((((((2.0 ^ 0x8) + (- (- 0x1))) % 0x8) / 0x2) * 0x4) - 0x3))
355+end,(- 5.0))
356356checkF(function ()
357−return - ((((((((0x2 ^ 0x8) + - (- 0x1))) % 0x8)) // 0x2) * 0x4) - 0x3)
358−end,- 7.0)
357+return (- ((((((0x2 ^ 0x8) + (- (- 0x1))) % 0x8) // 0x2) * 0x4) - 0x3))
358+end,(- 7.0))
359359checkI(function ()
360360return (240.0 | (204.0 ~ (0xaa & 0xfd)))
361361end,0xf4)
362362checkI(function ()
363−return ~ (~ (kFF0 | kFF0))
363+return (~ (~ (kFF0 | kFF0)))
364364end,0x0)
365365checkI(function ()
366−return ~ ~ - 1024.0
367−end,- 0x400)
366+return (~ (~ (- 1024.0)))
367+end,(- 0x400))
368368checkI(function ()
369−return (((((0x64 << k6)) << - 0x4)) >> 0x2)
369+return (((0x64 << k6) << (- 0x4)) >> 0x2)
370370end,0x64)
371371local a = 0x11
372372;
373−local sbx = (((((0x1 << a)) - 0x1)) >> 0x1)
373+local sbx = (((0x1 << a) - 0x1) >> 0x1)
374374local border <const> = 0xffff
375375checkI(function ()
376376return border
377377end,sbx)
378378checkI(function ()
379−return - border
380−end,- sbx)
379+return (- border)
380+end,(- sbx))
381381checkI(function ()
382382return (border + 0x1)
383383end,(sbx + 0x1))
@@ -385,41 +385,41 @@ checkK(function ()
385385return (border + 0x2)
386386end,(sbx + 0x2))
387387checkK(function ()
388−return - ((border + 0x1))
389−end,- ((sbx + 0x1)))
388+return (- (border + 0x1))
389+end,(- (sbx + 0x1)))
390390local border <const> = 65535.0
391391checkF(function ()
392392return border
393393end,(sbx + 0.0))
394394checkF(function ()
395−return - border
396−end,- (sbx + 0.0))
395+return (- border)
396+end,(- (sbx + 0.0)))
397397checkF(function ()
398398return (border + 0x1)
399−end,((sbx + 1.0)))
399+end,(sbx + 1.0))
400400checkK(function ()
401401return (border + 0x2)
402−end,((sbx + 2.0)))
402+end,(sbx + 2.0))
403403checkK(function ()
404−return - ((border + 0x1))
405−end,- ((sbx + 1.0)))
404+return (- (border + 0x1))
405+end,(- (sbx + 1.0)))
406406checkR(function (x)
407407return (x + k1)
408408end,0xa,0xb,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
409409checkR(function (x)
410410return (x - 0x7f)
411−end,0xa,- 0x75,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
411+end,0xa,(- 0x75),"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
412412checkR(function (x)
413413return (0x80 + x)
414414end,0.0,128.0,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
415415checkR(function (x)
416−return (x * - 0x7f)
417−end,- 1.0,127.0,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
416+return (x * (- 0x7f))
417+end,(- 1.0),127.0,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
418418checkR(function (x)
419419return (0x14 * x)
420420end,0x2,0x28,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
421421checkR(function (x)
422−return (x ^ - 0x2)
422+return (x ^ (- 0x2))
423423end,0x2,0.25,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
424424checkR(function (x)
425425return (x / 0x28)
@@ -428,7 +428,7 @@ checkR(function (x)
428428return (x // 0x1)
429429end,10.0,10.0,"\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
430430checkR(function (x)
431−return (x % ((0x64 - 0xa)))
431+return (x % (0x64 - 0xa))
432432end,0x5b,0x1,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
433433checkR(function (x)
434434return (k1 << x)
@@ -437,13 +437,13 @@ checkR(function (x)
437437return (x << 0x7f)
438438end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
439439checkR(function (x)
440−return (x << - 0x7f)
440+return (x << (- 0x7f))
441441end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
442442checkR(function (x)
443443return (x >> 0x80)
444444end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
445445checkR(function (x)
446−return (x >> - 0x7f)
446+return (x >> (- 0x7f))
447447end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
448448checkR(function (x)
449449return (x & 0x1)
@@ -452,14 +452,14 @@ checkR(function (x)
452452return (0xa | x)
453453end,0x1,0xb,"\u{42}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
454454checkR(function (x)
455−return - (0xa ~ x)
456−end,- 0x1,0x9,"\u{42}\u{58}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
455+return (- (0xa ~ x))
456+end,(- 0x1),0x9,"\u{42}\u{58}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
457457checkR(function (x)
458458return (x + 0.0)
459459end,0x1,1.0,"\u{41}\u{44}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
460460checkR(function (x)
461−return (x * - 0x2710)
462−end,0x2,- 0x4e20,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
461+return (x * (- 0x2710))
462+end,0x2,(- 0x4e20),"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
463463checkR(function (x)
464464return (x ^ 0.5)
465465end,0x4,2.0,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
@@ -470,10 +470,10 @@ checkR(function (x)
470470return (x // 0x2710)
471471end,0x2710,0x1,"\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
472472checkR(function (x)
473−return (x % ((100.0 - 0xa)))
473+return (x % (100.0 - 0xa))
474474end,0x5b,1.0,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
475475check(function ()
476−return - 0.0
476+return (- 0.0)
477477end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
478478check(function ()
479479return (k3 / 0x0)
@@ -482,7 +482,7 @@ check(function ()
482482return (0x0 % 0x0)
483483end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
484484check(function ()
485−return - (0x4 // 0x0)
485+return (- (0x4 // 0x0))
486486end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
487487check(function (x)
488488return (x >> 2.0)
@@ -494,7 +494,7 @@ check(function (x)
494494return (x & 2.0)
495495end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{42}\u{41}\u{4e}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
496496check(function ()
497−for i = - 0xa, 10.5
497+for i = (- 0xa), 10.5
498498do
499499
500500end
@@ -506,7 +506,7 @@ do
506506end
507507end,"\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{46}\u{4f}\u{52}\u{50}\u{52}\u{45}\u{50}","\u{46}\u{4f}\u{52}\u{4c}\u{4f}\u{4f}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
508508check(function ()
509−return - nil
509+return (- nil)
510510end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
511511check(function ()
512512local a,b,c
@@ -527,13 +527,13 @@ end
527527checkequal(function ()
528528local a
529529;
530−if not ((a or b)) then
530+if (not (a or b)) then
531531b=a
532532end
533533end,function ()
534534local a
535535;
536−if (not (a and not b)) then
536+if (not (a and (not b))) then
537537b=a
538538end
539539end)
@@ -544,7 +544,7 @@ return ((0x0 <= a) and (a <= l))
544544end,function (l)
545545local a
546546;
547−return not (not (((a >= 0x0)) or not ((a <= l))))
547+return (not (not ((a >= 0x0) or (not (a <= l)))))
548548end)
549549check(function (a,b)
550550while a do
desk/res/lua/cycled/constructs.lua+33−33
@@ -28,55 +28,55 @@ a=(0x3 // 0x0)
2828;
2929a=(0x0 % 0x0)
3030end
31−assert((((0x2 ^ 0x3) ^ 0x2) == (0x2 ^ ((0x3 ^ 0x2)))))
31+assert(((0x2 ^ (0x3 ^ 0x2)) == (0x2 ^ (0x3 ^ 0x2))))
3232;
33−assert((((0x2 ^ 0x3) * 0x4) == (((0x2 ^ 0x3)) * 0x4)))
33+assert((((0x2 ^ 0x3) * 0x4) == ((0x2 ^ 0x3) * 0x4)))
3434;
35−assert((2.0 ^ - ((0x2 == (0x1 / 0x4)) and - (0x2 ^ - - (0x2 == - - - 0x4)))))
35+assert((2.0 ^ (- ((0x2 == (0x1 / 0x4)) and (- (0x2 ^ (- (- (0x2 == (- (- (- 0x4))))))))))))
3636;
37−assert(not ((nil and 0x2) and not (((0x2 > 0x3) or (0x3 < 0x2)))))
37+assert((not ((nil and 0x2) and (not ((0x2 > 0x3) or (0x3 < 0x2))))))
3838;
39−assert(- (((0x3 - 0x1) - 0x5) == ((0x0 + 0x0) - 0x9)))
39+assert((- (((0x3 - 0x1) - 0x5) == ((0x0 + 0x0) - 0x9))))
4040;
41−assert(- ((0x2 ^ 0x2) == - ((0x4 and (((- 0x2) ^ 0x2) == 0x4)) and ((((0x2 * 0x2) - 0x3) - 0x1) == 0x0))))
41+assert((- ((0x2 ^ 0x2) == (- ((0x4 and (((- 0x2) ^ 0x2) == 0x4)) and ((((0x2 * 0x2) - 0x3) - 0x1) == 0x0))))))
4242;
43−assert(- (((0x3 % 0x5) == 0x2) and - ((0x3 + 0x5) == 0x2)))
43+assert((- (((0x3 % 0x5) == 0x2) and (- ((0x3 + 0x5) == 0x2)))))
4444assert(((((0x2 * 0x1) + (0x3 / 0x3)) == 0x3) and (((0x1 + 0x2) .. (0x3 * 0x1)) == "\u{33}\u{33}")))
4545;
46−assert(not ((((0x2 + 0x1) > (0x3 * 0x1))) and (("\u{61}" .. "\u{62}") > "\u{61}")))
46+assert((not (((0x2 + 0x1) > (0x3 * 0x1)) and (("\u{61}" .. "\u{62}") > "\u{61}"))))
4747;
4848assert(((0xf0 | (0xcc ~ (0xaa & 0xfd))) == 0xf4))
4949assert(((((0xfd & 0xaa) ~ 0xcc) | 0xf0) == 0xf4))
5050assert(((0xf0 & (0xf + 0x1)) == 0x10))
5151assert(((((0x3 ^ 0x4) // (0x2 ^ 0x3)) // 0x5) == 0x2))
52−assert(- (((0x3 + (((0x4 * 0x5) // ((0x2 ^ 0x3) ^ 0x2)) // 0x9)) + ((0x4 % 0xa) / 0x3)) == (((- 0x3) + ((((((0x4 * 0x5)) // ((0x2 ^ ((0x3 ^ 0x2)))))) // 0x9))) + ((((0x4 % 0xa)) / 0x3)))))
53−assert(not ((((true or false)) and nil)))
52+assert((- (((0x3 + (((0x4 * 0x5) // (0x2 ^ (0x3 ^ 0x2))) // 0x9)) + ((0x4 % 0xa) / 0x3)) == (((- 0x3) + (((0x4 * 0x5) // (0x2 ^ (0x3 ^ 0x2))) // 0x9)) + ((0x4 % 0xa) / 0x3)))))
53+assert((not ((true or false) and nil)))
5454assert((true or (false and nil)))
55−assert((((((((0x1 or false)) and true)) or false)) == true))
56−assert((((((((nil and true)) or false)) and true)) == false))
55+assert(((((0x1 or false) and true) or false) == true))
56+assert(((((nil and true) or false) and true) == false))
5757local a,b = 0x1,nil
5858;
59−assert(- (((0x1 or 0x2)) == - (0x1 and ((((0x1 and 0x2)) + (- (1.25 or - 0x4))) == 0.75))))
59+assert((- ((0x1 or 0x2) == (- (0x1 and (((0x1 and 0x2) + (- (1.25 or (- 0x4)))) == 0.75))))))
6060;
61−local x = ((((((b or a)) + 0x1) == 0x2) and ((((0xa or a)) + 0x1) == 0xb)))
61+local x = ((((b or a) + 0x1) == 0x2) and (((0xa or a) + 0x1) == 0xb))
6262;
6363assert(x)
6464;
65−x=(((((((0x2 < 0x3)) or 0x1)) == true) and ((((0x2 < 0x3) and 0x4)) == 0x4)))
65+x=((((0x2 < 0x3) or 0x1) == true) and (((0x2 < 0x3) and 0x4) == 0x4))
6666;
6767assert(x)
6868;
6969local x,y = 0x1,0x2
7070;
71−assert(((((x > y)) and x) or (y == 0x2)))
71+assert((((x > y) and x) or (y == 0x2)))
7272;
7373x,y=0x2,0x1
7474;
75−assert(((((x > y)) and x) or (y == 0x2)))
75+assert((((x > y) and x) or (y == 0x2)))
7676;
7777assert(((0x499602d2 == tonumber("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}")) and ((0x499602d2 + 0x1) == 0x499602d3)))
7878do
79−local operand = {0x3,0x64,5.0,- 0xa,- 5.0,0x2710,- 0x2710}
79+local operand = {0x3,0x64,5.0,(- 0xa),(- 5.0),0x2710,(- 0x2710)}
8080local operator = {"\u{2b}","\u{2d}","\u{2a}","\u{2f}","\u{2f}\u{2f}","\u{25}","\u{5e}","\u{26}","\u{7c}","\u{5e}","\u{3c}\u{3c}","\u{3e}\u{3e}","\u{3d}\u{3d}","\u{7e}\u{3d}","\u{3c}","\u{3e}","\u{3c}\u{3d}","\u{3e}\u{3d}"}
8181for _,op in ipairs(operator)
8282do
@@ -135,9 +135,9 @@ do
135135local code = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{7b}"}
136136for i = 0x1, 0x101
137137do
138−code[# (code + 0x1)]=(i .. "\u{2e}\u{31}\u{2c}")
138+code[(# (code + 0x1))]=(i .. "\u{2e}\u{31}\u{2c}")
139139end
140−code[# (code + 0x1)]="\u{7d}\u{3b}"
140+code[(# (code + 0x1))]="\u{7d}\u{3b}"
141141code=table.concat(code)
142142local function check
143143(ret,val)
@@ -199,12 +199,12 @@ local i = 0x3
199199local t = {}
200200;
201201local a = nil
202−while not a do
202+while (not a) do
203203a=0x0
204204;
205205for i = 0x1, n
206206do
207−for i = i, 0x1, - 0x1
207+for i = i, 0x1, (- 0x1)
208208do
209209a=(a + 0x1)
210210;
@@ -215,9 +215,9 @@ end
215215end
216216;
217217end
218−assert(((a == ((n * ((n + 0x1))) / 0x2)) and (i == 0x3)))
218+assert(((a == ((n * (n + 0x1)) / 0x2)) and (i == 0x3)))
219219;
220−assert(((t[0x1] and t[n]) and not (t[0x0] and not t[(n + 0x1)])))
220+assert(((t[0x1] and t[n]) and (not (t[0x0] and (not t[(n + 0x1)])))))
221221function f(b)
222222local x = 0x1
223223;
@@ -305,7 +305,7 @@ end
305305local a,b,c = f()
306306;
307307assert((((a == 0x1) and (b == 0x2)) and (c == 0x3)))
308−a,b,c=(f())
308+a,b,c=f()
309309;
310310assert((((a == 0x1) and (b == nil)) and (c == nil)))
311311end
@@ -340,7 +340,7 @@ f,a=load(f)()
340340;
341341assert(((a.a == 0x1) and a.b))
342342function g(a,b,c,d,e)
343−if not (((((a >= b) or c) or (d and e)) or nil)) then
343+if (not ((((a >= b) or c) or (d and e)) or nil)) then
344344return 0x0
345345else
346346return 0x1
@@ -349,7 +349,7 @@ end
349349end
350350local function h
351351(a,b,c,d,e)
352−while (((((a >= b) or c) or ((d and e))) or nil)) do
352+while ((((a >= b) or c) or (d and e)) or nil) do
353353return 0x1
354354end
355355;
@@ -364,10 +364,10 @@ assert((((f(0x1,0x2,nil,0x1,"\u{78}") == "\u{78}") and (g(0x1,0x2,nil,0x1,"\u{78
364364assert((((f(0x1,0x2,nil,nil,"\u{78}") == nil) and (g(0x1,0x2,nil,nil,"\u{78}") == 0x0)) and (h(0x1,0x2,nil,nil,"\u{78}") == 0x0)))
365365assert((((f(0x1,0x2,nil,0x1,nil) == nil) and (g(0x1,0x2,nil,0x1,nil) == 0x0)) and (h(0x1,0x2,nil,0x1,nil) == 0x0)))
366366assert((((0x1 and ((0x2 < 0x3) == true)) and (0x2 < 0x3)) and (("\u{61}" < "\u{62}") == true)))
367−x=((0x2 < 0x3) and not 0x3)
367+x=((0x2 < 0x3) and (not 0x3))
368368;
369369assert((x == false))
370−x=((0x2 < 0x1) or (((0x2 > 0x1) and "\u{61}")))
370+x=((0x2 < 0x1) or ((0x2 > 0x1) and "\u{61}"))
371371;
372372assert((x == "\u{61}"))
373373do
@@ -407,7 +407,7 @@ prog="\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{6b}\u{31}\u
407407end
408408print(("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{2d}\u{63}\u{69}\u{72}\u{63}\u{75}\u{69}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6d}\u{69}\u{7a}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{28}" .. (_ENV.GLOB1 .. "\u{29}")))
409409local binops <const> = {{"\u{20}\u{61}\u{6e}\u{64}\u{20}",function (a,b)
410−if not a then
410+if (not a) then
411411return a
412412else
413413return b
@@ -432,8 +432,8 @@ do
432432for _,op in ipairs(binops)
433433do
434434local t = {("\u{28}" .. (v1[0x1] .. (op[0x1] .. (v2[0x1] .. "\u{29}")))),op[0x2](v1[0x2],v2[0x2])}
435−res[# (res + 0x1)]=t
436−res[# (res + 0x1)]={("\u{6e}\u{6f}\u{74}" .. t[0x1]),not t[0x2]}
435+res[(# (res + 0x1))]=t
436+res[(# (res + 0x1))]={("\u{6e}\u{6f}\u{74}" .. t[0x1]),(not t[0x2])}
437437end
438438end
439439end
@@ -455,7 +455,7 @@ do
455455local s = v[0x1]
456456local p = load(string.format(prog,s,s),"")
457457IX=false
458−assert(((p() == v[0x2]) and (IX == not not v[0x2])))
458+assert(((p() == v[0x2]) and (IX == (not (not v[0x2])))))
459459i=(i + 0x1)
460460if ((i % 0xea60) == 0x0) then
461461print("\u{2b}")
desk/res/lua/cycled/coroutine.lua+71−71
@@ -3,15 +3,15 @@ local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
33local f
44local main,ismain = coroutine.running()
55assert(((type(main) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") and ismain))
6−assert(not coroutine.resume(main))
7−assert(not (coroutine.isyieldable(main) and not coroutine.isyieldable()))
8−assert(not pcall(coroutine.yield))
9−assert(not pcall(coroutine.resume,0x0))
10−assert(not pcall(coroutine.status,0x0))
6+assert((not coroutine.resume(main)))
7+assert((not (coroutine.isyieldable(main) and (not coroutine.isyieldable()))))
8+assert((not pcall(coroutine.yield)))
9+assert((not pcall(coroutine.resume,0x0)))
10+assert((not pcall(coroutine.status,0x0)))
1111local function eqtab
1212(t1,t2)
13−assert(# (t1 == # t2))
14−for i = 0x1, # t1
13+assert((# (t1 == (# t2))))
14+for i = 0x1, (# t1)
1515do
1616local v = t1[i]
1717assert((t2[i] == v))
@@ -27,7 +27,7 @@ assert((coroutine.resume(f) == false))
2727assert((coroutine.status(f) == "\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
2828local arg = {...}
2929assert(coroutine.isyieldable(x))
30−for i = 0x1, # arg
30+for i = 0x1, (# arg)
3131do
3232_G.x={coroutine.yield(table.unpack(arg[i]))}
3333end
@@ -53,7 +53,7 @@ eqtab(_G.x,{"\u{78}\u{75}\u{78}\u{75}"})
5353assert(((((s and (a == 0x1)) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
5454assert((coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}"))
5555s,a=coroutine.resume(f,"\u{78}\u{75}\u{78}\u{75}")
56−assert(not ((s and string.find(a,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}")))
56+assert((not ((s and string.find(a,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}"))))
5757_G.f=nil
5858local function foo
5959(i)
@@ -121,7 +121,7 @@ end
121121table.insert(a,n)
122122x=filter(n,x)
123123end
124−assert(# ((a == 0x16) and (a[# a] == 0x4f)))
124+assert((# ((a == 0x16) and (a[(# a)] == 0x4f))))
125125x,a=nil
126126print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}")
127127local function func2close
@@ -137,12 +137,12 @@ assert((st and (msg == nil)))
137137st,msg=coroutine.close(co)
138138assert((st and (msg == nil)))
139139local st,msg = pcall(coroutine.close,coroutine.running())
140−assert(not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}")))
140+assert((not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))))
141141local main = coroutine.running()
142142;
143143(coroutine.wrap(function ()
144144local st,msg = pcall(coroutine.close,main)
145−assert(not (st and string.find(msg,"\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")))
145+assert((not (st and string.find(msg,"\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))))
146146end))()
147147do
148148local co
@@ -155,14 +155,14 @@ end)
155155local st,msg = coroutine.resume(co)
156156assert((st and (msg == 0x14)))
157157st,msg=coroutine.close(co)
158−assert(not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}")))
158+assert((not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))))
159159end
160160local X
161161local co = coroutine.create(error)
162162local st,msg = coroutine.resume(co,0x64)
163−assert(not (st and (msg == 0x64)))
163+assert((not (st and (msg == 0x64))))
164164st,msg=coroutine.close(co)
165−assert(not (st and (msg == 0x64)))
165+assert((not (st and (msg == 0x64))))
166166st,msg=coroutine.close(co)
167167assert((st and (msg == nil)))
168168co=coroutine.create(function ()
@@ -177,7 +177,7 @@ end)
177177coroutine.resume(co)
178178assert(X)
179179assert(coroutine.close(co))
180−assert(not (X and (coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}")))
180+assert((not (X and (coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))))
181181local x = 0x0
182182co=coroutine.create(function ()
183183local y <close> = func2close(function (self,err)
@@ -215,7 +215,7 @@ local co = coroutine.create(function ()
215215return pcall(foo)
216216end)
217217local st1,st2,err = coroutine.resume(co)
218−assert((st1 and not (st2 and (err == 0x2b))))
218+assert((st1 and (not (st2 and (err == 0x2b)))))
219219assert(((X == 0x2b) and (Y.what == "\u{43}")))
220220local track = {}
221221local function h
@@ -226,20 +226,20 @@ end
226226local function foo
227227()
228228local x <close> = func2close(function (_,msg)
229−track[# (track + 0x1)]=(msg or false)
229+track[(# (track + 0x1))]=(msg or false)
230230error(0x14)
231231end)
232232local y <close> = func2close(function (_,msg)
233−track[# (track + 0x1)]=(msg or false)
233+track[(# (track + 0x1))]=(msg or false)
234234return 0x3e8
235235end)
236236local z <close> = func2close(function (_,msg)
237−track[# (track + 0x1)]=(msg or false)
237+track[(# (track + 0x1))]=(msg or false)
238238error(0xa)
239239end)
240240coroutine.yield(0x1)
241241h(func2close(function (_,msg)
242−track[# (track + 0x1)]=(msg or false)
242+track[(# (track + 0x1))]=(msg or false)
243243error(0x2)
244244end))
245245end
@@ -248,11 +248,11 @@ local st,res = coroutine.resume(co,foo)
248248assert((st and (res == 0x1)))
249249local st,res1,res2 = coroutine.resume(co)
250250assert((coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))
251−assert((st and not (res1 and (res2 == 0x14))))
251+assert((st and (not (res1 and (res2 == 0x14)))))
252252assert(((((track[0x1] == false) and (track[0x2] == 0x2)) and (track[0x3] == 0xa)) and (track[0x4] == 0xa)))
253253end
254254local co = coroutine.wrap(function ()
255−assert(not pcall(table.sort,{0x1,0x2,0x3},coroutine.yield))
255+assert((not pcall(table.sort,{0x1,0x2,0x3},coroutine.yield)))
256256assert(coroutine.isyieldable())
257257coroutine.yield(0x14)
258258return 0x1e
@@ -282,7 +282,7 @@ do
282282assert((f1(i) == i))
283283end
284284local r1,r2,v = f1(nil)
285−assert((r1 and not (r2 and (v[0x1] == ((((0xa + 0x1)) * 0xa) / 0x2)))))
285+assert((r1 and (not (r2 and (v[0x1] == (((0xa + 0x1) * 0xa) / 0x2))))))
286286local function f
287287(a,b)
288288a=coroutine.yield(a)
@@ -298,11 +298,11 @@ coroutine.yield(xpcall(f,g,0xa,0x14))
298298end)
299299assert((co() == 0xa))
300300local r,msg = co(0x64)
301−assert(not (r and (msg == 0xf0)))
301+assert((not (r and (msg == 0xf0))))
302302do
303303local function f
304304(c)
305−assert(not coroutine.isyieldable())
305+assert((not coroutine.isyieldable()))
306306return (c .. c)
307307end
308308local co = coroutine.wrap(function (c)
@@ -321,14 +321,14 @@ end)
321321local trace = {}
322322local function dotrace
323323(event)
324−trace[# (trace + 0x1)]=event
324+trace[(# (trace + 0x1))]=event
325325end
326326debug.sethook(co,dotrace,"\u{63}\u{6c}\u{72}")
327327repeat
328328
329−until not coroutine.resume(co)
329+until (not coroutine.resume(co))
330330local correcttrace = {"\u{63}\u{61}\u{6c}\u{6c}","\u{6c}\u{69}\u{6e}\u{65}","\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{6c}\u{69}\u{6e}\u{65}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"}
331−assert(# (trace == # correcttrace))
331+assert((# (trace == (# correcttrace))))
332332for k,v in pairs(trace)
333333do
334334assert((v == correcttrace[k]))
@@ -346,14 +346,14 @@ end
346346x=coroutine.wrap(goo)
347347assert((x() == 0x3))
348348local a,b = pcall(x)
349−assert(not (a and (b == foo)))
349+assert((not (a and (b == foo))))
350350x=coroutine.create(goo)
351351a,b=coroutine.resume(x)
352352assert((a and (b == 0x3)))
353353a,b=coroutine.resume(x)
354−assert(not ((a and (b == foo)) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}")))
354+assert((not ((a and (b == foo)) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}"))))
355355a,b=coroutine.resume(x)
356−assert(not ((a and string.find(b,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}")))
356+assert((not ((a and string.find(b,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}"))))
357357goo=nil
358358local function all
359359(a,n,k)
@@ -432,7 +432,7 @@ end)
432432return pcall(A,0x1)
433433end)
434434st,res=A()
435−assert(not ((st and string.find(res,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (X == true)))
435+assert((not ((st and string.find(res,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (X == true))))
436436end
437437do
438438local co
@@ -443,9 +443,9 @@ end)
443443error(0x6f)
444444end)
445445local st,errobj = pcall(co)
446−assert(not (st and (errobj == 0x6f)))
446+assert((not (st and (errobj == 0x6f))))
447447st,errobj=pcall(co)
448−assert(not (st and string.find(errobj,"\u{64}\u{65}\u{61}\u{64}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}")))
448+assert((not (st and string.find(errobj,"\u{64}\u{65}\u{61}\u{64}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))))
449449end
450450local co1,co2
451451co1=coroutine.create(function ()
@@ -453,7 +453,7 @@ return co2()
453453end)
454454co2=coroutine.wrap(function ()
455455assert((coroutine.status(co1) == "\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))
456−assert(not coroutine.resume(co1))
456+assert((not coroutine.resume(co1)))
457457coroutine.yield(0x3)
458458end)
459459a,b=coroutine.resume(co1)
@@ -462,7 +462,7 @@ assert((coroutine.status(co1) == "\u{64}\u{65}\u{61}\u{64}"))
462462a=function (a)
463463coroutine.wrap(a)(a)
464464end
465−assert(not pcall(a,a))
465+assert((not pcall(a,a)))
466466a=nil
467467local x = coroutine.create(function ()
468468local a = 0xa
@@ -473,13 +473,13 @@ return a
473473end
474474error("\u{78}")
475475end)
476−assert(not coroutine.resume(x))
477−assert(not coroutine.resume(x,0x1,0x1,0x1,0x1,0x1,0x1,0x1))
476+assert((not coroutine.resume(x)))
477+assert((not coroutine.resume(x,0x1,0x1,0x1,0x1,0x1,0x1,0x1)))
478478assert((_G.F() == 0xb))
479479assert((_G.F() == 0xc))
480480_G.F=nil
481−if not T then
482−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
481+if (not T) then
482+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
483483else
484484print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{73}")
485485local turn
@@ -529,7 +529,7 @@ a[i]=i
529529end
530530T.sethook("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x1)
531531local a1 = {table.unpack(a)}
532−assert(# (a1 == n))
532+assert((# (a1 == n)))
533533for i = 0x1, n
534534do
535535assert((a[i] == i))
@@ -539,22 +539,22 @@ end)
539539end
540540local co = test(0x0)
541541;
542−while not done do
542+while (not done) do
543543co(0x1e)
544544end
545545co=test(0x1)
546546;
547−while not done do
547+while (not done) do
548548co(0x14,0xa)
549549end
550550co=test(0x3)
551551;
552−while not done do
552+while (not done) do
553553co()
554554end
555555co=test(0x64)
556556;
557−while not done do
557+while (not done) do
558558co()
559559end
560560end
@@ -643,13 +643,13 @@ assert((((n == "\u{61}") and (v == 0x1)) and (debug.getlocal(c,0x0,0x2) ~= "\u{6
643643assert(debug.setlocal(c,0x0,0x1,0xa))
644644local t = debug.getinfo(c,0x0)
645645assert((t.currentline == (t.linedefined + 0x2)))
646−assert(not debug.getinfo(c,0x1))
646+assert((not debug.getinfo(c,0x1)))
647647assert(coroutine.resume(c))
648648local n,v = debug.getlocal(c,0x0,0x2)
649649assert(((n == "\u{62}") and (v == 0xa)))
650650v={coroutine.resume(c)}
651651assert(((((v[0x1] == true) and (v[0x2] == 0x2)) and (v[0x3] == 0x3)) and (v[0x4] == undef)))
652−assert(not coroutine.resume(c))
652+assert((not coroutine.resume(c)))
653653end
654654do
655655local c = coroutine.create(function ()
@@ -657,7 +657,7 @@ T.testC("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}",0xa,0x14)
657657end)
658658local a,b = coroutine.resume(c)
659659assert((a and (b == 0x14)))
660−assert((debug.getinfo(c,0x0).linedefined == - 0x1))
660+assert((debug.getinfo(c,0x0).linedefined == (- 0x1)))
661661a,b=debug.getlocal(c,0x0,0x2)
662662assert((b == 0xa))
663663end
@@ -676,7 +676,7 @@ a,b,c,d=T.testC("\u{20}\u{20}\u{20}\u{20}\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{
676676assert(((((a == coroutine.running()) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (c == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (d == 0x4)))
677677local state = T.newstate()
678678assert(T.testC(state,"\u{6e}\u{65}\u{77}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
679−assert(not T.testC(state,"\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
679+assert((not T.testC(state,"\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
680680T.testC(state,"\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}")
681681T.loadlib(state)
682682assert(T.doremote(state,"\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{27}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{58}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{78}\u{29}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{28}\u{78}\u{2c}\u{20}\u{27}\u{42}\u{42}\u{27}\u{29}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{43}\u{43}\u{27}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}"))
@@ -696,17 +696,17 @@ end
696696coroutine.yield()
697697end)
698698_G.TO_SURVIVE()
699−if not _soft then
699+if (not _soft) then
700700local lim = 0xf4240
701701local t = {(lim - 0xa),(lim - 0x5),(lim - 0x1),lim,(lim + 0x1),(lim + 0x5)}
702−for i = 0x1, # t
702+for i = 0x1, (# t)
703703do
704704local j = t[i]
705705local co = coroutine.create(function ()
706706return table.unpack({},0x1,j)
707707end)
708708local r,msg = coroutine.resume(co)
709−assert(((j < lim) or not r))
709+assert(((j < lim) or (not r)))
710710end
711711end
712712assert((coroutine.running() == main))
@@ -763,11 +763,11 @@ return (val(a) % val(b))
763763end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a,b)
764764coroutine.yield(nil,"\u{75}\u{6e}\u{6d}")
765765;
766−return - val(a)
766+return (- val(a))
767767end,["\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}"] = function (a,b)
768768coroutine.yield(nil,"\u{62}\u{6e}\u{6f}\u{74}")
769769;
770−return ~ val(a)
770+return (~ val(a))
771771end,["\u{5f}\u{5f}\u{73}\u{68}\u{6c}"] = function (a,b)
772772coroutine.yield(nil,"\u{73}\u{68}\u{6c}")
773773;
@@ -823,21 +823,21 @@ i=(i + 0x1)
823823end
824824end
825825assert((run(function ()
826−if ((a >= b)) then
826+if (a >= b) then
827827return "\u{3e}\u{3d}"
828828else
829829return "\u{3c}"
830830end
831831end,{"\u{6c}\u{65}","\u{73}\u{75}\u{62}"}) == "\u{3c}"))
832832assert((run(function ()
833−if ((a <= b)) then
833+if (a <= b) then
834834return "\u{3c}\u{3d}"
835835else
836836return "\u{3e}"
837837end
838838end,{"\u{6c}\u{65}","\u{73}\u{75}\u{62}"}) == "\u{3c}\u{3d}"))
839839assert((run(function ()
840−if ((a == b)) then
840+if (a == b) then
841841return "\u{3d}\u{3d}"
842842else
843843return "\u{7e}\u{3d}"
@@ -851,7 +851,7 @@ return (0x1 + a)
851851end,{"\u{61}\u{64}\u{64}"}) == 0xb))
852852assert((run(function ()
853853return (a - 0x19)
854−end,{"\u{73}\u{75}\u{62}"}) == - 0xf))
854+end,{"\u{73}\u{75}\u{62}"}) == (- 0xf)))
855855assert((run(function ()
856856return (0x2 * a)
857857end,{"\u{6d}\u{75}\u{6c}"}) == 0x14))
@@ -872,7 +872,7 @@ return (a + b)
872872end,{"\u{61}\u{64}\u{64}"}) == 0x16))
873873assert((run(function ()
874874return (a - b)
875−end,{"\u{73}\u{75}\u{62}"}) == - 0x2))
875+end,{"\u{73}\u{75}\u{62}"}) == (- 0x2)))
876876assert((run(function ()
877877return (a * b)
878878end,{"\u{6d}\u{75}\u{6c}"}) == 0x78))
@@ -894,7 +894,7 @@ return (a1000 + 0x3e8)
894894end,{"\u{61}\u{64}\u{64}"}) == 0x7d0))
895895assert((run(function ()
896896return (a1000 - 0x61a8)
897−end,{"\u{73}\u{75}\u{62}"}) == - 0x5dc0))
897+end,{"\u{73}\u{75}\u{62}"}) == (- 0x5dc0)))
898898assert((run(function ()
899899return (0x7d0 * a)
900900end,{"\u{6d}\u{75}\u{6c}"}) == 0x4e20))
@@ -911,8 +911,8 @@ assert((run(function ()
911911return (a % b)
912912end,{"\u{6d}\u{6f}\u{64}"}) == 0xa))
913913assert((run(function ()
914−return ~ (a & b)
915−end,{"\u{62}\u{6e}\u{6f}\u{74}","\u{62}\u{61}\u{6e}\u{64}"}) == ~ (0xa & 0xc)))
914+return (~ (a & b))
915+end,{"\u{62}\u{6e}\u{6f}\u{74}","\u{62}\u{61}\u{6e}\u{64}"}) == (~ (0xa & 0xc))))
916916assert((run(function ()
917917return (a | b)
918918end,{"\u{62}\u{6f}\u{72}"}) == (0xa | 0xc)))
@@ -961,7 +961,7 @@ end,{"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74
961961do
962962local mt1 = {["\u{5f}\u{5f}\u{6c}\u{65}"] = function (a,b)
963963coroutine.yield(0xa)
964−return ((val(a) <= val(b)))
964+return (val(a) <= val(b))
965965end,["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
966966coroutine.yield(0xa)
967967return (val(a) < val(b))
@@ -1028,7 +1028,7 @@ end
10281028return s
10291029end,{"\u{66}\u{6f}\u{72}","\u{66}\u{6f}\u{72}","\u{66}\u{6f}\u{72}"}) == 0xa))
10301030if (T == nil) then
1031−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
1031+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
10321032print("\u{4f}\u{4b}")
10331033;
10341034return
@@ -1042,13 +1042,13 @@ return T.testC(table.unpack(x))
10421042end)
10431043end
10441044local a = {apico("\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}\u{a}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{72}\u{72}\u{69}\u{76}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{29}\u{a}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}",error)()}
1045−assert(# (((((a == 0x4) and (a[0x3] == "\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}")) and (a[0x4] == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}")) and (_G.status == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (_G.ctx == 0x2)))
1045+assert((# (((((a == 0x4) and (a[0x3] == "\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}")) and (a[0x4] == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}")) and (_G.status == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (_G.ctx == 0x2))))
10461046local co = apico("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{3b}",coroutine.yield,"\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{34}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}","\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")
10471047assert((co() == 0xa))
10481048assert((co(0x14,0x1e) == "\u{61}"))
10491049a={co()}
1050−assert(# ((((((((a == 0xa) and (a[0x2] == coroutine.yield)) and (a[0x5] == 0x14)) and (a[0x6] == 0x1e)) and (a[0x7] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0x8] == 0x3)) and (a[0x9] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0xa] == 0x4)))
1051−assert(not pcall(co))
1050+assert((# ((((((((a == 0xa) and (a[0x2] == coroutine.yield)) and (a[0x5] == 0x14)) and (a[0x6] == 0x1e)) and (a[0x7] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0x8] == 0x3)) and (a[0x9] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0xa] == 0x4))))
1051+assert((not pcall(co)))
10521052f=T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{35}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}\u{3b}")
10531053co=coroutine.wrap(function ()
10541054assert((f() == 0x17))
@@ -1081,7 +1081,7 @@ return f(nil)
10811081end)
10821082assert((co() == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}"))
10831083a={co()}
1084−assert(# ((((a == 0x3) and (a[0x1] == a[0x2])) and (a[0x2] == a[0x3])) and (a[0x3] == 0x22)))
1084+assert((# ((((a == 0x3) and (a[0x1] == a[0x2])) and (a[0x2] == a[0x3])) and (a[0x3] == 0x22))))
10851085local y
10861086co=coroutine.wrap(function (...)
10871087return T.testC("\u{20}\u{23}\u{20}\u{69}\u{6e}\u{69}\u{74}\u{69}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{31}\u{73}\u{74}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{33}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{32}\u{6e}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{34}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{33}\u{74}\u{68}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{20}\u{20}\u{20}\u{23}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{68}\u{69}\u{63}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{20}\u{61}\u{72}\u{67}\u{2e}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{43}\u{27}\u{20}\u{68}\u{65}\u{72}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{32}\u{20}\u{30}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{9}\u{9}\u{23}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{32}\u{20}\u{32}\u{20}\u{35}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6a}\u{75}\u{6d}\u{70}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{34}\u{74}\u{68}\u{20}\u{28}\u{61}\u{6e}\u{64}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{29}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}",function (a,b)
@@ -1105,9 +1105,9 @@ a={co(0x7,0x8)}
11051105assert(((((((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(a[0x2]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x3]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x4]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x5]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x6]) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
11061106assert(((a[0x7] == 0x3) and (a[0x8] == 0x4)))
11071107assert(((a[0x9] == 0x7) and (a[0xa] == 0x8)))
1108−assert((a[0xb]:find("\u{65}\u{72}\u{72}\u{6d}\u{73}\u{67}") and # (a == 0xb)))
1108+assert((a[0xb]:find("\u{65}\u{72}\u{72}\u{6d}\u{73}\u{67}") and (# (a == 0xb))))
11091109assert(((x == "\u{59}\u{49}\u{45}\u{4c}\u{44}") and (y == 0x4)))
1110−assert(not pcall(co))
1110+assert((not pcall(co)))
11111111_G.ctx=nil
11121112_G.status=nil
11131113local co = coroutine.wrap(function ()
desk/res/lua/cycled/cstack.lua+6−6
@@ -3,7 +3,7 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\
33local function checkerror
44(msg,f, ...)
55local s,err = pcall(f,...)
6−assert(not (s and string.find(err,msg)))
6+assert((not (s and string.find(err,msg))))
77end
88do
99print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{69}\u{6e}\u{67}")
@@ -28,7 +28,7 @@ local p = string.rep("\u{2e}\u{3f}",size)
2828return string.match(s,p)
2929end
3030local m = f(0x50)
31−assert(# (m == 0x50))
31+assert((# (m == 0x50)))
3232checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{63}\u{6f}\u{6d}\u{70}\u{6c}\u{65}\u{78}",f,0x7d0)
3333end
3434do
@@ -69,7 +69,7 @@ end
6969local st,msg = xpcall(stack,function ()
7070return "\u{6f}\u{6b}"
7171end,lim)
72−assert(not (st and (msg == "\u{6f}\u{6b}")))
72+assert((not (st and (msg == "\u{6f}\u{6b}"))))
7373print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
7474end
7575do
@@ -91,7 +91,7 @@ end)
9191assert(coroutine.resume(coro))
9292end
9393local st,msg = coroutine.close(coro)
94−assert(not (st and string.find(msg,"\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))
94+assert((not (st and string.find(msg,"\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))))
9595print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
9696end
9797do
@@ -108,7 +108,7 @@ f()
108108end
109109local f = coroutine.wrap(body)
110110f()
111−assert(not pcall(f))
111+assert((not pcall(f)))
112112print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
113113end
114114do
@@ -126,7 +126,7 @@ end
126126if T then
127127print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{72}\u{65}\u{63}\u{6f}\u{76}\u{65}\u{72}\u{79}")
128128local N = 0x0
129−local LIM = - 0x1
129+local LIM = (- 0x1)
130130local stack1
131131local dummy
132132local function err
desk/res/lua/cycled/db.lua+67−67
@@ -7,7 +7,7 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{64}\u{65}\u{62}\u{75}\
77do
88local a = 0x1
99end
10−assert(not debug.gethook())
10+assert((not debug.gethook()))
1111local testline = 0x13
1212local function test
1313(s,l,p)
@@ -26,26 +26,26 @@ debug.sethook(f,"\u{6c}")
2626load(s)()
2727;
2828debug.sethook()
29−assert(# (l == 0x0))
29+assert((# (l == 0x0)))
3030end
3131do
32−assert(not pcall(debug.getinfo,print,"\u{58}"))
33−assert(not pcall(debug.getinfo,0x0,"\u{3e}"))
34−assert(not debug.getinfo(0x3e8))
35−assert(not debug.getinfo(- 0x1))
32+assert((not pcall(debug.getinfo,print,"\u{58}")))
33+assert((not pcall(debug.getinfo,0x0,"\u{3e}")))
34+assert((not debug.getinfo(0x3e8)))
35+assert((not debug.getinfo((- 0x1))))
3636local a = debug.getinfo(print)
3737assert(((a.what == "\u{43}") and (a.short_src == "\u{5b}\u{43}\u{5d}")))
3838a=debug.getinfo(print,"\u{4c}")
3939assert((a.activelines == nil))
4040local b = debug.getinfo(test,"\u{53}\u{66}\u{4c}")
41−assert(((((((b.name == nil) and (b.what == "\u{4c}\u{75}\u{61}")) and (b.linedefined == testline)) and (b.lastlinedefined == (b.linedefined + 0xa))) and (b.func == test)) and not string.find(b.short_src,"\u{25}\u{5b}")))
41+assert(((((((b.name == nil) and (b.what == "\u{4c}\u{75}\u{61}")) and (b.linedefined == testline)) and (b.lastlinedefined == (b.linedefined + 0xa))) and (b.func == test)) and (not string.find(b.short_src,"\u{25}\u{5b}"))))
4242assert((b.activelines[(b.linedefined + 0x1)] and b.activelines[b.lastlinedefined]))
43−assert(not (b.activelines[b.linedefined] and not b.activelines[(b.lastlinedefined + 0x1)]))
43+assert((not (b.activelines[b.linedefined] and (not b.activelines[(b.lastlinedefined + 0x1)]))))
4444end
4545do
4646local func = load(string.dump(load("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{31}\u{30}\u{29}"),true))
4747local actl = debug.getinfo(func,"\u{4c}").activelines
48−assert(# (actl == 0x0))
48+assert((# (actl == 0x0)))
4949end
5050local a = "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}"
5151local function dostring
@@ -90,7 +90,7 @@ return ((0x1 + 0x1) and (not (0x1 or g.x())))
9090end
9191assert((f() == "\u{78}\u{69}\u{78}\u{69}"))
9292g=debug.getinfo(f)
93−assert(((((g.what == "\u{4c}\u{75}\u{61}") and (g.func == f)) and (g.namewhat == "")) and not g.name))
93+assert(((((g.what == "\u{4c}\u{75}\u{61}") and (g.func == f)) and (g.namewhat == "")) and (not g.name)))
9494function f(x,name)
9595name=(name or "\u{66}")
9696local a = debug.getinfo(0x1)
@@ -143,10 +143,10 @@ g={}
143143f(g).x=(f(0x2) and (f(0xa) + f(0x9)))
144144assert((g.x == f(0x13)))
145145function g(x)
146−if not x then
146+if (not x) then
147147return 0x3
148148end
149−return (x("\u{61}","\u{78}"))
149+return x("\u{61}","\u{78}")
150150end
151151assert((g(f) == "\u{61}"))
152152until 0x1
@@ -209,8 +209,8 @@ checkactivelines(load(string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\
209209end
210210end
211211print("\u{2b}")
212−assert(not pcall(debug.getlocal,0x14,0x1))
213−assert(not pcall(debug.setlocal,- 0x1,0x1,0xa))
212+assert((not pcall(debug.getlocal,0x14,0x1)))
213+assert((not pcall(debug.setlocal,(- 0x1),0x1,0xa)))
214214local function foo
215215(a,b, ...)
216216local d,e
@@ -218,30 +218,30 @@ end
218218local co = coroutine.create(foo)
219219assert((debug.getlocal(foo,0x1) == "\u{61}"))
220220assert((debug.getlocal(foo,0x2) == "\u{62}"))
221−assert(not debug.getlocal(foo,0x3))
221+assert((not debug.getlocal(foo,0x3)))
222222assert((debug.getlocal(co,foo,0x1) == "\u{61}"))
223223assert((debug.getlocal(co,foo,0x2) == "\u{62}"))
224−assert(not debug.getlocal(co,foo,0x3))
225−assert(not debug.getlocal(print,0x1))
224+assert((not debug.getlocal(co,foo,0x3)))
225+assert((not debug.getlocal(print,0x1)))
226226local function foo
227227()
228−return (debug.getlocal(0x1,- 0x1))
228+return debug.getlocal(0x1,(- 0x1))
229229end
230−assert(not foo(0xa))
230+assert((not foo(0xa)))
231231local function foo
232232(a, ...)
233233local t = table.pack(...)
234234for i = 0x1, t.n
235235do
236−local n,v = debug.getlocal(0x1,- i)
236+local n,v = debug.getlocal(0x1,(- i))
237237assert(((n == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}") and (v == t[i])))
238238end
239−assert(not debug.getlocal(0x1,- ((t.n + 0x1))))
240−assert(not debug.setlocal(0x1,- ((t.n + 0x1)),0x1e))
239+assert((not debug.getlocal(0x1,(- (t.n + 0x1)))))
240+assert((not debug.setlocal(0x1,(- (t.n + 0x1)),0x1e)))
241241if (t.n > 0x0) then
242242(function (x)
243−assert((debug.setlocal(0x2,- 0x1,x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
244−assert((debug.setlocal(0x2,- t.n,x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
243+assert((debug.setlocal(0x2,(- 0x1),x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
244+assert((debug.setlocal(0x2,(- t.n),x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
245245end)(0x1ae)
246246assert((... == 0x1ae))
247247end
@@ -250,13 +250,13 @@ foo()
250250foo(print)
251251foo(0xc8,0x3,0x4)
252252local a = {}
253−for i = 0x1, (((_soft and 0x64) or 0x3e8))
253+for i = 0x1, ((_soft and 0x64) or 0x3e8)
254254do
255255a[i]=i
256256end
257257foo(table.unpack(a))
258258do
259−assert(not debug.gethook())
259+assert((not debug.gethook()))
260260local count = 0x0
261261local function f
262262()
@@ -335,31 +335,31 @@ assert(((x == "\u{42}") and (y == 0xd)))
335335end
336336end
337337g()
338−assert(((((a[f] and a[g]) and a[assert]) and a[debug.getlocal]) and not a[print]))
338+assert(((((a[f] and a[g]) and a[assert]) and a[debug.getlocal]) and (not a[print])))
339339local n,v = debug.getlocal(0x0,0x1)
340340assert(((v == 0x0) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
341341local n,v = debug.getlocal(0x0,0x2)
342342assert(((v == 0x2) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
343−assert(not debug.getlocal(0x0,0x3))
344−assert(not debug.getlocal(0x0,0x0))
343+assert((not debug.getlocal(0x0,0x3)))
344+assert((not debug.getlocal(0x0,0x0)))
345345function f()
346346assert((select(0x2,debug.getlocal(0x2,0x3)) == 0x1))
347−assert(not debug.getlocal(0x2,0x4))
347+assert((not debug.getlocal(0x2,0x4)))
348348debug.setlocal(0x2,0x3,0xa)
349349return 0x14
350350end
351351function g(a,b)
352−return (((a + 0x1)) + f())
352+return ((a + 0x1) + f())
353353end
354354assert((g(0x0,0x0) == 0x1e))
355355_G.f,_G.g=nil
356356debug.sethook(nil)
357357;
358−assert(not debug.gethook())
358+assert((not debug.gethook()))
359359do
360−assert(not debug.setuservalue(io.stdin,0xa))
360+assert((not debug.setuservalue(io.stdin,0xa)))
361361local a,b = debug.getuservalue(io.stdin,0xa)
362−assert(((a == nil) and not b))
362+assert(((a == nil) and (not b)))
363363end
364364do
365365local function f
@@ -376,11 +376,11 @@ debug.sethook(function ()
376376count=(count + 0x1)
377377end,"",0x1)
378378local t = {table.unpack(a)}
379−assert(# (t == 0x64))
379+assert((# (t == 0x64)))
380380t={table.unpack(a,0x1,0x3)}
381−assert(# (t == 0x3))
381+assert((# (t == 0x3)))
382382t={f(table.unpack(a,0x1,0x1e))}
383−assert(# (t == 0x1f))
383+assert((# (t == 0x1f)))
384384end
385385local function collectlocals
386386(level)
@@ -388,7 +388,7 @@ local tab = {}
388388for i = 0x1, math.huge
389389do
390390local n,v = debug.getlocal((level + 0x1),i)
391−if not ((n and string.find(n,"\u{5e}\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{30}\u{2d}\u{39}\u{5f}\u{5d}\u{2b}\u{24}"))) then
391+if (not (n and string.find(n,"\u{5e}\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{30}\u{2d}\u{39}\u{5f}\u{5d}\u{2b}\u{24}"))) then
392392break
393393end
394394tab[n]=v
@@ -405,21 +405,21 @@ end
405405debug.sethook(function (e)
406406assert((e == "\u{63}\u{61}\u{6c}\u{6c}"))
407407dostring("\u{58}\u{58}\u{20}\u{3d}\u{20}\u{31}\u{32}")
408−assert(not pcall(load("\u{61}\u{3d}\u{27}\u{6a}\u{6f}\u{61}\u{6f}\u{27}\u{2b}\u{31}")))
408+assert((not pcall(load("\u{61}\u{3d}\u{27}\u{6a}\u{6f}\u{61}\u{6f}\u{27}\u{2b}\u{31}"))))
409409debug.sethook(function (e,l)
410410assert((debug.getinfo(0x2,"\u{6c}").currentline == l))
411411local f,m,c = debug.gethook()
412412assert((e == "\u{6c}\u{69}\u{6e}\u{65}"))
413413assert(((m == "\u{6c}") and (c == 0x0)))
414414debug.sethook(nil)
415−assert(not X)
415+assert((not X))
416416X=collectlocals(0x2)
417417end,"\u{6c}")
418418end,"\u{63}")
419419a:f(0x1,0x2,0x3,0x4,0x5)
420420assert(((((X.self == a) and (X.a == 0x1)) and (X.b == 0x2)) and (X.c == nil)))
421421assert((XX == 0xc))
422−assert(not debug.gethook())
422+assert((not debug.gethook()))
423423_G.XX=nil
424424do
425425local X = false
@@ -453,8 +453,8 @@ assert(X)
453453end
454454local function eqseq
455455(t1,t2)
456−assert(# (t1 == # t2))
457−for i = 0x1, # t1
456+assert((# (t1 == (# t2))))
457+for i = 0x1, (# t1)
458458do
459459assert((t1[i] == t2[i]))
460460end
@@ -465,7 +465,7 @@ local on = false
465465local inp,out
466466local function hook
467467(event)
468−if not on then
468+if (not on) then
469469return
470470end
471471local ar = debug.getinfo(0x2,"\u{72}\u{75}\u{53}")
@@ -473,7 +473,7 @@ local t = {}
473473for i = ar.ftransfer, ((ar.ftransfer + ar.ntransfer) - 0x1)
474474do
475475local _,v = debug.getlocal(0x2,i)
476−t[# (t + 0x1)]=v
476+t[(# (t + 0x1))]=v
477477end
478478if (event == "\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}") then
479479out=t
@@ -504,7 +504,7 @@ return ...
504504end
505505local function foo1
506506()
507−on=not on
507+on=(not on)
508508;
509509return foo(0x14,0xa,0x0)
510510end
@@ -522,10 +522,10 @@ local t = {}
522522local i = 0x1
523523while true do
524524local name,value = debug.getupvalue(f,i)
525−if not name then
525+if (not name) then
526526break
527527end
528−assert(not t[name])
528+assert((not t[name]))
529529t[name]=value
530530i=(i + 0x1)
531531end
@@ -544,9 +544,9 @@ a=x
544544;
545545return (c + b)
546546end
547−assert(not debug.getupvalue(foo1,0x3))
548−assert(not debug.getupvalue(foo1,0x0))
549−assert(not debug.setupvalue(foo1,0x3,"\u{78}\u{75}\u{78}\u{75}"))
547+assert((not debug.getupvalue(foo1,0x3)))
548+assert((not debug.getupvalue(foo1,0x0)))
549+assert((not debug.setupvalue(foo1,0x3,"\u{78}\u{75}\u{78}\u{75}")))
550550local t = getupvalues(foo1)
551551assert((((t.a == nil) and (t.b == 0x2)) and (t.c == 0x3)))
552552t=getupvalues(foo2)
@@ -628,7 +628,7 @@ end,"\u{63}\u{72}")
628628h(false)
629629debug.sethook()
630630local res = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}"}
631−for i = 0x1, # res
631+for i = 0x1, (# res)
632632do
633633assert((res[i] == table.remove(b,0x1)))
634634end
@@ -677,7 +677,7 @@ assert((debug.traceback(print) == print))
677677assert((debug.traceback(print,0x4) == print))
678678assert(string.find(debug.traceback("\u{68}\u{69}",0x4),"\u{5e}\u{68}\u{69}\u{a}"))
679679assert(string.find(debug.traceback("\u{68}\u{69}"),"\u{5e}\u{68}\u{69}\u{a}"))
680−assert(not string.find(debug.traceback("\u{68}\u{69}"),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
680+assert((not string.find(debug.traceback("\u{68}\u{69}"),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}")))
681681assert(string.find(debug.traceback("\u{68}\u{69}",0x0),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
682682assert(string.find(debug.traceback(),"\u{5e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{3a}\u{a}"))
683683do
@@ -751,22 +751,22 @@ assert(x.activelines[i])
751751x.activelines[i]=undef
752752end
753753assert((next(x.activelines) == nil))
754−assert(not debug.getinfo(co,0x2))
754+assert((not debug.getinfo(co,0x2)))
755755local a,b = debug.getlocal(co,0x1,0x1)
756756assert(((a == "\u{78}") and (b == 0xa)))
757757a,b=debug.getlocal(co,0x1,0x2)
758758assert(((a == "\u{61}") and (b == 0x1)))
759759debug.setlocal(co,0x1,0x2,"\u{68}\u{69}")
760760assert((debug.gethook(co) == foo))
761−assert(# (((tr == 0x2) and (tr[0x1] == (l.currentline - 0x1))) and (tr[0x2] == l.currentline)))
761+assert((# (((tr == 0x2) and (tr[0x1] == (l.currentline - 0x1))) and (tr[0x2] == l.currentline))))
762762a,b,c=pcall(coroutine.resume,co)
763763assert(((a and b) and (c == (l.currentline + 0x1))))
764764checktraceback(co,{"\u{79}\u{69}\u{65}\u{6c}\u{64}","\u{69}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{3c}"})
765765a,b=coroutine.resume(co)
766766assert((a and (b == "\u{68}\u{69}")))
767−assert(# ((tr == 0x4) and (tr[0x4] == (l.currentline + 0x2))))
767+assert((# ((tr == 0x4) and (tr[0x4] == (l.currentline + 0x2)))))
768768assert((debug.gethook(co) == foo))
769−assert(not debug.gethook())
769+assert((not debug.gethook()))
770770checktraceback(co,{})
771771co=coroutine.create(function (x)
772772local a,b = coroutine.yield(x)
@@ -777,9 +777,9 @@ a,b=coroutine.resume(co,0xa)
777777assert((a and (b == 0xa)))
778778a,b=debug.getlocal(co,0x1,0x1)
779779assert(((a == "\u{78}") and (b == 0xa)))
780−assert(not debug.getlocal(co,0x1,0x5))
780+assert((not debug.getlocal(co,0x1,0x5)))
781781assert((debug.setlocal(co,0x1,0x1,0x1e) == "\u{78}"))
782−assert(not debug.setlocal(co,0x1,0x5,0x28))
782+assert((not debug.setlocal(co,0x1,0x5,0x28)))
783783a,b=coroutine.resume(co,0x64)
784784assert((a and (b == 0x1e)))
785785function f(i)
@@ -835,15 +835,15 @@ setmetatable(a,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = f,["\u{5f}\u{5f
835835local b = setmetatable({},getmetatable(a))
836836assert((((a[0x3] == "\u{69}\u{6e}\u{64}\u{65}\u{78}") and ((a ^ 0x3) == "\u{70}\u{6f}\u{77}")) and ((a .. a) == "\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}")))
837837assert((((a / 0x3) == "\u{64}\u{69}\u{76}") and ((0x3 % a) == "\u{6d}\u{6f}\u{64}")))
838−assert((((((a + 0x3) == "\u{61}\u{64}\u{64}") and ((0x3 - a) == "\u{73}\u{75}\u{62}")) and ((a * 0x3) == "\u{6d}\u{75}\u{6c}")) and - ((a == "\u{75}\u{6e}\u{6d}") and # ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))
839−assert((((((a + 0x7530) == "\u{61}\u{64}\u{64}") and ((a - 3.0) == "\u{73}\u{75}\u{62}")) and ((a * 3.0) == "\u{6d}\u{75}\u{6c}")) and - ((a == "\u{75}\u{6e}\u{6d}") and # ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))
838+assert((((((a + 0x3) == "\u{61}\u{64}\u{64}") and ((0x3 - a) == "\u{73}\u{75}\u{62}")) and ((a * 0x3) == "\u{6d}\u{75}\u{6c}")) and (- ((a == "\u{75}\u{6e}\u{6d}") and (# ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))))
839+assert((((((a + 0x7530) == "\u{61}\u{64}\u{64}") and ((a - 3.0) == "\u{73}\u{75}\u{62}")) and ((a * 3.0) == "\u{6d}\u{75}\u{6c}")) and (- ((a == "\u{75}\u{6e}\u{6d}") and (# ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))))
840840assert((((((a | 0x3) == "\u{62}\u{6f}\u{72}") and ((0x3 ~ a) == "\u{62}\u{78}\u{6f}\u{72}")) and ((a << 0x3) == "\u{73}\u{68}\u{6c}")) and ((a >> 0x1) == "\u{73}\u{68}\u{72}")))
841841assert(((a == b) and (a.op == "\u{65}\u{71}")))
842842assert(((a >= b) and (a.op == "\u{6c}\u{65}")))
843843assert((("\u{78}" >= a) and (a.op == "\u{6c}\u{65}")))
844844assert(((a > b) and (a.op == "\u{6c}\u{74}")))
845845assert(((a > 0xa) and (a.op == "\u{6c}\u{74}")))
846−assert(~ (a == "\u{62}\u{6e}\u{6f}\u{74}"))
846+assert((~ (a == "\u{62}\u{6e}\u{6f}\u{74}")))
847847do
848848local function f
849849()
@@ -875,9 +875,9 @@ end
875875local function deep
876876(lvl,n)
877877if (lvl == 0x0) then
878−return (debug.traceback("\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}",n))
878+return debug.traceback("\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}",n)
879879else
880−return (deep((lvl - 0x1),n))
880+return deep((lvl - 0x1),n)
881881end
882882end
883883local function checkdeep
@@ -889,7 +889,7 @@ assert((cl <= ((0xa + 0xb) + 0x1)))
889889local brk = string.find(rest,"\u{25}\u{2e}\u{25}\u{2e}\u{25}\u{2e}\u{9}\u{25}\u{28}\u{73}\u{6b}\u{69}\u{70}")
890890if brk then
891891local rest1 = string.sub(rest,0x1,brk)
892−local rest2 = string.sub(rest,brk,# rest)
892+local rest2 = string.sub(rest,brk,(# rest))
893893assert(((countlines(rest1) == 0xa) and (countlines(rest2) == 0xb)))
894894else
895895assert((cl == ((total - start) + 0x2)))
@@ -930,14 +930,14 @@ local prog = "\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}
930930local name = string.rep("\u{78}",0x3e8)
931931local p = assert(load(prog,name))
932932local c = string.dump(p)
933−assert(# ((c > 0x3e8) and # (c < 0x7d0)))
933+assert((# ((c > 0x3e8) and (# (c < 0x7d0)))))
934934local f = assert(load(c))
935935local g = f()
936936local h = g(0x3)
937937assert((h(0x5) == 0x8))
938938assert((((debug.getinfo(f).source == name) and (debug.getinfo(g).source == name)) and (debug.getinfo(h).source == name)))
939939local c = string.dump(p,true)
940−assert(# (c < 0x1f4))
940+assert((# (c < 0x1f4)))
941941local f = assert(load(c))
942942local g = f()
943943local h = g(0x1e)
desk/res/lua/cycled/errors.lua+29−29
@@ -6,12 +6,12 @@ mt.__index=nil
66local function checkerr
77(msg,f, ...)
88local st,err = pcall(f,...)
9−assert(not (st and string.find(err,msg)))
9+assert((not (st and string.find(err,msg))))
1010end
1111local function doit
1212(s)
1313local f,msg = load(s)
14−if not f then
14+if (not f) then
1515return msg
1616end
1717local cond,msg = pcall(f)
@@ -28,7 +28,7 @@ end
2828local function checksyntax
2929(prog,extra,token,line)
3030local msg = doit(prog)
31−if not (string.find(token,"\u{5e}\u{3c}\u{25}\u{61}") and not string.find(token,"\u{5e}\u{63}\u{68}\u{61}\u{72}\u{25}\u{28}")) then
31+if (not (string.find(token,"\u{5e}\u{3c}\u{25}\u{61}") and (not string.find(token,"\u{5e}\u{63}\u{68}\u{61}\u{72}\u{25}\u{28}")))) then
3232token=("\u{27}" .. (token .. "\u{27}"))
3333end
3434token=string.gsub(token,"\u{28}\u{25}\u{70}\u{29}","\u{25}\u{25}\u{25}\u{31}")
@@ -40,7 +40,7 @@ assert((doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{68}\u{69}\u{27}\u{2c}
4040assert((doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{29}") == nil))
4141assert(doit("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{6e}\u{3d}\u{32}\u{5e}\u{33}\u{30}\u{29}"))
4242assert(doit("\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{29}"))
43−assert(not (doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{31}\u{29}") and doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{29}")))
43+assert((not (doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{31}\u{29}") and doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{29}"))))
4444assert(doit("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{28}\u{29}"))
4545assert(doit("\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{20}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{61}"))
4646assert(doit("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{3b}\u{3b}"))
@@ -60,8 +60,8 @@ end
6060checksyntax("\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{a}\u{20}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}\u{20}\u{61}\u{6c}\u{72}\u{65}\u{61}\u{64}\u{79}\u{20}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}",0x1)
6161checksyntax("\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{41}\u{a}\u{20}\u{20}\u{20}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}","\u{6e}\u{6f}\u{20}\u{76}\u{69}\u{73}\u{69}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}",0x2)
6262end
63−if not T then
64−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{43}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
63+if (not T) then
64+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{43}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
6565else
6666print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}")
6767local a = {}
@@ -78,7 +78,7 @@ a[i]=tostring(i)
7878end
7979end)
8080T.totalmem(0x0)
81−assert(not (st and (msg == ("\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}" .. "\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"))))
81+assert((not (st and (msg == ("\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}" .. "\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
8282local res = T.testC("\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{31}\u{36}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{6f}\u{6e}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{34}\u{20}\u{72}\u{65}\u{6d}\u{61}\u{69}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{78}\u{75}\u{78}\u{75}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{a}\u{20}\u{20}")
8383assert(string.find(res,"\u{78}\u{75}\u{78}\u{75}\u{2e}\u{2d}\u{6d}\u{61}\u{69}\u{6e}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))
8484end
@@ -89,7 +89,7 @@ checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{20}\u{3c}\u{3d}\u{20}\u{31}
8989checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{33}\u{29}\u{2b}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
9090checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{3a}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
9191checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
92−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}"),"\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}"))
92+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}"),"\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")))
9393checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}","\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
9494checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{28}\u{31}\u{29}\u{2e}\u{2e}\u{7b}\u{7d}","\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
9595checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{61}\u{2e}\u{5f}\u{45}\u{4e}\u{56}\u{2e}\u{78}\u{20}\u{2b}\u{20}\u{31}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{78}\u{27}")
@@ -106,7 +106,7 @@ checkmessage("\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}
106106checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
107107checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{64}\u{64}\u{64}\u{27}")
108108checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{2b}\u{31}\u{2e}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{62}\u{27}")
109−assert(not doit("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{64}\u{64}\u{64}\u{3d}\u{6e}\u{65}\u{78}\u{74}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{6e}\u{69}\u{6c}\u{29}"))
109+assert((not doit("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{64}\u{64}\u{64}\u{3d}\u{6e}\u{65}\u{78}\u{74}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{6e}\u{69}\u{6c}\u{29}")))
110110checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{63}\u{63}\u{5b}\u{31}\u{5d}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{63}\u{63}\u{27}")
111111checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{2e}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{61}\u{27}")
112112checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{61}\u{27}")
@@ -118,8 +118,8 @@ checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}
118118checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{2c}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{2c}\u{33}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{62}\u{28}\u{31}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{28}\u{33}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
119119checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{2c}\u{66}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{66}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{66}\u{27}")
120120checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}\u{28}\u{29}","\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{61}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
121−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{78}\u{3d}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{2b}\u{28}\u{61}\u{61}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}"))
122−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{28}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}"))
121+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{78}\u{3d}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{2b}\u{28}\u{61}\u{61}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}")))
122+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{28}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}")))
123123checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
124124checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}","\u{74}\u{77}\u{6f}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}")
125125checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{27}\u{31}\u{30}\u{27}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
@@ -256,7 +256,7 @@ local function lineerror
256256(s,l)
257257local err,msg = pcall(load(s))
258258local line = tonumber(string.match(msg,"\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}"))
259−assert(((line == l) or (not (line and not l))))
259+assert(((line == l) or (not (line and (not l)))))
260260end
261261lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{27}\u{61}\u{27}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{69}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x2)
262262lineerror("\u{a}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6b}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{33}\u{20}\u{a}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{6b}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x3)
@@ -272,16 +272,16 @@ lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{
272272local p = "\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{67}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{78}\u{29}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{61}\u{27}\u{2c}\u{20}\u{58}\u{58}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{67}\u{28}\u{29}\u{a}"
273273XX=0x3
274274;
275−lineerror((p),0x3)
275+lineerror(p,0x3)
276276XX=0x0
277277;
278−lineerror((p),false)
278+lineerror(p,false)
279279XX=0x1
280280;
281−lineerror((p),0x2)
281+lineerror(p,0x2)
282282XX=0x2
283283;
284−lineerror((p),0x1)
284+lineerror(p,0x1)
285285_G.XX,_G.g,_G.f=nil
286286lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{65}\u{6e}\u{64}",0x3)
287287lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}",0x5)
@@ -290,7 +290,7 @@ do
290290local s = string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{5f}\u{41}\u{2e}\u{78}",string.rep("\u{a}",0x12c))
291291lineerror(s,0x12d)
292292end
293−if not _soft then
293+if (not _soft) then
294294collectgarbage()
295295print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
296296local C = 0x0
@@ -310,7 +310,7 @@ local function checkstackmessage
310310(m)
311311print(("\u{28}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}" .. (C .. "\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{29}")))
312312C=0x0
313−return (string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
313+return string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
314314end
315315assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
316316assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
@@ -341,7 +341,7 @@ i=(i + 0x1)
341341end
342342assert((i > 0xf))
343343local res,msg = xpcall(error,error)
344−assert(not (res and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
344+assert((not (res and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))))
345345print("\u{2b}")
346346local function f
347347(x)
@@ -380,11 +380,11 @@ local t = {}
380380local res,msg = pcall(function ()
381381error(t)
382382end)
383−assert(not (res and (msg == t)))
383+assert((not (res and (msg == t))))
384384res,msg=pcall(function ()
385385error(nil)
386386end)
387−assert(not (res and (msg == nil)))
387+assert((not (res and (msg == nil))))
388388local function f
389389()
390390error({["\u{6d}\u{73}\u{67}"] = "\u{78}"})
@@ -394,25 +394,25 @@ return {["\u{6d}\u{73}\u{67}"] = (r.msg .. "\u{79}")}
394394end)
395395assert((msg.msg == "\u{78}\u{79}"))
396396res,msg=pcall(assert,false,"\u{58}",t)
397−assert(not (res and (msg == "\u{58}")))
397+assert((not (res and (msg == "\u{58}"))))
398398res,msg=pcall(function ()
399399assert(false)
400400end)
401401local line = string.match(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{6c}\u{75}\u{61}\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{61}\u{69}\u{6c}\u{65}\u{64}\u{21}\u{24}")
402402assert((tonumber(line) == (debug.getinfo(0x1,"\u{6c}").currentline - 0x2)))
403403res,msg=pcall(assert,false,t)
404−assert(not (res and (msg == t)))
404+assert((not (res and (msg == t))))
405405res,msg=pcall(assert,nil,nil)
406−assert(not (res and (msg == nil)))
406+assert((not (res and (msg == nil))))
407407res,msg=pcall(assert)
408−assert(not (res and string.find(msg,"\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}")))
408+assert((not (res and string.find(msg,"\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}"))))
409409end
410410local a,b,c = xpcall(string.find,error,"\u{61}\u{6c}\u{6f}","\u{61}\u{6c}")
411411assert(((a and (b == 0x1)) and (c == 0x2)))
412412a,b,c=xpcall(string.find,function (x)
413413return {}
414414end,true,"\u{61}\u{6c}")
415−assert(not ((a and (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (c == nil)))
415+assert((not ((a and (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (c == nil))))
416416print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{6b}\u{65}\u{6e}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}")
417417checksyntax("\u{73}\u{79}\u{6e}\u{74}\u{61}\u{78}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}","","\u{65}\u{72}\u{72}\u{6f}\u{72}",0x1)
418418checksyntax("\u{31}\u{2e}\u{30}\u{30}\u{30}","","\u{31}\u{2e}\u{30}\u{30}\u{30}",0x1)
@@ -423,7 +423,7 @@ checksyntax("\u{66}\u{6f}\u{72}\u{20}\u{3e}\u{3e}\u{20}\u{64}\u{6f}\u{20}\u{65}\
423423checksyntax("\u{61}\u{1}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{31}\u{3e}",0x1)
424424checksyntax("\u{ff}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{32}\u{35}\u{35}\u{3e}",0x1)
425425doit("\u{49}\u{20}\u{3d}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{28}\u{22}\u{61}\u{3d}\u{39}\u{2b}\u{22}\u{29}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{33}")
426−assert(((_G.aaa == 0x3) and not _G.I))
426+assert(((_G.aaa == 0x3) and (not _G.I)))
427427_G.I,_G.aaa=nil
428428print("\u{2b}")
429429local lim = 0x3e8
@@ -440,12 +440,12 @@ local function testrep
440440local s = (init .. (string.rep(rep,0x64) .. (close .. string.rep(repc,0x64))))
441441local res,msg = load(s)
442442assert(res)
443−if (finalresult) then
443+if finalresult then
444444assert((res() == finalresult))
445445end
446446s=(init .. string.rep(rep,0x1f4))
447447local res,msg = load(s)
448−assert(not (res and ((string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}") or string.find(msg,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))))
448+assert((not (res and (string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}") or string.find(msg,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))))
449449end
450450testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}","\u{2c}\u{61}","\u{3d}\u{20}\u{31}","\u{2c}\u{31}")
451451testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}\u{3d}","\u{7b}","\u{30}","\u{7d}")
desk/res/lua/cycled/events.lua+57−57
@@ -31,9 +31,9 @@ assert((setmetatable(a,nil) == a))
3131assert((getmetatable(a) == nil))
3232assert((setmetatable(a,t) == a))
3333function f(t,i,e)
34−assert(not e)
34+assert((not e))
3535local p = rawget(t,"\u{70}\u{61}\u{72}\u{65}\u{6e}\u{74}")
36−return ((p and (p[i] + 0x3))),"\u{64}\u{75}\u{6d}\u{6d}\u{79}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"
36+return (p and (p[i] + 0x3)),"\u{64}\u{75}\u{6d}\u{6d}\u{79}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"
3737end
3838t.__index=f
3939a.parent={["\u{7a}"] = 0x19,["\u{78}"] = 0xc,[0x4] = 0x18}
@@ -109,12 +109,12 @@ foi=false
109109;
110110a[0x1]=0x0
111111;
112−assert(not foi)
112+assert((not foi))
113113foi=false
114114;
115115a["\u{61}\u{31}"]=0x0
116116;
117−assert(not foi)
117+assert((not foi))
118118foi=false
119119;
120120a["\u{61}\u{31}\u{31}"]=0x0
@@ -129,7 +129,7 @@ foi=false
129129;
130130a[0x1]=undef
131131;
132−assert(not foi)
132+assert((not foi))
133133a[0x1]=undef
134134foi=false
135135;
@@ -154,7 +154,7 @@ function f(op)
154154return function (...)
155155cap={[0x0] = op,...}
156156;
157−return (...)
157+return ...
158158end
159159end
160160t.__add=f("\u{61}\u{64}\u{64}")
@@ -176,8 +176,8 @@ t.__lt=f("\u{6c}\u{74}")
176176t.__le=f("\u{6c}\u{65}")
177177local function checkcap
178178(t)
179−assert(# ((cap + 0x1) == # t))
180−for i = 0x1, # t
179+assert((# ((cap + 0x1) == (# t))))
180+for i = 0x1, (# t)
181181do
182182assert((cap[(i - 0x1)] == t[i]))
183183assert((math.type(cap[(i - 0x1)]) == math.type(t[i])))
@@ -221,7 +221,7 @@ checkcap({"\u{64}\u{69}\u{76}",a,0.0})
221221assert(((a % 0x2) == a))
222222;
223223checkcap({"\u{6d}\u{6f}\u{64}",a,0x2})
224−assert(((a // ((0x1 / 0x0))) == a))
224+assert(((a // (0x1 / 0x0)) == a))
225225;
226226checkcap({"\u{69}\u{64}\u{69}\u{76}",a,(0x1 / 0x0)})
227227;
@@ -254,7 +254,7 @@ assert(((0xa ~ a) == 0xa))
254254end)()
255255;
256256checkcap({"\u{62}\u{78}\u{6f}\u{72}",0xa,a})
257−assert(- (a == a))
257+assert((- (a == a)))
258258;
259259checkcap({"\u{75}\u{6e}\u{6d}",a,a})
260260assert(((a ^ 4.0) == a))
@@ -269,10 +269,10 @@ checkcap({"\u{70}\u{6f}\u{77}",0x4,a})
269269assert((("\u{34}" ^ a) == "\u{34}"))
270270;
271271checkcap({"\u{70}\u{6f}\u{77}","\u{34}",a})
272−assert(# (a == a))
272+assert((# (a == a)))
273273;
274274checkcap({"\u{6c}\u{65}\u{6e}",a,a})
275−assert(~ (a == a))
275+assert((~ (a == a)))
276276;
277277checkcap({"\u{62}\u{6e}\u{6f}\u{74}",a,a})
278278assert(((a << 0x3) == a))
@@ -287,20 +287,20 @@ checkcap({"\u{6c}\u{74}",a,5.0})
287287assert((a >= 0xa))
288288;
289289checkcap({"\u{6c}\u{65}",0xa,a})
290−assert((a <= - 10.0))
290+assert((a <= (- 10.0)))
291291;
292−checkcap({"\u{6c}\u{65}",a,- 10.0})
293−assert((a < - 0xa))
292+checkcap({"\u{6c}\u{65}",a,(- 10.0)})
293+assert((a < (- 0xa)))
294294;
295−checkcap({"\u{6c}\u{74}",a,- 0xa})
295+checkcap({"\u{6c}\u{74}",a,(- 0xa)})
296296t=setmetatable({0x1,0x2,0x3},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
297297return 0xa
298298end})
299−assert(# ((t == 0xa) and (rawlen(t) == 0x3)))
299+assert((# ((t == 0xa) and (rawlen(t) == 0x3))))
300300assert((rawlen("\u{61}\u{62}\u{63}") == 0x3))
301−assert(not pcall(rawlen,io.stdin))
302−assert(not pcall(rawlen,0x22))
303−assert(not pcall(rawlen))
301+assert((not pcall(rawlen,io.stdin)))
302+assert((not pcall(rawlen,0x22)))
303+assert((not pcall(rawlen)))
304304assert((rawlen(string.rep("\u{61}",0x3e8)) == 0x3e8))
305305t={}
306306t.__lt=function (a,b,c)
@@ -339,18 +339,18 @@ return setmetatable({["\u{78}"] = x},t)
339339end
340340local function test
341341(a,b,c)
342−assert(not ((((Op(0x1) < Op(0x1))) and ((Op(0x1) < Op(0x2)))) and not ((Op(0x2) < Op(0x1)))))
343−assert(not ((((0x1 < Op(0x1))) and ((Op(0x1) < 0x2))) and not ((0x2 < Op(0x1)))))
344−assert(not ((((Op("\u{61}") < Op("\u{61}"))) and ((Op("\u{61}") < Op("\u{62}")))) and not ((Op("\u{62}") < Op("\u{61}")))))
345−assert(not (((("\u{61}" < Op("\u{61}"))) and ((Op("\u{61}") < "\u{62}"))) and not ((Op("\u{62}") < Op("\u{61}")))))
346−assert(((((Op(0x1) <= Op(0x1))) and ((Op(0x1) <= Op(0x2)))) and not ((Op(0x2) <= Op(0x1)))))
347−assert(((((Op("\u{61}") <= Op("\u{61}"))) and ((Op("\u{61}") <= Op("\u{62}")))) and not ((Op("\u{62}") <= Op("\u{61}")))))
348−assert(not (((Op(0x1) > Op(0x1))) and not (((Op(0x1) > Op(0x2))) and ((Op(0x2) > Op(0x1))))))
349−assert(not (((Op("\u{61}") > Op("\u{61}"))) and not (((Op("\u{61}") > Op("\u{62}"))) and ((Op("\u{62}") > Op("\u{61}"))))))
350−assert((((Op(0x1) >= Op(0x1))) and not (((Op(0x1) >= Op(0x2))) and ((Op(0x2) >= Op(0x1))))))
351−assert((((0x1 >= Op(0x1))) and not (((0x1 >= Op(0x2))) and ((Op(0x2) >= 0x1)))))
352−assert((((Op("\u{61}") >= Op("\u{61}"))) and not (((Op("\u{61}") >= Op("\u{62}"))) and ((Op("\u{62}") >= Op("\u{61}"))))))
353−assert(((("\u{61}" >= Op("\u{61}"))) and not (((Op("\u{61}") >= "\u{62}")) and ((Op("\u{62}") >= Op("\u{61}"))))))
342+assert((not (((Op(0x1) < Op(0x1)) and (Op(0x1) < Op(0x2))) and (not (Op(0x2) < Op(0x1))))))
343+assert((not (((0x1 < Op(0x1)) and (Op(0x1) < 0x2)) and (not (0x2 < Op(0x1))))))
344+assert((not (((Op("\u{61}") < Op("\u{61}")) and (Op("\u{61}") < Op("\u{62}"))) and (not (Op("\u{62}") < Op("\u{61}"))))))
345+assert((not ((("\u{61}" < Op("\u{61}")) and (Op("\u{61}") < "\u{62}")) and (not (Op("\u{62}") < Op("\u{61}"))))))
346+assert((((Op(0x1) <= Op(0x1)) and (Op(0x1) <= Op(0x2))) and (not (Op(0x2) <= Op(0x1)))))
347+assert((((Op("\u{61}") <= Op("\u{61}")) and (Op("\u{61}") <= Op("\u{62}"))) and (not (Op("\u{62}") <= Op("\u{61}")))))
348+assert((not ((Op(0x1) > Op(0x1)) and (not ((Op(0x1) > Op(0x2)) and (Op(0x2) > Op(0x1)))))))
349+assert((not ((Op("\u{61}") > Op("\u{61}")) and (not ((Op("\u{61}") > Op("\u{62}")) and (Op("\u{62}") > Op("\u{61}")))))))
350+assert(((Op(0x1) >= Op(0x1)) and (not ((Op(0x1) >= Op(0x2)) and (Op(0x2) >= Op(0x1))))))
351+assert(((0x1 >= Op(0x1)) and (not ((0x1 >= Op(0x2)) and (Op(0x2) >= 0x1)))))
352+assert(((Op("\u{61}") >= Op("\u{61}")) and (not ((Op("\u{61}") >= Op("\u{62}")) and (Op("\u{62}") >= Op("\u{61}"))))))
353+assert((("\u{61}" >= Op("\u{61}")) and (not ((Op("\u{61}") >= "\u{62}") and (Op("\u{62}") >= Op("\u{61}"))))))
354354assert(((Op(0x1) == Op(0x1)) and (Op(0x1) ~= Op(0x2))))
355355assert(((Op("\u{61}") == Op("\u{61}")) and (Op("\u{61}") ~= Op("\u{62}"))))
356356assert(((a == a) and (a ~= b)))
@@ -373,7 +373,7 @@ end
373373t.__lt=function (a,b)
374374for k in pairs(a)
375375do
376−if not b[k] then
376+if (not b[k]) then
377377return false
378378end
379379b[k]=undef
@@ -383,23 +383,23 @@ end
383383t.__le=function (a,b)
384384for k in pairs(a)
385385do
386−if not b[k] then
386+if (not b[k]) then
387387return false
388388end
389389end
390390return true
391391end
392392assert((Set({0x1,0x2,0x3}) < Set({0x1,0x2,0x3,0x4})))
393−assert(not ((Set({0x1,0x2,0x3,0x4}) < Set({0x1,0x2,0x3,0x4}))))
394−assert(((Set({0x1,0x2,0x3,0x4}) <= Set({0x1,0x2,0x3,0x4}))))
395−assert(((Set({0x1,0x2,0x3,0x4}) >= Set({0x1,0x2,0x3,0x4}))))
396−assert(not ((Set({0x1,0x3}) <= Set({0x3,0x5}))))
397−assert(not ((Set({0x1,0x3}) <= Set({0x3,0x5}))))
398−assert(not ((Set({0x1,0x3}) >= Set({0x3,0x5}))))
393+assert((not (Set({0x1,0x2,0x3,0x4}) < Set({0x1,0x2,0x3,0x4}))))
394+assert((Set({0x1,0x2,0x3,0x4}) <= Set({0x1,0x2,0x3,0x4})))
395+assert((Set({0x1,0x2,0x3,0x4}) >= Set({0x1,0x2,0x3,0x4})))
396+assert((not (Set({0x1,0x3}) <= Set({0x3,0x5}))))
397+assert((not (Set({0x1,0x3}) <= Set({0x3,0x5}))))
398+assert((not (Set({0x1,0x3}) >= Set({0x3,0x5}))))
399399t.__eq=function (a,b)
400400for k in pairs(a)
401401do
402−if not b[k] then
402+if (not b[k]) then
403403return false
404404end
405405b[k]=undef
@@ -408,7 +408,7 @@ return (next(b) == nil)
408408end
409409local s = Set({0x1,0x3,0x5})
410410assert((s == Set({0x3,0x5,0x1})))
411−assert(not rawequal(s,Set({0x3,0x5,0x1})))
411+assert((not rawequal(s,Set({0x3,0x5,0x1}))))
412412assert(rawequal(s,s))
413413assert((Set({0x1,0x3,0x5,0x1}) == rawSet({0x3,0x5,0x1})))
414414assert((rawSet({0x1,0x3,0x5,0x1}) == Set({0x3,0x5,0x1})))
@@ -426,8 +426,8 @@ return (x[0x1] == y[0x1])
426426end
427427assert((a == b))
428428end
429−if not T then
430−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
429+if (not T) then
430+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
431431else
432432local u1 = T.newuserdata(0x0,0x1)
433433local u2 = T.newuserdata(0x0,0x1)
@@ -448,7 +448,7 @@ end})
448448assert((((u1 == u3) and (u3 == u1)) and (u1 ~= u2)))
449449assert((((u2 == u1) and (u2 == u3)) and (u3 == u2)))
450450assert((u2 ~= {}))
451−assert((rawequal(u1,u1) and not rawequal(u1,u3)))
451+assert((rawequal(u1,u1) and (not rawequal(u1,u3))))
452452local mirror = {}
453453debug.setmetatable(u3,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror})
454454for i = 0x1, 0xa
@@ -482,9 +482,9 @@ d={["\u{76}\u{61}\u{6c}"] = "\u{64}"}
482482setmetatable(d,t)
483483A=true
484484assert(((c .. d) == "\u{63}\u{64}"))
485−assert(((0x0 .. ("\u{61}" .. ("\u{62}" .. (c .. (d .. ("\u{65}" .. ("\u{66}" .. (((0x5 + 0x3)) .. "\u{67}")))))))) == "\u{30}\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{38}\u{67}"))
485+assert(((0x0 .. ("\u{61}" .. ("\u{62}" .. (c .. (d .. ("\u{65}" .. ("\u{66}" .. ((0x5 + 0x3) .. "\u{67}")))))))) == "\u{30}\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{38}\u{67}"))
486486A=false
487−assert((((c .. (d .. (c .. d)))).val == "\u{63}\u{64}\u{63}\u{64}"))
487+assert(((c .. (d .. (c .. d))).val == "\u{63}\u{64}\u{63}\u{64}"))
488488x=(c .. d)
489489assert(((getmetatable(x) == t) and (x.val == "\u{63}\u{64}")))
490490x=(0x0 .. ("\u{61}" .. ("\u{62}" .. (c .. (d .. ("\u{65}" .. ("\u{66}" .. "\u{67}")))))))
@@ -514,12 +514,12 @@ t1.__le=function ()
514514return false
515515end
516516setmetatable(d,t1)
517−assert((((c == d) and (c < d)) and not ((d <= c))))
517+assert((((c == d) and (c < d)) and (not (d <= c))))
518518t2={}
519519t2.__eq=t1.__eq
520520t2.__lt=t1.__lt
521521setmetatable(d,t2)
522−assert((((c == d) and (c < d)) and not ((d <= c))))
522+assert((((c == d) and (c < d)) and (not (d <= c))))
523523local i
524524local tt = {["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = function (t, ...)
525525i=(i + 0x1)
@@ -552,12 +552,12 @@ end,["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function (x)
552552return math.floor(x)
553553end}
554554debug.setmetatable(0xa,mt)
555−assert((getmetatable(- 0x2) == mt))
555+assert((getmetatable((- 0x2)) == mt))
556556assert(((0xa)[0x3] == 0xd))
557557assert(((0xa)["\u{33}"] == 0xd))
558−assert(# (3.45 == 0x3))
558+assert((# (3.45 == 0x3)))
559559debug.setmetatable(0x17,nil)
560−assert((getmetatable(- 0x2) == nil))
560+assert((getmetatable((- 0x2)) == nil))
561561debug.setmetatable(true,mt)
562562assert((getmetatable(false) == mt))
563563mt.__index=function (a,b)
@@ -570,7 +570,7 @@ assert((getmetatable(true) == nil))
570570debug.setmetatable(nil,mt)
571571assert((getmetatable(nil) == mt))
572572mt.__add=function (a,b)
573−return (((a or 0x1)) + ((b or 0x2)))
573+return ((a or 0x1) + (b or 0x2))
574574end
575575assert(((0xa + nil) == 0xc))
576576assert(((nil + 0x17) == 0x18))
@@ -585,12 +585,12 @@ setmetatable(a,a)
585585a.__index=a
586586;
587587a.__newindex=a
588−assert(not pcall(function (a,b)
588+assert((not pcall(function (a,b)
589589return a[b]
590−end,a,0xa))
591−assert(not pcall(function (a,b,c)
590+end,a,0xa)))
591+assert((not pcall(function (a,b,c)
592592a[b]=c
593−end,a,0xa,true))
593+end,a,0xa,true)))
594594T,K,V=nil
595595grandparent={}
596596grandparent.__newindex=function (t,k,v)
desk/res/lua/cycled/files.lua+83−83
@@ -2,7 +2,7 @@ local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
22local maxint = math.maxinteger
33assert((type(os.getenv("\u{50}\u{41}\u{54}\u{48}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
44assert((io.input(io.stdin) == io.stdin))
5−assert(not pcall(io.input,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}"))
5+assert((not pcall(io.input,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}")))
66assert((io.output(io.stdout) == io.stdout))
77local function testerr
88(msg,f, ...)
@@ -13,24 +13,24 @@ local function checkerr
1313(msg,f, ...)
1414assert(testerr(msg,f,...))
1515end
16−assert(not (io.close(io.stdin) and not (io.stdout:close() and not io.stderr:close())))
16+assert((not (io.close(io.stdin) and (not (io.stdout:close() and (not io.stderr:close()))))))
1717checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{6f}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}",io.stdin.close)
1818assert(((type(io.input()) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.output()) == "\u{66}\u{69}\u{6c}\u{65}")))
1919assert(((type(io.stdin) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.stderr) == "\u{66}\u{69}\u{6c}\u{65}")))
20−assert(not io.type(0x8))
20+assert((not io.type(0x8)))
2121local a = {}
2222;
2323setmetatable(a,{})
24−assert(not io.type(a))
24+assert((not io.type(a)))
2525assert((getmetatable(io.input()).__name == "\u{46}\u{49}\u{4c}\u{45}\u{2a}"))
2626local a,b,c = io.open("\u{78}\u{75}\u{78}\u{75}\u{5f}\u{6e}\u{61}\u{6f}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}")
27−assert(not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
27+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
2828a,b,c=io.open("\u{2f}\u{61}\u{2f}\u{62}\u{2f}\u{63}\u{2f}\u{64}","\u{77}")
29−assert(not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
29+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
3030local file = os.tmpname()
3131local f,msg = io.open(file,"\u{77}")
32−if not f then
33−((Message or print))("\u{27}\u{6f}\u{73}\u{2e}\u{74}\u{6d}\u{70}\u{6e}\u{61}\u{6d}\u{65}\u{27}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{3b}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
32+if (not f) then
33+(Message or print)("\u{27}\u{6f}\u{73}\u{2e}\u{74}\u{6d}\u{70}\u{6e}\u{61}\u{6d}\u{65}\u{27}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{3b}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
3434else
3535f:close()
3636print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{69}\u{2f}\u{6f}")
@@ -50,18 +50,18 @@ io.input(io.stdin)
5050io.output(io.stdout)
5151;
5252os.remove(file)
53−assert(not loadfile(file))
53+assert((not loadfile(file)))
5454checkerr("",dofile,file)
55−assert(not io.open(file))
55+assert((not io.open(file)))
5656io.output(file)
5757assert((io.output() ~= io.stdout))
58−if not _port then
58+if (not _port) then
5959local status,msg,code = io.stdin:seek("\u{73}\u{65}\u{74}",0x3e8)
60−assert(not ((status and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(code) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
60+assert((not ((status and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(code) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
6161end
6262assert((io.output():seek() == 0x0))
6363assert((io.write("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"):seek() == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}")))
64−assert((io.output():seek("\u{63}\u{75}\u{72}",- 0x3) == (string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") - 0x3)))
64+assert((io.output():seek("\u{63}\u{75}\u{72}",(- 0x3)) == (string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") - 0x3)))
6565assert(io.write("\u{6a}\u{6f}\u{61}\u{6f}"))
6666assert((io.output():seek("\u{65}\u{6e}\u{64}") == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{6a}\u{6f}\u{61}\u{6f}")))
6767assert((io.output():seek("\u{73}\u{65}\u{74}") == 0x0))
@@ -85,7 +85,7 @@ end
8585io.input():close()
8686io.close()
8787assert(os.rename(file,otherfile))
88−assert(not os.rename(file,otherfile))
88+assert((not os.rename(file,otherfile)))
8989io.output(io.open(otherfile,"\u{61}\u{62}"))
9090assert(io.write("\u{a}\u{a}\u{9}\u{9}\u{20}\u{20}",0xd7a,"\u{a}"))
9191;
@@ -105,8 +105,8 @@ f:write(maxint,"\u{a}")
105105f:write(string.format("\u{30}\u{58}\u{25}\u{78}\u{a}",maxint))
106106f:write("\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
107107f:write(0x0,"\u{a}")
108−f:write(- maxint,"\u{a}")
109−f:write(string.format("\u{30}\u{78}\u{25}\u{58}\u{a}",- maxint))
108+f:write((- maxint),"\u{a}")
109+f:write(string.format("\u{30}\u{78}\u{25}\u{58}\u{a}",(- maxint)))
110110f:write("\u{2d}\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
111111assert(f:close())
112112local f <close> = assert(io.open(file,"\u{72}"))
@@ -114,9 +114,9 @@ assert((f:read("\u{6e}") == maxint))
114114assert((f:read("\u{6e}") == maxint))
115115assert((f:read("\u{6e}") == 343.5))
116116assert((f:read("\u{6e}") == 0x0))
117−assert((f:read("\u{2a}\u{6e}") == - maxint))
118−assert((f:read("\u{6e}") == - maxint))
119−assert((f:read("\u{2a}\u{6e}") == - 343.5))
117+assert((f:read("\u{2a}\u{6e}") == (- maxint)))
118+assert((f:read("\u{6e}") == (- maxint)))
119+assert((f:read("\u{2a}\u{6e}") == (- 343.5)))
120120end
121121assert(os.remove(file))
122122do
@@ -134,7 +134,7 @@ assert(((((((((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}") and (l2 == "\u
134134assert(f:close())
135135local f <close> = assert(io.open(file,"\u{72}"))
136136l1,n1,n2,dummy=f:read("\u{6c}","\u{6e}","\u{6e}","\u{6c}")
137−assert(((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and not n1))
137+assert(((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (not n1)))
138138end
139139assert(os.remove(file))
140140f=assert(io.open(file,"\u{77}"))
@@ -158,10 +158,10 @@ f:write("\u{a}")
158158f:write("\u{2e}\u{65}\u{2b}\u{9}\u{30}\u{2e}\u{65}\u{3b}\u{9}\u{2d}\u{2d}\u{3b}\u{20}\u{20}\u{30}\u{78}\u{58}\u{3b}\u{a}")
159159assert(f:close())
160160f=assert(io.open(file,"\u{72}"))
161−assert((f:read("\u{6e}") == - 12.3))
161+assert((f:read("\u{6e}") == (- 12.3)))
162162;
163163assert((f:read(0x1) == "\u{2d}"))
164−assert((f:read("\u{6e}") == - 0xffff))
164+assert((f:read("\u{6e}") == (- 0xffff)))
165165;
166166assert((f:read(0x2) == "\u{2b}\u{20}"))
167167assert((f:read("\u{6e}") == 0.3))
@@ -180,31 +180,31 @@ assert((f:read("\u{6e}") == 8.61328125))
180180;
181181assert((f:read(0x1) == "\u{65}"))
182182do
183−assert(not f:read("\u{6e}"))
183+assert((not f:read("\u{6e}")))
184184local s = f:read("\u{4c}")
185185assert(string.find(s,"\u{5e}\u{30}\u{30}\u{2a}\u{a}\u{24}"))
186186end
187−assert(not f:read("\u{6e}"))
187+assert((not f:read("\u{6e}")))
188188;
189189assert((f:read(0x2) == "\u{65}\u{2b}"))
190−assert(not f:read("\u{6e}"))
190+assert((not f:read("\u{6e}")))
191191;
192192assert((f:read(0x1) == "\u{3b}"))
193−assert(not f:read("\u{6e}"))
193+assert((not f:read("\u{6e}")))
194194;
195195assert((f:read(0x2) == "\u{2d}\u{3b}"))
196−assert(not f:read("\u{6e}"))
196+assert((not f:read("\u{6e}")))
197197;
198198assert((f:read(0x1) == "\u{58}"))
199−assert(not f:read("\u{6e}"))
199+assert((not f:read("\u{6e}")))
200200;
201201assert((f:read(0x1) == "\u{3b}"))
202−assert(not f:read("\u{6e}"))
202+assert((not f:read("\u{6e}")))
203203;
204−assert(not f:read(0x0))
204+assert((not f:read(0x0)))
205205assert(f:close())
206206assert(os.remove(file))
207−assert(not pcall(io.lines,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}"))
207+assert((not pcall(io.lines,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}")))
208208assert(os.rename(otherfile,file))
209209io.output(otherfile)
210210local n = 0x0
@@ -228,7 +228,7 @@ assert((n == 0x6))
228228local f = assert(io.open(otherfile))
229229assert((io.type(f) == "\u{66}\u{69}\u{6c}\u{65}"))
230230io.output(file)
231−assert(not io.output():read())
231+assert((not io.output():read()))
232232n=0x0
233233for l in f:lines()
234234do
@@ -269,8 +269,8 @@ do
269269t[i]=0x1
270270end
271271t={io.lines(otherfile,table.unpack(t))()}
272−assert(# (((t == 0xfa) and (t[0x1] == "\u{61}")) and (t[# t] == "\u{61}")))
273−t[# (t + 0x1)]=0x1
272+assert((# (((t == 0xfa) and (t[0x1] == "\u{61}")) and (t[(# t)] == "\u{61}"))))
273+t[(# (t + 0x1))]=0x1
274274checkerr("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",io.lines,otherfile,table.unpack(t))
275275collectgarbage()
276276assert(os.remove(otherfile))
@@ -278,7 +278,7 @@ end
278278io.input(file)
279279do
280280local a,b,c = io.input():write("\u{78}\u{75}\u{78}\u{75}")
281−assert(not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
281+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
282282end
283283checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}",io.read,"\u{78}")
284284assert((io.read(0x0) == ""))
@@ -291,18 +291,18 @@ assert(io.input():seek("\u{73}\u{65}\u{74}",x))
291291assert((io.read("\u{4c}") == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{a}"))
292292assert((io.read(0x1) == "\u{58}"))
293293assert((io.read(string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")) == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
294−assert(io.input():seek("\u{63}\u{75}\u{72}",- string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")))
294+assert(io.input():seek("\u{63}\u{75}\u{72}",(- string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))))
295295assert((io.read() == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
296296assert((io.read() == ""))
297297assert((io.read("\u{6e}") == 0xd7a))
298298assert((io.read(0x1) == "\u{a}"))
299−assert(not io.read(0x0))
300−assert(not io.read(0x1))
301−assert(not io.read(0x7530))
299+assert((not io.read(0x0)))
300+assert((not io.read(0x1)))
301+assert((not io.read(0x7530)))
302302assert((({io.read(0x1)})[0x2] == undef))
303−assert(not io.read())
303+assert((not io.read()))
304304assert((({io.read()})[0x2] == undef))
305−assert(not io.read("\u{6e}"))
305+assert((not io.read("\u{6e}")))
306306assert((({io.read("\u{6e}")})[0x2] == undef))
307307assert((io.read("\u{61}") == ""))
308308assert((io.read("\u{61}") == ""))
@@ -339,20 +339,20 @@ assert((io.read(string.len(t)) == t))
339339assert((io.read(0x1) == "\u{20}"))
340340assert(io.read(0x0))
341341assert((io.read("\u{61}") == "\u{3b}\u{65}\u{6e}\u{64}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
342−assert(not io.read(0x0))
342+assert((not io.read(0x0)))
343343assert(io.close(io.input()))
344344do
345345local function ismsg
346346(m)
347−return (((type(m) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and not tonumber(m)))
347+return ((type(m) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (not tonumber(m)))
348348end
349349local f = io.open(file,"\u{77}")
350350local r,m,c = f:read()
351−assert(not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
351+assert((not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
352352assert(f:close())
353353f=io.open(file,"\u{72}")
354354r,m,c=f:write("\u{77}\u{68}\u{61}\u{74}\u{65}\u{76}\u{65}\u{72}")
355−assert(not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")))
355+assert((not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
356356assert(f:close())
357357f=io.open(file,"\u{77}")
358358r,m=pcall(f:lines())
@@ -368,7 +368,7 @@ assert((io.read("\u{4c}") == "\u{a}"))
368368assert((io.read("\u{4c}") == "\u{a}"))
369369assert((io.read("\u{4c}") == "\u{6c}\u{69}\u{6e}\u{65}\u{a}"))
370370assert((io.read("\u{4c}") == "\u{6f}\u{74}\u{68}\u{65}\u{72}"))
371−assert(not io.read("\u{4c}"))
371+assert((not io.read("\u{4c}")))
372372io.input():close()
373373local f = assert(io.open(file))
374374local s = ""
@@ -403,7 +403,7 @@ io.output(file)
403403io.write("\u{61}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{20}\u{2b}\u{20}\u{33}\u{34}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{2a}\u{61}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{2d}\u{61}\u{a}"):close()
404404local t = {}
405405assert(load(io.lines(file,"\u{4c}"),nil,nil,t))()
406−assert((t.a == - ((((0xa + 0x22)) * 0x2))))
406+assert((t.a == (- ((0xa + 0x22) * 0x2))))
407407do
408408local function gettoclose
409409(lv)
@@ -447,7 +447,7 @@ io.write("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}"):cl
447447for a,b in io.lines(file,0x1,0x1)
448448do
449449if (a == "\u{a}") then
450−assert(not b)
450+assert((not b))
451451else
452452assert((tonumber(a) == (tonumber(b) - 0x1)))
453453end
@@ -461,7 +461,7 @@ do
461461if (a == "") then
462462break
463463end
464−assert(((a == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}") and not (b and not c)))
464+assert(((a == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}") and (not (b and (not c)))))
465465end
466466collectgarbage()
467467io.output(file)
@@ -470,7 +470,7 @@ io.write("\u{30}\u{30}\u{a}\u{31}\u{30}\u{a}\u{32}\u{30}\u{a}\u{33}\u{30}\u{a}\u
470470for a,b in io.lines(file,"\u{6e}","\u{6e}")
471471do
472472if (a == 0x28) then
473−assert(not b)
473+assert((not b))
474474else
475475assert((a == (b - 0xa)))
476476end
@@ -479,13 +479,13 @@ io.output(file)
479479;
480480io.write("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{a}\u{3d}\u{20}\u{58}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{20}\u{2a}\u{a}\u{32}\u{20}\u{2b}\u{a}\u{58}\u{3b}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{a}\u{2d}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{3b}\u{a}"):close()
481481_G.X=0x1
482−assert(not load((io.lines(file))))
482+assert((not load(io.lines(file))))
483483collectgarbage()
484−load((io.lines(file,"\u{4c}")))()
484+load(io.lines(file,"\u{4c}"))()
485485assert((_G.X == 0x2))
486−load((io.lines(file,0x1)))()
486+load(io.lines(file,0x1))()
487487assert((_G.X == 0x4))
488−load((io.lines(file,0x3)))()
488+load(io.lines(file,0x3))()
489489assert((_G.X == 0x8))
490490_G.X=nil
491491print("\u{2b}")
@@ -498,8 +498,8 @@ assert((x1 == _G.X2))
498498_G.X2=nil
499499print("\u{2b}")
500500assert(os.remove(file))
501−assert(not os.remove(file))
502−assert(not os.remove(otherfile))
501+assert((not os.remove(file)))
502+assert((not os.remove(otherfile)))
503503local function testloadfile
504504(s,expres)
505505io.output(file)
@@ -561,10 +561,10 @@ end
561561do
562562io.open(file,"\u{77}"):write("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
563563local s,m = loadfile(file,"\u{62}")
564−assert(not (s and string.find(m,"\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}")))
564+assert((not (s and string.find(m,"\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))))
565565io.open(file,"\u{77}"):write("\u{1b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
566566local s,m = loadfile(file,"\u{74}")
567−assert(not (s and string.find(m,"\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}")))
567+assert((not (s and string.find(m,"\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))))
568568assert(os.remove(file))
569569end
570570io.output(file)
@@ -589,7 +589,7 @@ assert((io.read(0x3) == "\u{0}\u{0}\u{0}"))
589589assert((io.read(0x0) == ""))
590590assert((io.read(0x1) == "\u{ff}"))
591591assert((io.read("\u{61}") == "\u{0}"))
592−assert(not io.read(0x0))
592+assert((not io.read(0x0)))
593593assert((otherfilehandle == io.input()))
594594otherfilehandle:close()
595595assert(os.remove(file))
@@ -599,8 +599,8 @@ io.output(file):write("\u{20}\u{31}\u{32}\u{33}\u{2e}\u{34}\u{9}\u{2d}\u{35}\u{3
599599io.input(file)
600600local _,a,b,c,d,e,h,__ = io.read(0x1,"\u{6e}","\u{6e}","\u{6c}","\u{6c}","\u{6c}","\u{61}",0xa)
601601assert(io.close(io.input()))
602−assert(((_ == "\u{20}") and not __))
603−assert((((type(a) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and (a == 123.4)) and (b == - 0.56)))
602+assert(((_ == "\u{20}") and (not __)))
603+assert((((type(a) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and (a == 123.4)) and (b == (- 0.56))))
604604assert(((d == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (e == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}")))
605605assert((h == "\u{a}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{72}\u{65}\u{73}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{74}\u{68}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
606606assert(os.remove(file))
@@ -632,7 +632,7 @@ f:close()
632632fr:close()
633633assert(os.remove(file))
634634end
635−if not _soft then
635+if (not _soft) then
636636print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{73}\u{20}\u{28}\u{3e}\u{20}\u{42}\u{55}\u{46}\u{53}\u{49}\u{5a}\u{29}")
637637io.output(file)
638638for i = 0x1, 0x1389
@@ -648,14 +648,14 @@ assert(((x == y) and (string.len(x) == ((0x1389 * 0xd) + 0x6))))
648648io.input():seek("\u{73}\u{65}\u{74}",0x0)
649649y=io.read()
650650assert((x == (y .. ("\u{a}" .. io.read()))))
651−assert(not io.read())
651+assert((not io.read()))
652652io.close(io.input())
653653assert(os.remove(file))
654654x=nil
655655;
656656y=nil
657657end
658−if not _port then
658+if (not _port) then
659659local progname
660660do
661661local arg = (arg or ARG)
@@ -689,8 +689,8 @@ assert((((x == x1) and (y == y1)) and (z == z1)))
689689if (v[0x2] == "\u{6f}\u{6b}") then
690690assert(((x and (y == "\u{65}\u{78}\u{69}\u{74}")) and (z == 0x0)))
691691else
692−assert(not (x and (y == v[0x2])))
693−assert(((((v[0x3] == nil) and (z > 0x0))) or (v[0x3] == z)))
692+assert((not (x and (y == v[0x2]))))
693+assert((((v[0x3] == nil) and (z > 0x0)) or (v[0x3] == z)))
694694end
695695end
696696end
@@ -720,7 +720,7 @@ load(os.date("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{44}\u{2e}\u{79}\u{65}
720720_G.D=nil
721721end
722722checkDateTable(os.time())
723−if not _port then
723+if (not _port) then
724724checkDateTable(0x0)
725725checkDateTable(0x1)
726726checkDateTable(0x3e8)
@@ -737,23 +737,23 @@ checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{6
737737checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x3e8,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 1.5})
738738checkerr("\u{6d}\u{69}\u{73}\u{73}\u{69}\u{6e}\u{67}",os.time,{["\u{68}\u{6f}\u{75}\u{72}"] = 0xc})
739739if (string.packsize("\u{69}") == 0x4) then
740−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - (((0x1 << 0x1f)) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
741−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - ((0x1 << 0x1f)),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
740+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- ((0x1 << 0x1f) + 0x76b)),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
741+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- (0x1 << 0x1f)),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
742742if (math.maxinteger > (0x2 ^ 0x1f)) then
743−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (((0x1 << 0x1f)) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
743+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
744744end
745745end
746−if not _port then
746+if (not _port) then
747747assert((type(os.date("\u{25}\u{45}\u{78}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
748748assert((type(os.date("\u{25}\u{4f}\u{79}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
749749local t0 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0})
750−local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0,["\u{73}\u{65}\u{63}"] = (((0x1 << 0x1f)) - 0x1)})
751−assert(((t1 - t0) == (((0x1 << 0x1f)) - 0x1)))
750+local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0,["\u{73}\u{65}\u{63}"] = ((0x1 << 0x1f) - 0x1)})
751+assert(((t1 - t0) == ((0x1 << 0x1f) - 0x1)))
752752t0=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
753−t1=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{73}\u{65}\u{63}"] = - ((0x1 << 0x1f))})
754−assert(((t1 - t0) == - ((0x1 << 0x1f))))
753+t1=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{73}\u{65}\u{63}"] = (- (0x1 << 0x1f))})
754+assert(((t1 - t0) == (- (0x1 << 0x1f))))
755755if (maxint >= (0x2 ^ 0x3e)) then
756−checkerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - maxint,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
756+checkerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- maxint),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
757757if (string.packsize("\u{69}") == 0x4) then
758758if testerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.date,"\u{25}\u{59}",(0x2 ^ 0x28)) then
759759print("\u{20}\u{20}\u{34}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
@@ -761,12 +761,12 @@ checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{6
761761else
762762print("\u{20}\u{20}\u{38}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
763763checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.date,"\u{25}\u{59}",(0x2 ^ 0x3c))
764−assert(tonumber(os.time({["\u{79}\u{65}\u{61}\u{72}"] = (((0x1 << 0x1f)) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3b})))
765−checkerr("\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (((0x1 << 0x1f)) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3c})
764+assert(tonumber(os.time({["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3b})))
765+checkerr("\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3c})
766766end
767767checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{64}\u{61}\u{79}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = (0x2 ^ 0x20)})
768−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{6d}\u{6f}\u{6e}\u{74}\u{68}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = - ((((0x1 << 0x1f)) + 0x1)),["\u{64}\u{61}\u{79}"] = 0x1})
769−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (((0x1 << 0x1f)) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
768+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{6d}\u{6f}\u{6e}\u{74}\u{68}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = (- ((0x1 << 0x1f) + 0x1)),["\u{64}\u{61}\u{79}"] = 0x1})
769+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
770770else
771771print("\u{20}\u{20}\u{38}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
772772assert(tonumber(os.date("\u{25}\u{59}",(0x2 ^ 0x3c))))
@@ -791,17 +791,17 @@ t=os.time(D)
791791D.year=(D.year - 0x1)
792792;
793793local t1 = os.time(D)
794−assert((math.abs(((os.difftime(t,t1) / ((0x18 * 0xe10))) - 0x16d)) < 0x2))
794+assert((math.abs(((os.difftime(t,t1) / (0x18 * 0xe10)) - 0x16d)) < 0x2))
795795t=os.time()
796796t1=os.time(os.date("\u{2a}\u{74}"))
797797local diff = os.difftime(t1,t)
798798assert(((0x0 <= diff) and (diff <= 0x1)))
799799diff=os.difftime(t,t1)
800−assert(- ((0x1 <= diff) and (diff <= 0x0)))
800+assert((- ((0x1 <= diff) and (diff <= 0x0))))
801801local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xc})
802802local t2 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xa,["\u{73}\u{65}\u{63}"] = 0x13})
803803assert((os.difftime(t1,t2) == ((0x3c * 0x2) - 0x13)))
804−t1={["\u{79}\u{65}\u{61}\u{72}"] = 0x7d5,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x1,["\u{6d}\u{69}\u{6e}"] = 0x0,["\u{73}\u{65}\u{63}"] = - 0xe12}
804+t1={["\u{79}\u{65}\u{61}\u{72}"] = 0x7d5,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x1,["\u{6d}\u{69}\u{6e}"] = 0x0,["\u{73}\u{65}\u{63}"] = (- 0xe12)}
805805os.time(t1)
806806assert((((((((t1.day == 0x1f) and (t1.month == 0xc)) and (t1.year == 0x7d4)) and (t1.hour == 0x17)) and (t1.min == 0x3b)) and (t1.sec == 0x3a)) and (t1.yday == 0x16e)))
807807io.output(io.stdout)
desk/res/lua/cycled/foo.lua+1−1
@@ -69,7 +69,7 @@ return function (y)
6969return (x + y)
7070end
7171end
72−x=- (0x1 + 0x8)
72+x=(- (0x1 + 0x8))
7373if (_VERSION ~= version) then
7474io.stderr:write("\u{54}\u{68}\u{69}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{73}\u{75}\u{69}\u{74}\u{65}\u{20}\u{69}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}",version,"\u{2c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{72}\u{20}",_VERSION,"\u{a}\u{45}\u{78}\u{69}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
7575return
desk/res/lua/cycled/gc.lua+13−13
@@ -19,10 +19,10 @@ do
1919local a = collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",0xc8)
2020local b = collectgarbage("\u{73}\u{65}\u{74}\u{73}\u{74}\u{65}\u{70}\u{6d}\u{75}\u{6c}",0xc8)
2121local t = {0x0,0x2,0xa,0x5a,0x1f4,0x1388,0x7530,0x7ffffffe}
22−for i = 0x1, # t
22+for i = 0x1, (# t)
2323do
2424local p = t[i]
25−for j = 0x1, # t
25+for j = 0x1, (# t)
2626do
2727local m = t[j]
2828collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",p)
@@ -173,7 +173,7 @@ print("\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}"
173173local x = "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
174174assert((string.len(x) == 0x50))
175175local s = ""
176−local k = math.min(0x12c,(((math.maxinteger // 0x50)) // 0x2))
176+local k = math.min(0x12c,((math.maxinteger // 0x50) // 0x2))
177177for n = 0x1, k
178178do
179179s=(s .. x)
@@ -209,17 +209,17 @@ assert((gcinfo() < x))
209209return i
210210end
211211collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
212−if not _port then
212+if (not _port) then
213213assert((dosteps(0xa) < dosteps(0x2)))
214214end
215215assert((dosteps(0x4e20) == 0x1))
216216assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
217217assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
218−assert(not collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
218+assert((not collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}")))
219219collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
220220assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
221221end
222−if not _port then
222+if (not _port) then
223223collectgarbage()
224224;
225225collectgarbage()
@@ -355,7 +355,7 @@ assert((next(a) ~= nil))
355355local i = 0x0
356356for k,v in pairs(a)
357357do
358−assert(((((((k == 0x1) and (v == x))) or (((k == 0x2) and (v == y)))) or (((k == 0x3) and (v == z)))) or (k == v)))
358+assert((((((k == 0x1) and (v == x)) or ((k == 0x2) and (v == y))) or ((k == 0x3) and (v == z))) or (k == v)))
359359;
360360i=(i + 0x1)
361361end
@@ -453,7 +453,7 @@ setmetatable(s,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}"})
453453setmetatable(u,{["\u{5f}\u{5f}\u{67}\u{63}"] = function (o)
454454local i = s[o]
455455s[i]=true
456−assert(not s[(i - 0x1)])
456+assert((not s[(i - 0x1)]))
457457if (i == 0x8) then
458458error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{40}")
459459end
@@ -490,7 +490,7 @@ warn("\u{40}\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
490490end
491491print("\u{2b}")
492492if (T == nil) then
493−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{47}\u{43}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
493+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{47}\u{43}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
494494else
495495local function newproxy
496496(u)
@@ -599,7 +599,7 @@ assert(string.find(_WARN,"\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}
599599_WARN=false
600600warn("\u{40}\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
601601end
602−if not _soft then
602+if (not _soft) then
603603print("\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{6c}\u{69}\u{73}\u{74}")
604604local a = {}
605605for i = 0x1, 0x30d40
@@ -744,7 +744,7 @@ local setmetatable,assert,type,print,getmetatable = setmetatable,assert,type,pri
744744local tt = {}
745745tt.__gc=function (o)
746746assert((getmetatable(o) == tt))
747−local a = ("\u{78}\u{75}\u{78}\u{75}" .. (((0xa + 0x3)) .. "\u{6a}\u{6f}\u{61}\u{6f}")),{}
747+local a = ("\u{78}\u{75}\u{78}\u{75}" .. ((0xa + 0x3) .. "\u{6a}\u{6f}\u{61}\u{6f}")),{}
748748___Glob=o
749749setmetatable({},tt)
750750print(("\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{74}\u{65}\u{20}" .. "\u{3c}\u{3c}\u{3c}\u{a}"))
@@ -772,7 +772,7 @@ warn("\u{40}\u{73}\u{74}\u{6f}\u{72}\u{65}")
772772_WARN=false
773773error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}")
774774end}
775−for i = 0xa, 0x1, - 0x1
775+for i = 0xa, 0x1, (- 0x1)
776776do
777777table.insert(___Glob,setmetatable({i},mt))
778778end
@@ -784,7 +784,7 @@ setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
784784res=collectgarbage()
785785end})
786786collectgarbage()
787−assert(not res)
787+assert((not res))
788788end
789789collectgarbage(oldmode)
790790print("\u{4f}\u{4b}")
desk/res/lua/cycled/gengc.lua+15−15
@@ -6,13 +6,13 @@ local oldmode = collectgarbage("\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}
66do
77local U = {}
88collectgarbage()
9−assert(not (T or (T.gcage(U) == "\u{6f}\u{6c}\u{64}")))
9+assert((not (T or (T.gcage(U) == "\u{6f}\u{6c}\u{64}"))))
1010U[0x1]={["\u{78}"] = {0xea}}
11−assert(not (T or (((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gcage(U[0x1]) == "\u{6e}\u{65}\u{77}")))))
11+assert((not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gcage(U[0x1]) == "\u{6e}\u{65}\u{77}")))))
1212collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
13−assert(not (T or (((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gcage(U[0x1]) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}")))))
13+assert((not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gcage(U[0x1]) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}")))))
1414collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
15−assert(not (T or (((T.gcage(U) == "\u{6f}\u{6c}\u{64}") and (T.gcage(U[0x1]) == "\u{6f}\u{6c}\u{64}\u{31}")))))
15+assert((not (T or ((T.gcage(U) == "\u{6f}\u{6c}\u{64}") and (T.gcage(U[0x1]) == "\u{6f}\u{6c}\u{64}\u{31}")))))
1616assert((U[0x1].x[0x1] == 0xea))
1717end
1818do
@@ -22,11 +22,11 @@ local function foo
2222end
2323local old = {0xa}
2424collectgarbage()
25−assert(not (T or (T.gcage(old) == "\u{6f}\u{6c}\u{64}")))
25+assert((not (T or (T.gcage(old) == "\u{6f}\u{6c}\u{64}"))))
2626setmetatable(old,{})
27−assert(not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{30}")))
27+assert((not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{30}"))))
2828collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
29−assert(not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{31}")))
29+assert((not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{31}"))))
3030setmetatable(getmetatable(old),{["\u{5f}\u{5f}\u{67}\u{63}"] = foo})
3131collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
3232end
@@ -36,7 +36,7 @@ A[0x1]=false
3636local function gcf
3737(obj)
3838A[0x1]=obj
39−assert(not (T or (T.gcage(obj) == "\u{6f}\u{6c}\u{64}\u{31}")))
39+assert((not (T or (T.gcage(obj) == "\u{6f}\u{6c}\u{64}\u{31}"))))
4040obj=nil
4141collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
4242print(getmetatable(A[0x1]).x)
@@ -44,9 +44,9 @@ end
4444collectgarbage()
4545local obj = {}
4646collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
47−assert(not (T or (T.gcage(obj) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}")))
47+assert((not (T or (T.gcage(obj) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}"))))
4848setmetatable(obj,{["\u{5f}\u{5f}\u{67}\u{63}"] = gcf,["\u{78}"] = "\u{2b}"})
49−assert(not (T or (T.gcage(getmetatable(obj)) == "\u{6e}\u{65}\u{77}")))
49+assert((not (T or (T.gcage(getmetatable(obj)) == "\u{6e}\u{65}\u{77}"))))
5050obj=nil
5151collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
5252end
@@ -74,19 +74,19 @@ end
7474do
7575local t = setmetatable({},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
7676collectgarbage()
77−assert(not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}")))
77+assert((not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}"))))
7878t[0x1]={0xa}
79−assert(not (T or (((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gccolor(t) == "\u{67}\u{72}\u{61}\u{79}")))))
79+assert((not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gccolor(t) == "\u{67}\u{72}\u{61}\u{79}")))))
8080collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
81−assert(not (T or (((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gccolor(t) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}")))))
81+assert((not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gccolor(t) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}")))))
8282collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
83−assert(not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}")))
83+assert((not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}"))))
8484t[0x1]={0xa}
8585collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
8686assert((t[0x1] == nil))
8787end
8888if (T == nil) then
89−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6f}\u{6d}\u{65}\u{20}\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
89+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6f}\u{6d}\u{65}\u{20}\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
9090print("\u{4f}\u{4b}")
9191return
9292end
desk/res/lua/cycled/goto.lua+11−11
@@ -2,7 +2,7 @@ collectgarbage()
22local function errmsg
33(code,m)
44local st,msg = load(code)
5−assert(not (st and string.find(msg,m)))
5+assert((not (st and string.find(msg,m))))
66end
77errmsg("\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
88errmsg("\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
@@ -72,34 +72,34 @@ local function foo
7272local a = {}
7373goto l3
7474::l1::
75−a[# (a + 0x1)]=0x1
75+a[(# (a + 0x1))]=0x1
7676;
7777goto l2
7878;
7979::l2::
80−a[# (a + 0x1)]=0x2
80+a[(# (a + 0x1))]=0x2
8181;
8282goto l5
8383;
8484::l3::
8585::l3a::
86−a[# (a + 0x1)]=0x3
86+a[(# (a + 0x1))]=0x3
8787;
8888goto l1
8989;
9090::l4::
91−a[# (a + 0x1)]=0x4
91+a[(# (a + 0x1))]=0x4
9292;
9393goto l6
9494;
9595::l5::
96−a[# (a + 0x1)]=0x5
96+a[(# (a + 0x1))]=0x5
9797;
9898goto l4
9999;
100100::l6::
101101assert((((((a[0x1] == 0x3) and (a[0x2] == 0x1)) and (a[0x3] == 0x2)) and (a[0x4] == 0x5)) and (a[0x5] == 0x4)))
102−if not a[0x6] then
102+if (not a[0x6]) then
103103a[0x6]=true
104104;
105105goto l3a
@@ -160,7 +160,7 @@ end
160160local b
161161do
162162local c
163−t[# (t + 0x1)]=function ()
163+t[(# (t + 0x1))]=function ()
164164return a,b,c,d
165165end
166166if (i > 0x2) then
@@ -168,7 +168,7 @@ goto l2
168168end
169169do
170170local d
171−t[# (t + 0x1)]=function ()
171+t[(# (t + 0x1))]=function ()
172172return a,b,c,d
173173end
174174i=(i + 0x1)
@@ -181,7 +181,7 @@ end
181181return t
182182end
183183local a = foo()
184−assert(# (a == 0x6))
184+assert((# (a == 0x6)))
185185for i = 0x2, 0x6
186186do
187187assert((debug.upvalueid(a[0x1],0x1) == debug.upvalueid(a[i],0x1)))
@@ -206,7 +206,7 @@ for i = 0x3, 0x5, 0x2
206206do
207207for j = 0x1, 0x6
208208do
209−assert((((debug.upvalueid(a[i],0x4) == debug.upvalueid(a[j],0x4))) == ((i == j))))
209+assert(((debug.upvalueid(a[i],0x4) == debug.upvalueid(a[j],0x4)) == (i == j)))
210210end
211211end
212212local function testG
desk/res/lua/cycled/heavy.lua+15−15
@@ -6,11 +6,11 @@ local a = "\u{78}"
66local st,msg = pcall(function ()
77while true do
88a=(a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. a)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
9−print(string.format("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",# a))
9+print(string.format("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",(# a)))
1010end
1111end)
12−assert(not (st and ((string.find(msg,"\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
13−print(("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. # (a * 0x64)))
12+assert((not (st and (string.find(msg,"\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
13+print(("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. (# (a * 0x64))))
1414end
1515print("\u{2b}")
1616end
@@ -22,7 +22,7 @@ local count = 0x0
2222local function f
2323()
2424count=(count + p)
25−if ((count % ((0x80 * p))) == 0x0) then
25+if ((count % (0x80 * p)) == 0x0) then
2626io.stderr:write("\u{28}",(count // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
2727end
2828return s
@@ -35,7 +35,7 @@ return st,msg
3535end
3636function controlstruct()
3737print("\u{63}\u{6f}\u{6e}\u{74}\u{72}\u{6f}\u{6c}\u{20}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{75}\u{72}\u{65}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}")
38−local lim = (((((0x1 << 0x18)) - 0x2)) // 0x3)
38+local lim = (((0x1 << 0x18) - 0x2) // 0x3)
3939local s = string.rep("\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{a}",lim)
4040s=("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. (s .. "\u{65}\u{6e}\u{64}"))
4141assert(load(s))
@@ -44,19 +44,19 @@ lim=(lim + 0x3)
4444s=string.rep("\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{a}",lim)
4545s=("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. (s .. "\u{65}\u{6e}\u{64}"))
4646local st,msg = load(s)
47−assert(not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}")))
47+assert((not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}"))))
4848print(msg)
4949end
5050function manylines()
5151print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")
5252local st,msg = loadrep("\u{a}","\u{6c}\u{69}\u{6e}\u{65}\u{73}")
53−assert(not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")))
53+assert((not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}"))))
5454print("\u{2b}")
5555end
5656function hugeid()
5757print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{68}\u{75}\u{67}\u{65}\u{20}\u{69}\u{64}\u{65}\u{6e}\u{74}\u{69}\u{66}\u{69}\u{65}\u{72}")
5858local st,msg = loadrep("\u{61}","\u{63}\u{68}\u{61}\u{72}\u{73}")
59−assert(not (st and ((string.find(msg,"\u{6c}\u{65}\u{78}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
59+assert((not (st and (string.find(msg,"\u{6c}\u{65}\u{78}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
6060print("\u{2b}")
6161end
6262function toomanyinst()
@@ -66,14 +66,14 @@ print("\u{2b}")
6666end
6767local function loadrepfunc
6868(prefix,f)
69−local count = - 0x1
69+local count = (- 0x1)
7070local function aux
7171()
7272count=(count + 0x1)
7373if (count == 0x0) then
7474return prefix
7575else
76−if ((count % (0x100000)) == 0x0) then
76+if ((count % 0x100000) == 0x0) then
7777io.stderr:write("\u{28}",(count // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
7878end
7979return f(count)
@@ -87,7 +87,7 @@ end
8787function toomanyconst()
8888print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}\u{73}")
8989loadrepfunc("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{30}\u{2c}",function (n)
90−return string.char(0x22,(((((n // (0x80 ^ 0x0))) & 0x7f)) + 0x80),(((((n // (0x80 ^ 0x1))) & 0x7f)) + 0x80),(((((n // (0x80 ^ 0x2))) & 0x7f)) + 0x80),(((((n // (0x80 ^ 0x3))) & 0x7f)) + 0x80),(((((n // (0x80 ^ 0x4))) & 0x7f)) + 0x80),0x22,0x2c)
90+return string.char(0x22,(((n // (0x80 ^ 0x0)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x1)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x2)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x3)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x4)) & 0x7f) + 0x80),0x22,0x2c)
9191end)
9292end
9393function toomanystr()
@@ -95,13 +95,13 @@ local a = {}
9595local st,msg = pcall(function ()
9696for i = 0x1, math.huge
9797do
98−if ((i % (0x100000)) == 0x0) then
98+if ((i % 0x100000) == 0x0) then
9999io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
100100end
101101a[i]=string.pack("\u{49}",i)
102102end
103103end)
104−local size = # a
104+local size = (# a)
105105a=collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
106106print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}",(a * 0x400))
107107print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}",msg)
@@ -112,7 +112,7 @@ local a = {}
112112local st,msg = pcall(function ()
113113for i = 0x1, math.huge
114114do
115−if ((i % (0x100000)) == 0x0) then
115+if ((i % 0x100000) == 0x0) then
116116io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
117117end
118118a[i]=i
@@ -120,7 +120,7 @@ end
120120end)
121121print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400))
122122print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}\u{20}",msg)
123−print("\u{73}\u{69}\u{7a}\u{65}\u{3a}",# a)
123+print("\u{73}\u{69}\u{7a}\u{65}\u{3a}",(# a))
124124end
125125toomanyidx()
126126print("\u{4f}\u{4b}")
desk/res/lua/cycled/literals.lua+14−14
@@ -14,7 +14,7 @@ assert(("\u{63}\u{61}\u{62}" == "\u{63}\u{61}\u{62}"))
1414assert(("\u{63}" == "\u{63}"))
1515assert(("\u{63}\u{a}" == "\u{63}\u{a}"))
1616assert(("\u{0}\u{0}\u{0}\u{61}\u{6c}\u{6f}" == ("\u{0}" .. ("\u{0}\u{0}" .. "\u{61}\u{6c}\u{6f}"))))
17−assert((0xa .. (0x14 .. - (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}"))))
17+assert((0xa .. (0x14 .. (- (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}")))))
1818assert(("\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}" == "\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}"))
1919local function lexstring
2020(x,y,n)
@@ -44,7 +44,7 @@ local st,msg = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. s),"")
4444if (err ~= "\u{3c}\u{65}\u{6f}\u{66}\u{3e}") then
4545err=(err .. "\u{27}")
4646end
47−assert(not (st and string.find(msg,("\u{6e}\u{65}\u{61}\u{72}\u{20}\u{2e}\u{2d}" .. err))))
47+assert((not (st and string.find(msg,("\u{6e}\u{65}\u{61}\u{72}\u{20}\u{2e}\u{2d}" .. err)))))
4848end
4949lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}\u{22}","\u{5c}\u{78}\u{22}")
5050lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}","\u{5c}\u{78}")
@@ -79,14 +79,14 @@ lexerror("\u{27}\u{61}\u{6c}\u{6f}\u{20}\u{5c}\u{39}\u{38}","\u{3c}\u{65}\u{6f}\
7979for i = 0x0, 0xff
8080do
8181local s = string.char(i)
82−assert(not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{5d}") == not load((s .. "\u{3d}\u{31}"),"")))
83−assert(not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{30}\u{2d}\u{39}\u{5d}") == not load(("\u{61}" .. (s .. "\u{31}\u{20}\u{3d}\u{20}\u{31}")),"")))
82+assert((not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{5d}") == (not load((s .. "\u{3d}\u{31}"),"")))))
83+assert((not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{30}\u{2d}\u{39}\u{5d}") == (not load(("\u{61}" .. (s .. "\u{31}\u{20}\u{3d}\u{20}\u{31}")),"")))))
8484end
8585local var1 = (string.rep("\u{61}",0x3a98) .. "\u{31}")
8686local var2 = (string.rep("\u{61}",0x3a98) .. "\u{32}")
8787local prog = string.format("\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{35}\u{a}\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{25}\u{73}\u{20}\u{2b}\u{20}\u{31}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{73}\u{20}\u{2d}\u{20}\u{25}\u{73}\u{20}\u{65}\u{6e}\u{64}\u{a}",var1,var2,var1,var1,var2)
8888local f = dostring(prog)
89−assert((((_G[var1] == 0x5) and (_G[var2] == 0x6)) and (f() == - 0x1)))
89+assert((((_G[var1] == 0x5) and (_G[var2] == 0x6)) and (f() == (- 0x1))))
9090_G[var1],_G[var2]=nil
9191print("\u{2b}")
9292assert(("\u{a}\u{9}" == "\u{a}\u{9}"))
@@ -165,33 +165,33 @@ assert((s == load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5b}\u{3d}\u{3d}
165165end
166166if (os.setlocale("\u{70}\u{74}\u{5f}\u{42}\u{52}") or os.setlocale("\u{70}\u{74}\u{62}")) then
167167assert(((tonumber("\u{33}\u{2c}\u{34}") == 3.4) and (tonumber("\u{33}\u{2e}\u{34}") == 3.4)))
168−assert((tonumber("\u{20}\u{20}\u{2d}\u{2e}\u{34}\u{20}\u{20}") == - 0.4))
168+assert((tonumber("\u{20}\u{20}\u{2d}\u{2e}\u{34}\u{20}\u{20}") == (- 0.4)))
169169assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{2e}\u{34}\u{31}\u{20}\u{20}") == 0.25390625))
170−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{28}\u{33}\u{2c}\u{34}\u{29}"))
170+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{28}\u{33}\u{2c}\u{34}\u{29}")))
171171assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{2e}\u{34}"))() == 3.4))
172172assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2e}\u{34}\u{2c}\u{33}"))() == 0.4))
173173assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}"))() == 4.0))
174174assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{2b}\u{2e}\u{35}"))() == 4.5))
175175assert(((("\u{20}\u{30}\u{78}\u{2e}\u{31}\u{20}" + "\u{20}\u{30}\u{78}\u{2c}\u{31}") + "\u{2d}\u{30}\u{58}\u{2e}\u{31}\u{9}") == 0.0625))
176−assert(not (tonumber("\u{69}\u{6e}\u{66}") and not tonumber("\u{4e}\u{41}\u{4e}")))
176+assert((not (tonumber("\u{69}\u{6e}\u{66}") and (not tonumber("\u{4e}\u{41}\u{4e}")))))
177177assert((assert(load(string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",4.51)))() == 4.51))
178178local a,b = load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{35}\u{2e}")
179179assert(string.find(b,"\u{27}\u{34}\u{25}\u{2e}\u{35}\u{25}\u{2e}\u{27}"))
180180assert(os.setlocale("\u{43}"))
181181else
182−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{70}\u{74}\u{5f}\u{42}\u{52}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{65}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{76}\u{61}\u{69}\u{6c}\u{61}\u{62}\u{6c}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{64}\u{65}\u{63}\u{69}\u{6d}\u{61}\u{6c}\u{20}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
182+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{70}\u{74}\u{5f}\u{42}\u{52}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{65}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{76}\u{61}\u{69}\u{6c}\u{61}\u{62}\u{6c}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{64}\u{65}\u{63}\u{69}\u{6d}\u{61}\u{6c}\u{20}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
183183end
184184local s = "\u{61}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{d}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{d}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{d}"
185185local c = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",s)
186186assert((assert(load(c))() == s))
187−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
188−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{a}\u{27}"))
189−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{5c}\u{33}\u{34}\u{35}\u{27}"))
190−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{78}\u{5d}"))
187+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
188+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{a}\u{27}")))
189+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{5c}\u{33}\u{34}\u{35}\u{27}")))
190+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{78}\u{5d}")))
191191local function malformednum
192192(n,exp)
193193local s,msg = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. n))
194−assert(not (s and string.find(msg,exp)))
194+assert((not (s and string.find(msg,exp))))
195195end
196196malformednum("\u{30}\u{78}\u{65}\u{2d}","\u{6e}\u{65}\u{61}\u{72}\u{20}\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
197197malformednum("\u{30}\u{78}\u{65}\u{70}\u{2d}\u{70}","\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
desk/res/lua/cycled/locals.lua+55−55
@@ -56,7 +56,7 @@ local _6,_7,_8,_9,_10
5656local x = 0x3
5757local b = a
5858local c,d = a,b
59−if ((d == b)) then
59+if (d == b) then
6060local x = "\u{71}"
6161x=b
6262assert((x == 0x2))
@@ -98,11 +98,11 @@ do
9898local i = 0x2
9999local p = 0x4
100100repeat
101−for j = - 0x3, 0x3
101+for j = (- 0x3), 0x3
102102do
103103assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{20}\u{3d}\u{3d}\u{32}\u{5e}\u{25}\u{73}\u{29}",j,(p - j),i),""))()
104−assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",- j,(p - j),i),""))()
105−assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{3d}\u{30}\u{2c}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{62}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",- j,(p - j),i),""))()
104+assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",(- j),(p - j),i),""))()
105+assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{3d}\u{30}\u{2c}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{62}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",(- j),(p - j),i),""))()
106106end
107107p=(0x2 * p)
108108;
@@ -208,7 +208,7 @@ local function checkro
208208(name,code)
209209local st,msg = load(code)
210210local gab = string.format("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{73}\u{73}\u{69}\u{67}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{25}\u{73}\u{27}",name)
211−assert(not (st and string.find(msg,gab)))
211+assert((not (st and string.find(msg,gab))))
212212end
213213checkro("\u{79}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{2c}\u{20}\u{79}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{7a}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{3b}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{31}\u{32}")
214214checkro("\u{78}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{79}\u{2c}\u{20}\u{7a}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}")
@@ -221,7 +221,7 @@ end
221221print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}")
222222local function stack
223223(n)
224−n=((((n == 0x0)) or stack((n - 0x1))))
224+n=((n == 0x0) or stack((n - 0x1)))
225225end
226226local function func2close
227227(f,x,y)
@@ -237,18 +237,18 @@ local a = {}
237237do
238238local b <close> = false
239239local x <close> = setmetatable({"\u{78}"},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (self)
240−a[# (a + 0x1)]=self[0x1]
240+a[(# (a + 0x1))]=self[0x1]
241241end})
242242local w,y <close>,z = func2close(function (self,err)
243243assert((err == nil))
244244;
245−a[# (a + 0x1)]="\u{79}"
245+a[(# (a + 0x1))]="\u{79}"
246246end,0xa,0x14)
247247local c <close> = nil
248−a[# (a + 0x1)]="\u{69}\u{6e}"
248+a[(# (a + 0x1))]="\u{69}\u{6e}"
249249assert(((w == 0xa) and (z == 0x14)))
250250end
251−a[# (a + 0x1)]="\u{6f}\u{75}\u{74}"
251+a[(# (a + 0x1))]="\u{6f}\u{75}\u{74}"
252252assert(((((a[0x1] == "\u{69}\u{6e}") and (a[0x2] == "\u{79}")) and (a[0x3] == "\u{78}")) and (a[0x4] == "\u{6f}\u{75}\u{74}")))
253253end
254254do
@@ -311,9 +311,9 @@ flag=true
311311end})
312312local function a
313313()
314−return (function ()
314+return function ()
315315return nil
316−end),nil,nil,x
316+end,nil,nil,x
317317end
318318local v <const> = 0x1
319319local w <const> = 0x1
@@ -481,14 +481,14 @@ local x <close> = {}
481481os.exit(false)
482482end
483483local stat,msg = pcall(foo)
484−assert(not (stat and string.find(msg,"\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{78}\u{27}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{61}\u{20}\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")))
484+assert((not (stat and string.find(msg,"\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{78}\u{27}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{61}\u{20}\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}"))))
485485local function foo
486486()
487487local xyz <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = print})
488488getmetatable(xyz).__close=nil
489489end
490490local stat,msg = pcall(foo)
491−assert(not (stat and string.find(msg,"\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}")))
491+assert((not (stat and string.find(msg,"\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}"))))
492492local function foo
493493()
494494local a1 <close> = func2close(function (_,msg)
@@ -503,7 +503,7 @@ end)
503503getmetatable(a2).__close=0x4
504504end
505505local stat,msg = pcall(foo)
506−assert(not (stat and (msg == 0xc)))
506+assert((not (stat and (msg == 0xc))))
507507end
508508do
509509local track = {}
@@ -512,11 +512,11 @@ local function foo
512512local x <close> = func2close(function ()
513513local xx <close> = func2close(function (_,msg)
514514assert((msg == nil))
515−track[# (track + 0x1)]="\u{78}\u{78}"
515+track[(# (track + 0x1))]="\u{78}\u{78}"
516516end)
517−track[# (track + 0x1)]="\u{78}"
517+track[(# (track + 0x1))]="\u{78}"
518518end)
519−track[# (track + 0x1)]="\u{66}\u{6f}\u{6f}"
519+track[(# (track + 0x1))]="\u{66}\u{6f}\u{6f}"
520520return 0x14,0x1e,0x28
521521end
522522local a,b,c,d = foo()
@@ -527,28 +527,28 @@ local function foo
527527()
528528local x0 <close> = func2close(function (_,msg)
529529assert((msg == 0xca))
530−track[# (track + 0x1)]="\u{78}\u{30}"
530+track[(# (track + 0x1))]="\u{78}\u{30}"
531531end)
532532local x <close> = func2close(function ()
533533local xx <close> = func2close(function (_,msg)
534534assert((msg == 0x65))
535−track[# (track + 0x1)]="\u{78}\u{78}"
535+track[(# (track + 0x1))]="\u{78}\u{78}"
536536error(0xca)
537537end)
538−track[# (track + 0x1)]="\u{78}"
538+track[(# (track + 0x1))]="\u{78}"
539539error(0x65)
540540end)
541−track[# (track + 0x1)]="\u{66}\u{6f}\u{6f}"
541+track[(# (track + 0x1))]="\u{66}\u{6f}\u{6f}"
542542return 0x14,0x1e,0x28
543543end
544544local st,msg = pcall(foo)
545−assert(not (st and (msg == 0xca)))
545+assert((not (st and (msg == 0xca))))
546546assert(((((track[0x1] == "\u{66}\u{6f}\u{6f}") and (track[0x2] == "\u{78}")) and (track[0x3] == "\u{78}\u{78}")) and (track[0x4] == "\u{78}\u{30}")))
547547end
548548local function checktable
549549(t1,t2)
550−assert(# (t1 == # t2))
551−for i = 0x1, # t1
550+assert((# (t1 == (# t2))))
551+for i = 0x1, (# t1)
552552do
553553assert((t1[i] == t2[i]))
554554end
@@ -579,7 +579,7 @@ st,obj=xpcall(overflow,errorh,0x0)
579579tracegc.start()
580580end)
581581co()
582−assert(not ((st and (obj[0x1] == 0xa)) and (flag[0x1] == 0x64)))
582+assert((not ((st and (obj[0x1] == 0xa)) and (flag[0x1] == 0x64))))
583583end
584584if rawget(_G,"\u{54}") then
585585do
@@ -670,16 +670,16 @@ collectgarbage()
670670local m = T.totalmem()
671671collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
672672T.totalmem((m + extra))
673−assert(not pcall(table.concat,a))
673+assert((not pcall(table.concat,a)))
674674assert(((T.totalmem() - m) <= extra))
675675T.totalmem(((m + lim) + extra))
676−assert(not pcall(table.concat,a))
676+assert((not pcall(table.concat,a)))
677677assert(((T.totalmem() - m) <= extra))
678678T.totalmem(((m + (0x2 * lim)) + extra))
679−assert(not pcall(table.concat,a))
679+assert((not pcall(table.concat,a)))
680680assert(((T.totalmem() - m) <= extra))
681681T.totalmem(((m + (0x4 * lim)) + extra))
682−assert(# (table.concat(a) == (0x2 * lim)))
682+assert((# (table.concat(a) == (0x2 * lim))))
683683T.totalmem(0x0)
684684collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
685685print("\u{2b}")
@@ -688,13 +688,13 @@ do
688688local trace = {}
689689local function hook
690690(event)
691−trace[# (trace + 0x1)]=(event .. ("\u{20}" .. ((debug.getinfo(0x2).name or "\u{3f}"))))
691+trace[(# (trace + 0x1))]=(event .. ("\u{20}" .. (debug.getinfo(0x2).name or "\u{3f}")))
692692end
693693local x = func2close(function (_,msg)
694−trace[# (trace + 0x1)]="\u{78}"
694+trace[(# (trace + 0x1))]="\u{78}"
695695end)
696696local y = func2close(function (_,msg)
697−trace[# (trace + 0x1)]="\u{79}"
697+trace[(# (trace + 0x1))]="\u{79}"
698698end)
699699debug.sethook(hook,"\u{72}")
700700local t = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{33}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}",x,y)}
@@ -707,12 +707,12 @@ do
707707local trace = {}
708708local function hook
709709(event)
710−trace[# (trace + 0x1)]=(event .. ("\u{20}" .. debug.getinfo(0x2).name))
710+trace[(# (trace + 0x1))]=(event .. ("\u{20}" .. debug.getinfo(0x2).name))
711711end
712712local function foo
713713(...)
714714local x <close> = func2close(function (_,msg)
715−trace[# (trace + 0x1)]="\u{78}"
715+trace[(# (trace + 0x1))]="\u{78}"
716716end)
717717local y <close> = func2close(function (_,msg)
718718debug.sethook(hook,"\u{72}")
@@ -728,28 +728,28 @@ print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\
728728do
729729local trace = {}
730730local co = coroutine.wrap(function ()
731−trace[# (trace + 0x1)]="\u{6e}\u{6f}\u{77}\u{58}"
731+trace[(# (trace + 0x1))]="\u{6e}\u{6f}\u{77}\u{58}"
732732local x <close> = func2close(function (_,msg)
733733assert((msg == nil))
734−trace[# (trace + 0x1)]="\u{78}\u{31}"
734+trace[(# (trace + 0x1))]="\u{78}\u{31}"
735735coroutine.yield("\u{78}")
736−trace[# (trace + 0x1)]="\u{78}\u{32}"
736+trace[(# (trace + 0x1))]="\u{78}\u{32}"
737737end)
738738return pcall(function ()
739739do
740740local z <close> = func2close(function (_,msg)
741741assert((msg == nil))
742−trace[# (trace + 0x1)]="\u{7a}\u{31}"
742+trace[(# (trace + 0x1))]="\u{7a}\u{31}"
743743coroutine.yield("\u{7a}")
744−trace[# (trace + 0x1)]="\u{7a}\u{32}"
744+trace[(# (trace + 0x1))]="\u{7a}\u{32}"
745745end)
746746end
747−trace[# (trace + 0x1)]="\u{6e}\u{6f}\u{77}\u{59}"
747+trace[(# (trace + 0x1))]="\u{6e}\u{6f}\u{77}\u{59}"
748748local y <close> = func2close(function (_,msg)
749749assert((msg == nil))
750−trace[# (trace + 0x1)]="\u{79}\u{31}"
750+trace[(# (trace + 0x1))]="\u{79}\u{31}"
751751coroutine.yield("\u{79}")
752−trace[# (trace + 0x1)]="\u{79}\u{32}"
752+trace[(# (trace + 0x1))]="\u{79}\u{32}"
753753end)
754754return 0xa,0x14,0x1e
755755end)
@@ -773,7 +773,7 @@ local res = table.pack(co())
773773assert(((res.n == 0x2) and (res[0x2] == nil)))
774774local res2 = table.pack(co())
775775assert((res2.n == t.n))
776−for i = 0x1, # t
776+for i = 0x1, (# t)
777777do
778778if (t[i] == "\u{78}") then
779779assert((res2[i] == res[0x1]))
@@ -825,14 +825,14 @@ coroutine.yield("\u{7a}")
825825return 0x64,0xc8
826826end)
827827local y <close> = func2close(function (_,msg)
828−assert(((msg == err) or (((msg == nil) and (err == 0x1)))))
828+assert(((msg == err) or ((msg == nil) and (err == 0x1))))
829829coroutine.yield("\u{79}")
830830if err then
831831error((err + 0x14))
832832end
833833end)
834834local x <close> = func2close(function (_,msg)
835−assert(((msg == err) or (((msg == nil) and (err == 0x1)))))
835+assert(((msg == err) or ((msg == nil) and (err == 0x1))))
836836coroutine.yield("\u{78}")
837837return 0x64,0xc8
838838end)
@@ -861,7 +861,7 @@ assert(((a == "\u{79}") and (b == nil)))
861861a,b=co()
862862assert(((a == "\u{7a}") and (b == nil)))
863863local st,msg = co()
864−assert(not (st and (msg == 0x15)))
864+assert((not (st and (msg == 0x15))))
865865local a,b = co()
866866assert(((a == "\u{78}") and (b == nil)))
867867a,b=co()
@@ -869,7 +869,7 @@ assert(((a == "\u{79}") and (b == nil)))
869869a,b=co()
870870assert(((a == "\u{7a}") and (b == nil)))
871871local st,msg = co()
872−assert(not (st and (msg == (0xa + 0x14))))
872+assert((not (st and (msg == (0xa + 0x14)))))
873873end
874874do
875875local x = false
@@ -888,11 +888,11 @@ coroutine.yield(0xc8)
888888error(0x17)
889889end)
890890local b = co()
891−assert(((b == 0x64) and not (x and not y)))
891+assert(((b == 0x64) and (not (x and (not y)))))
892892b=co()
893−assert(((b == 0xc8) and not (x and y)))
893+assert(((b == 0xc8) and (not (x and y))))
894894local a,b = pcall(co)
895−assert(not (((a and (b == 0x17)) and x) and y))
895+assert((not (((a and (b == 0x17)) and x) and y)))
896896end
897897do
898898local x = 0x0
@@ -917,7 +917,7 @@ assert((x == 0x0))
917917local st,msg = pcall(co)
918918;
919919assert((x == 0x2))
920−assert(not (st and string.find(msg,"\u{40}\u{59}\u{59}\u{59}")))
920+assert((not (st and string.find(msg,"\u{40}\u{59}\u{59}\u{59}"))))
921921local x = 0x0
922922local y = 0x0
923923co=coroutine.wrap(function ()
@@ -940,7 +940,7 @@ assert((co() == 0x64))
940940assert((x == 0x0))
941941local st,msg = pcall(co)
942942assert(((x == 0x1) and (y == 0x1)))
943−assert(not (st and string.find(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{25}\u{77}\u{2b}\u{3a}\u{25}\u{64}\u{2b}\u{3a}\u{20}\u{59}\u{59}\u{59}")))
943+assert((not (st and string.find(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{25}\u{77}\u{2b}\u{3a}\u{25}\u{64}\u{2b}\u{3a}\u{20}\u{59}\u{59}\u{59}"))))
944944end
945945local co
946946co=coroutine.wrap(function ()
@@ -996,10 +996,10 @@ local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{
996996local obj = func2close(coroutine.yield)
997997local co = coroutine.create(f)
998998local st,msg = coroutine.resume(co,obj)
999−assert(not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{61}\u{63}\u{72}\u{6f}\u{73}\u{73}")))
999+assert((not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{61}\u{63}\u{72}\u{6f}\u{73}\u{73}"))))
10001000local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}")
10011001local st,msg = pcall(f,obj)
1002−assert(not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{6f}\u{75}\u{74}\u{73}\u{69}\u{64}\u{65}")))
1002+assert((not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{6f}\u{75}\u{74}\u{73}\u{69}\u{64}\u{65}"))))
10031003end
10041004end
10051005do
desk/res/lua/cycled/main.lua+6−6
@@ -33,7 +33,7 @@ return t
3333end
3434local function checkprogout
3535(s)
36−assert((string.sub(s,- 0x1) == "\u{a}"))
36+assert((string.sub(s,(- 0x1)) == "\u{a}"))
3737local t = getoutput()
3838for line in string.gmatch(s,"\u{2e}\u{2d}\u{a}")
3939do
@@ -60,7 +60,7 @@ local function NoRun
6060p=string.gsub(p,"\u{6c}\u{75}\u{61}",("\u{22}" .. (progname .. "\u{22}")),0x1)
6161local s = string.format(p,...)
6262s=string.format("\u{25}\u{73}\u{20}\u{3e}\u{25}\u{73}\u{20}\u{32}\u{3e}\u{26}\u{31}",s,out)
63−assert(not os.execute(s))
63+assert((not os.execute(s)))
6464assert(string.find(getoutput(),msg,0x1,true))
6565end
6666RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{76}")
@@ -124,13 +124,13 @@ local out = getoutput()
124124assert((defaultpath == string.match(output,"\u{5e}\u{28}\u{2e}\u{2d}\u{29}\u{9}")))
125125assert((defaultCpath == string.match(output,"\u{9}\u{28}\u{2e}\u{2d}\u{29}\u{24}")))
126126end
127−assert(not ((string.find(defaultpath,"\u{78}\u{78}\u{78}") and string.find(defaultpath,"\u{6c}\u{75}\u{61}")) and not (string.find(defaultCpath,"\u{78}\u{78}\u{78}") and string.find(defaultCpath,"\u{6c}\u{75}\u{61}"))))
127+assert((not ((string.find(defaultpath,"\u{78}\u{78}\u{78}") and string.find(defaultpath,"\u{6c}\u{75}\u{61}")) and (not (string.find(defaultCpath,"\u{78}\u{78}\u{78}") and string.find(defaultCpath,"\u{6c}\u{75}\u{61}"))))))
128128local function convert
129129(p)
130130prepfile("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}\u{29}")
131131RUN("\u{65}\u{6e}\u{76}\u{20}\u{4c}\u{55}\u{41}\u{5f}\u{50}\u{41}\u{54}\u{48}\u{3d}\u{22}\u{25}\u{73}\u{22}\u{20}\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",p,prog,out)
132132local expected = getoutput()
133−expected=string.sub(expected,0x1,- 0x2)
133+expected=string.sub(expected,0x1,(- 0x2))
134134if string.find(p,"\u{3b}\u{3b}") then
135135p=string.gsub(p,"\u{3b}\u{3b}",("\u{3b}" .. (defaultpath .. "\u{3b}")))
136136p=string.gsub(p,"\u{5e}\u{3b}","")
@@ -240,7 +240,7 @@ RUN("\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,ou
240240checkprogout("\u{31}\u{32}\u{30}\u{a}\u{4f}\u{6b}\u{a}")
241241assert(os.remove(prog))
242242assert(os.remove(otherprog))
243−assert(not os.remove(out))
243+assert((not os.remove(out)))
244244NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{68}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{68}")
245245NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{2d}\u{2d}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{2d}\u{2d}")
246246NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{45}\u{78}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{45}\u{78}")
@@ -300,7 +300,7 @@ assert(os.execute("\u{73}\u{6c}\u{65}\u{65}\u{70}\u{20}\u{31}"))
300300local n = 0x64
301301for i = 0x0, 0x64
302302do
303−if not kill(pid) then
303+if (not kill(pid)) then
304304n=i
305305break
306306end
desk/res/lua/cycled/math.lua+279−279
@@ -2,8 +2,8 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6e}\u{75}\u{6d}\u{62}\
22local minint <const> = math.mininteger
33local maxint <const> = math.maxinteger
44local intbits <const> = (math.floor((math.log(maxint,0x2) + 0.5)) + 0x1)
5−assert((((0x1 << intbits)) == 0x0))
6−assert((minint == (0x1 << ((intbits - 0x1)))))
5+assert(((0x1 << intbits) == 0x0))
6+assert((minint == (0x1 << (intbits - 0x1))))
77assert((maxint == (minint - 0x1)))
88local floatbits = 0x18
99do
@@ -15,25 +15,25 @@ end
1515end
1616local function isNaN
1717(x)
18−return ((x ~= x))
18+return (x ~= x)
1919end
2020assert(isNaN((0x0 / 0x0)))
21−assert(not isNaN((0x1 / 0x0)))
21+assert((not isNaN((0x1 / 0x0))))
2222do
2323local x = (2.0 ^ floatbits)
2424assert(((x > (x - 1.0)) and (x == (x + 1.0))))
2525print(string.format("\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{2c}\u{20}\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{28}\u{6d}\u{61}\u{6e}\u{74}\u{69}\u{73}\u{73}\u{61}\u{29}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}",intbits,floatbits))
2626end
27−assert((((math.type(0x0) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}") and (math.type(0.0) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")) and not math.type("\u{31}\u{30}")))
27+assert((((math.type(0x0) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}") and (math.type(0.0) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")) and (not math.type("\u{31}\u{30}"))))
2828local function checkerror
2929(msg,f, ...)
3030local s,err = pcall(f,...)
31−assert(not (s and string.find(err,msg)))
31+assert((not (s and string.find(err,msg))))
3232end
3333local msgf2i = "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{2e}\u{2a}\u{20}\u{68}\u{61}\u{73}\u{20}\u{6e}\u{6f}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{61}\u{74}\u{69}\u{6f}\u{6e}"
3434local function eq
3535(a,b,limit)
36−if not limit then
36+if (not limit) then
3737if (floatbits >= 0x32) then
3838limit=1e-11
3939else
@@ -49,30 +49,30 @@ end
4949assert((((((0.0 == 0x0) and (0.0 == 0x0)) and (0.0 == 0x0)) and (20.0 == 0x14)) and (0.2 == 0.2)))
5050do
5151local a,b,c = "\u{32}","\u{20}\u{33}\u{65}\u{30}\u{20}","\u{20}\u{31}\u{30}\u{20}\u{20}"
52−assert((((a + b) == 0x5) and - (b == - ((0x3 and ((b + "\u{32}") == 0x5)) and (("\u{31}\u{30}" - c) == 0x0)))))
52+assert((((a + b) == 0x5) and (- (b == (- ((0x3 and ((b + "\u{32}") == 0x5)) and (("\u{31}\u{30}" - c) == 0x0)))))))
5353assert((((type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
54−assert(((((a == "\u{32}") and (b == "\u{20}\u{33}\u{65}\u{30}\u{20}")) and (c == "\u{20}\u{31}\u{30}\u{20}\u{20}")) and - (c == - "\u{20}\u{20}\u{31}\u{30}\u{20}")))
54+assert(((((a == "\u{32}") and (b == "\u{20}\u{33}\u{65}\u{30}\u{20}")) and (c == "\u{20}\u{31}\u{30}\u{20}\u{20}")) and (- (c == (- "\u{20}\u{20}\u{31}\u{30}\u{20}")))))
5555assert((((c % a) == 0x0) and ((a ^ b) == 0x8)))
5656a=0x0
57−assert((a == - (a and (0x0 == - 0x0))))
57+assert((a == (- (a and (0x0 == (- 0x0))))))
5858end
5959do
60−local x = - 0x1
60+local x = (- 0x1)
6161local mz = (0x0 / x)
6262local t = {[0x0] = 0xa,0x14,0x1e,0x28,0x32}
63−assert(((t[mz] == t[0x0]) and (t[- 0x0] == t[0x0])))
63+assert(((t[mz] == t[0x0]) and (t[(- 0x0)] == t[0x0])))
6464end
6565do
6666local a,b = math.modf(3.5)
6767assert(((a == 3.0) and (b == 0.5)))
68−a,b=math.modf(- 2.5)
69−assert((a == - (2.0 and (b == - 0.5))))
70−a,b=math.modf(- 3e23)
71−assert((a == - (3e23 and (b == 0.0))))
68+a,b=math.modf((- 2.5))
69+assert((a == (- (2.0 and (b == (- 0.5))))))
70+a,b=math.modf((- 3e23))
71+assert((a == (- (3e23 and (b == 0.0)))))
7272a,b=math.modf(3e35)
7373assert(((a == 3e35) and (b == 0.0)))
74−a,b=math.modf(- (0x1 / 0x0))
75−assert((a == - ((0x1 / 0x0) and (b == 0.0))))
74+a,b=math.modf((- (0x1 / 0x0)))
75+assert((a == (- ((0x1 / 0x0) and (b == 0.0)))))
7676a,b=math.modf((0x1 / 0x0))
7777assert(((a == (0x1 / 0x0)) and (b == 0.0)))
7878a,b=math.modf((0x0 / 0x0))
@@ -83,15 +83,15 @@ a,b=math.modf(minint)
8383assert((eqT(a,minint) and eqT(b,0.0)))
8484end
8585assert((math.huge > 1e31))
86−assert(- (math.huge < - 1e31))
86+assert((- (math.huge < (- 1e31))))
8787assert((minint < (minint + 0x1)))
8888assert(((maxint - 0x1) < maxint))
8989assert(((0x0 - minint) == minint))
9090assert(((minint * minint) == 0x0))
9191assert((((maxint * maxint) * maxint) == maxint))
92−for _,i in pairs({- 0x10,- 0xf,- 0x3,- 0x2,- 0x1,0x0,0x1,0x2,0x3,0xf})
92+for _,i in pairs({(- 0x10),(- 0xf),(- 0x3),(- 0x2),(- 0x1),0x0,0x1,0x2,0x3,0xf})
9393do
94−for _,j in pairs({- 0x10,- 0xf,- 0x3,- 0x2,- 0x1,0x1,0x2,0x3,0xf})
94+for _,j in pairs({(- 0x10),(- 0xf),(- 0x3),(- 0x2),(- 0x1),0x1,0x2,0x3,0xf})
9595do
9696for _,ti in pairs({0x0,0.0})
9797do
@@ -105,9 +105,9 @@ end
105105end
106106end
107107assert(((0x1 // 0.0) == (0x1 / 0x0)))
108−assert(- ((0x1 // 0.0) == - (0x1 / 0x0)))
108+assert((- ((0x1 // 0.0) == (- (0x1 / 0x0)))))
109109assert(eqT((3.5 // 1.5),2.0))
110−assert(eqT((3.5 // - 1.5),- 3.0))
110+assert(eqT((3.5 // (- 1.5)),(- 3.0)))
111111do
112112local x,y
113113x=0x1
@@ -119,7 +119,7 @@ assert(((x // 0x0) == (0x1 / 0x0)))
119119x=3.5
120120;
121121assert(eqT((x // 0x1),3.0))
122−assert(eqT((x // - 0x1),- 4.0))
122+assert(eqT((x // (- 0x1)),(- 4.0)))
123123x=3.5
124124;
125125y=1.5
@@ -127,80 +127,80 @@ y=1.5
127127assert(eqT((x // y),2.0))
128128x=3.5
129129;
130−y=- 1.5
130+y=(- 1.5)
131131;
132−assert(eqT((x // y),- 3.0))
132+assert(eqT((x // y),(- 3.0)))
133133end
134134assert(((maxint // maxint) == 0x1))
135135assert(((maxint // 0x1) == maxint))
136−assert(((((maxint - 0x1)) // maxint) == 0x0))
137−assert(((maxint // ((maxint - 0x1))) == 0x1))
136+assert((((maxint - 0x1) // maxint) == 0x0))
137+assert(((maxint // (maxint - 0x1)) == 0x1))
138138assert(((minint // minint) == 0x1))
139139assert(((minint // minint) == 0x1))
140−assert(((((minint + 0x1)) // minint) == 0x0))
141−assert(((minint // ((minint + 0x1))) == 0x1))
140+assert((((minint + 0x1) // minint) == 0x0))
141+assert(((minint // (minint + 0x1)) == 0x1))
142142assert(((minint // 0x1) == minint))
143−assert((minint // - (0x1 == - minint)))
144−assert((minint // - (0x2 == (0x2 ^ ((intbits - 0x2))))))
145−assert((maxint // - (0x1 == - maxint)))
143+assert((minint // (- (0x1 == (- minint)))))
144+assert((minint // (- (0x2 == (0x2 ^ (intbits - 0x2))))))
145+assert((maxint // (- (0x1 == (- maxint)))))
146146do
147−assert((0x2 ^ - (0x3 == (0x1 / (0x2 ^ 0x3)))))
148−assert(eq(((- 0x3) ^ - 0x3),(0x1 / ((- 0x3) ^ 0x3))))
149−for i = - 0x3, 0x3
147+assert((0x2 ^ (- (0x3 == (0x1 / (0x2 ^ 0x3))))))
148+assert(eq(((- 0x3) ^ (- 0x3)),(0x1 / ((- 0x3) ^ 0x3))))
149+for i = (- 0x3), 0x3
150150do
151−for j = - 0x3, 0x3
151+for j = (- 0x3), 0x3
152152do
153−if not ((_port or (i ~= 0x0)) or (j > 0x0)) then
153+if (not ((_port or (i ~= 0x0)) or (j > 0x0))) then
154154assert(eq((i ^ j),(0x1 / (i ^ (- j)))))
155155end
156156end
157157end
158158end
159159if (floatbits < intbits) then
160−assert(((2.0 ^ floatbits) == ((0x1 << floatbits))))
161−assert((((2.0 ^ floatbits) - 1.0) == (((0x1 << floatbits)) - 1.0)))
162−assert((((2.0 ^ floatbits) - 1.0) ~= ((0x1 << floatbits))))
163−assert((((2.0 ^ floatbits) + 1.0) ~= (((0x1 << floatbits)) + 0x1)))
160+assert(((2.0 ^ floatbits) == (0x1 << floatbits)))
161+assert((((2.0 ^ floatbits) - 1.0) == ((0x1 << floatbits) - 1.0)))
162+assert((((2.0 ^ floatbits) - 1.0) ~= (0x1 << floatbits)))
163+assert((((2.0 ^ floatbits) + 1.0) ~= ((0x1 << floatbits) + 0x1)))
164164else
165165assert((maxint == (maxint + 0.0)))
166166assert(((maxint - 0x1) == (maxint - 1.0)))
167167assert(((minint + 0x1) == (minint + 1.0)))
168168assert((maxint ~= (maxint - 1.0)))
169169end
170−assert(((maxint + 0.0) == ((2.0 ^ ((intbits - 0x1))) - 1.0)))
170+assert(((maxint + 0.0) == ((2.0 ^ (intbits - 0x1)) - 1.0)))
171171assert(((minint + 0.0) == minint))
172−assert(((minint + 0.0) == - (2.0 ^ ((intbits - 0x1)))))
172+assert(((minint + 0.0) == (- (2.0 ^ (intbits - 0x1)))))
173173assert((0x1 < 1.1))
174174;
175−assert(not ((0x1 < 0.9)))
175+assert((not (0x1 < 0.9)))
176176assert((0x1 <= 1.1))
177177;
178−assert(not ((0x1 <= 0.9)))
179−assert(- (0x1 < - 0.9))
178+assert((not (0x1 <= 0.9)))
179+assert((- (0x1 < (- 0.9))))
180180;
181−assert(not (- (0x1 < - 1.1)))
181+assert((not (- (0x1 < (- 1.1)))))
182182assert((0x1 <= 1.1))
183183;
184−assert(not (- (0x1 <= - 1.1)))
185−assert(- (0x1 < - 0.9))
184+assert((not (- (0x1 <= (- 1.1)))))
185+assert((- (0x1 < (- 0.9))))
186186;
187−assert(not (- (0x1 < - 1.1)))
188−assert(- (0x1 <= - 0.9))
187+assert((not (- (0x1 < (- 1.1)))))
188+assert((- (0x1 <= (- 0.9))))
189189;
190−assert(not (- (0x1 <= - 1.1)))
190+assert((not (- (0x1 <= (- 1.1)))))
191191assert((minint <= (minint + 0.0)))
192192assert(((minint + 0.0) <= minint))
193−assert(not ((minint < (minint + 0.0))))
194−assert(not (((minint + 0.0) < minint)))
195−assert((maxint < (minint * - 1.0)))
196−assert((maxint <= (minint * - 1.0)))
193+assert((not (minint < (minint + 0.0))))
194+assert((not ((minint + 0.0) < minint)))
195+assert((maxint < (minint * (- 1.0))))
196+assert((maxint <= (minint * (- 1.0))))
197197do
198−local fmaxi1 = (0x2 ^ ((intbits - 0x1)))
198+local fmaxi1 = (0x2 ^ (intbits - 0x1))
199199assert((maxint < fmaxi1))
200200assert((maxint <= fmaxi1))
201−assert(not ((fmaxi1 <= maxint)))
202−assert((minint <= - (0x2 ^ ((intbits - 0x1)))))
203−assert(- ((0x2 ^ ((intbits - 0x1))) <= minint))
201+assert((not (fmaxi1 <= maxint)))
202+assert((minint <= (- (0x2 ^ (intbits - 0x1)))))
203+assert((- ((0x2 ^ (intbits - 0x1)) <= minint)))
204204end
205205if (floatbits < intbits) then
206206print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
@@ -208,56 +208,56 @@ local fmax = (0x2 ^ floatbits)
208208local ifmax = (fmax | 0x0)
209209assert((fmax < (ifmax + 0x1)))
210210assert(((fmax - 0x1) < ifmax))
211−assert(- (((fmax - 0x1)) > - ifmax))
212−assert(not ((fmax <= (ifmax - 0x1))))
213−assert(- (fmax > - ((ifmax + 0x1))))
214−assert(not (- (fmax >= - ((ifmax - 0x1)))))
211+assert((- ((fmax - 0x1) > (- ifmax))))
212+assert((not (fmax <= (ifmax - 0x1))))
213+assert((- (fmax > (- (ifmax + 0x1)))))
214+assert((not (- (fmax >= (- (ifmax - 0x1))))))
215215assert((((fmax / 0x2) - 0.5) < (ifmax // 0x2)))
216−assert(- ((((fmax / 0x2) - 0.5)) > - (ifmax // 0x2)))
216+assert((- (((fmax / 0x2) - 0.5) > (- (ifmax // 0x2)))))
217217assert((maxint < (0x2 ^ intbits)))
218−assert((minint > - (0x2 ^ intbits)))
218+assert((minint > (- (0x2 ^ intbits))))
219219assert((maxint <= (0x2 ^ intbits)))
220−assert((minint >= - (0x2 ^ intbits)))
220+assert((minint >= (- (0x2 ^ intbits))))
221221else
222222print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
223223assert((maxint < (maxint + 1.0)))
224224assert((maxint < (maxint + 0.5)))
225225assert(((maxint - 1.0) < maxint))
226226assert(((maxint - 0.5) < maxint))
227−assert(not (((maxint + 0.0) < maxint)))
227+assert((not ((maxint + 0.0) < maxint)))
228228assert(((maxint + 0.0) <= maxint))
229−assert(not ((maxint < (maxint + 0.0))))
229+assert((not (maxint < (maxint + 0.0))))
230230assert(((maxint + 0.0) <= maxint))
231231assert((maxint <= (maxint + 0.0)))
232−assert(not (((maxint + 1.0) <= maxint)))
233−assert(not (((maxint + 0.5) <= maxint)))
234−assert(not ((maxint <= (maxint - 1.0))))
235−assert(not ((maxint <= (maxint - 0.5))))
232+assert((not ((maxint + 1.0) <= maxint)))
233+assert((not ((maxint + 0.5) <= maxint)))
234+assert((not (maxint <= (maxint - 1.0))))
235+assert((not (maxint <= (maxint - 0.5))))
236236assert((minint < (minint + 1.0)))
237237assert((minint < (minint + 0.5)))
238238assert((minint <= (minint + 0.5)))
239239assert(((minint - 1.0) < minint))
240240assert(((minint - 1.0) <= minint))
241−assert(not (((minint + 0.0) < minint)))
242−assert(not (((minint + 0.5) < minint)))
243−assert(not ((minint < (minint + 0.0))))
241+assert((not ((minint + 0.0) < minint)))
242+assert((not ((minint + 0.5) < minint)))
243+assert((not (minint < (minint + 0.0))))
244244assert(((minint + 0.0) <= minint))
245245assert((minint <= (minint + 0.0)))
246−assert(not (((minint + 1.0) <= minint)))
247−assert(not (((minint + 0.5) <= minint)))
248−assert(not ((minint <= (minint - 1.0))))
246+assert((not ((minint + 1.0) <= minint)))
247+assert((not ((minint + 0.5) <= minint)))
248+assert((not (minint <= (minint - 1.0))))
249249end
250250do
251251local NaN <const> = (0x0 / 0x0)
252−assert(not ((NaN < 0x0)))
253−assert(not ((NaN > minint)))
254−assert(not ((NaN <= - 0x9)))
255−assert(not ((NaN <= maxint)))
256−assert(not ((NaN < maxint)))
257−assert(not ((minint <= NaN)))
258−assert(not ((minint < NaN)))
259−assert(not ((0x4 <= NaN)))
260−assert(not ((0x4 < NaN)))
252+assert((not (NaN < 0x0)))
253+assert((not (NaN > minint)))
254+assert((not (NaN <= (- 0x9))))
255+assert((not (NaN <= maxint)))
256+assert((not (NaN < maxint)))
257+assert((not (minint <= NaN)))
258+assert((not (minint < NaN)))
259+assert((not (0x4 <= NaN)))
260+assert((not (0x4 < NaN)))
261261end
262262local function checkcompt
263263(msg,code)
@@ -274,16 +274,16 @@ local function f2i
274274return (x | x)
275275end
276276checkerror(msgf2i,f2i,math.huge)
277−checkerror(msgf2i,f2i,- math.huge)
277+checkerror(msgf2i,f2i,(- math.huge))
278278checkerror(msgf2i,f2i,(0x0 / 0x0))
279279if (floatbits < intbits) then
280280assert(((maxint + 1.0) == (maxint + 0.0)))
281281assert(((minint - 1.0) == (minint + 0.0)))
282282checkerror(msgf2i,f2i,(maxint + 0.0))
283−assert((f2i((2.0 ^ ((intbits - 0x2)))) == (0x1 << ((intbits - 0x2)))))
284−assert((f2i(- (2.0 ^ ((intbits - 0x2)))) == - ((0x1 << ((intbits - 0x2))))))
285−assert((((((2.0 ^ ((floatbits - 0x1))) + 1.0)) // 0x1) == (((0x1 << ((floatbits - 0x1)))) + 0x1)))
286−local mf = ((maxint - ((0x1 << ((floatbits - intbits))))) + 0x1)
283+assert((f2i((2.0 ^ (intbits - 0x2))) == (0x1 << (intbits - 0x2))))
284+assert((f2i((- (2.0 ^ (intbits - 0x2)))) == (- (0x1 << (intbits - 0x2)))))
285+assert(((((2.0 ^ (floatbits - 0x1)) + 1.0) // 0x1) == ((0x1 << (floatbits - 0x1)) + 0x1)))
286+local mf = ((maxint - (0x1 << (floatbits - intbits))) + 0x1)
287287assert((f2i((mf + 0.0)) == mf))
288288mf=(mf + 0x1)
289289assert((f2i((mf + 0.0)) ~= mf))
@@ -297,8 +297,8 @@ end
297297assert((f2i((minint + 0.0)) == minint))
298298assert((("\u{32}" + 0x1) == 0x3))
299299assert((("\u{32}\u{20}" + 0x1) == 0x3))
300−assert((("\u{20}\u{2d}\u{32}\u{20}" + 0x1) == - 0x1))
301−assert((("\u{20}\u{2d}\u{30}\u{78}\u{61}\u{20}" + 0x1) == - 0x9))
300+assert((("\u{20}\u{2d}\u{32}\u{20}" + 0x1) == (- 0x1)))
301+assert((("\u{20}\u{2d}\u{30}\u{78}\u{61}\u{20}" + 0x1) == (- 0x9)))
302302do
303303assert(eqT(tonumber(tostring(maxint)),maxint))
304304assert(eqT(tonumber(tostring(minint)),minint))
@@ -314,53 +314,53 @@ end
314314assert(eqT(tonumber(incd(maxint)),(maxint + 1.0)))
315315assert(eqT(tonumber(incd(minint)),(minint - 1.0)))
316316assert(eqT(tonumber(("\u{31}" .. string.rep("\u{30}",0x1e))),1e30))
317−assert(eqT(tonumber(("\u{2d}\u{31}" .. string.rep("\u{30}",0x1e))),- 1e30))
317+assert(eqT(tonumber(("\u{2d}\u{31}" .. string.rep("\u{30}",0x1e))),(- 1e30)))
318318assert(eqT(tonumber(("\u{30}\u{78}\u{31}" .. string.rep("\u{30}",0x1e))),0x0))
319319assert((minint == load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. minint))()))
320320assert(eqT(maxint,load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. maxint))()))
321321assert(eqT(1e22,1e22))
322−assert(eqT(- 1e22,- 1e22))
322+assert(eqT((- 1e22),(- 1e22)))
323323end
324324assert((tonumber(3.4) == 3.4))
325325assert(eqT(tonumber(0x3),0x3))
326326assert((eqT(tonumber(maxint),maxint) and eqT(tonumber(minint),minint)))
327327assert((tonumber((0x1 / 0x0)) == (0x1 / 0x0)))
328328assert((tonumber("\u{30}") == 0x0))
329−assert(not tonumber(""))
330−assert(not tonumber("\u{20}\u{20}"))
331−assert(not tonumber("\u{2d}"))
332−assert(not tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{20}"))
333−assert(not tonumber({}))
334−assert(((((tonumber("\u{2b}\u{30}\u{2e}\u{30}\u{31}") == (0x1 / 0x64)) and (tonumber("\u{2b}\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2d}\u{31}\u{2e}") == - (0x1 and (tonumber("\u{2b}\u{31}\u{2e}") == 0x1)))))
335−assert(not (tonumber("\u{2b}\u{20}\u{30}\u{2e}\u{30}\u{31}") and not (tonumber("\u{2b}\u{2e}\u{65}\u{31}") and not (tonumber("\u{31}\u{65}") and not (tonumber("\u{31}\u{2e}\u{30}\u{65}\u{2b}") and not tonumber("\u{2e}"))))))
336−assert((tonumber("\u{2d}\u{30}\u{31}\u{32}") == - (0xa - 0x2)))
337−assert((tonumber("\u{2d}\u{31}\u{2e}\u{32}\u{65}\u{32}") == - - - 0x78))
338−assert((tonumber("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}") == (((0x1 << ((0x4 * 0xc)))) - 0x1)))
339−assert((tonumber(("\u{30}\u{78}" .. string.rep("\u{66}",((intbits // 0x4))))) == - 0x1))
340−assert((tonumber(("\u{2d}\u{30}\u{78}" .. string.rep("\u{66}",((intbits // 0x4))))) == 0x1))
329+assert((not tonumber("")))
330+assert((not tonumber("\u{20}\u{20}")))
331+assert((not tonumber("\u{2d}")))
332+assert((not tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{20}")))
333+assert((not tonumber({})))
334+assert(((((tonumber("\u{2b}\u{30}\u{2e}\u{30}\u{31}") == (0x1 / 0x64)) and (tonumber("\u{2b}\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2d}\u{31}\u{2e}") == (- (0x1 and (tonumber("\u{2b}\u{31}\u{2e}") == 0x1))))))
335+assert((not (tonumber("\u{2b}\u{20}\u{30}\u{2e}\u{30}\u{31}") and (not (tonumber("\u{2b}\u{2e}\u{65}\u{31}") and (not (tonumber("\u{31}\u{65}") and (not (tonumber("\u{31}\u{2e}\u{30}\u{65}\u{2b}") and (not tonumber("\u{2e}")))))))))))
336+assert((tonumber("\u{2d}\u{30}\u{31}\u{32}") == (- (0xa - 0x2))))
337+assert((tonumber("\u{2d}\u{31}\u{2e}\u{32}\u{65}\u{32}") == (- (- (- 0x78)))))
338+assert((tonumber("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}") == ((0x1 << (0x4 * 0xc)) - 0x1)))
339+assert((tonumber(("\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == (- 0x1)))
340+assert((tonumber(("\u{2d}\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == 0x1))
341341assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == 0xa))
342342assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0xa) == 0x3f2))
343−assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == - 0xa))
343+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == (- 0xa)))
344344assert((tonumber("\u{31}\u{30}",0x24) == 0x24))
345−assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{20}\u{20}",0x24) == - 0x24))
345+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{20}\u{20}",0x24) == (- 0x24)))
346346assert((tonumber("\u{20}\u{20}\u{2b}\u{31}\u{5a}\u{20}\u{20}",0x24) == (0x24 + 0x23)))
347−assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{7a}\u{20}\u{20}",0x24) == - (0x24 + - 0x23)))
348−assert((tonumber("\u{2d}\u{66}\u{46}\u{66}\u{61}",0x10) == - ((0xa + ((0x10 * ((0xf + ((0x10 * ((0xf + ((0x10 * 0xf))))))))))))))
349−assert(((tonumber(string.rep("\u{31}",((intbits - 0x2))),0x2) + 0x1) == (0x2 ^ ((intbits - 0x2)))))
350−assert(((tonumber("\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == ((0x1 << 0x20))))
351−assert(((tonumber("\u{30}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == ((0x1 << 0x20))))
352−assert(((tonumber("\u{2d}\u{30}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) - 0x1) == - ((0x1 << 0x28))))
347+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{7a}\u{20}\u{20}",0x24) == (- (0x24 + (- 0x23)))))
348+assert((tonumber("\u{2d}\u{66}\u{46}\u{66}\u{61}",0x10) == (- (0xa + (0x10 * (0xf + (0x10 * (0xf + (0x10 * 0xf)))))))))
349+assert(((tonumber(string.rep("\u{31}",(intbits - 0x2)),0x2) + 0x1) == (0x2 ^ (intbits - 0x2))))
350+assert(((tonumber("\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
351+assert(((tonumber("\u{30}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
352+assert(((tonumber("\u{2d}\u{30}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) - 0x1) == (- (0x1 << 0x28))))
353353for i = 0x2, 0x24
354354do
355355local i2 = (i * i)
356356local i10 = ((((i2 * i2) * i2) * i2) * i2)
357357assert((tonumber("\u{9}\u{31}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{9}",i) == i10))
358358end
359−if not _soft then
360−assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0xd) .. "\u{2e}\u{30}"))) == ((2.0 ^ ((0x4 * 0xd))) - 0x1)))
361−assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x96) .. "\u{2e}\u{30}"))) == ((2.0 ^ ((0x4 * 0x96))) - 0x1)))
362−assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x12c) .. "\u{2e}\u{30}"))) == ((2.0 ^ ((0x4 * 0x12c))) - 0x1)))
363−assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x1f4) .. "\u{2e}\u{30}"))) == ((2.0 ^ ((0x4 * 0x1f4))) - 0x1)))
359+if (not _soft) then
360+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0xd) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0xd)) - 0x1)))
361+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x96) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x96)) - 0x1)))
362+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x12c) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x12c)) - 0x1)))
363+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x1f4) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x1f4)) - 0x1)))
364364assert((tonumber(("\u{30}\u{78}\u{33}\u{2e}" .. string.rep("\u{30}",0x3e8))) == 0x3))
365365assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{30}",0x3e8) .. "\u{61}"))) == 0xa))
366366assert((tonumber(("\u{30}\u{78}\u{30}\u{2e}" .. (string.rep("\u{30}",0xd) .. "\u{31}"))) == (2.0 ^ (- (0x4 * 0xe)))))
@@ -373,53 +373,53 @@ end
373373local function f
374374(...)
375375if (select("\u{23}",...) == 0x1) then
376−return (...)
376+return ...
377377else
378378return "\u{2a}\u{2a}\u{2a}"
379379end
380380end
381−assert(not f(tonumber("\u{66}\u{46}\u{66}\u{61}",0xf)))
382−assert(not f(tonumber("\u{30}\u{39}\u{39}",0x8)))
383−assert(not f(tonumber("\u{31}\u{0}",0x2)))
384−assert(not f(tonumber("",0x8)))
385−assert(not f(tonumber("\u{20}\u{20}",0x9)))
386−assert(not f(tonumber("\u{20}\u{20}",0x9)))
387−assert(not f(tonumber("\u{30}\u{78}\u{66}",0xa)))
388−assert(not f(tonumber("\u{69}\u{6e}\u{66}")))
389−assert(not f(tonumber("\u{20}\u{49}\u{4e}\u{46}\u{20}")))
390−assert(not f(tonumber("\u{4e}\u{61}\u{6e}")))
391−assert(not f(tonumber("\u{6e}\u{61}\u{6e}")))
392−assert(not f(tonumber("\u{20}\u{20}")))
393−assert(not f(tonumber("")))
394−assert(not f(tonumber("\u{31}\u{20}\u{20}\u{61}")))
395−assert(not f(tonumber("\u{31}\u{20}\u{20}\u{61}",0x2)))
396−assert(not f(tonumber("\u{31}\u{0}")))
397−assert(not f(tonumber("\u{31}\u{20}\u{0}")))
398−assert(not f(tonumber("\u{31}\u{0}\u{20}")))
399−assert(not f(tonumber("\u{65}\u{31}")))
400−assert(not f(tonumber("\u{65}\u{20}\u{20}\u{31}")))
401−assert(not f(tonumber("\u{20}\u{33}\u{2e}\u{34}\u{2e}\u{35}\u{20}")))
402−assert(not tonumber("\u{30}\u{78}"))
403−assert(not tonumber("\u{78}"))
404−assert(not tonumber("\u{78}\u{33}"))
405−assert(not tonumber("\u{30}\u{78}\u{33}\u{2e}\u{33}\u{2e}\u{33}"))
406−assert(not tonumber("\u{30}\u{30}\u{78}\u{32}"))
407−assert(not tonumber("\u{30}\u{78}\u{20}\u{32}"))
408−assert(not tonumber("\u{30}\u{20}\u{78}\u{32}"))
409−assert(not tonumber("\u{32}\u{33}\u{78}"))
410−assert(not tonumber("\u{2d}\u{20}\u{30}\u{78}\u{61}\u{61}"))
411−assert(not tonumber("\u{2d}\u{30}\u{78}\u{61}\u{61}\u{50}\u{20}"))
412−assert(not tonumber("\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}"))
413−assert(not tonumber("\u{30}\u{78}\u{35}\u{70}\u{2b}\u{2d}\u{32}"))
381+assert((not f(tonumber("\u{66}\u{46}\u{66}\u{61}",0xf))))
382+assert((not f(tonumber("\u{30}\u{39}\u{39}",0x8))))
383+assert((not f(tonumber("\u{31}\u{0}",0x2))))
384+assert((not f(tonumber("",0x8))))
385+assert((not f(tonumber("\u{20}\u{20}",0x9))))
386+assert((not f(tonumber("\u{20}\u{20}",0x9))))
387+assert((not f(tonumber("\u{30}\u{78}\u{66}",0xa))))
388+assert((not f(tonumber("\u{69}\u{6e}\u{66}"))))
389+assert((not f(tonumber("\u{20}\u{49}\u{4e}\u{46}\u{20}"))))
390+assert((not f(tonumber("\u{4e}\u{61}\u{6e}"))))
391+assert((not f(tonumber("\u{6e}\u{61}\u{6e}"))))
392+assert((not f(tonumber("\u{20}\u{20}"))))
393+assert((not f(tonumber(""))))
394+assert((not f(tonumber("\u{31}\u{20}\u{20}\u{61}"))))
395+assert((not f(tonumber("\u{31}\u{20}\u{20}\u{61}",0x2))))
396+assert((not f(tonumber("\u{31}\u{0}"))))
397+assert((not f(tonumber("\u{31}\u{20}\u{0}"))))
398+assert((not f(tonumber("\u{31}\u{0}\u{20}"))))
399+assert((not f(tonumber("\u{65}\u{31}"))))
400+assert((not f(tonumber("\u{65}\u{20}\u{20}\u{31}"))))
401+assert((not f(tonumber("\u{20}\u{33}\u{2e}\u{34}\u{2e}\u{35}\u{20}"))))
402+assert((not tonumber("\u{30}\u{78}")))
403+assert((not tonumber("\u{78}")))
404+assert((not tonumber("\u{78}\u{33}")))
405+assert((not tonumber("\u{30}\u{78}\u{33}\u{2e}\u{33}\u{2e}\u{33}")))
406+assert((not tonumber("\u{30}\u{30}\u{78}\u{32}")))
407+assert((not tonumber("\u{30}\u{78}\u{20}\u{32}")))
408+assert((not tonumber("\u{30}\u{20}\u{78}\u{32}")))
409+assert((not tonumber("\u{32}\u{33}\u{78}")))
410+assert((not tonumber("\u{2d}\u{20}\u{30}\u{78}\u{61}\u{61}")))
411+assert((not tonumber("\u{2d}\u{30}\u{78}\u{61}\u{61}\u{50}\u{20}")))
412+assert((not tonumber("\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}")))
413+assert((not tonumber("\u{30}\u{78}\u{35}\u{70}\u{2b}\u{2d}\u{32}")))
414414assert((((0x10 == 0x10) and (0xfff == ((0x2 ^ 0xc) - 0x1))) and (0xfb == 0xfb)))
415415assert(((0.0 == 0x0) and (0.0 == 0x0)))
416−assert((0xffffffff == (((0x1 << 0x20)) - 0x1)))
416+assert((0xffffffff == ((0x1 << 0x20) - 0x1)))
417417assert((tonumber("\u{2b}\u{30}\u{78}\u{32}") == 0x2))
418−assert((tonumber("\u{2d}\u{30}\u{78}\u{61}\u{41}") == - 0xaa))
419−assert((tonumber("\u{2d}\u{30}\u{78}\u{66}\u{66}\u{46}\u{46}\u{46}\u{66}\u{66}\u{66}") == - (((0x1 << 0x20)) + 0x1)))
418+assert((tonumber("\u{2d}\u{30}\u{78}\u{61}\u{41}") == (- 0xaa)))
419+assert((tonumber("\u{2d}\u{30}\u{78}\u{66}\u{66}\u{46}\u{46}\u{46}\u{66}\u{66}\u{66}") == (- ((0x1 << 0x20) + 0x1))))
420420assert((((0.0 == 0x0) and ((0xe + 0x1) == 0xf)) and ((0xe - 0x1) == 0xd)))
421421assert((tonumber("\u{20}\u{20}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == (0x25 / 0x10)))
422−assert((tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == - (0x25 / 0x10)))
422+assert((tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == (- (0x25 / 0x10))))
423423assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}\u{2b}\u{38}\u{20}\u{20}") == 0x51))
424424assert((0.9999999997671694 == (0x1 - "\u{30}\u{78}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}")))
425425assert((("\u{30}\u{78}\u{41}\u{2e}\u{61}" + 0x0) == (0xa + (0xa / 0x10))))
@@ -435,73 +435,73 @@ assert(((tonumber("\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}"
435435assert(((1e-31 > 9e-32) and (9e29 < 1e30)))
436436assert((0.123456 > 0.123455))
437437assert((tonumber("\u{2b}\u{31}\u{2e}\u{32}\u{33}\u{45}\u{31}\u{38}") == (1.23 * (10.0 ^ 0x12))))
438−assert(not ((((0x1 < 0x1)) and ((0x1 < 0x2))) and not ((0x2 < 0x1))))
439−assert(not (((("\u{61}" < "\u{61}")) and (("\u{61}" < "\u{62}"))) and not (("\u{62}" < "\u{61}"))))
440−assert(((((0x1 <= 0x1)) and ((0x1 <= 0x2))) and not ((0x2 <= 0x1))))
441−assert((((("\u{61}" <= "\u{61}")) and (("\u{61}" <= "\u{62}"))) and not (("\u{62}" <= "\u{61}"))))
442−assert(not (((0x1 > 0x1)) and not (((0x1 > 0x2)) and ((0x2 > 0x1)))))
443−assert(not ((("\u{61}" > "\u{61}")) and not ((("\u{61}" > "\u{62}")) and (("\u{62}" > "\u{61}")))))
444−assert((((0x1 >= 0x1)) and not (((0x1 >= 0x2)) and ((0x2 >= 0x1)))))
445−assert(((("\u{61}" >= "\u{61}")) and not ((("\u{61}" >= "\u{62}")) and (("\u{62}" >= "\u{61}")))))
446−assert((((1.3 < 1.4) and (1.3 <= 1.4)) and not (((1.3 < 1.3)) and (1.3 <= 1.3))))
447−assert(eqT(- (0x4 % 0x3),0x2))
448−assert(eqT((0x4 % - 0x3),- 0x2))
449−assert(eqT(- (4.0 % 0x3),2.0))
450−assert(eqT((0x4 % - 3.0),- 2.0))
451−assert(eqT((0x4 % - 0x5),- 0x1))
452−assert(eqT((0x4 % - 5.0),- 1.0))
438+assert((not (((0x1 < 0x1) and (0x1 < 0x2)) and (not (0x2 < 0x1)))))
439+assert((not ((("\u{61}" < "\u{61}") and ("\u{61}" < "\u{62}")) and (not ("\u{62}" < "\u{61}")))))
440+assert((((0x1 <= 0x1) and (0x1 <= 0x2)) and (not (0x2 <= 0x1))))
441+assert(((("\u{61}" <= "\u{61}") and ("\u{61}" <= "\u{62}")) and (not ("\u{62}" <= "\u{61}"))))
442+assert((not ((0x1 > 0x1) and (not ((0x1 > 0x2) and (0x2 > 0x1))))))
443+assert((not (("\u{61}" > "\u{61}") and (not (("\u{61}" > "\u{62}") and ("\u{62}" > "\u{61}"))))))
444+assert(((0x1 >= 0x1) and (not ((0x1 >= 0x2) and (0x2 >= 0x1)))))
445+assert((("\u{61}" >= "\u{61}") and (not (("\u{61}" >= "\u{62}") and ("\u{62}" >= "\u{61}")))))
446+assert((((1.3 < 1.4) and (1.3 <= 1.4)) and (not ((1.3 < 1.3) and (1.3 <= 1.3)))))
447+assert(eqT((- (0x4 % 0x3)),0x2))
448+assert(eqT((0x4 % (- 0x3)),(- 0x2)))
449+assert(eqT((- (4.0 % 0x3)),2.0))
450+assert(eqT((0x4 % (- 3.0)),(- 2.0)))
451+assert(eqT((0x4 % (- 0x5)),(- 0x1)))
452+assert(eqT((0x4 % (- 5.0)),(- 1.0)))
453453assert(eqT((0x4 % 0x5),0x4))
454454assert(eqT((0x4 % 5.0),4.0))
455−assert(eqT(- (0x4 % - 0x5),- 0x4))
456−assert(eqT(- (0x4 % - 5.0),- 4.0))
457−assert(eqT(- (0x4 % 0x5),0x1))
458−assert(eqT(- (0x4 % 5.0),1.0))
455+assert(eqT((- (0x4 % (- 0x5))),(- 0x4)))
456+assert(eqT((- (0x4 % (- 5.0))),(- 4.0)))
457+assert(eqT((- (0x4 % 0x5)),0x1))
458+assert(eqT((- (0x4 % 5.0)),1.0))
459459assert(eqT((4.25 % 0x4),0.25))
460460assert(eqT((10.0 % 0x2),0.0))
461−assert(eqT(- (10.0 % 0x2),0.0))
462−assert(eqT(- (10.0 % - 0x2),0.0))
461+assert(eqT((- (10.0 % 0x2)),0.0))
462+assert(eqT((- (10.0 % (- 0x2))),0.0))
463463assert(((math.pi - (math.pi % 0x1)) == 0x3))
464464assert(((math.pi - (math.pi % 1e-3)) == 3.141))
465465do
466466local i,j = 0x0,0x4e20
467467while (i < j) do
468−local m = (((i + j)) // 0x2)
469−if (0xa ^ - (m > 0x0)) then
468+local m = ((i + j) // 0x2)
469+if (0xa ^ (- (m > 0x0))) then
470470i=(m + 0x1)
471471else
472472j=m
473473end
474474end
475−local b = (0xa ^ - ((i - ((i // 0xa)))))
475+local b = (0xa ^ (- (i - (i // 0xa))))
476476assert(((b > 0x0) and ((b * b) == 0x0)))
477477local delta = (b / 0x3e8)
478−assert(eq((((2.1 * b)) % ((0x2 * b))),((0.1 * b)),delta))
479−assert(eq(((- (2.1 * b)) % ((0x2 * b))),(((0x2 * b)) - ((0.1 * b))),delta))
480−assert(eq((((2.1 * b)) % (- (0x2 * b))),(((0.1 * b)) - ((0x2 * b))),delta))
478+assert(eq(((2.1 * b) % (0x2 * b)),(0.1 * b),delta))
479+assert(eq(((- (2.1 * b)) % (0x2 * b)),((0x2 * b) - (0.1 * b)),delta))
480+assert(eq(((2.1 * b) % (- (0x2 * b))),((0.1 * b) - (0x2 * b)),delta))
481481assert(eq(((- (2.1 * b)) % (- (0x2 * b))),(- (0.1 * b)),delta))
482482end
483−for i = - 0xa, 0xa
483+for i = (- 0xa), 0xa
484484do
485−for j = - 0xa, 0xa
485+for j = (- 0xa), 0xa
486486do
487487if (j ~= 0x0) then
488−assert(((((i + 0.0)) % j) == (i % j)))
488+assert((((i + 0.0) % j) == (i % j)))
489489end
490490end
491491end
492492for i = 0x0, 0xa
493493do
494−for j = - 0xa, 0xa
494+for j = (- 0xa), 0xa
495495do
496496if (j ~= 0x0) then
497−assert(((((0x2 ^ i)) % j) == (((0x1 << i)) % j)))
497+assert((((0x2 ^ i) % j) == ((0x1 << i) % j)))
498498end
499499end
500500end
501501do
502502local i = 0xa
503−while (((0x1 << i)) > 0x0) do
504−assert(((((0x1 << i)) % 0x3) == ((i % 0x2) + 0x1)))
503+while ((0x1 << i) > 0x0) do
504+assert((((0x1 << i) % 0x3) == ((i % 0x2) + 0x1)))
505505i=(i + 0x1)
506506end
507507i=0xa
@@ -512,13 +512,13 @@ end
512512end
513513assert(eqT((minint % minint),0x0))
514514assert(eqT((maxint % maxint),0x0))
515−assert(((((minint + 0x1)) % minint) == (minint + 0x1)))
516−assert(((((maxint - 0x1)) % maxint) == (maxint - 0x1)))
515+assert((((minint + 0x1) % minint) == (minint + 0x1)))
516+assert((((maxint - 0x1) % maxint) == (maxint - 0x1)))
517517assert(((minint % maxint) == (maxint - 0x1)))
518−assert((minint % - (0x1 == 0x0)))
519−assert((minint % - (0x2 == 0x0)))
520−assert((maxint % - (0x2 == - 0x1)))
521−if not _port then
518+assert((minint % (- (0x1 == 0x0))))
519+assert((minint % (- (0x2 == 0x0))))
520+assert((maxint % (- (0x2 == (- 0x1)))))
521+if (not _port) then
522522local function anan
523523(x)
524524assert(isNaN(x))
@@ -527,30 +527,30 @@ anan((0.0 % 0x0))
527527anan((1.3 % 0x0))
528528anan((math.huge % 0x1))
529529anan((math.huge % 1e30))
530−anan(- (math.huge % 1e30))
531−anan(- (math.huge % - 1e30))
530+anan((- (math.huge % 1e30)))
531+anan((- (math.huge % (- 1e30))))
532532assert(((0x1 % math.huge) == 0x1))
533533assert(((1e30 % math.huge) == 1e30))
534−assert((1e30 % - (math.huge == - math.huge)))
535−assert(- ((0x1 % math.huge) == math.huge))
536−assert(- (0x1 % - (math.huge == - 0x1)))
534+assert((1e30 % (- (math.huge == (- math.huge)))))
535+assert((- ((0x1 % math.huge) == math.huge)))
536+assert((- (0x1 % (- (math.huge == (- 0x1))))))
537537end
538538assert(math.ult(0x3,0x4))
539−assert(not math.ult(0x4,0x4))
540−assert(math.ult(- 0x2,- 0x1))
541−assert(math.ult(0x2,- 0x1))
542−assert(not math.ult(- 0x2,- 0x2))
539+assert((not math.ult(0x4,0x4)))
540+assert(math.ult((- 0x2),(- 0x1)))
541+assert(math.ult(0x2,(- 0x1)))
542+assert((not math.ult((- 0x2),(- 0x2))))
543543assert(math.ult(maxint,minint))
544−assert(not math.ult(minint,maxint))
545−assert(eq(((math.sin(- 9.8) ^ 0x2) + (math.cos(- 9.8) ^ 0x2)),0x1))
544+assert((not math.ult(minint,maxint)))
545+assert(eq(((math.sin((- 9.8)) ^ 0x2) + (math.cos((- 9.8)) ^ 0x2)),0x1))
546546assert(eq(math.tan((math.pi / 0x4)),0x1))
547547assert((eq(math.sin((math.pi / 0x2)),0x1) and eq(math.cos((math.pi / 0x2)),0x0)))
548548assert(((eq(math.atan(0x1),(math.pi / 0x4)) and eq(math.acos(0x0),(math.pi / 0x2))) and eq(math.asin(0x1),(math.pi / 0x2))))
549549assert((eq(math.deg((math.pi / 0x2)),0x5a) and eq(math.rad(0x5a),(math.pi / 0x2))))
550−assert((math.abs(- 10.43) == 10.43))
550+assert((math.abs((- 10.43)) == 10.43))
551551assert(eqT(math.abs(minint),minint))
552552assert(eqT(math.abs(maxint),maxint))
553−assert(eqT(math.abs(- maxint),maxint))
553+assert(eqT(math.abs((- maxint)),maxint))
554554assert(eq(math.atan(0x1,0x0),(math.pi / 0x2)))
555555assert((math.fmod(0xa,0x3) == 0x1))
556556assert(eq((math.sqrt(0xa) ^ 0x2),0xa))
@@ -558,17 +558,17 @@ assert(eq(math.log(0x2,0xa),(math.log(0x2) / math.log(0xa))))
558558assert(eq(math.log(0x2,0x2),0x1))
559559assert(eq(math.log(0x9,0x3),0x2))
560560assert(eq(math.exp(0x0),0x1))
561−assert(eq(math.sin(0xa),math.sin((0xa % ((0x2 * math.pi))))))
561+assert(eq(math.sin(0xa),math.sin((0xa % (0x2 * math.pi)))))
562562assert((tonumber("\u{20}\u{31}\u{2e}\u{33}\u{65}\u{2d}\u{32}\u{20}") == 0.013))
563−assert((tonumber("\u{20}\u{2d}\u{31}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{20}") == - 1.00000000000001))
564−assert((0x800001 + - (0x800001 == 0x0)))
565−assert((0x800000 + - (0x800000 == 0x0)))
566−assert((0x7fffff + - (0x7fffff == 0x0)))
563+assert((tonumber("\u{20}\u{2d}\u{31}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{20}") == (- 1.00000000000001)))
564+assert((0x800001 + (- (0x800001 == 0x0))))
565+assert((0x800000 + (- (0x800000 == 0x0))))
566+assert((0x7fffff + (- (0x7fffff == 0x0))))
567567do
568568assert(eqT(math.floor(3.4),0x3))
569569assert(eqT(math.ceil(3.4),0x4))
570−assert(eqT(math.floor(- 3.4),- 0x4))
571−assert(eqT(math.ceil(- 3.4),- 0x3))
570+assert(eqT(math.floor((- 3.4)),(- 0x4)))
571+assert(eqT(math.ceil((- 3.4)),(- 0x3)))
572572assert(eqT(math.floor(maxint),maxint))
573573assert(eqT(math.ceil(maxint),maxint))
574574assert(eqT(math.floor(minint),minint))
@@ -577,8 +577,8 @@ assert(eqT(math.ceil(minint),minint))
577577assert(eqT(math.ceil((minint + 0.0)),minint))
578578assert((math.floor(1e50) == 1e50))
579579assert((math.ceil(1e50) == 1e50))
580−assert((math.floor(- 1e50) == - 1e50))
581−assert((math.ceil(- 1e50) == - 1e50))
580+assert((math.floor((- 1e50)) == (- 1e50)))
581+assert((math.ceil((- 1e50)) == (- 1e50)))
582582for _,p in pairs({0x1f,0x20,0x3f,0x40})
583583do
584584assert((math.floor((0x2 ^ p)) == (0x2 ^ p)))
@@ -593,30 +593,30 @@ assert(eqT(math.tointeger((minint .. "")),minint))
593593assert(eqT(math.tointeger(maxint),maxint))
594594assert(eqT(math.tointeger((maxint .. "")),maxint))
595595assert(eqT(math.tointeger((minint + 0.0)),minint))
596−assert(not math.tointeger((0.0 - minint)))
597−assert(not math.tointeger(math.pi))
598−assert(not math.tointeger(- math.pi))
596+assert((not math.tointeger((0.0 - minint))))
597+assert((not math.tointeger(math.pi)))
598+assert((not math.tointeger((- math.pi))))
599599assert((math.floor(math.huge) == math.huge))
600600assert((math.ceil(math.huge) == math.huge))
601−assert(not math.tointeger(math.huge))
602−assert((math.floor(- math.huge) == - math.huge))
603−assert((math.ceil(- math.huge) == - math.huge))
604−assert(not math.tointeger(- math.huge))
601+assert((not math.tointeger(math.huge)))
602+assert((math.floor((- math.huge)) == (- math.huge)))
603+assert((math.ceil((- math.huge)) == (- math.huge)))
604+assert((not math.tointeger((- math.huge))))
605605assert((math.tointeger("\u{33}\u{34}\u{2e}\u{30}") == 0x22))
606−assert(not math.tointeger("\u{33}\u{34}\u{2e}\u{33}"))
607−assert(not math.tointeger({}))
608−assert(not math.tointeger((0x0 / 0x0)))
606+assert((not math.tointeger("\u{33}\u{34}\u{2e}\u{33}")))
607+assert((not math.tointeger({})))
608+assert((not math.tointeger((0x0 / 0x0))))
609609end
610−for i = - 0x6, 0x6
610+for i = (- 0x6), 0x6
611611do
612−for j = - 0x6, 0x6
612+for j = (- 0x6), 0x6
613613do
614614if (j ~= 0x0) then
615615local mi = math.fmod(i,j)
616616local mf = math.fmod((i + 0.0),j)
617617assert((mi == mf))
618618assert(((math.type(mi) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}") and (math.type(mf) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")))
619−if (((((i >= 0x0) and (j >= 0x0))) or (((i <= 0x0) and (j <= 0x0)))) or (mi == 0x0)) then
619+if ((((i >= 0x0) and (j >= 0x0)) or ((i <= 0x0) and (j <= 0x0))) or (mi == 0x0)) then
620620assert(eqT(mi,(i % j)))
621621end
622622end
@@ -636,18 +636,18 @@ assert((math.max(maxint,1e61) == 1e61))
636636assert(eqT(math.max(minint,(minint + 0x1)),(minint + 0x1)))
637637assert(eqT(math.min(0x3),0x3))
638638assert(eqT(math.min(0x3,0x5,0x9,0x1),0x1))
639−assert((math.min(3.2,5.9,- 9.2,1.1) == - 9.2))
639+assert((math.min(3.2,5.9,(- 9.2),1.1) == (- 9.2)))
640640assert((math.min(1.9,1.7,1.72) == 1.7))
641−assert((math.min(- 1e61,minint) == - 1e61))
641+assert((math.min((- 1e61),minint) == (- 1e61)))
642642assert(eqT(math.min(maxint,(maxint - 0x1)),(maxint - 0x1)))
643643assert(eqT(math.min((maxint - 0x2),maxint,(maxint - 0x1)),(maxint - 0x2)))
644644end
645645local a,b = "\u{31}\u{30}","\u{32}\u{30}"
646−assert(((((a * b) == 0xc8) and ((a + b) == 0x1e)) and ((a - b) == - ((0xa and ((a / b) == 0.5)) and - (b == - 0x14)))))
646+assert(((((a * b) == 0xc8) and ((a + b) == 0x1e)) and ((a - b) == (- ((0xa and ((a / b) == 0.5)) and (- (b == (- 0x14))))))))
647647assert(((a == "\u{31}\u{30}") and (b == "\u{32}\u{30}")))
648648do
649649print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{4e}\u{61}\u{4e}")
650−local mz <const> = - 0.0
650+local mz <const> = (- 0.0)
651651local z <const> = 0.0
652652assert((mz == z))
653653assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
@@ -656,24 +656,24 @@ assert(((a[z] == 0x1) and (a[mz] == 0x1)))
656656a[z]=0x2
657657assert(((a[z] == 0x2) and (a[mz] == 0x2)))
658658local inf = ((math.huge * 0x2) + 0x1)
659−local mz <const> = - (0x1 / inf)
659+local mz <const> = (- (0x1 / inf))
660660local z <const> = (0x1 / inf)
661661assert((mz == z))
662662assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
663663local NaN <const> = (inf - inf)
664664assert((NaN ~= NaN))
665−assert(not ((NaN < NaN)))
666−assert(not ((NaN <= NaN)))
667−assert(not ((NaN > NaN)))
668−assert(not ((NaN >= NaN)))
669−assert(not (((0x0 < NaN)) and not ((NaN < 0x0))))
665+assert((not (NaN < NaN)))
666+assert((not (NaN <= NaN)))
667+assert((not (NaN > NaN)))
668+assert((not (NaN >= NaN)))
669+assert((not ((0x0 < NaN) and (not (NaN < 0x0)))))
670670local NaN1 <const> = (0x0 / 0x0)
671−assert(((NaN ~= NaN1) and not (((NaN <= NaN1)) and not ((NaN1 <= NaN)))))
671+assert(((NaN ~= NaN1) and (not ((NaN <= NaN1) and (not (NaN1 <= NaN))))))
672672local a = {}
673−assert(not pcall(rawset,a,NaN,0x1))
673+assert((not pcall(rawset,a,NaN,0x1)))
674674assert((a[NaN] == undef))
675675a[0x1]=0x1
676−assert(not pcall(rawset,a,NaN,0x1))
676+assert((not pcall(rawset,a,NaN,0x1)))
677677assert((a[NaN] == undef))
678678local a1,a2,a3,a4,a5 = 0x0,0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}",0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}"
679679assert((((a1 == a2) and (a2 == a4)) and (a1 ~= a3)))
@@ -683,23 +683,23 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{6d}\u{61}\u{74}\
683683local random,max,min = math.random,math.max,math.min
684684local function testnear
685685(val,ref,tol)
686−return ((math.abs((val - ref)) < (ref * tol)))
686+return (math.abs((val - ref)) < (ref * tol))
687687end
688688do
689689local h <const> = 0x7a7040a5
690690local l <const> = 0xa323c9d6
691691math.randomseed(0x3ef)
692−local res = ((((h << 0x20) | l)) & ~ (~ (0x0 << intbits)))
692+local res = (((h << 0x20) | l) & (~ (~ (0x0 << intbits))))
693693assert((random(0x0) == res))
694694math.randomseed(0x3ef,0x0)
695695local res
696696if (floatbits <= 0x20) then
697−res=(((h >> ((0x20 - floatbits)))) % (0x2 ^ 0x20))
697+res=((h >> (0x20 - floatbits)) % (0x2 ^ 0x20))
698698else
699−res=((((h % (0x2 ^ 0x20))) * (0x2 ^ ((floatbits - 0x20)))) + ((((l >> ((0x40 - floatbits)))) % (0x2 ^ 0x20))))
699+res=(((h % (0x2 ^ 0x20)) * (0x2 ^ (floatbits - 0x20))) + ((l >> (0x40 - floatbits)) % (0x2 ^ 0x20)))
700700end
701701local rand = random()
702−assert(eq(rand,0.4782753376376966,(0x2 ^ - floatbits)))
702+assert(eq(rand,0.4782753376376966,(0x2 ^ (- floatbits))))
703703assert(((rand * (0x2 ^ floatbits)) == res))
704704end
705705do
@@ -719,7 +719,7 @@ for i = 0x1, randbits
719719do
720720counts[i]=0x0
721721end
722−local up = - math.huge
722+local up = (- math.huge)
723723local low = math.huge
724724local rounds = (0x64 * randbits)
725725local totalrounds = 0x0
@@ -732,18 +732,18 @@ up=max(up,t)
732732low=min(low,t)
733733assert((((t * mult) % 0x1) == 0x0))
734734local bit = (i % randbits)
735−if ((((t * (0x2 ^ bit))) % 0x1) >= 0.5) then
735+if (((t * (0x2 ^ bit)) % 0x1) >= 0.5) then
736736counts[(bit + 0x1)]=(counts[(bit + 0x1)] + 0x1)
737737end
738738end
739739totalrounds=(totalrounds + rounds)
740−if not ((eq(up,0x1,1e-3) and eq(low,0x0,1e-3))) then
740+if (not (eq(up,0x1,1e-3) and eq(low,0x0,1e-3))) then
741741goto doagain
742742end
743−local expected = (((totalrounds / randbits) / 0x2))
743+local expected = ((totalrounds / randbits) / 0x2)
744744for i = 0x1, randbits
745745do
746−if not testnear(counts[i],expected,0.1) then
746+if (not testnear(counts[i],expected,0.1)) then
747747goto doagain
748748end
749749end
@@ -766,21 +766,21 @@ local t = random(0x0)
766766up=max(up,t)
767767low=min(low,t)
768768local bit = (i % intbits)
769−counts[(bit + 0x1)]=(counts[(bit + 0x1)] + ((((t >> bit)) & 0x1)))
769+counts[(bit + 0x1)]=(counts[(bit + 0x1)] + ((t >> bit) & 0x1))
770770end
771771totalrounds=(totalrounds + rounds)
772772local lim = (maxint >> 0xa)
773−if not ((((maxint - up) < lim) and ((low - minint) < lim))) then
773+if (not (((maxint - up) < lim) and ((low - minint) < lim))) then
774774goto doagain
775775end
776−local expected = (((totalrounds / intbits) / 0x2))
776+local expected = ((totalrounds / intbits) / 0x2)
777777for i = 0x1, intbits
778778do
779−if not testnear(counts[i],expected,0.1) then
779+if (not testnear(counts[i],expected,0.1)) then
780780goto doagain
781781end
782782end
783−print(string.format("\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{64}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{3a}\u{20}\u{5b}\u{6d}\u{69}\u{6e}\u{69}\u{6e}\u{74}\u{20}\u{2b}\u{20}\u{25}\u{2e}\u{30}\u{66}\u{70}\u{70}\u{6d}\u{2c}\u{20}\u{6d}\u{61}\u{78}\u{69}\u{6e}\u{74}\u{20}\u{2d}\u{20}\u{25}\u{2e}\u{30}\u{66}\u{70}\u{70}\u{6d}\u{5d}",totalrounds,((((minint - low)) / minint) * 1e6),((((maxint - up)) / maxint) * 1e6)))
783+print(string.format("\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{64}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{3a}\u{20}\u{5b}\u{6d}\u{69}\u{6e}\u{69}\u{6e}\u{74}\u{20}\u{2b}\u{20}\u{25}\u{2e}\u{30}\u{66}\u{70}\u{70}\u{6d}\u{2c}\u{20}\u{6d}\u{61}\u{78}\u{69}\u{6e}\u{74}\u{20}\u{2d}\u{20}\u{25}\u{2e}\u{30}\u{66}\u{70}\u{70}\u{6d}\u{5d}",totalrounds,(((minint - low) / minint) * 1e6),(((maxint - up) / maxint) * 1e6)))
784784end
785785do
786786local count = {0x0,0x0,0x0,0x0,0x0,0x0}
@@ -795,7 +795,7 @@ end
795795totalrep=(totalrep + rep)
796796for i = 0x1, 0x6
797797do
798−if not testnear(count[i],totalrep,0.05) then
798+if (not testnear(count[i],totalrep,0.05)) then
799799goto doagain
800800end
801801end
@@ -809,7 +809,7 @@ local count = 0x0
809809while true do
810810local t = random(x1,x2)
811811assert(((x1 <= t) and (t <= x2)))
812−if not mark[t] then
812+if (not mark[t]) then
813813mark[t]=true
814814count=(count + 0x1)
815815if (count == ((x2 - x1) + 0x1)) then
@@ -819,15 +819,15 @@ end
819819end
820820::ok::
821821end
822−aux(- 0xa,0x0)
822+aux((- 0xa),0x0)
823823aux(0x1,0x6)
824824aux(0x1,0x2)
825825aux(0x1,0xd)
826826aux(0x1,0x1f)
827827aux(0x1,0x20)
828828aux(0x1,0x21)
829−aux(- 0xa,0xa)
830−aux(- 0xa,- 0xa)
829+aux((- 0xa),0xa)
830+aux((- 0xa),(- 0xa))
831831aux(minint,minint)
832832aux(maxint,maxint)
833833aux(minint,(minint + 0x9))
@@ -846,7 +846,7 @@ local count = 0x0
846846for _ = 0x1, n
847847do
848848local t = random(p1,p2)
849−if not mark[t] then
849+if (not mark[t]) then
850850assert(((p1 <= t) and (t <= p2)))
851851max=math.max(max,t)
852852min=math.min(min,t)
@@ -854,26 +854,26 @@ mark[t]=true
854854count=(count + 0x1)
855855end
856856end
857−if not ((count >= (n * 0.8))) then
857+if (not (count >= (n * 0.8))) then
858858goto doagain
859859end
860−local diff = (((p2 - p1)) >> 0x4)
861−if not (((min < (p1 + diff)) and (max > (p2 - diff)))) then
860+local diff = ((p2 - p1) >> 0x4)
861+if (not ((min < (p1 + diff)) and (max > (p2 - diff)))) then
862862goto doagain
863863end
864864end
865865aux(0x0,maxint)
866866aux(0x1,maxint)
867867aux(0x3,(maxint // 0x3))
868−aux(minint,- 0x1)
868+aux(minint,(- 0x1))
869869aux((minint // 0x2),(maxint // 0x2))
870870aux(minint,maxint)
871871aux((minint + 0x1),maxint)
872872aux(minint,(maxint - 0x1))
873−aux(0x0,(0x1 << ((intbits - 0x5))))
873+aux(0x0,(0x1 << (intbits - 0x5)))
874874end
875−assert(not pcall(random,0x1,0x2,0x3))
876−assert(not pcall(random,(minint + 0x1),minint))
877−assert(not pcall(random,maxint,(maxint - 0x1)))
878−assert(not pcall(random,maxint,minint))
875+assert((not pcall(random,0x1,0x2,0x3)))
876+assert((not pcall(random,(minint + 0x1),minint)))
877+assert((not pcall(random,maxint,(maxint - 0x1))))
878+assert((not pcall(random,maxint,minint)))
879879print("\u{4f}\u{4b}")
desk/res/lua/cycled/nextvar.lua+102−102
@@ -2,11 +2,11 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\
22local function checkerror
33(msg,f, ...)
44local s,err = pcall(f,...)
5−assert(not (s and string.find(err,msg)))
5+assert((not (s and string.find(err,msg))))
66end
77local function check
88(t,na,nh)
9−if not T then
9+if (not T) then
1010return
1111end
1212local a,h = T.querytab(t)
@@ -27,7 +27,7 @@ end
2727for i = 0x1, 0x64
2828do
2929a[i]=true
30−assert(# (a == i))
30+assert((# (a == i)))
3131end
3232do
3333local a = {}
@@ -72,7 +72,7 @@ local i = 0x0
7272for k,v in ipairs({true,false,true,false})
7373do
7474i=(i + 0x1)
75−x=not x
75+x=(not x)
7676assert((x == v))
7777end
7878assert((i == 0x4))
@@ -84,13 +84,13 @@ assert(((k == math.mininteger) and (v == 0xa)))
8484k,v=f({[math.mininteger] = 0xa},k)
8585assert((k == nil))
8686end
87−if not T then
88−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
87+if (not T) then
88+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
8989else
9090local function mp2
9191(n)
9292local mp = (0x2 ^ math.ceil(math.log(n,0x2)))
93−assert(((n == 0x0) or ((((mp / 0x2) < n) and (n <= mp)))))
93+assert(((n == 0x0) or (((mp / 0x2) < n) and (n <= mp))))
9494return mp
9595end
9696do
@@ -131,23 +131,23 @@ local t = f()
131131T.alloccount()
132132;
133133collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
134−assert(# (t == sa))
134+assert((# (t == sa)))
135135check(t,sa,mp2(sh))
136136end
137137end
138138local a = {}
139−for i = 0x1, sizes[# sizes]
139+for i = 0x1, sizes[(# sizes)]
140140do
141141a[i]=i
142142end
143143for k in ipairs(sizes)
144144do
145145local t = {table.unpack(a,0x1,k)}
146−assert(# (t == k))
146+assert((# (t == k)))
147147check(t,k,0x0)
148148t={0x1,0x2,0x3,table.unpack(a,0x1,k)}
149149check(t,(k + 0x3),0x0)
150−assert(# (t == (k + 0x3)))
150+assert((# (t == (k + 0x3))))
151151end
152152local lim = 0x82
153153local a = {}
@@ -175,14 +175,14 @@ a={}
175175for i = 0x1, lim
176176do
177177a[i]=0x1
178−assert(# (a == i))
178+assert((# (a == i)))
179179check(a,mp2(i),0x0)
180180end
181181a={}
182182for i = 0x1, lim
183183do
184184a[("\u{61}" .. i)]=0x1
185−assert(# (a == 0x0))
185+assert((# (a == 0x0)))
186186check(a,0x0,mp2(i))
187187end
188188a={}
@@ -228,7 +228,7 @@ end
228228for i = 0x1, lim
229229do
230230local a = {}
231−for i = i, 0x1, - 0x1
231+for i = i, 0x1, (- 0x1)
232232do
233233a[i]=i
234234end
@@ -267,18 +267,18 @@ a[0x20]=true
267267a[0x30]=true
268268;
269269a[0x33]=true
270−assert(# (a == 0x30))
270+assert((# (a == 0x30)))
271271assert((select(0x4,T.querytab(a)) == 0x30))
272272a[0x32]=true
273273assert((select(0x4,T.querytab(a)) == 0x32))
274−assert(# (a == 0x33))
275−end
276−assert(# ({} == 0x0))
277−assert(# ({nil} == 0x0))
278−assert(# ({nil,nil} == 0x0))
279−assert(# ({nil,nil,nil} == 0x0))
280−assert(# ({nil,nil,nil,nil} == 0x0))
281−assert(# ({0x1,0x2,0x3,nil,nil} == 0x3))
274+assert((# (a == 0x33)))
275+end
276+assert((# ({} == 0x0)))
277+assert((# ({nil} == 0x0)))
278+assert((# ({nil,nil} == 0x0)))
279+assert((# ({nil,nil,nil} == 0x0)))
280+assert((# ({nil,nil,nil,nil} == 0x0)))
281+assert((# ({0x1,0x2,0x3,nil,nil} == 0x3)))
282282print("\u{2b}")
283283local nofind = {}
284284a,b,c=0x1,0x2,0x3
@@ -289,7 +289,7 @@ local function find
289289local n,v
290290while 0x1 do
291291n,v=next(_G,n)
292−if not n then
292+if (not n) then
293293return nofind
294294end
295295assert((_G[n] ~= undef))
@@ -312,7 +312,7 @@ assert(((print == find("\u{70}\u{72}\u{69}\u{6e}\u{74}")) and (print == find1("\
312312assert((_G["\u{70}\u{72}\u{69}\u{6e}\u{74}"] == find("\u{70}\u{72}\u{69}\u{6e}\u{74}")))
313313assert((assert == find1("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}")))
314314assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
315−assert(not find1("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"))
315+assert((not find1("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
316316_G[("\u{72}\u{65}\u{74}" .. "\u{75}\u{72}\u{6e}")]=undef
317317assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
318318_G["\u{78}\u{78}\u{78}"]=0x1
@@ -344,7 +344,7 @@ a[n]=v
344344end
345345for n,v in pairs(a)
346346do
347−if not ((package.loaded[n] and (type(v) ~= "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")) and not string.find(n,"\u{5e}\u{5b}\u{25}\u{75}\u{5f}\u{5d}")) then
347+if (not ((package.loaded[n] and (type(v) ~= "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")) and (not string.find(n,"\u{5e}\u{5b}\u{25}\u{75}\u{5f}\u{5d}")))) then
348348_G[n]=undef
349349end
350350collectgarbage()
@@ -376,8 +376,8 @@ checknext({0x1,0x2,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
376376checknext({0x1,0x2,0x3,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
377377checknext({0x1,0x2,0x3,0x4,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
378378checknext({0x1,0x2,0x3,0x4,0x5,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
379−assert(# ({} == 0x0))
380−assert(# ({[- 0x1] = 0x2} == 0x0))
379+assert((# ({} == 0x0)))
380+assert((# ({[(- 0x1)] = 0x2} == 0x0)))
381381for i = 0x0, 0x28
382382do
383383local a = {}
@@ -385,13 +385,13 @@ for j = 0x1, i
385385do
386386a[j]=j
387387end
388−assert(# (a == i))
388+assert((# (a == i)))
389389end
390390function table.maxn(t)
391391local max = 0x0
392392for k in pairs(t)
393393do
394−max=((((type(k) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")) and math.max(max,k)) or max)
394+max=(((type(k) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and math.max(max,k)) or max)
395395end
396396return max
397397end
@@ -406,7 +406,7 @@ for i = 0x0, 0x32
406406do
407407a[(0x2 ^ i)]=true
408408end
409−assert(a[# a])
409+assert(a[(# a)])
410410print("\u{2b}")
411411do
412412local a = {[0x1] = 0x1,[1.1] = 0x2,["\u{78}"] = 0x3,[string.rep("\u{78}",0x3e8)] = 0x4,[print] = 0x5,[checkerror] = 0x6,[coroutine.running()] = 0x7,[true] = 0x8,[io.stdin] = 0x9,[{}] = 0xa}
@@ -443,7 +443,7 @@ do
443443local k1 = next(t)
444444assert((k == k1))
445445t[k]=nil
446−local expected = (((((type(k) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and k[0x1]) or ((type(k) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and k())) or string.sub(k,0x1,0x1)))
446+local expected = ((((type(k) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and k[0x1]) or ((type(k) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and k())) or string.sub(k,0x1,0x1))
447447assert((expected == v))
448448coroutine.yield(v)
449449end
@@ -467,54 +467,54 @@ assert(((count == 0x0) and (next(t) == nil)))
467467end
468468local function test
469469(a)
470−assert(not pcall(table.insert,a,0x2,0x14))
470+assert((not pcall(table.insert,a,0x2,0x14)))
471471;
472472table.insert(a,0xa)
473473;
474474table.insert(a,0x2,0x14)
475475;
476−table.insert(a,0x1,- 0x1)
476+table.insert(a,0x1,(- 0x1))
477477;
478478table.insert(a,0x28)
479479;
480−table.insert(a,# (a + 0x1),0x32)
481−table.insert(a,0x2,- 0x2)
480+table.insert(a,(# (a + 0x1)),0x32)
481+table.insert(a,0x2,(- 0x2))
482482assert((a[0x2] ~= undef))
483483assert((a["\u{32}"] == undef))
484−assert(not pcall(table.insert,a,0x0,0x14))
484+assert((not pcall(table.insert,a,0x0,0x14)))
485485;
486−assert(not pcall(table.insert,a,# (a + 0x2),0x14))
486+assert((not pcall(table.insert,a,(# (a + 0x2)),0x14)))
487487;
488−assert((table.remove(a,0x1) == - 0x1))
489−assert((table.remove(a,0x1) == - 0x2))
488+assert((table.remove(a,0x1) == (- 0x1)))
489+assert((table.remove(a,0x1) == (- 0x2)))
490490assert((table.remove(a,0x1) == 0xa))
491491assert((table.remove(a,0x1) == 0x14))
492492assert((table.remove(a,0x1) == 0x28))
493493assert((table.remove(a,0x1) == 0x32))
494494assert((table.remove(a,0x1) == nil))
495495assert((table.remove(a) == nil))
496−assert((table.remove(a,# a) == nil))
496+assert((table.remove(a,(# a)) == nil))
497497end
498−a={["\u{6e}"] = 0x0,[- 0x7] = "\u{62}\u{61}\u{6e}"}
498+a={["\u{6e}"] = 0x0,[(- 0x7)] = "\u{62}\u{61}\u{6e}"}
499499test(a)
500−assert(((a.n == 0x0) and (a[- 0x7] == "\u{62}\u{61}\u{6e}")))
501−a={[- 0x7] = "\u{62}\u{61}\u{6e}"}
500+assert(((a.n == 0x0) and (a[(- 0x7)] == "\u{62}\u{61}\u{6e}")))
501+a={[(- 0x7)] = "\u{62}\u{61}\u{6e}"}
502502;
503503test(a)
504−assert(((a.n == nil) and # ((a == 0x0) and (a[- 0x7] == "\u{62}\u{61}\u{6e}"))))
505−a={[- 0x1] = "\u{62}\u{61}\u{6e}"}
504+assert(((a.n == nil) and (# ((a == 0x0) and (a[(- 0x7)] == "\u{62}\u{61}\u{6e}")))))
505+a={[(- 0x1)] = "\u{62}\u{61}\u{6e}"}
506506test(a)
507−assert(# (((a == 0x0) and (table.remove(a) == nil)) and (a[- 0x1] == "\u{62}\u{61}\u{6e}")))
507+assert((# (((a == 0x0) and (table.remove(a) == nil)) and (a[(- 0x1)] == "\u{62}\u{61}\u{6e}"))))
508508a={[0x0] = "\u{62}\u{61}\u{6e}"}
509−assert(# (((a == 0x0) and (table.remove(a) == "\u{62}\u{61}\u{6e}")) and (a[0x0] == undef)))
509+assert((# (((a == 0x0) and (table.remove(a) == "\u{62}\u{61}\u{6e}")) and (a[0x0] == undef))))
510510table.insert(a,0x1,0xa)
511511;
512512table.insert(a,0x1,0x14)
513513;
514−table.insert(a,0x1,- 0x1)
514+table.insert(a,0x1,(- 0x1))
515515assert((table.remove(a) == 0xa))
516516assert((table.remove(a) == 0x14))
517−assert((table.remove(a) == - 0x1))
517+assert((table.remove(a) == (- 0x1)))
518518assert((table.remove(a) == nil))
519519a={"\u{63}","\u{64}"}
520520table.insert(a,0x3,"\u{61}")
@@ -524,15 +524,15 @@ assert((table.remove(a,0x1) == "\u{64}"))
524524assert((table.remove(a,0x1) == "\u{61}"))
525525assert((table.remove(a,0x1) == "\u{62}"))
526526assert((table.remove(a,0x1) == nil))
527−assert(# ((a == 0x0) and (a.n == nil)))
527+assert((# ((a == 0x0) and (a.n == nil))))
528528a={0xa,0x14,0x1e,0x28}
529−assert((table.remove(a,# (a + 0x1)) == nil))
530−assert(not pcall(table.remove,a,0x0))
531−assert((a[# a] == 0x28))
532−assert((table.remove(a,# a) == 0x28))
533−assert((a[# a] == 0x1e))
529+assert((table.remove(a,(# (a + 0x1))) == nil))
530+assert((not pcall(table.remove,a,0x0)))
531+assert((a[(# a)] == 0x28))
532+assert((table.remove(a,(# a)) == 0x28))
533+assert((a[(# a)] == 0x1e))
534534assert((table.remove(a,0x2) == 0x14))
535−assert(((a[# a] == 0x1e) and # (a == 0x2)))
535+assert(((a[(# a)] == 0x1e) and (# (a == 0x2))))
536536do
537537local function test
538538(proxy,t)
@@ -540,7 +540,7 @@ for i = 0x1, 0xa
540540do
541541table.insert(proxy,0x1,i)
542542end
543−assert(# ((proxy == 0xa) and # ((t == 0xa) and (proxy[0x1] ~= undef))))
543+assert((# ((proxy == 0xa) and (# ((t == 0xa) and (proxy[0x1] ~= undef))))))
544544for i = 0x1, 0xa
545545do
546546assert((t[i] == (0xb - i)))
@@ -555,13 +555,13 @@ for i = 0x1, 0x8
555555do
556556assert((table.remove(proxy,0x1) == i))
557557end
558−assert(# ((proxy == 0x2) and # (t == 0x2)))
558+assert((# ((proxy == 0x2) and (# (t == 0x2)))))
559559local a,b,c = table.unpack(proxy)
560560assert((((a == 0x9) and (b == 0xa)) and (c == nil)))
561561end
562562local t = {}
563563local proxy = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
564−return # t
564+return (# t)
565565end,["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t})
566566test(proxy,t)
567567local count = 0x0
@@ -587,8 +587,8 @@ table.insert(t,0x14)
587587local k,v = next(t)
588588assert(((k == math.mininteger) and (v == 0x14)))
589589end
590−if not T then
591−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{6f}\u{6e}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
590+if (not T) then
591+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{6f}\u{6e}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
592592else
593593local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
594594local tab = {0xa,0x14,0x1e}
@@ -606,13 +606,13 @@ mt.__newindex=tab
606606checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.insert,u,0x28)
607607checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.remove,u)
608608mt.__len=function ()
609−return # tab
609+return (# tab)
610610end
611611table.insert(u,0x28)
612−assert(# ((u == 0x4) and # (((tab == 0x4) and (u[0x4] == 0x28)) and (tab[0x4] == 0x28))))
612+assert((# ((u == 0x4) and (# (((tab == 0x4) and (u[0x4] == 0x28)) and (tab[0x4] == 0x28))))))
613613assert((table.remove(u) == 0x28))
614614table.insert(u,0x1,0x32)
615−assert(# ((u == 0x4) and # (((tab == 0x4) and (u[0x4] == 0x1e)) and (tab[0x1] == 0x32))))
615+assert((# ((u == 0x4) and (# (((tab == 0x4) and (u[0x4] == 0x1e)) and (tab[0x1] == 0x32))))))
616616mt.__newindex=nil
617617mt.__len=nil
618618local tab2 = {}
@@ -621,7 +621,7 @@ debug.setmetatable(u2,{["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\
621621tab2[k]=v
622622end})
623623table.move(u,0x1,0x4,0x1,u2)
624−assert(# (((tab2 == 0x4) and (tab2[0x1] == tab[0x1])) and (tab2[0x4] == tab[0x4])))
624+assert((# (((tab2 == 0x4) and (tab2[0x1] == tab[0x1])) and (tab2[0x4] == tab[0x4]))))
625625end
626626print("\u{2b}")
627627a={}
@@ -642,7 +642,7 @@ for i = 0x1, 0x0
642642do
643643error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
644644end
645−for i = 0x0, 0x1, - 0x1
645+for i = 0x0, 0x1, (- 0x1)
646646do
647647error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
648648end
@@ -650,7 +650,7 @@ a=nil
650650;
651651for i = 0x1, 0x1
652652do
653−assert(not a)
653+assert((not a))
654654;
655655a=0x1
656656end
@@ -658,9 +658,9 @@ end
658658assert(a)
659659a=nil
660660;
661−for i = 0x1, 0x1, - 0x1
661+for i = 0x1, 0x1, (- 0x1)
662662do
663−assert(not a)
663+assert((not a))
664664;
665665a=0x1
666666end
@@ -679,7 +679,7 @@ end
679679assert((a == 0x1))
680680a=0x0
681681;
682−for i = 0x2710, 1e4, - 0x1
682+for i = 0x2710, 1e4, (- 0x1)
683683do
684684a=(a + 0x1)
685685end
@@ -695,7 +695,7 @@ end
695695assert((a == 0x0))
696696a=0x0
697697;
698−for i = 0x270f, 1e4, - 0x1
698+for i = 0x270f, 1e4, (- 0x1)
699699do
700700a=(a + 0x1)
701701end
@@ -703,7 +703,7 @@ end
703703assert((a == 0x0))
704704a=0x0
705705;
706−for i = 0x1, 0.99999, - 0x1
706+for i = 0x1, 0.99999, (- 0x1)
707707do
708708a=(a + 0x1)
709709end
@@ -727,7 +727,7 @@ end
727727assert((a == 0x1))
728728a=0x0
729729;
730−for i = - 1.5, - 1.5, 0x1
730+for i = (- 1.5), (- 1.5), 0x1
731731do
732732a=(a + 0x1)
733733end
@@ -735,7 +735,7 @@ end
735735assert((a == 0x1))
736736a=0x0
737737;
738−for i = 1e6, 1e6, - 0x1
738+for i = 1e6, 1e6, (- 0x1)
739739do
740740a=(a + 0x1)
741741end
@@ -751,7 +751,7 @@ end
751751assert((a == 0x0))
752752a=0x0
753753;
754−for i = 0x1869f, 1e5, - 1.0
754+for i = 0x1869f, 1e5, (- 1.0)
755755do
756756a=(a + 0x1)
757757end
@@ -759,7 +759,7 @@ end
759759assert((a == 0x0))
760760a=0x0
761761;
762−for i = 1.0, 0.99999, - 0x1
762+for i = 1.0, 0.99999, (- 0x1)
763763do
764764a=(a + 0x1)
765765end
@@ -780,7 +780,7 @@ end
780780assert((a == 0xa))
781781a=0x0
782782;
783−for i = 10.0, 0x1, - 0x1
783+for i = 10.0, 0x1, (- 0x1)
784784do
785785a=(a + 0x1)
786786;
@@ -813,7 +813,7 @@ end
813813assert((c == 0xa))
814814c=0x0
815815;
816−for i = - 0x1, - 0xa, - 1.0
816+for i = (- 0x1), (- 0xa), (- 1.0)
817817do
818818checkfloat(i)
819819end
@@ -826,7 +826,7 @@ end
826826local m = math.maxinteger
827827c=0x0
828828;
829−for i = m, (m - 0xa), - 0x1
829+for i = m, (m - 0xa), (- 0x1)
830830do
831831checkint(i)
832832end
@@ -840,7 +840,7 @@ end
840840assert((c == 0xa))
841841c=0x0
842842;
843−for i = 0xa, 1e-3, - 0x1
843+for i = 0xa, 1e-3, (- 0x1)
844844do
845845checkint(i)
846846end
@@ -854,21 +854,21 @@ end
854854assert((c == 0xa))
855855c=0x0
856856;
857−for i = 0x9, "\u{33}\u{2e}\u{34}", - 0x1
857+for i = 0x9, "\u{33}\u{2e}\u{34}", (- 0x1)
858858do
859859checkint(i)
860860end
861861assert((c == 0x6))
862862c=0x0
863863;
864−for i = 0x0, "\u{20}\u{2d}\u{33}\u{2e}\u{34}\u{20}\u{20}", - 0x1
864+for i = 0x0, "\u{20}\u{2d}\u{33}\u{2e}\u{34}\u{20}\u{20}", (- 0x1)
865865do
866866checkint(i)
867867end
868868assert((c == 0x4))
869869c=0x0
870870;
871−for i = 0x64, "\u{39}\u{36}\u{2e}\u{33}", - 0x2
871+for i = 0x64, "\u{39}\u{36}\u{2e}\u{33}", (- 0x2)
872872do
873873checkint(i)
874874end
@@ -886,20 +886,20 @@ end
886886assert((c == 0xa))
887887c=0x0
888888;
889−for i = - 0x1, - math.huge, - 0x1
889+for i = (- 0x1), (- math.huge), (- 0x1)
890890do
891−if (i < - 0xa) then
891+if (i < (- 0xa)) then
892892break
893893end
894894;
895895checkint(i)
896896end
897897assert((c == 0xa))
898−for i = math.mininteger, - 1e101
898+for i = math.mininteger, (- 1e101)
899899do
900900assert(false)
901901end
902−for i = math.maxinteger, 1e101, - 0x1
902+for i = math.maxinteger, 1e101, (- 0x1)
903903do
904904assert(false)
905905end
@@ -913,19 +913,19 @@ do
913913c=(c + 0x1)
914914assert((i == t[c]))
915915end
916−assert((c == # t))
916+assert((c == (# t)))
917917end
918918local maxi = math.maxinteger
919919local mini = math.mininteger
920−checkfor(mini,maxi,maxi,{mini,- 0x1,(maxi - 0x1)})
921−checkfor(mini,math.huge,maxi,{mini,- 0x1,(maxi - 0x1)})
922−checkfor(maxi,mini,mini,{maxi,- 0x1})
923−checkfor(maxi,mini,- maxi,{maxi,0x0,- maxi})
924−checkfor(maxi,- math.huge,mini,{maxi,- 0x1})
920+checkfor(mini,maxi,maxi,{mini,(- 0x1),(maxi - 0x1)})
921+checkfor(mini,math.huge,maxi,{mini,(- 0x1),(maxi - 0x1)})
922+checkfor(maxi,mini,mini,{maxi,(- 0x1)})
923+checkfor(maxi,mini,(- maxi),{maxi,0x0,(- maxi)})
924+checkfor(maxi,(- math.huge),mini,{maxi,(- 0x1)})
925925checkfor(maxi,mini,0x1,{})
926−checkfor(mini,maxi,- 0x1,{})
926+checkfor(mini,maxi,(- 0x1),{})
927927checkfor((maxi - 0x6),maxi,0x3,{(maxi - 0x6),(maxi - 0x3),maxi})
928−checkfor((mini + 0x4),mini,- 0x2,{(mini + 0x4),(mini + 0x2),mini})
928+checkfor((mini + 0x4),mini,(- 0x2),{(mini + 0x4),(mini + 0x2),mini})
929929local step = (maxi // 0xa)
930930local c = mini
931931for i = mini, maxi, step
@@ -934,7 +934,7 @@ assert((i == c))
934934c=(c + step)
935935end
936936c=maxi
937−for i = maxi, mini, - step
937+for i = maxi, mini, (- step)
938938do
939939assert((i == c))
940940c=(c - step)
@@ -951,13 +951,13 @@ do
951951end
952952end)
953953checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
954−for i = 0x1, - 0xa, 0x0
954+for i = 0x1, (- 0xa), 0x0
955955do
956956
957957end
958958end)
959959checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
960−for i = 1.0, - 0xa, 0.0
960+for i = 1.0, (- 0xa), 0.0
961961do
962962
963963end
@@ -1039,17 +1039,17 @@ return (i - inc),t[(i - inc)]
10391039else
10401040return nil
10411041end
1042−end,t,# (t + 0x1)
1042+end,t,(# (t + 0x1))
10431043end})
10441044local res = {}
10451045local co = coroutine.wrap(function ()
10461046for i,p in pairs(t)
10471047do
1048−res[# (res + 0x1)]=p
1048+res[(# (res + 0x1))]=p
10491049end
10501050end)
10511051co()
10521052co(0x1)
1053−assert(((((res[0x1] == 0x1e) and (res[0x2] == 0x14)) and (res[0x3] == 0xa)) and # (res == 0x3)))
1053+assert(((((res[0x1] == 0x1e) and (res[0x2] == 0x14)) and (res[0x3] == 0xa)) and (# (res == 0x3))))
10541054end
10551055print("\u{4f}\u{4b}")
desk/res/lua/cycled/pm.lua+25−25
@@ -2,7 +2,7 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{74}\u{74}\
22local function checkerror
33(msg,f, ...)
44local s,err = pcall(f,...)
5−assert(not (s and string.find(err,msg)))
5+assert((not (s and string.find(err,msg))))
66end
77local function f
88(s,p)
@@ -28,16 +28,16 @@ assert(((a == 0x9) and (b == 0xb)))
2828;
2929a,b=string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}")
3030assert(((a == 0xb) and (b == 0xb)))
31−assert(not string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}\u{0}"))
32−assert(not string.find("","\u{0}"))
31+assert((not string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}\u{0}")))
32+assert((not string.find("","\u{0}")))
3333assert((string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{31}\u{32}") == 0x4))
34−assert(not string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{5e}\u{31}\u{32}"))
34+assert((not string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{5e}\u{31}\u{32}")))
3535assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2a}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
3636assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2a}\u{61}") == "\u{61}\u{61}\u{61}"))
3737assert((string.match("\u{62}","\u{2e}\u{2a}\u{62}") == "\u{62}"))
3838assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2b}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
3939assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2b}\u{61}") == "\u{61}\u{61}\u{61}"))
40−assert(not string.match("\u{62}","\u{2e}\u{2b}\u{62}"))
40+assert((not string.match("\u{62}","\u{2e}\u{2b}\u{62}")))
4141assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{3f}\u{62}") == "\u{61}\u{62}"))
4242assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{3f}\u{61}") == "\u{61}\u{61}"))
4343assert((string.match("\u{62}","\u{2e}\u{3f}\u{62}") == "\u{62}"))
@@ -62,17 +62,17 @@ assert((f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2a}\u{61}") == "\u{61}\u{61}"))
6262assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2a}\u{61}") == "\u{61}\u{62}\u{61}"))
6363assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2b}") == "\u{61}\u{61}\u{61}"))
6464assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2b}\u{24}") == "\u{61}\u{61}\u{61}"))
65−assert(not f("\u{61}\u{61}\u{61}","\u{62}\u{2b}"))
66−assert(not f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2b}\u{61}"))
65+assert((not f("\u{61}\u{61}\u{61}","\u{62}\u{2b}")))
66+assert((not f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2b}\u{61}")))
6767assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2b}\u{61}") == "\u{61}\u{62}\u{61}"))
6868assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}") == "\u{61}"))
6969assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{25}\u{24}") == "\u{61}\u{24}"))
7070assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}\u{2e}") == "\u{61}\u{24}\u{61}"))
71−assert(not f("\u{61}\u{24}\u{61}","\u{24}\u{24}"))
72−assert(not f("\u{61}\u{24}\u{62}","\u{61}\u{24}"))
71+assert((not f("\u{61}\u{24}\u{61}","\u{24}\u{24}")))
72+assert((not f("\u{61}\u{24}\u{62}","\u{61}\u{24}")))
7373assert((f("\u{61}\u{24}\u{61}","\u{24}") == ""))
7474assert((f("","\u{62}\u{2a}") == ""))
75−assert(not f("\u{61}\u{61}\u{61}","\u{62}\u{62}\u{2a}"))
75+assert((not f("\u{61}\u{61}\u{61}","\u{62}\u{62}\u{2a}")))
7676assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2d}") == ""))
7777assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2d}\u{24}") == "\u{61}\u{61}\u{61}"))
7878assert((f("\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}","\u{62}\u{2e}\u{2a}\u{62}") == "\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}"))
@@ -94,17 +94,17 @@ print("\u{2b}")
9494local function f1
9595(s,p)
9696p=string.gsub(p,"\u{25}\u{25}\u{28}\u{5b}\u{30}\u{2d}\u{39}\u{5d}\u{29}",function (s)
97−return ("\u{25}" .. ((tonumber(s) + 0x1)))
97+return ("\u{25}" .. (tonumber(s) + 0x1))
9898end)
9999p=string.gsub(p,"\u{5e}\u{28}\u{5e}\u{3f}\u{29}","\u{25}\u{31}\u{28}\u{29}",0x1)
100100p=string.gsub(p,"\u{28}\u{24}\u{3f}\u{29}\u{24}","\u{28}\u{29}\u{25}\u{31}",0x1)
101101local t = {string.match(s,p)}
102−return string.sub(s,t[0x1],(t[# t] - 0x1))
102+return string.sub(s,t[0x1],(t[(# t)] - 0x1))
103103end
104104assert((f1("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{78}\u{20}\u{31}\u{32}\u{33}\u{20}\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}","\u{28}\u{2e}\u{2e}\u{2a}\u{29}\u{20}\u{25}\u{31}") == "\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}"))
105105assert((f1("\u{61}\u{78}\u{7a}\u{31}\u{32}\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}\u{34}","\u{28}\u{2e}\u{2b}\u{29}\u{3d}\u{28}\u{2e}\u{2a}\u{29}\u{3d}\u{25}\u{32}\u{20}\u{25}\u{31}") == "\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}"))
106106assert((f1("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{3d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}") == "\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}"))
107−assert(not string.match("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{5b}\u{3d}\u{5d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}"))
107+assert((not string.match("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{5b}\u{3d}\u{5d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}")))
108108local function range
109109(i,j)
110110if (i <= j) then
@@ -138,7 +138,7 @@ print("\u{2b}")
138138assert((string.match("\u{61}\u{6c}\u{6f}\u{20}\u{78}\u{79}\u{7a}\u{4b}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{4b}") == "\u{78}\u{79}\u{7a}"))
139139assert((string.match("\u{32}\u{35}\u{34}\u{20}\u{4b}","\u{28}\u{25}\u{64}\u{2a}\u{29}\u{4b}") == ""))
140140assert((string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2a}\u{29}\u{24}") == ""))
141−assert(not string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{24}"))
141+assert((not string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{24}")))
142142assert((string.find("\u{28}\u{c3}\u{a1}\u{6c}\u{6f}\u{29}","\u{25}\u{28}\u{c3}\u{a1}") == 0x1))
143143local a,b,c,d,e = string.match("\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}",PU("\u{5e}\u{28}\u{28}\u{28}\u{2e}\u{29}\u{2e}\u{29}\u{2e}\u{20}\u{28}\u{25}\u{77}\u{2a}\u{29}\u{29}\u{24}"))
144144assert((((((a == "\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") and (b == "\u{c3}\u{a2}\u{6c}")) and (c == "\u{c3}\u{a2}")) and (d == "\u{61}\u{6c}\u{6f}")) and (e == nil)))
@@ -209,10 +209,10 @@ end)
209209assert((((((s == r) and (t[0x1] == 0x1)) and (t[0x3] == 0x3)) and (t[0x7] == 0x4)) and (t[0xd] == 0x4)))
210210local function isbalanced
211211(s)
212−return not string.find(string.gsub(s,"\u{25}\u{62}\u{28}\u{29}",""),"\u{5b}\u{28}\u{29}\u{5d}")
212+return (not string.find(string.gsub(s,"\u{25}\u{62}\u{28}\u{29}",""),"\u{5b}\u{28}\u{29}\u{5d}"))
213213end
214214assert(isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{29}\u{28}\u{0}\u{29}\u{20}\u{37}\u{29}\u{20}\u{0}\u{0}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{29}\u{28}\u{63}\u{29}\u{28}\u{29}\u{20}\u{61}"))
215−assert(not isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{20}\u{37}\u{29}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{0}\u{20}\u{63}\u{29}\u{20}\u{61}"))
215+assert((not isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{20}\u{37}\u{29}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{0}\u{20}\u{63}\u{29}\u{20}\u{61}")))
216216assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{27}\u{6f}\u{69}\u{27}\u{20}\u{61}\u{6c}\u{6f}","\u{25}\u{62}\u{27}\u{27}","\u{22}") == "\u{61}\u{6c}\u{6f}\u{20}\u{22}\u{20}\u{61}\u{6c}\u{6f}"))
217217local t = {"\u{61}\u{70}\u{70}\u{6c}\u{65}","\u{6f}\u{72}\u{61}\u{6e}\u{67}\u{65}","\u{6c}\u{69}\u{6d}\u{65}",["\u{6e}"] = 0x0}
218218assert((string.gsub("\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}","\u{78}",function ()
@@ -239,14 +239,14 @@ checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u
239239checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{30}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{30}\u{29}","\u{61}")
240240checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{31}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{31}\u{29}","\u{61}")
241241checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{75}\u{73}\u{65}\u{20}\u{6f}\u{66}\u{20}\u{27}\u{25}\u{25}\u{27}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{2e}","\u{25}\u{78}")
242−if not _soft then
242+if (not _soft) then
243243print("\u{62}\u{69}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}")
244244local a = string.rep("\u{61}",0x493e0)
245245assert(string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{24}"))
246−assert(not string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{62}\u{24}"))
246+assert((not string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{62}\u{24}")))
247247assert(string.find(a,"\u{5e}\u{61}\u{2d}\u{2e}\u{3f}\u{24}"))
248248a=(string.rep("\u{61}",0x2710) .. string.rep("\u{62}",0x2710))
249−assert(not pcall(string.gsub,a,"\u{62}"))
249+assert((not pcall(string.gsub,a,"\u{62}")))
250250end
251251local function rev
252252(s)
@@ -288,7 +288,7 @@ for i in string.gmatch("\u{78}\u{75}\u{78}\u{78}\u{20}\u{75}\u{75}\u{20}\u{70}\u
288288do
289289assert((i == table.remove(t,0x1)))
290290end
291−assert(# (t == 0x0))
291+assert((# (t == 0x0)))
292292t={}
293293for i,j in string.gmatch("\u{31}\u{33}\u{20}\u{31}\u{34}\u{20}\u{31}\u{30}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{2c}\u{20}\u{31}\u{35}\u{3d}\u{20}\u{31}\u{36}\u{2c}\u{20}\u{32}\u{32}\u{3d}\u{32}\u{33}","\u{28}\u{25}\u{64}\u{2b}\u{29}\u{25}\u{73}\u{2a}\u{3d}\u{25}\u{73}\u{2a}\u{28}\u{25}\u{64}\u{2b}\u{29}")
294294do
@@ -310,7 +310,7 @@ s=(s + tonumber(k))
310310end
311311assert((s == 0x32))
312312s=0x0
313−for k in string.gmatch("\u{31}\u{31}\u{20}\u{32}\u{31}\u{20}\u{33}\u{31}","\u{25}\u{64}\u{2b}",- 0x4)
313+for k in string.gmatch("\u{31}\u{31}\u{20}\u{32}\u{31}\u{20}\u{33}\u{31}","\u{25}\u{64}\u{2b}",(- 0x4))
314314do
315315s=(s + tonumber(k))
316316end
@@ -339,8 +339,8 @@ assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{7a}\u{5d}") == 0x
339339assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{5d}") == 0x2))
340340assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{61}\u{25}\u{7a}\u{5d}") == 0x3))
341341assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{7a}\u{5d}") == 0x4))
342−assert(not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{6c}\u{25}\u{7a}\u{5d}"))
343−assert(not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{25}\u{7a}\u{5d}"))
342+assert((not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{6c}\u{25}\u{7a}\u{5d}")))
343+assert((not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{25}\u{7a}\u{5d}")))
344344local i,e = string.find("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}")
345345assert(((i == 0x2) and (e == 0x5)))
346346local k = string.match("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{28}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{29}")
@@ -350,12 +350,12 @@ for k in string.gmatch("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{74}\u
350350do
351351assert((table.remove(a,0x1) == k))
352352end
353−assert(# (a == 0x0))
353+assert((# (a == 0x0)))
354354local function malform
355355(p,m)
356356m=(m or "\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}")
357357local r,msg = pcall(string.find,"\u{61}",p)
358−assert(not (r and string.find(msg,m)))
358+assert((not (r and string.find(msg,m))))
359359end
360360malform("\u{28}\u{2e}","\u{75}\u{6e}\u{66}\u{69}\u{6e}\u{69}\u{73}\u{68}\u{65}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
361361malform("\u{2e}\u{29}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{70}\u{61}\u{74}\u{74}\u{65}\u{72}\u{6e}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
desk/res/lua/cycled/sort.lua+27−27
@@ -6,7 +6,7 @@ local minI = math.mininteger
66local function checkerror
77(msg,f, ...)
88local s,err = pcall(f,...)
9−assert(not (s and string.find(err,msg)))
9+assert((not (s and string.find(err,msg))))
1010end
1111checkerror("\u{77}\u{72}\u{6f}\u{6e}\u{67}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{6f}\u{66}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",table.insert,{},0x2,0x3,0x4)
1212local x,y,z,a,n
@@ -21,9 +21,9 @@ assert(((select(lim,unpack(a)) == lim) and (select("\u{23}",unpack(a)) == lim)))
2121x=unpack(a)
2222assert((x == 0x1))
2323x={unpack(a)}
24−assert(# (((x == lim) and (x[0x1] == 0x1)) and (x[lim] == lim)))
24+assert((# (((x == lim) and (x[0x1] == 0x1)) and (x[lim] == lim))))
2525x={unpack(a,(lim - 0x2))}
26−assert(# (((x == 0x3) and (x[0x1] == (lim - 0x2))) and (x[0x3] == lim)))
26+assert((# (((x == 0x3) and (x[0x1] == (lim - 0x2))) and (x[0x3] == lim))))
2727x={unpack(a,0xa,0x6)}
2828assert((next(x) == nil))
2929x={unpack(a,0xb,0xa)}
@@ -37,14 +37,14 @@ assert(((a == 0x1) and (x == nil)))
3737a,x=unpack({0x1,0x2},0x1,0x1)
3838assert(((a == 0x1) and (x == nil)))
3939do
40−local maxi = (((0x1 << 0x1f)) - 0x1)
41−local mini = - ((0x1 << 0x1f))
40+local maxi = ((0x1 << 0x1f) - 0x1)
41+local mini = (- (0x1 << 0x1f))
4242checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxi)
4343checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxi)
4444checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxI)
4545checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxI)
4646checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},mini,maxi)
47−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},- maxi,maxi)
47+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},(- maxi),maxi)
4848checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},minI,maxI)
4949unpack({},maxi,0x0)
5050unpack({},maxi,0x1)
@@ -79,7 +79,7 @@ do
7979local t = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
8080return "\u{61}\u{62}\u{63}"
8181end})
82−assert(# (t == "\u{61}\u{62}\u{63}"))
82+assert((# (t == "\u{61}\u{62}\u{63}")))
8383checkerror("\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",table.insert,t,0x1)
8484end
8585print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}")
@@ -119,10 +119,10 @@ assert((table.move({0xa,0x14,0x1e},0x1,0x0,0x3,a) == a))
119119eqT(a,{})
120120a=table.move({0xa,0x14,0x1e},0x1,0xa,0x1)
121121eqT(a,{0xa,0x14,0x1e})
122−a=table.move({[(maxI - 0x2)] = 0x1,[(maxI - 0x1)] = 0x2,[maxI] = 0x3},(maxI - 0x2),maxI,- 0xa,{})
123−eqT(a,{[- 0xa] = 0x1,[- 0x9] = 0x2,[- 0x8] = 0x3})
124−a=table.move({[minI] = 0x1,[(minI + 0x1)] = 0x2,[(minI + 0x2)] = 0x3},minI,(minI + 0x2),- 0xa,{})
125−eqT(a,{[- 0xa] = 0x1,[- 0x9] = 0x2,[- 0x8] = 0x3})
122+a=table.move({[(maxI - 0x2)] = 0x1,[(maxI - 0x1)] = 0x2,[maxI] = 0x3},(maxI - 0x2),maxI,(- 0xa),{})
123+eqT(a,{[(- 0xa)] = 0x1,[(- 0x9)] = 0x2,[(- 0x8)] = 0x3})
124+a=table.move({[minI] = 0x1,[(minI + 0x1)] = 0x2,[(minI + 0x2)] = 0x3},minI,(minI + 0x2),(- 0xa),{})
125+eqT(a,{[(- 0xa)] = 0x1,[(- 0x9)] = 0x2,[(- 0x8)] = 0x3})
126126a=table.move({0x2d},0x1,0x1,maxI)
127127eqT(a,{0x2d,[maxI] = 0x2d})
128128a=table.move({[maxI] = 0x64},maxI,maxI,minI)
@@ -141,7 +141,7 @@ end})
141141table.move(a,0xa,0xd,0x3,b)
142142assert((b[0x1] == "\u{28}\u{33}\u{2c}\u{31}\u{30}\u{30}\u{29}\u{28}\u{34}\u{2c}\u{31}\u{31}\u{30}\u{29}\u{28}\u{35}\u{2c}\u{31}\u{32}\u{30}\u{29}\u{28}\u{36}\u{2c}\u{31}\u{33}\u{30}\u{29}"))
143143local stat,msg = pcall(table.move,b,0xa,0xd,0x3,b)
144−assert(not (stat and (msg == b)))
144+assert((not (stat and (msg == b))))
145145end
146146do
147147local function checkmove
@@ -155,27 +155,27 @@ pos2=k
155155error()
156156end})
157157local st,msg = pcall(table.move,a,f,e,t)
158−assert(not (st and not ((msg and (pos1 == x)) and (pos2 == y))))
158+assert((not (st and (not ((msg and (pos1 == x)) and (pos2 == y))))))
159159end
160160checkmove(0x1,maxI,0x0,0x1,0x0)
161161checkmove(0x0,(maxI - 0x1),0x1,(maxI - 0x1),maxI)
162−checkmove(minI,- 0x2,- 0x5,- 0x2,(maxI - 0x6))
163−checkmove((minI + 0x1),- 0x1,- 0x2,- 0x1,(maxI - 0x3))
164−checkmove(minI,- 0x2,0x0,minI,0x0)
165−checkmove((minI + 0x1),- 0x1,0x1,(minI + 0x1),0x1)
162+checkmove(minI,(- 0x2),(- 0x5),(- 0x2),(maxI - 0x6))
163+checkmove((minI + 0x1),(- 0x1),(- 0x2),(- 0x1),(maxI - 0x3))
164+checkmove(minI,(- 0x2),0x0,minI,0x0)
165+checkmove((minI + 0x1),(- 0x1),0x1,(minI + 0x1),0x1)
166166end
167167checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},0x0,maxI,0x1)
168−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},- 0x1,(maxI - 0x1),0x1)
169−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,- 0x1,0x1)
168+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},(- 0x1),(maxI - 0x1),0x1)
169+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,(- 0x1),0x1)
170170checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,maxI,0x1)
171171checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,maxI,0x2)
172172checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,0x2,maxI)
173−checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},minI,- 0x2,0x2)
173+checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},minI,(- 0x2),0x2)
174174print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6f}\u{72}\u{74}")
175175local a = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
176−return - 0x1
176+return (- 0x1)
177177end})
178−assert(# (a == - 0x1))
178+assert((# (a == (- 0x1))))
179179table.sort(a,error)
180180a=setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
181181return maxI
@@ -199,9 +199,9 @@ f=(f or function (x,y)
199199return (x < y)
200200end)
201201;
202−for n = # a, 0x2, - 0x1
202+for n = (# a), 0x2, (- 0x1)
203203do
204−assert(not f(a[n],a[(n - 0x1)]))
204+assert((not f(a[n],a[(n - 0x1)])))
205205end
206206end
207207a={"\u{4a}\u{61}\u{6e}","\u{46}\u{65}\u{62}","\u{4d}\u{61}\u{72}","\u{41}\u{70}\u{72}","\u{4d}\u{61}\u{79}","\u{4a}\u{75}\u{6e}","\u{4a}\u{75}\u{6c}","\u{41}\u{75}\u{67}","\u{53}\u{65}\u{70}","\u{4f}\u{63}\u{74}","\u{4e}\u{6f}\u{76}","\u{44}\u{65}\u{63}"}
@@ -209,7 +209,7 @@ table.sort(a)
209209check(a)
210210local function perm
211211(s,n)
212−n=(n or # s)
212+n=(n or (# s))
213213if (n == 0x1) then
214214local t = {unpack(s)}
215215table.sort(t)
@@ -237,7 +237,7 @@ local function timesort
237237(a,n,func,msg,pre)
238238local x = os.clock()
239239table.sort(a,func)
240−x=(((os.clock() - x)) * 0x3e8)
240+x=((os.clock() - x) * 0x3e8)
241241pre=(pre or "")
242242print(string.format("\u{25}\u{73}\u{73}\u{6f}\u{72}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{25}\u{64}\u{20}\u{25}\u{73}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{20}\u{6d}\u{73}\u{65}\u{63}\u{2e}",pre,n,msg,x))
243243check(a,func)
@@ -266,7 +266,7 @@ i=(i + 0x1)
266266;
267267return (y < x)
268268end)
269−x=(((os.clock() - x)) * 0x3e8)
269+x=((os.clock() - x) * 0x3e8)
270270print(string.format("\u{49}\u{6e}\u{76}\u{65}\u{72}\u{74}\u{2d}\u{73}\u{6f}\u{72}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{25}\u{64}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{20}\u{6d}\u{73}\u{65}\u{63}\u{2e}\u{2c}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{69}\u{20}\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{69}\u{73}\u{6f}\u{6e}\u{73}",limit,x,i))
271271check(a,function (x,y)
272272return (y < x)
desk/res/lua/cycled/strings.lua+73−73
@@ -4,7 +4,7 @@ local mini <const> = math.mininteger
44local function checkerror
55(msg,f, ...)
66local s,err = pcall(f,...)
7−assert(not (s and string.find(err,msg)))
7+assert((not (s and string.find(err,msg))))
88end
99assert(("\u{61}\u{6c}\u{6f}" < "\u{61}\u{6c}\u{6f}\u{31}"))
1010assert(("" < "\u{61}"))
@@ -15,26 +15,26 @@ assert(("\u{61}\u{6c}\u{6f}\u{0}" > "\u{61}\u{6c}\u{6f}"))
1515assert(("\u{0}" < "\u{1}"))
1616assert(("\u{0}\u{0}" < "\u{0}\u{1}"))
1717assert(("\u{1}\u{0}\u{61}\u{0}\u{61}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}"))
18−assert(not (("\u{1}\u{0}\u{61}\u{0}\u{62}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}")))
18+assert((not ("\u{1}\u{0}\u{61}\u{0}\u{62}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}")))
1919assert(("\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}\u{0}"))
20−assert(not (("\u{0}\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}")))
20+assert((not ("\u{0}\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}")))
2121assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}\u{0}"))
22−assert(not (("\u{0}\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}")))
22+assert((not ("\u{0}\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}")))
2323assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}"))
2424assert(("\u{0}\u{0}\u{0}" >= "\u{0}\u{0}\u{0}"))
25−assert(not (("\u{0}\u{0}\u{62}" < "\u{0}\u{0}\u{61}\u{0}")))
25+assert((not ("\u{0}\u{0}\u{62}" < "\u{0}\u{0}\u{61}\u{0}")))
2626assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x2,0x4) == "\u{32}\u{33}\u{34}"))
2727assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7) == "\u{37}\u{38}\u{39}"))
2828assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x6) == ""))
2929assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x7) == "\u{37}"))
3030assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x0,0x0) == ""))
31−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0xa,0xa) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
31+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0xa),0xa) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
3232assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x1,0x9) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
33−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0xa,- 0x14) == ""))
34−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0x1) == "\u{39}"))
35−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0x4) == "\u{36}\u{37}\u{38}\u{39}"))
36−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",- 0x6,- 0x4) == "\u{34}\u{35}\u{36}"))
37−assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,- 0x4) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}"))
33+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0xa),(- 0x14)) == ""))
34+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x1)) == "\u{39}"))
35+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x4)) == "\u{36}\u{37}\u{38}\u{39}"))
36+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x6),(- 0x4)) == "\u{34}\u{35}\u{36}"))
37+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,(- 0x4)) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}"))
3838assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,maxi) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
3939assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,mini) == ""))
4040assert((string.sub("\u{0}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x3,0x5) == "\u{32}\u{33}\u{34}"))
@@ -44,42 +44,42 @@ local a,b = string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
4444assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",a,b) == "\u{33}\u{34}\u{35}"))
4545assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x3) == 0x3))
4646assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x4) == 0xd))
47−assert(not string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{36}",0x4))
48−assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{2e}\u{34}\u{35}",- 0x9) == 0xd))
49−assert(not string.find("\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}","\u{0}",0x5,0x1))
47+assert((not string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{36}",0x4)))
48+assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{2e}\u{34}\u{35}",(- 0x9)) == 0xd))
49+assert((not string.find("\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}","\u{0}",0x5,0x1)))
5050assert((string.find("","") == 0x1))
5151assert((string.find("","",0x1) == 0x1))
52−assert(not string.find("","",0x2))
53−assert(not string.find("","\u{61}\u{61}\u{61}",0x1))
52+assert((not string.find("","",0x2)))
53+assert((not string.find("","\u{61}\u{61}\u{61}",0x1)))
5454assert((("\u{61}\u{6c}\u{6f}\u{28}\u{2e}\u{29}\u{61}\u{6c}\u{6f}"):find("\u{28}\u{2e}\u{29}",0x1,0x1) == 0x4))
5555assert((string.len("") == 0x0))
5656assert((string.len("\u{0}\u{0}\u{0}") == 0x3))
5757assert((string.len("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}") == 0xa))
58−assert(# ("" == 0x0))
59−assert(# ("\u{0}\u{0}\u{0}" == 0x3))
60−assert(# ("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}" == 0xa))
58+assert((# ("" == 0x0)))
59+assert((# ("\u{0}\u{0}\u{0}" == 0x3)))
60+assert((# ("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}" == 0xa)))
6161assert((string.byte("\u{61}") == 0x61))
6262assert((string.byte("\u{e4}") > 0x7f))
6363assert((string.byte(string.char(0xff)) == 0xff))
6464assert((string.byte(string.char(0x0)) == 0x0))
6565assert((string.byte("\u{0}") == 0x0))
66−assert((string.byte("\u{0}\u{0}\u{61}\u{6c}\u{6f}\u{0}\u{78}",- 0x1) == string.byte("\u{78}")))
66+assert((string.byte("\u{0}\u{0}\u{61}\u{6c}\u{6f}\u{0}\u{78}",(- 0x1)) == string.byte("\u{78}")))
6767assert((string.byte("\u{62}\u{61}",0x2) == 0x61))
68−assert((string.byte("\u{a}\u{a}",0x2,- 0x1) == 0xa))
68+assert((string.byte("\u{a}\u{a}",0x2,(- 0x1)) == 0xa))
6969assert((string.byte("\u{a}\u{a}",0x2,0x2) == 0xa))
7070assert((string.byte("") == nil))
71−assert((string.byte("\u{68}\u{69}",- 0x3) == nil))
71+assert((string.byte("\u{68}\u{69}",(- 0x3)) == nil))
7272assert((string.byte("\u{68}\u{69}",0x3) == nil))
7373assert((string.byte("\u{68}\u{69}",0x9,0xa) == nil))
7474assert((string.byte("\u{68}\u{69}",0x2,0x1) == nil))
7575assert((string.char() == ""))
7676assert((string.char(0x0,0xff,0x0) == "\u{0}\u{ff}\u{0}"))
7777assert((string.char(0x0,string.byte("\u{e4}"),0x0) == "\u{0}\u{e4}\u{0}"))
78−assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,- 0x1)) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
78+assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,(- 0x1))) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
7979assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,0x0)) == ""))
80−assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",- 0xa,0x64)) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
80+assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",(- 0xa),0x64)) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
8181checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,0x100)
82−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,- 0x1)
82+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,(- 0x1))
8383checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.maxinteger)
8484checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.mininteger)
8585assert((string.upper("\u{61}\u{62}\u{0}\u{63}") == "\u{41}\u{42}\u{0}\u{43}"))
@@ -88,15 +88,15 @@ assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x0) == ""))
8888assert((string.rep("\u{74}\u{e9}\u{73}\u{0}\u{74}\u{ea}",0x2) == "\u{74}\u{e9}\u{73}\u{0}\u{74}\u{ea}\u{74}\u{e9}\u{73}\u{0}\u{74}\u{ea}"))
8989assert((string.rep("",0xa) == ""))
9090if (string.packsize("\u{69}") == 0x4) then
91−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}",string.rep,"\u{61}\u{61}",((0x1 << 0x1e)))
92−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}",string.rep,"\u{61}",((0x1 << 0x1e)),"\u{2c}")
91+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}",string.rep,"\u{61}\u{61}",(0x1 << 0x1e))
92+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}",string.rep,"\u{61}",(0x1 << 0x1e),"\u{2c}")
9393end
9494assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x0,"\u{78}\u{75}\u{78}\u{75}") == ""))
9595assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x1,"\u{78}\u{75}\u{78}\u{75}") == "\u{74}\u{65}\u{73}\u{74}\u{65}"))
9696assert((string.rep("\u{1}\u{0}\u{1}",0x2,"\u{0}\u{0}") == "\u{1}\u{0}\u{1}\u{0}\u{0}\u{1}\u{0}\u{1}"))
9797assert((string.rep("",0xa,"\u{2e}") == string.rep("\u{2e}",0x9)))
98−assert(not pcall(string.rep,"\u{61}\u{61}",((maxi // 0x2) + 0xa)))
99−assert(not pcall(string.rep,"",((maxi // 0x2) + 0xa),"\u{61}\u{61}"))
98+assert((not pcall(string.rep,"\u{61}\u{61}",((maxi // 0x2) + 0xa))))
99+assert((not pcall(string.rep,"",((maxi // 0x2) + 0xa),"\u{61}\u{61}")))
100100assert((string.reverse("") == ""))
101101assert((string.reverse("\u{0}\u{1}\u{2}\u{3}") == "\u{3}\u{2}\u{1}\u{0}"))
102102assert((string.reverse("\u{0}\u{31}\u{32}\u{33}\u{34}") == "\u{34}\u{33}\u{32}\u{31}\u{0}"))
@@ -108,27 +108,27 @@ assert((type(tostring(nil)) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
108108assert((type(tostring(0xc)) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
109109assert(string.find(tostring({}),"\u{74}\u{61}\u{62}\u{6c}\u{65}\u{3a}"))
110110assert(string.find(tostring(print),"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{3a}"))
111−assert(# (tostring("\u{0}") == 0x1))
111+assert((# (tostring("\u{0}") == 0x1)))
112112assert((tostring(true) == "\u{74}\u{72}\u{75}\u{65}"))
113113assert((tostring(false) == "\u{66}\u{61}\u{6c}\u{73}\u{65}"))
114−assert((tostring(- 0x4b3) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
114+assert((tostring((- 0x4b3)) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
115115assert((tostring(1203.125) == "\u{31}\u{32}\u{30}\u{33}\u{2e}\u{31}\u{32}\u{35}"))
116−assert((tostring(- 0.5) == "\u{2d}\u{30}\u{2e}\u{35}"))
117−assert((tostring(- 0x7fff) == "\u{2d}\u{33}\u{32}\u{37}\u{36}\u{37}"))
116+assert((tostring((- 0.5)) == "\u{2d}\u{30}\u{2e}\u{35}"))
117+assert((tostring((- 0x7fff)) == "\u{2d}\u{33}\u{32}\u{37}\u{36}\u{37}"))
118118if math.tointeger(0x7fffffff) then
119−assert((tostring(- 0x7fffffff) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
119+assert((tostring((- 0x7fffffff)) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
120120end
121121if math.tointeger(0x4000000000000000) then
122122assert((tostring(0x4000000000000000) == "\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
123−assert((tostring(- 0x4000000000000000) == "\u{2d}\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
123+assert((tostring((- 0x4000000000000000)) == "\u{2d}\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
124124end
125125if (tostring(0.0) == "\u{30}\u{2e}\u{30}") then
126126assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}\u{2e}\u{30}")))
127−assert((tostring(- (0x4b3 + 0.0)) == "\u{2d}\u{31}\u{32}\u{30}\u{33}\u{2e}\u{30}"))
127+assert((tostring((- (0x4b3 + 0.0))) == "\u{2d}\u{31}\u{32}\u{30}\u{33}\u{2e}\u{30}"))
128128else
129129assert((tostring(0.0) == "\u{30}"))
130130assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}")))
131−assert((tostring(- (0x4b3 + 0.0)) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
131+assert((tostring((- (0x4b3 + 0.0))) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
132132end
133133do
134134local null = "\u{28}\u{6e}\u{75}\u{6c}\u{6c}\u{29}"
@@ -142,10 +142,10 @@ assert((string.format("\u{25}\u{70}",io.stdin) ~= null))
142142assert((string.format("\u{25}\u{70}",io.stdin) == string.format("\u{25}\u{70}",io.stdin)))
143143assert((string.format("\u{25}\u{70}",print) == string.format("\u{25}\u{70}",print)))
144144assert((string.format("\u{25}\u{70}",print) ~= string.format("\u{25}\u{70}",assert)))
145−assert(# (string.format("\u{25}\u{39}\u{30}\u{70}",{}) == 0x5a))
146−assert(# (string.format("\u{25}\u{2d}\u{36}\u{30}\u{70}",{}) == 0x3c))
147−assert((string.format("\u{25}\u{31}\u{30}\u{70}",false) == (string.rep("\u{20}",(0xa - # null)) .. null)))
148−assert((string.format("\u{25}\u{2d}\u{31}\u{32}\u{70}",1.5) == (null .. string.rep("\u{20}",(0xc - # null)))))
145+assert((# (string.format("\u{25}\u{39}\u{30}\u{70}",{}) == 0x5a)))
146+assert((# (string.format("\u{25}\u{2d}\u{36}\u{30}\u{70}",{}) == 0x3c)))
147+assert((string.format("\u{25}\u{31}\u{30}\u{70}",false) == (string.rep("\u{20}",(0xa - (# null))) .. null)))
148+assert((string.format("\u{25}\u{2d}\u{31}\u{32}\u{70}",1.5) == (null .. string.rep("\u{20}",(0xc - (# null))))))
149149do
150150local t1 = {}
151151;
@@ -195,7 +195,7 @@ checkQ(true)
195195checkQ(nil)
196196checkQ(false)
197197checkQ(math.huge)
198−checkQ(- math.huge)
198+checkQ((- math.huge))
199199assert((string.format("\u{25}\u{71}",(0x0 / 0x0)) == "\u{28}\u{30}\u{2f}\u{30}\u{29}"))
200200checkerror("\u{6e}\u{6f}\u{20}\u{6c}\u{69}\u{74}\u{65}\u{72}\u{61}\u{6c}",string.format,"\u{25}\u{71}",{})
201201end
@@ -218,12 +218,12 @@ assert((string.format("\u{25}\u{78}",0.0) == "\u{30}"))
218218assert((string.format("\u{25}\u{30}\u{32}\u{78}",0.0) == "\u{30}\u{30}"))
219219assert((string.format("\u{25}\u{30}\u{38}\u{58}",0xffffffff) == "\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}"))
220220assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",0x7b0d) == "\u{2b}\u{30}\u{30}\u{33}\u{31}\u{35}\u{30}\u{31}"))
221−assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",- 0x78cf) == "\u{2d}\u{30}\u{30}\u{33}\u{30}\u{39}\u{32}\u{37}"))
221+assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",(- 0x78cf)) == "\u{2d}\u{30}\u{30}\u{33}\u{30}\u{39}\u{32}\u{37}"))
222222do
223223local i = 0x1
224224local j = 0x2710
225225while ((i + 0x1) < j) do
226−local m = (((i + j)) // 0x2)
226+local m = ((i + j) // 0x2)
227227if ((0xa ^ m) < math.huge) then
228228i=m
229229else
@@ -231,34 +231,34 @@ j=m
231231end
232232end
233233assert((((0xa ^ i) < math.huge) and ((0xa ^ j) == math.huge)))
234−local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",- ((0xa ^ i)))
234+local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",(- (0xa ^ i)))
235235assert((string.len(s) >= (i + 0x65)))
236−assert((tonumber(s) == - ((0xa ^ i))))
236+assert((tonumber(s) == (- (0xa ^ i))))
237237assert(((0xa ^ 0x26) < math.huge))
238−local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",- ((0xa ^ 0x26)))
238+local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",(- (0xa ^ 0x26)))
239239assert((string.len(s) >= (0x26 + 0x65)))
240−assert((tonumber(s) == - ((0xa ^ 0x26))))
240+assert((tonumber(s) == (- (0xa ^ 0x26))))
241241end
242242do
243−local max,min = 0x7fffffff,- 0x80000000
244−assert((string.sub(string.format("\u{25}\u{38}\u{78}",- 0x1),- 0x8) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
243+local max,min = 0x7fffffff,(- 0x80000000)
244+assert((string.sub(string.format("\u{25}\u{38}\u{78}",(- 0x1)),(- 0x8)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
245245assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
246−assert((string.sub(string.format("\u{25}\u{78}",min),- 0x8) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
246+assert((string.sub(string.format("\u{25}\u{78}",min),(- 0x8)) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
247247assert((string.format("\u{25}\u{64}",max) == "\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
248248assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{38}"))
249249assert((string.format("\u{25}\u{75}",0xffffffff) == "\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{35}"))
250250assert((string.format("\u{25}\u{6f}",0xabcd) == "\u{31}\u{32}\u{35}\u{37}\u{31}\u{35}"))
251−max,min=0x7fffffffffffffff,- 0x8000000000000000
251+max,min=0x7fffffffffffffff,(- 0x8000000000000000)
252252if (max > (2.0 ^ 0x35)) then
253−assert((string.format("\u{25}\u{78}",((((0x2 ^ 0x34) | 0x0)) - 0x1)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
253+assert((string.format("\u{25}\u{78}",(((0x2 ^ 0x34) | 0x0) - 0x1)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
254254assert((string.format("\u{30}\u{78}\u{25}\u{38}\u{58}",0x8f000003) == "\u{30}\u{78}\u{38}\u{46}\u{30}\u{30}\u{30}\u{30}\u{30}\u{33}"))
255255assert((string.format("\u{25}\u{64}",(0x2 ^ 0x35)) == "\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
256−assert((string.format("\u{25}\u{69}",- (0x2 ^ 0x35)) == "\u{2d}\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
256+assert((string.format("\u{25}\u{69}",(- (0x2 ^ 0x35))) == "\u{2d}\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
257257assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
258258assert((string.format("\u{25}\u{78}",min) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
259259assert((string.format("\u{25}\u{64}",max) == "\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{37}"))
260260assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{38}"))
261−assert((string.format("\u{25}\u{75}",~ (- (0x1 << 0x40))) == "\u{31}\u{38}\u{34}\u{34}\u{36}\u{37}\u{34}\u{34}\u{30}\u{37}\u{33}\u{37}\u{30}\u{39}\u{35}\u{35}\u{31}\u{36}\u{31}\u{35}"))
261+assert((string.format("\u{25}\u{75}",(~ (- (0x1 << 0x40)))) == "\u{31}\u{38}\u{34}\u{34}\u{36}\u{37}\u{34}\u{34}\u{30}\u{37}\u{33}\u{37}\u{30}\u{39}\u{35}\u{35}\u{31}\u{36}\u{31}\u{35}"))
262262assert((tostring(0x11f71fb04cb) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}"))
263263end
264264end
@@ -273,30 +273,30 @@ s=string.format("\u{25}\u{41}",n)
273273assert(string.find(s,"\u{5e}\u{25}\u{2d}\u{3f}\u{30}\u{58}\u{5b}\u{31}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{25}\u{2e}\u{3f}\u{5b}\u{30}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{2a}\u{50}\u{5b}\u{2d}\u{2b}\u{5d}\u{3f}\u{25}\u{64}\u{2b}\u{24}"))
274274assert((tonumber(s) == n))
275275end
276−for _,n in ipairs({0.1,- 0.1,(0x1 / 0x3),- (0x1 / 0x3),1e30,- 1e30,- (0x2d / 0xf7),0x1,- 0x1,0x2,- 0x2,3e-20,- 3e-20})
276+for _,n in ipairs({0.1,(- 0.1),(0x1 / 0x3),(- (0x1 / 0x3)),1e30,(- 1e30),(- (0x2d / 0xf7)),0x1,(- 0x1),0x2,(- 0x2),3e-20,(- 3e-20)})
277277do
278278matchhexa(n)
279279end
280280assert(string.find(string.format("\u{25}\u{41}",0.0),"\u{5e}\u{30}\u{58}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{50}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
281−assert(string.find(string.format("\u{25}\u{61}",- 0.0),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{70}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
282−if not _port then
281+assert(string.find(string.format("\u{25}\u{61}",(- 0.0)),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{70}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
282+if (not _port) then
283283assert(string.find(string.format("\u{25}\u{61}",(0x1 / 0x0)),"\u{5e}\u{69}\u{6e}\u{66}"))
284−assert(string.find(string.format("\u{25}\u{41}",- (0x1 / 0x0)),"\u{5e}\u{25}\u{2d}\u{49}\u{4e}\u{46}"))
284+assert(string.find(string.format("\u{25}\u{41}",(- (0x1 / 0x0))),"\u{5e}\u{25}\u{2d}\u{49}\u{4e}\u{46}"))
285285assert(string.find(string.format("\u{25}\u{61}",(0x0 / 0x0)),"\u{5e}\u{25}\u{2d}\u{3f}\u{6e}\u{61}\u{6e}"))
286−assert(string.find(string.format("\u{25}\u{61}",- 0.0),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}"))
286+assert(string.find(string.format("\u{25}\u{61}",(- 0.0)),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}"))
287287end
288−if not pcall(string.format,"\u{25}\u{2e}\u{33}\u{61}",0x0) then
289−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{6d}\u{6f}\u{64}\u{69}\u{66}\u{69}\u{65}\u{72}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{20}\u{27}\u{25}\u{61}\u{27}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{76}\u{61}\u{69}\u{6c}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
288+if (not pcall(string.format,"\u{25}\u{2e}\u{33}\u{61}",0x0)) then
289+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{6d}\u{6f}\u{64}\u{69}\u{66}\u{69}\u{65}\u{72}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{20}\u{27}\u{25}\u{61}\u{27}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{76}\u{61}\u{69}\u{6c}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
290290else
291291assert(string.find(string.format("\u{25}\u{2b}\u{2e}\u{32}\u{41}",0xc),"\u{5e}\u{25}\u{2b}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
292−assert(string.find(string.format("\u{25}\u{2e}\u{34}\u{41}",- 0xc),"\u{5e}\u{25}\u{2d}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{30}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
292+assert(string.find(string.format("\u{25}\u{2e}\u{34}\u{41}",(- 0xc)),"\u{5e}\u{25}\u{2d}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{30}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
293293end
294294end
295295assert((string.format("\u{25}\u{23}\u{31}\u{32}\u{6f}",0xa) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{31}\u{32}"))
296296assert((string.format("\u{25}\u{23}\u{31}\u{30}\u{78}",0x64) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{78}\u{36}\u{34}"))
297297assert((string.format("\u{25}\u{23}\u{2d}\u{31}\u{37}\u{58}",0x64) == "\u{30}\u{58}\u{36}\u{34}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
298−assert((string.format("\u{25}\u{30}\u{31}\u{33}\u{69}",- 0x64) == "\u{2d}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}"))
299−assert((string.format("\u{25}\u{32}\u{2e}\u{35}\u{64}",- 0x64) == "\u{2d}\u{30}\u{30}\u{31}\u{30}\u{30}"))
298+assert((string.format("\u{25}\u{30}\u{31}\u{33}\u{69}",(- 0x64)) == "\u{2d}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}"))
299+assert((string.format("\u{25}\u{32}\u{2e}\u{35}\u{64}",(- 0x64)) == "\u{2d}\u{30}\u{30}\u{31}\u{30}\u{30}"))
300300assert((string.format("\u{25}\u{2e}\u{75}",0x0) == ""))
301301assert((string.format("\u{25}\u{2b}\u{23}\u{30}\u{31}\u{34}\u{2e}\u{30}\u{66}",0x64) == "\u{2b}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}\u{2e}"))
302302assert((string.format("\u{25}\u{2d}\u{31}\u{36}\u{63}",0x61) == "\u{61}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
@@ -348,7 +348,7 @@ assert((table.concat({},"\u{78}",(mini + 0x1),mini) == ""))
348348assert((table.concat({},"\u{78}",maxi,mini) == ""))
349349assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}"},"\u{78}",maxi,maxi) == "\u{61}\u{6c}\u{6f}"))
350350assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}",[(maxi - 0x1)] = "\u{79}"},"\u{2d}",(maxi - 0x1),maxi) == "\u{79}\u{2d}\u{61}\u{6c}\u{6f}"))
351−assert(not pcall(table.concat,{"\u{61}","\u{62}",{}}))
351+assert((not pcall(table.concat,{"\u{61}","\u{62}",{}})))
352352a={"\u{61}","\u{62}","\u{63}"}
353353assert((table.concat(a,"\u{2c}",0x1,0x0) == ""))
354354assert((table.concat(a,"\u{2c}",0x1,0x1) == "\u{61}"))
@@ -356,11 +356,11 @@ assert((table.concat(a,"\u{2c}",0x1,0x2) == "\u{61}\u{2c}\u{62}"))
356356assert((table.concat(a,"\u{2c}",0x2) == "\u{62}\u{2c}\u{63}"))
357357assert((table.concat(a,"\u{2c}",0x3) == "\u{63}"))
358358assert((table.concat(a,"\u{2c}",0x4) == ""))
359−if not _port then
359+if (not _port) then
360360local locales = {"\u{70}\u{74}\u{62}","\u{70}\u{74}\u{5f}\u{42}\u{52}\u{2e}\u{69}\u{73}\u{6f}\u{38}\u{38}\u{35}\u{39}\u{31}","\u{49}\u{53}\u{4f}\u{2d}\u{38}\u{38}\u{35}\u{39}\u{2d}\u{31}"}
361361local function trylocale
362362(w)
363−for i = 0x1, # locales
363+for i = 0x1, (# locales)
364364do
365365if os.setlocale(locales[i],w) then
366366print(string.format("\u{27}\u{25}\u{73}\u{27}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{65}\u{20}\u{73}\u{65}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{25}\u{73}\u{27}",w,locales[i]))
@@ -390,14 +390,14 @@ local co = coroutine.wrap(f)
390390assert((co() == "\u{32}"))
391391end
392392if (T == nil) then
393−((Message or print))("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
393+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
394394else
395395print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}")
396396local blen = 0xc8
397397local function callpfs
398398(op,fmt,n)
399399local x = {T.testC(("\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" .. (op .. "\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")),fmt,n)}
400−assert(# (x == 0x4))
400+assert((# (x == 0x4)))
401401return x[0x4]
402402end
403403local function testpfs
@@ -410,13 +410,13 @@ testpfs("\u{49}",string.rep("\u{61}",blen),0x0)
410410testpfs("\u{49}",string.rep("\u{61}",(blen + 0x1)),0x0)
411411local str = (string.rep("\u{61}\u{62}",blen) .. ("\u{25}\u{64}" .. string.rep("\u{64}",(blen / 0x2))))
412412testpfs("\u{49}",str,(0x2 ^ 0xe))
413−testpfs("\u{49}",str,- (0x2 ^ 0xf))
413+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
414414str=("\u{25}\u{64}" .. string.rep("\u{63}\u{64}",blen))
415415testpfs("\u{49}",str,(0x2 ^ 0xe))
416−testpfs("\u{49}",str,- (0x2 ^ 0xf))
416+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
417417str=(string.rep("\u{63}",(blen - 0x2)) .. "\u{25}\u{64}")
418418testpfs("\u{49}",str,(0x2 ^ 0xe))
419−testpfs("\u{49}",str,- (0x2 ^ 0xf))
419+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
420420for l = 0xc, 0xe
421421do
422422local str1 = string.rep("\u{61}",l)
desk/res/lua/cycled/tpack.lua+36−36
@@ -11,33 +11,33 @@ local sizeLI = packsize("\u{6a}")
1111local sizefloat = packsize("\u{66}")
1212local sizedouble = packsize("\u{64}")
1313local sizenumber = packsize("\u{6e}")
14−local little = ((pack("\u{69}\u{32}",0x1) == "\u{1}\u{0}"))
14+local little = (pack("\u{69}\u{32}",0x1) == "\u{1}\u{0}")
1515local align = packsize("\u{21}\u{78}\u{58}\u{69}\u{31}\u{36}")
1616assert(((((0x1 <= sizeshort) and (sizeshort <= sizeint)) and (sizeint <= sizelong)) and (sizefloat <= sizedouble)))
1717print("\u{70}\u{6c}\u{61}\u{74}\u{66}\u{6f}\u{72}\u{6d}\u{3a}")
1818print(string.format("\u{9}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{69}\u{6e}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{5f}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{64}\u{6f}\u{75}\u{62}\u{6c}\u{65}\u{20}\u{25}\u{64}\u{2c}\u{a}\u{9}\u{6c}\u{75}\u{61}\u{20}\u{49}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{6c}\u{75}\u{61}\u{20}\u{4e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{25}\u{64}",sizeshort,sizeint,sizelong,sizesize_t,sizefloat,sizedouble,sizeLI,sizenumber))
19−print(("\u{9}" .. ((((little and "\u{6c}\u{69}\u{74}\u{74}\u{6c}\u{65}") or "\u{62}\u{69}\u{67}")) .. "\u{20}\u{65}\u{6e}\u{64}\u{69}\u{61}\u{6e}")))
19+print(("\u{9}" .. (((little and "\u{6c}\u{69}\u{74}\u{74}\u{6c}\u{65}") or "\u{62}\u{69}\u{67}") .. "\u{20}\u{65}\u{6e}\u{64}\u{69}\u{61}\u{6e}")))
2020print(("\u{9}\u{61}\u{6c}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}\u{3a}\u{20}" .. align))
2121local function checkerror
2222(msg,f, ...)
2323local status,err = pcall(f,...)
24−assert(not (status and string.find(err,msg)))
24+assert((not (status and string.find(err,msg))))
2525end
2626assert((unpack("\u{42}",pack("\u{42}",0xff)) == 0xff))
2727assert((unpack("\u{62}",pack("\u{62}",0x7f)) == 0x7f))
28−assert((unpack("\u{62}",pack("\u{62}",- 0x80)) == - 0x80))
28+assert((unpack("\u{62}",pack("\u{62}",(- 0x80))) == (- 0x80)))
2929assert((unpack("\u{48}",pack("\u{48}",0xffff)) == 0xffff))
3030assert((unpack("\u{68}",pack("\u{68}",0x7fff)) == 0x7fff))
31−assert((unpack("\u{68}",pack("\u{68}",- 0x8000)) == - 0x8000))
31+assert((unpack("\u{68}",pack("\u{68}",(- 0x8000))) == (- 0x8000)))
3232assert((unpack("\u{4c}",pack("\u{4c}",0xffffffff)) == 0xffffffff))
3333assert((unpack("\u{6c}",pack("\u{6c}",0x7fffffff)) == 0x7fffffff))
34−assert((unpack("\u{6c}",pack("\u{6c}",- 0x80000000)) == - 0x80000000))
34+assert((unpack("\u{6c}",pack("\u{6c}",(- 0x80000000))) == (- 0x80000000)))
3535for i = 0x1, NB
3636do
3737local s = string.rep("\u{ff}",i)
38−assert((pack(("\u{69}" .. i),- 0x1) == s))
39−assert((packsize(("\u{69}" .. i)) == # s))
40−assert((unpack(("\u{69}" .. i),s) == - 0x1))
38+assert((pack(("\u{69}" .. i),(- 0x1)) == s))
39+assert((packsize(("\u{69}" .. i)) == (# s)))
40+assert((unpack(("\u{69}" .. i),s) == (- 0x1)))
4141s=("\u{aa}" .. string.rep("\u{0}",(i - 0x1)))
4242assert((pack(("\u{3c}\u{49}" .. i),0xaa) == s))
4343assert((unpack(("\u{3c}\u{49}" .. i),s) == 0xaa))
@@ -52,11 +52,11 @@ assert((unpack(("\u{3c}\u{69}" .. (sizeLI + 0x1)),(s .. "\u{0}")) == lnum))
5252assert((unpack(("\u{3c}\u{69}" .. (sizeLI + 0x1)),(s .. "\u{0}")) == lnum))
5353for i = (sizeLI + 0x1), NB
5454do
55−local s = pack("\u{3c}\u{6a}",- lnum)
56−assert((unpack("\u{3c}\u{6a}",s) == - lnum))
57−assert((unpack(("\u{3c}\u{69}" .. i),(s .. ("\u{ff}"):rep((i - sizeLI)))) == - lnum))
58−assert((unpack(("\u{3e}\u{69}" .. i),(("\u{ff}"):rep((i - sizeLI)) .. s:reverse())) == - lnum))
59−assert((unpack(("\u{3c}\u{49}" .. i),(s .. ("\u{0}"):rep((i - sizeLI)))) == - lnum))
55+local s = pack("\u{3c}\u{6a}",(- lnum))
56+assert((unpack("\u{3c}\u{6a}",s) == (- lnum)))
57+assert((unpack(("\u{3c}\u{69}" .. i),(s .. ("\u{ff}"):rep((i - sizeLI)))) == (- lnum)))
58+assert((unpack(("\u{3e}\u{69}" .. i),(("\u{ff}"):rep((i - sizeLI)) .. s:reverse())) == (- lnum)))
59+assert((unpack(("\u{3c}\u{49}" .. i),(s .. ("\u{0}"):rep((i - sizeLI)))) == (- lnum)))
6060checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3c}\u{49}" .. i),(("\u{0}"):rep((i - 0x1)) .. "\u{1}"))
6161checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3e}\u{69}" .. i),("\u{1}" .. ("\u{0}"):rep((i - 0x1))))
6262end
@@ -65,7 +65,7 @@ for i = 0x1, sizeLI
6565do
6666local lstr = "\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\u{9}\u{a}\u{b}\u{c}\u{d}"
6767local lnum = 0x807060504030201
68−local n = (lnum & (~ (- (0x1 << ((i * 0x8))))))
68+local n = (lnum & (~ (- (0x1 << (i * 0x8)))))
6969local s = string.sub(lstr,0x1,i)
7070assert((pack(("\u{3c}\u{69}" .. i),n) == s))
7171assert((pack(("\u{3e}\u{69}" .. i),n) == s:reverse()))
@@ -75,7 +75,7 @@ do
7575local u = 0xf0
7676for i = 0x1, (sizeLI - 0x1)
7777do
78−assert((unpack(("\u{3c}\u{69}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == - 0x10))
78+assert((unpack(("\u{3c}\u{69}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == (- 0x10)))
7979assert((unpack(("\u{3e}\u{49}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == u))
8080u=((u * 0x100) + 0xff)
8181end
@@ -107,10 +107,10 @@ assert((packsize(s) == 0x7fffffff))
107107end
108108for i = 0x1, (sizeLI - 0x1)
109109do
110−local umax = (((0x1 << ((i * 0x8)))) - 0x1)
110+local umax = ((0x1 << (i * 0x8)) - 0x1)
111111local max = (umax >> 0x1)
112−local min = ~ max
113−checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),- 0x1)
112+local min = (~ max)
113+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),(- 0x1))
114114checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),min)
115115checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{49}" .. i),(umax + 0x1))
116116checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{69}" .. i),umax)
@@ -122,14 +122,14 @@ assert((unpack(("\u{3e}\u{49}" .. i),pack(("\u{3e}\u{49}" .. i),umax)) == umax))
122122end
123123assert((unpack("\u{3e}\u{6a}",pack("\u{3e}\u{6a}",math.maxinteger)) == math.maxinteger))
124124assert((unpack("\u{3c}\u{6a}",pack("\u{3c}\u{6a}",math.mininteger)) == math.mininteger))
125−assert((unpack("\u{3c}\u{4a}",pack("\u{3c}\u{6a}",- 0x1)) == - 0x1))
125+assert((unpack("\u{3c}\u{4a}",pack("\u{3c}\u{6a}",(- 0x1))) == (- 0x1)))
126126if little then
127127assert((pack("\u{66}",0x18) == pack("\u{3c}\u{66}",0x18)))
128128else
129129assert((pack("\u{66}",0x18) == pack("\u{3e}\u{66}",0x18)))
130130end
131131print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{2f}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{2d}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{73}")
132−for _,n in ipairs({0x0,- 1.1,1.9,(0x1 / 0x0),- (0x1 / 0x0),1e20,- 1e20,0.1,2000.7})
132+for _,n in ipairs({0x0,(- 1.1),1.9,(0x1 / 0x0),(- (0x1 / 0x0)),1e20,(- 1e20),0.1,2000.7})
133133do
134134assert((unpack("\u{6e}",pack("\u{6e}",n)) == n))
135135assert((unpack("\u{3c}\u{6e}",pack("\u{3c}\u{6e}",n)) == n))
@@ -137,7 +137,7 @@ assert((unpack("\u{3e}\u{6e}",pack("\u{3e}\u{6e}",n)) == n))
137137assert((pack("\u{3c}\u{66}",n) == pack("\u{3e}\u{66}",n):reverse()))
138138assert((pack("\u{3e}\u{64}",n) == pack("\u{3c}\u{64}",n):reverse()))
139139end
140−for _,n in ipairs({0x0,- 1.5,(0x1 / 0x0),- (0x1 / 0x0),1e10,- 1e9,0.5,2000.25})
140+for _,n in ipairs({0x0,(- 1.5),(0x1 / 0x0),(- (0x1 / 0x0)),1e10,(- 1e9),0.5,2000.25})
141141do
142142assert((unpack("\u{3c}\u{66}",pack("\u{3c}\u{66}",n)) == n))
143143assert((unpack("\u{3e}\u{66}",pack("\u{3e}\u{66}",n)) == n))
@@ -159,12 +159,12 @@ checkerror("\u{75}\u{6e}\u{66}\u{69}\u{6e}\u{69}\u{73}\u{68}\u{65}\u{64}\u{20}\u
159159for i = 0x2, NB
160160do
161161local s1 = pack(("\u{73}" .. i),s)
162−assert(((unpack(("\u{73}" .. i),s1) == s) and # (s1 == # (s + i))))
162+assert(((unpack(("\u{73}" .. i),s1) == s) and (# (s1 == (# (s + i))))))
163163end
164164end
165165do
166166local x = pack("\u{73}","\u{61}\u{6c}\u{6f}")
167−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{73}",x:sub(0x1,- 0x2))
167+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{73}",x:sub(0x1,(- 0x2)))
168168checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{63}\u{35}","\u{61}\u{62}\u{63}\u{64}")
169169checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}",pack,"\u{73}\u{31}\u{30}\u{30}","\u{61}\u{6c}\u{6f}")
170170end
@@ -186,27 +186,27 @@ checkerror("\u{6c}\u{6f}\u{6e}\u{67}\u{65}\u{72}\u{20}\u{74}\u{68}\u{61}\u{6e}",
186186end
187187do
188188local x = pack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8)
189−assert(# (x == packsize("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}")))
189+assert((# (x == packsize("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}"))))
190190local a,b,c,d,e,f,g,h = unpack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",x)
191191assert(((((((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == 0x4)) and (e == 0x5)) and (f == 0x6)) and (g == 0x7)) and (h == 0x8)))
192192end
193193print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}")
194194do
195195assert((pack("\u{20}\u{3c}\u{20}\u{69}\u{31}\u{20}\u{69}\u{32}\u{20}",0x2,0x3) == "\u{2}\u{3}\u{0}"))
196−local x = pack("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}",- 0xc,0x64,0xc8,"\u{ec}")
197−assert(# (x == packsize("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}")))
196+local x = pack("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}",(- 0xc),0x64,0xc8,"\u{ec}")
197+assert((# (x == packsize("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}"))))
198198assert((x == ("\u{f4}" .. ("\u{0}\u{0}\u{0}" .. ("\u{0}\u{0}\u{0}\u{64}" .. ("\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{c8}" .. ("\u{ec}" .. "\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}")))))))
199199local a,b,c,d,pos = unpack("\u{3e}\u{21}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{62}\u{20}\u{58}\u{69}\u{38}\u{20}\u{58}\u{49}\u{20}\u{58}\u{48}",x)
200−assert(((((a == "\u{f4}") and (b == 0x64)) and (c == 0xc8)) and (d == - (0x14 and (((pos - 0x1)) == # x)))))
200+assert(((((a == "\u{f4}") and (b == 0x64)) and (c == 0xc8)) and (d == (- (0x14 and ((pos - 0x1) == (# x)))))))
201201x=pack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{69}\u{34}","\u{61}\u{62}\u{63}","\u{61}\u{62}\u{63}\u{64}","\u{78}\u{7a}","\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x5,"\u{77}\u{6f}\u{72}\u{6c}\u{64}","\u{78}\u{79}")
202202assert((x == "\u{61}\u{62}\u{63}\u{61}\u{62}\u{63}\u{64}\u{78}\u{7a}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{0}\u{0}\u{0}\u{0}\u{0}\u{5}\u{77}\u{6f}\u{72}\u{6c}\u{64}\u{78}\u{79}\u{0}"))
203203local a,b,c,d,e,f,g,pos = unpack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{68}\u{20}\u{58}\u{69}\u{34}",x)
204−assert(((((((((a == "\u{61}\u{62}\u{63}") and (b == "\u{61}\u{62}\u{63}\u{64}")) and (c == "\u{78}\u{7a}")) and (d == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}")) and (e == 0x5)) and (f == "\u{77}\u{6f}\u{72}\u{6c}\u{64}")) and (g == "\u{78}\u{79}")) and ((((pos - 0x1)) % 0x4) == 0x0)))
204+assert(((((((((a == "\u{61}\u{62}\u{63}") and (b == "\u{61}\u{62}\u{63}\u{64}")) and (c == "\u{78}\u{7a}")) and (d == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}")) and (e == 0x5)) and (f == "\u{77}\u{6f}\u{72}\u{6c}\u{64}")) and (g == "\u{78}\u{79}")) and (((pos - 0x1) % 0x4) == 0x0)))
205205x=pack("\u{20}\u{62}\u{20}\u{62}\u{20}\u{58}\u{64}\u{20}\u{62}\u{20}\u{58}\u{62}\u{20}\u{78}",0x1,0x2,0x3)
206206assert((packsize("\u{20}\u{62}\u{20}\u{62}\u{20}\u{58}\u{64}\u{20}\u{62}\u{20}\u{58}\u{62}\u{20}\u{78}") == 0x4))
207207assert((x == "\u{1}\u{2}\u{3}\u{0}"))
208208a,b,c,pos=unpack("\u{62}\u{62}\u{58}\u{64}\u{62}",x)
209−assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (pos == # x)))
209+assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (pos == (# x))))
210210assert((packsize("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}") == 0x8))
211211local pos = unpack("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
212212;
@@ -242,18 +242,18 @@ end
242242for pos = 0x0, 0xc
243243do
244244local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(pos + 0x1))
245−assert(((i == ((((pos + 0x3)) // 0x4) + 0x1)) and (p == ((i * 0x4) + 0x1))))
245+assert(((i == (((pos + 0x3) // 0x4) + 0x1)) and (p == ((i * 0x4) + 0x1))))
246246end
247−local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,- 0x4)
247+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- 0x4))
248248assert(((i == 0x4) and (p == 0x11)))
249−local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,- 0x7)
249+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- 0x7))
250250assert(((i == 0x4) and (p == 0x11)))
251−local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,- # x)
251+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- (# x)))
252252assert(((i == 0x1) and (p == 0x5)))
253−for i = 0x1, # (x + 0x1)
253+for i = 0x1, (# (x + 0x1))
254254do
255255assert((unpack("\u{63}\u{30}",x,i) == ""))
256256end
257−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",unpack,"\u{63}\u{30}",x,# (x + 0x2))
257+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",unpack,"\u{63}\u{30}",x,(# (x + 0x2)))
258258end
259259print("\u{4f}\u{4b}")
desk/res/lua/cycled/tracegc.lua+1−1
@@ -10,7 +10,7 @@ setmetatable(o,mt)
1010end
1111end
1212function M.start()
13−if not active then
13+if (not active) then
1414active=true
1515setmetatable({},mt)
1616end
desk/res/lua/cycled/utf8.lua+40−40
@@ -3,36 +3,36 @@ local utf8 = require("\u{75}\u{74}\u{66}\u{38}")
33local function checkerror
44(msg,f, ...)
55local s,err = pcall(f,...)
6−assert(not (s and string.find(err,msg)))
6+assert((not (s and string.find(err,msg))))
77end
88local function len
99(s)
10−return # string.gsub(s,"\u{5b}\u{80}\u{2d}\u{bf}\u{5d}","")
10+return (# string.gsub(s,"\u{5b}\u{80}\u{2d}\u{bf}\u{5d}",""))
1111end
1212local justone = ("\u{5e}" .. (utf8.charpattern .. "\u{24}"))
1313local function checksyntax
1414(s,t)
1515local ts = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}"}
16−for i = 0x1, # t
16+for i = 0x1, (# t)
1717do
1818ts[(i + 0x1)]=string.format("\u{5c}\u{75}\u{7b}\u{25}\u{78}\u{7d}",t[i])
1919end
20−ts[# (t + 0x2)]="\u{27}"
20+ts[(# (t + 0x2))]="\u{27}"
2121ts=table.concat(ts)
2222assert((assert(load(ts))() == s))
2323end
24−assert(not utf8.offset("\u{61}\u{6c}\u{6f}",0x5))
25−assert(not utf8.offset("\u{61}\u{6c}\u{6f}",- 0x4))
24+assert((not utf8.offset("\u{61}\u{6c}\u{6f}",0x5)))
25+assert((not utf8.offset("\u{61}\u{6c}\u{6f}",(- 0x4))))
2626local function check
2727(s,t,nonstrict)
28−local l = utf8.len(s,0x1,- 0x1,nonstrict)
29−assert(# ((t == l) and (len(s) == l)))
28+local l = utf8.len(s,0x1,(- 0x1),nonstrict)
29+assert((# ((t == l) and (len(s) == l))))
3030assert((utf8.char(table.unpack(t)) == s))
3131assert((utf8.offset(s,0x0) == 0x1))
3232checksyntax(s,t)
33−local t1 = {utf8.codepoint(s,0x1,- 0x1,nonstrict)}
34−assert(# (t == # t1))
35−for i = 0x1, # t
33+local t1 = {utf8.codepoint(s,0x1,(- 0x1),nonstrict)}
34+assert((# (t == (# t1))))
35+for i = 0x1, (# t)
3636do
3737assert((t[i] == t1[i]))
3838end
@@ -41,21 +41,21 @@ do
4141local pi = utf8.offset(s,i)
4242local pi1 = utf8.offset(s,0x2,pi)
4343assert(string.find(string.sub(s,pi,(pi1 - 0x1)),justone))
44−assert((utf8.offset(s,- 0x1,pi1) == pi))
44+assert((utf8.offset(s,(- 0x1),pi1) == pi))
4545assert((utf8.offset(s,((i - l) - 0x1)) == pi))
46−assert(((pi1 - pi) == # utf8.char(utf8.codepoint(s,pi,pi,nonstrict))))
46+assert(((pi1 - pi) == (# utf8.char(utf8.codepoint(s,pi,pi,nonstrict)))))
4747for j = pi, (pi1 - 0x1)
4848do
4949assert((utf8.offset(s,0x0,j) == pi))
5050end
5151for j = (pi + 0x1), (pi1 - 0x1)
5252do
53−assert(not utf8.len(s,j))
53+assert((not utf8.len(s,j)))
5454end
5555assert((utf8.len(s,pi,pi,nonstrict) == 0x1))
5656assert((utf8.len(s,pi,(pi1 - 0x1),nonstrict) == 0x1))
57−assert((utf8.len(s,pi,- 0x1,nonstrict) == ((l - i) + 0x1)))
58−assert((utf8.len(s,pi1,- 0x1,nonstrict) == (l - i)))
57+assert((utf8.len(s,pi,(- 0x1),nonstrict) == ((l - i) + 0x1)))
58+assert((utf8.len(s,pi1,(- 0x1),nonstrict) == (l - i)))
5959assert((utf8.len(s,0x1,pi,nonstrict) == i))
6060end
6161local i = 0x0
@@ -65,32 +65,32 @@ i=(i + 0x1)
6565assert(((c == t[i]) and (p == utf8.offset(s,i))))
6666assert((utf8.codepoint(s,p,p,nonstrict) == c))
6767end
68−assert((i == # t))
68+assert((i == (# t)))
6969i=0x0
7070for c in string.gmatch(s,utf8.charpattern)
7171do
7272i=(i + 0x1)
7373assert((c == utf8.char(t[i])))
7474end
75−assert((i == # t))
75+assert((i == (# t)))
7676for i = 0x1, l
7777do
78−assert((utf8.offset(s,i) == utf8.offset(s,((i - l) - 0x1),# (s + 0x1))))
78+assert((utf8.offset(s,i) == utf8.offset(s,((i - l) - 0x1),(# (s + 0x1)))))
7979end
8080end
8181do
8282local function check
8383(s,p)
8484local a,b = utf8.len(s)
85−assert(not (a and (b == p)))
85+assert((not (a and (b == p))))
8686end
8787check("\u{61}\u{62}\u{63}\u{e3}\u{64}\u{65}\u{66}",0x4)
8888check("\u{f4}\u{9f}\u{bf}",0x1)
8989check("\u{f4}\u{9f}\u{bf}\u{bf}",0x1)
90−check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{80}",# (("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}") + 0x1))
90+check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{80}",(# ("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}" + 0x1)))
9191check("\u{80}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
9292check("\u{68}\u{65}\u{6c}\u{80}\u{6c}\u{6f}",0x4)
93−check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{bf}",# (("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}") + 0x1))
93+check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{bf}",(# ("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}" + 0x1)))
9494check("\u{bf}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
9595check("\u{68}\u{65}\u{6c}\u{bf}\u{6c}\u{6f}",0x4)
9696end
@@ -111,20 +111,20 @@ errorcodes("\u{bf}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}")
111111errorcodes("\u{ce}\u{b1}\u{ce}\u{bb}\u{cf}\u{86}\u{bf}\u{ce}\u{b1}")
112112local f = utf8.codes("")
113113assert((f("",0x2) == nil))
114−assert((f("",- 0x1) == nil))
114+assert((f("",(- 0x1)) == nil))
115115assert((f("",math.mininteger) == nil))
116116end
117117checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,0x5)
118−checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,- 0x4)
118+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,(- 0x4))
119119checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,0x2)
120−checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,- 0x1)
120+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,(- 0x1))
121121checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
122122checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
123123checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{80}",0x1)
124124checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x0,0x2)
125125checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x1,0x4)
126126local s = "\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{57}\u{6f}\u{72}\u{6c}\u{64}"
127−local t = {string.byte(s,0x1,- 0x1)}
127+local t = {string.byte(s,0x1,(- 0x1))}
128128for i = 0x1, utf8.len(s)
129129do
130130assert((t[i] == string.byte(s,i)))
@@ -133,14 +133,14 @@ check(s,t)
133133check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{2f}\u{e6}\u{bc}\u{a2}\u{e5}\u{ad}\u{97}",{0x6c49,0x5b57,0x2f,0x6f22,0x5b57})
134134do
135135local s = "\u{c3}\u{a1}\u{c3}\u{a9}\u{c3}\u{ad}\u{80}"
136−local t = {utf8.codepoint(s,0x1,# (s - 0x1))}
137−assert(# ((((t == 0x3) and (t[0x1] == 0xe1)) and (t[0x2] == 0xe9)) and (t[0x3] == 0xed)))
138−checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s,0x1,# s)
139−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,# (s + 0x1))
136+local t = {utf8.codepoint(s,0x1,(# (s - 0x1)))}
137+assert((# ((((t == 0x3) and (t[0x1] == 0xe1)) and (t[0x2] == 0xe9)) and (t[0x3] == 0xed))))
138+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s,0x1,(# s))
139+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,(# (s + 0x1)))
140140t={utf8.codepoint(s,0x4,0x3)}
141−assert(# (t == 0x0))
142−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,- (# (s + 0x1)),0x1)
143−checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,0x1,# (s + 0x1))
141+assert((# (t == 0x0)))
142+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,(- (# (s + 0x1))),0x1)
143+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,0x1,(# (s + 0x1)))
144144assert((utf8.codepoint("\u{d7ff}") == (0xd800 - 0x1)))
145145assert((utf8.codepoint("\u{e000}") == (0xdfff + 0x1)))
146146assert((utf8.codepoint("\u{d800}",0x1,0x1,true) == 0xd800))
@@ -150,13 +150,13 @@ end
150150assert((utf8.char() == ""))
151151assert((utf8.char(0x0,0x61,0x62,0x63,0x1) == "\u{0}\u{61}\u{62}\u{63}\u{1}"))
152152assert((utf8.codepoint(utf8.char(0x10ffff)) == 0x10ffff))
153−assert((utf8.codepoint(utf8.char(0x7fffffff),0x1,0x1,true) == (((0x1 << 0x1f)) - 0x1)))
153+assert((utf8.codepoint(utf8.char(0x7fffffff),0x1,0x1,true) == ((0x1 << 0x1f) - 0x1)))
154154checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,(0x7fffffff + 0x1))
155−checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,- 0x1)
155+checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,(- 0x1))
156156local function invalid
157157(s)
158158checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s)
159−assert(not utf8.len(s))
159+assert((not utf8.len(s)))
160160end
161161invalid("\u{f4}\u{9f}\u{bf}\u{bf}")
162162invalid("\u{d800}")
@@ -175,13 +175,13 @@ s=string.gsub(s,"\u{20}","")
175175check(s,{0x0,0x7f,0x80,0x7ff,0x800,0xffff,0x10000,0x10ffff})
176176do
177177local s = "\u{4000000}\u{7fffffff}"
178−assert(# (s == 0xc))
178+assert((# (s == 0xc)))
179179check(s,{0x4000000,0x7fffffff},true)
180180s="\u{200000}\u{3ffffff}"
181−assert(# (s == 0xa))
181+assert((# (s == 0xa)))
182182check(s,{0x200000,0x3ffffff},true)
183183s="\u{10000}\u{1fffff}"
184−assert(# (s == 0x8))
184+assert((# (s == 0x8)))
185185check(s,{0x10000,0x1fffff},true)
186186end
187187local x = "\u{e6}\u{97}\u{a5}\u{e6}\u{9c}\u{ac}\u{e8}\u{aa}\u{9e}\u{61}\u{2d}\u{34}\u{0}\u{c3}\u{a9}\u{c3}\u{b3}"
@@ -195,7 +195,7 @@ i=(i + 0x1)
195195assert((utf8.offset(x,i) == p))
196196assert((utf8.len(x,p) == ((utf8.len(x) - i) + 0x1)))
197197assert((utf8.len(c) == 0x1))
198−for j = 0x1, # (c - 0x1)
198+for j = 0x1, (# (c - 0x1))
199199do
200200assert((utf8.offset(x,0x0,((p + j) - 0x1)) == p))
201201end
desk/res/lua/cycled/vararg.lua+9−9
@@ -13,8 +13,8 @@ local function c12
1313assert((arg == _G.arg))
1414local x = {...}
1515;
16−x.n=# x
17−local res = ((((x.n == 0x2) and (x[0x1] == 0x1)) and (x[0x2] == 0x2)))
16+x.n=(# x)
17+local res = (((x.n == 0x2) and (x[0x1] == 0x1)) and (x[0x2] == 0x2))
1818if res then
1919res=0x37
2020end
@@ -38,7 +38,7 @@ assert(((a == 0x37) and (b == 0x2)))
3838a=call(c12,{0x1,0x2,["\u{6e}"] = 0x2})
3939assert(((a == 0x37) and (b == 0x2)))
4040a=call(c12,{0x1,0x2,["\u{6e}"] = 0x1})
41−assert(not a)
41+assert((not a))
4242assert((c12(0x1,0x2,0x3) == false))
4343local a = vararg(call(next,{_G,nil,["\u{6e}"] = 0x2}))
4444local b,c = next(_G)
@@ -51,7 +51,7 @@ local t = {0x1,0xa}
5151function t:f(...)
5252local arg = {...}
5353;
54−return (self[...] + # arg)
54+return (self[...] + (# arg))
5555end
5656assert(((t:f(0x1,0x4) == 0x3) and (t:f(0x2) == 0xb)))
5757print("\u{2b}")
@@ -64,7 +64,7 @@ i=(i + 0x1)
6464end
6565function f(a,b,c,d, ...)
6666local more = {...}
67−assert(((((a == 1.3) and (more[0x1] == 5.3)) and (more[(lim - 0x4)] == (lim + 0.3))) and not more[(lim - 0x3)]))
67+assert(((((a == 1.3) and (more[0x1] == 5.3)) and (more[(lim - 0x4)] == (lim + 0.3))) and (not more[(lim - 0x3)])))
6868end
6969local function g
7070(a,b,c)
@@ -108,15 +108,15 @@ f=load("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}
108108assert(f("\u{61}","\u{62}",nil,{},assert))
109109assert(f())
110110a={select(0x3,table.unpack({0xa,0x14,0x1e,0x28}))}
111−assert(# (((a == 0x2) and (a[0x1] == 0x1e)) and (a[0x2] == 0x28)))
111+assert((# (((a == 0x2) and (a[0x1] == 0x1e)) and (a[0x2] == 0x28))))
112112a={select(0x1)}
113113assert((next(a) == nil))
114−a={select(- 0x1,0x3,0x5,0x7)}
114+a={select((- 0x1),0x3,0x5,0x7)}
115115assert(((a[0x1] == 0x7) and (a[0x2] == undef)))
116−a={select(- 0x2,0x3,0x5,0x7)}
116+a={select((- 0x2),0x3,0x5,0x7)}
117117assert((((a[0x1] == 0x5) and (a[0x2] == 0x7)) and (a[0x3] == undef)))
118118pcall(select,0x2710)
119−pcall(select,- 0x2710)
119+pcall(select,(- 0x2710))
120120function f(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p48,p49,p50, ...)
121121local a1,a2,a3,a4,a5,a6,a7
122122local a8,a9,a10,a11,a12,a13,a14
desk/res/lua/cycled/verybig.lua+5−5
@@ -23,22 +23,22 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{61}\u{72}\u{67}\
2323local prog = "\u{24}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{a}\u{a}\u{62}\u{20}\u{3d}\u{20}\u{7b}\u{24}\u{31}\u{24}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{30}\u{39}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{34}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{30}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{31}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{36}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{32}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{37}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{33}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{34}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{34}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{35}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{36}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{36}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{37}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{37}\u{20}\u{3d}\u{20}\u{30}\u{78}\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{38}\u{20}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{39}\u{20}\u{3d}\u{20}\u{30}\u{78}\u{31}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{30}\u{20}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{31}\u{66}\u{66}\u{66}\u{66}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{31}\u{20}\u{3d}\u{20}\u{2d}\u{36}\u{35}\u{35}\u{33}\u{34}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{32}\u{20}\u{3d}\u{20}\u{2d}\u{36}\u{35}\u{35}\u{33}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{33}\u{20}\u{3d}\u{20}\u{2d}\u{36}\u{35}\u{35}\u{33}\u{36}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{34}\u{20}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{35}\u{20}\u{3d}\u{20}\u{31}\u{35}\u{30}\u{31}\u{32}\u{2e}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{24}\u{32}\u{24}\u{a}\u{7d}\u{3b}\u{a}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{2e}\u{61}\u{35}\u{30}\u{30}\u{30}\u{38}\u{20}\u{3d}\u{3d}\u{20}\u{32}\u{35}\u{30}\u{30}\u{34}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{5b}\u{22}\u{61}\u{31}\u{31}\u{22}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{35}\u{2e}\u{35}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{2e}\u{61}\u{33}\u{33}\u{30}\u{30}\u{37}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{31}\u{36}\u{35}\u{30}\u{33}\u{2e}\u{35}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{2e}\u{61}\u{35}\u{30}\u{30}\u{30}\u{39}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{32}\u{35}\u{30}\u{30}\u{34}\u{2e}\u{35}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{5b}\u{22}\u{62}\u{22}\u{2e}\u{2e}\u{33}\u{30}\u{30}\u{32}\u{34}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{29}\u{a}\u{a}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{3a}\u{78}\u{78}\u{78}\u{20}\u{28}\u{61}\u{2c}\u{62}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{2b}\u{62}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{3a}\u{78}\u{78}\u{78}\u{28}\u{31}\u{30}\u{2c}\u{20}\u{31}\u{32}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{32}\u{32}\u{29}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{65}\u{6c}\u{66}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{a}\u{62}\u{5b}\u{22}\u{78}\u{78}\u{78}\u{22}\u{5d}\u{20}\u{3d}\u{20}\u{75}\u{6e}\u{64}\u{65}\u{66}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{20}\u{3d}\u{20}\u{30}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{6e}\u{3d}\u{30}\u{a}\u{66}\u{6f}\u{72}\u{20}\u{61}\u{2c}\u{62}\u{20}\u{69}\u{6e}\u{20}\u{70}\u{61}\u{69}\u{72}\u{73}\u{28}\u{62}\u{29}\u{20}\u{64}\u{6f}\u{20}\u{73}\u{3d}\u{73}\u{2b}\u{62}\u{3b}\u{20}\u{6e}\u{3d}\u{6e}\u{2b}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{2d}\u{2d}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{33}\u{32}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{2c}\u{20}\u{65}\u{78}\u{61}\u{63}\u{74}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{66}\u{20}\u{27}\u{73}\u{27}\u{20}\u{64}\u{65}\u{70}\u{65}\u{6e}\u{64}\u{73}\u{20}\u{6f}\u{6e}\u{20}\u{73}\u{75}\u{6d}\u{6d}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{38}\u{31}\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{2e}\u{30}\u{20}\u{3c}\u{20}\u{73}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{20}\u{3c}\u{20}\u{38}\u{31}\u{38}\u{36}\u{30}\u{30}\u{30}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6e}\u{20}\u{3d}\u{3d}\u{20}\u{37}\u{30}\u{30}\u{30}\u{31}\u{29}\u{a}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{3b}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{27}\u{2b}\u{27}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{78}\u{29}\u{20}\u{62}\u{3d}\u{78}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{66}\u{7b}\u{24}\u{33}\u{24}\u{7d}\u{20}\u{6f}\u{72}\u{20}\u{31}\u{30}\u{a}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{31}\u{30}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{5b}\u{31}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{61}\u{31}\u{30}\u{22}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{5b}\u{32}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{35}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{5b}\u{23}\u{62}\u{2d}\u{31}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{61}\u{35}\u{30}\u{30}\u{30}\u{39}\u{22}\u{29}\u{a}\u{a}\u{a}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{78}\u{78}\u{78}\u{78}\u{20}\u{28}\u{78}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{62}\u{5b}\u{78}\u{5d}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{78}\u{78}\u{78}\u{78}\u{28}\u{33}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{61}\u{31}\u{31}\u{22}\u{29}\u{a}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{3b}\u{20}\u{62}\u{3d}\u{6e}\u{69}\u{6c}\u{a}\u{78}\u{78}\u{78}\u{78}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}\u{a}\u{a}"
2424local function sig
2525(x)
26−return (((((x % 0x2) == 0x0)) and "") or "\u{2d}")
26+return ((((x % 0x2) == 0x0) and "") or "\u{2d}")
2727end
2828local F = {function ()
2929for i = 0xa, 0xc359
3030do
31−io.write("\u{61}",i,"\u{20}\u{3d}\u{20}",sig(i),(0x5 + ((((i - 0xa)) / 0x2))),"\u{2c}\u{a}")
31+io.write("\u{61}",i,"\u{20}\u{3d}\u{20}",sig(i),(0x5 + ((i - 0xa) / 0x2)),"\u{2c}\u{a}")
3232end
3333end,function ()
3434for i = 0x754a, 0xc359
3535do
36−io.write("\u{62}",i,"\u{20}\u{3d}\u{20}",sig(i),(0x3aa5 + ((((i - 0x754a)) / 0x2))),"\u{2c}\u{a}")
36+io.write("\u{62}",i,"\u{20}\u{3d}\u{20}",sig(i),(0x3aa5 + ((i - 0x754a) / 0x2)),"\u{2c}\u{a}")
3737end
3838end,function ()
3939for i = 0xa, 0xc359
4040do
41−io.write("\u{22}\u{61}",i,"\u{22}\u{2c}\u{20}",sig(i),(0x5 + ((((i - 0xa)) / 0x2))),"\u{2c}\u{a}")
41+io.write("\u{22}\u{61}",i,"\u{22}\u{2c}\u{20}",sig(i),(0x5 + ((i - 0xa) / 0x2)),"\u{2c}\u{a}")
4242end
4343end}
4444local file = os.tmpname()
@@ -46,7 +46,7 @@ io.output(file)
4646for s in string.gmatch(prog,"\u{24}\u{28}\u{5b}\u{5e}\u{24}\u{5d}\u{2b}\u{29}")
4747do
4848local n = tonumber(s)
49−if not n then
49+if (not n) then
5050io.write(s)
5151else
5252F[n]()
desk/res/lua/foo.lua+2−2
@@ -47,9 +47,9 @@ do
4747 return 8, foo;
4848end
4949
50−print('the way of the future')
50+-- print('the way of the future')
5151
52−print 'hello'
52+-- print 'hello'
5353
5454h{key1 = 'Sonmi~451'}
5555
desk/sur/interlist.hoonnew file+8
@@ -0,0 +1,8 @@
1+|%
2+++ interlist
3+ |$ [sep val]
4+ $%
5+ [%double =val =sep tail=(interlist sep val)]
6+ [%single =val]
7+ ==
8+--
desk/sur/lua.hoon+3−3
@@ -1,7 +1,7 @@
11|%
22+$ name @t
33+$ namelist (lest name)
4−+$ ast
4++$ chunk
55 $%
66 [%blok blok]
77 ==
@@ -104,8 +104,8 @@
104104+$ funcbody [pars=parlist body=blok]
105105+$ parlist [pars=(list name) wildcard=?]
106106+$ local-function [=name body=funcbody]
107−+$ local-asmnt [=attnamelist rhs=(unit exprlist)]
108−+$ attnamelist (lest [=name attr=(unit attrib)])
107++$ local-asmnt [=attrnamelist rhs=(unit exprlist)]
108++$ attrnamelist (lest [=name attr=(unit attrib)])
109109+$ attrib
110110 $?
111111 %const
desk/ted/eval-lua.hoonnew file+19
@@ -0,0 +1,19 @@
1+/- spider
2+/+ *strandio
3+/+ lua-parser
4+/+ lua-printer
5+/+ lua-interpreter
6+=>
7+|%
8+--
9+=/ m (strand:spider ,vase)
10+^- thread:spider
11+|= arg=vase
12+^- form:m
13+=/ file=beam (need (de-beam (need !<((unit path) arg))))
14+;< =cage bind:m (read-file file)
15+=/ lua-code=@t (of-wain:format !<(wain +.cage))
16+~& %parsing
17+=/ ast (scan (trip lua-code) lua-parser)
18+~& %evaluating
19+%- pure:m !>((lua-interpreter ast))
desk/ted/test-lua.hoon+8−9
@@ -30,7 +30,12 @@
3030 ?- -.flag
3131 %restrict ~[+.flag]
3232 ==
33−;< bek=beak bind:m get-beak
33+=/ parse
34+ |* src=tape
35+ ?: (has-flag %crash-parser)
36+ (some (scan src lua-parser))
37+ (rust src lua-parser)
38+ ;< bek=beak bind:m get-beak
3439;< lua-files=(list path) bind:m (list-tree [bek /res/lua])
3540=/ lua-files %+ skim lua-files
3641 |= =path
@@ -51,10 +56,7 @@
5156 ;< =cage bind:m (read-file [bek current-file])
5257 =/ lua-code=@t (of-wain:format !<(wain +.cage))
5358 ~& %parsing
54− =/ ast-unit
55− ?: (has-flag %crash-parser)
56− (some (rash lua-code lua-parser))
57− (rush lua-code lua-parser)
59+ =/ ast-unit (parse (trip lua-code))
5860 ;< parse-result=test-result bind:m
5961 =/ m (strand:spider ,test-result)
6062 ?~ ast-unit (pure:m %err)
@@ -68,10 +70,7 @@
6870 %& [(into current-file 2 ~.cycled) %ins %lua !>((to-wain:format (crip printed)))]~
6971 ==
7072 ~& %parsing-printed
71− =/ cycled-ast-unit
72− ?: (has-flag %crash-parser)
73− (some (scan printed lua-parser))
74− (rust printed lua-parser)
73+ =/ cycled-ast-unit (parse printed)
7574 ?~ cycled-ast-unit (pure:m %err)
7675 =/ ast u.cycled-ast-unit
7776 ~? (has-flag %print-asts) ast