aboutsummaryrefslogtreecommitdiff
path: root/lux-python
diff options
context:
space:
mode:
authorEduardo Julian2022-04-07 03:27:59 -0400
committerEduardo Julian2022-04-07 03:27:59 -0400
commit9224e54bf175ebe13c3fae42f04b649413c737e7 (patch)
treedab2b19f79e79020792ee0bfe0fb6abe522639a3 /lux-python
parent7542b0addd9eaf01dd5f1c4c8a39b67f51a4bd06 (diff)
De-sigil-ification: &
Diffstat (limited to 'lux-python')
-rw-r--r--lux-python/source/program.lux18
1 files changed, 11 insertions, 7 deletions
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index d12ea355c..718cb9d95 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -287,8 +287,8 @@
[7]
[8]))
- (pattern (list& (~~ (static.literals code.local (inputs/? 8)))
- input/+))
+ (pattern (partial_list (~~ (static.literals code.local (inputs/? 8)))
+ input/+))
(again ((as (~~ (static.literal function.identity (function/? 8))) it)
(~~ (static.literals code.local (inputs/? 8))))
input/+))))))))))))
@@ -528,7 +528,7 @@
(IO (Platform Register (_.Expression Any) (_.Statement Any)))
(do io.monad
[host ..host]
- (in [platform.#&file_system (file.async file.default)
+ (in [platform.#file_system (file.async file.default)
platform.#host host
platform.#phase python.generate
platform.#runtime runtime.generate
@@ -555,12 +555,16 @@
(def: (scope body)
(-> (_.Statement Any) (_.Statement Any))
(let [@program (_.var "lux_program")
- max_recursion (|> (_.int +10) (_.** (_.int +6)))
- ; _.statement]
+ ; _.statement
+ $sys (_.__import__/1 (_.unicode "sys"))
+ ... $threading (_.__import__/1 (_.unicode "threading"))
+ current_limit (_.do "getrecursionlimit" (list) $sys)
+ old_limit current_limit
+ new_limit (_.bit_shl (_.int +2) old_limit)]
(<| (_.comment "-*- coding: utf-8 -*-")
($_ _.then
- (; (|> (_.__import__/1 (_.unicode "sys"))
- (_.do "setrecursionlimit" (list max_recursion))))
+ (; (_.do "setrecursionlimit" (list new_limit) $sys))
+ ... (; (_.do "stack_size" (list current_limit) $threading))
(_.def @program (list) body)
(; (_.apply/* (list) @program))
))))