diff options
author | Eduardo Julian | 2018-07-30 23:40:48 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-30 23:40:48 -0400 |
commit | 748c868680683df1949f62aac274040ac5bf43da (patch) | |
tree | 67b3bd8fb402dfd00fc0ee472186fc79e6545ac7 /new-luxc/source/luxc/lang/translation/python | |
parent | 76b47564f89bac5eb6604da7bbb94aabb83d6d84 (diff) |
Now implementing math functionality in stdlib instead of the compiler.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux | 23 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux | 33 |
2 files changed, 0 insertions, 56 deletions
diff --git a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux index f7cdf044a..35ffdb1f8 100644 --- a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux @@ -347,28 +347,6 @@ (install "clip" (trinary text//clip)) ))) -## [[Math]] -(def: (math//pow [subject param]) - Binary - (|> subject (python.** param))) - -(def: math-procs - Bundle - (<| (prefix "math") - (|> (dict.new text.Hash<Text>) - (install "cos" (unary runtimeT.math//cos)) - (install "sin" (unary runtimeT.math//sin)) - (install "tan" (unary runtimeT.math//tan)) - (install "acos" (unary runtimeT.math//acos)) - (install "asin" (unary runtimeT.math//asin)) - (install "atan" (unary runtimeT.math//atan)) - (install "exp" (unary runtimeT.math//exp)) - (install "log" (unary runtimeT.math//log)) - (install "ceil" (unary runtimeT.math//ceil)) - (install "floor" (unary runtimeT.math//floor)) - (install "pow" (binary math//pow)) - ))) - ## [[IO]] (def: io-procs Bundle @@ -449,7 +427,6 @@ (dict.merge frac-procs) (dict.merge text-procs) (dict.merge array-procs) - (dict.merge math-procs) (dict.merge io-procs) (dict.merge atom-procs) (dict.merge box-procs) diff --git a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux index 275eea636..3dd5980e8 100644 --- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux @@ -375,38 +375,6 @@ Runtime @@process//schedule) -(do-template [<name> <method>] - [(runtime: (<name> input) - ($_ python.then! - (python.import! "math") - (python.return! (|> (python.global "math") (python.send (list input) <method>)))))] - - [math//cos "cos"] - [math//sin "sin"] - [math//tan "tan"] - [math//acos "acos"] - [math//asin "asin"] - [math//atan "atan"] - [math//exp "exp"] - [math//log "log"] - [math//ceil "ceil"] - [math//floor "floor"] - ) - -(def: runtime//math - Runtime - ($_ python.then! - @@math//cos - @@math//sin - @@math//tan - @@math//acos - @@math//asin - @@math//atan - @@math//exp - @@math//log - @@math//ceil - @@math//floor)) - (def: runtime Runtime ($_ python.then! @@ -420,7 +388,6 @@ runtime//box runtime//io runtime//process - runtime//math )) (def: #export artifact Text (format prefix ".py")) |