From febfa99c2823219c2e76d2c73b1fd8db8f6c9918 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 7 May 2018 01:37:38 -0400 Subject: - Implemented Deg functionality in pure Lux. --- .../translation/python/procedure/common.jvm.lux | 43 ---------------------- 1 file changed, 43 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/python/procedure') 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 69b4aede4..0f5a3fdc9 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 @@ -231,9 +231,6 @@ [frac//smallest Double::MIN_VALUE python.float] [frac//min (f/* -1.0 Double::MAX_VALUE) python.float] [frac//max Double::MAX_VALUE python.float] - - [deg//min 0 python.int] - [deg//max -1 python.int] ) (do-template [ ] @@ -265,11 +262,6 @@ [int//add python.+] [int//sub python.-] [int//mul python.*] - - [deg//add python.+] - [deg//sub python.-] - [deg//rem python.-] - [deg//scale python.*] ) (do-template [ ] @@ -280,10 +272,6 @@ [int//div python./] [int//rem python.%] - - [deg//mul runtimeT.deg//*] - [deg//div runtimeT.deg///] - [deg//reciprocal python./] ) (do-template [ ] @@ -310,9 +298,6 @@ [int//= python.=] [int//< python.<] - - [deg//= python.=] - [deg//< python.<] ) (def: (apply1 func) @@ -325,15 +310,6 @@ (function (_ object) (python.send (list) method object))) -(do-template [ ] - [(def: ( inputO) - Unary - (|> inputO (python./ )))] - - [deg//to-frac (python.apply (list (|> (python.int 1) (python.bit-shl (python.int 32)))) - (python.global "float"))] - ) - (def: int-procs Bundle (<| (prefix "int") @@ -350,23 +326,6 @@ (install "to-frac" (unary (apply1 (python.global "float")))) (install "char" (unary (apply1 (python.global "chr"))))))) -(def: deg-procs - Bundle - (<| (prefix "deg") - (|> (dict.new text.Hash) - (install "+" (binary deg//add)) - (install "-" (binary deg//sub)) - (install "*" (binary deg//mul)) - (install "/" (binary deg//div)) - (install "%" (binary deg//rem)) - (install "=" (binary deg//=)) - (install "<" (binary deg//<)) - (install "scale" (binary deg//scale)) - (install "reciprocal" (binary deg//reciprocal)) - (install "min" (nullary deg//min)) - (install "max" (nullary deg//max)) - (install "to-frac" (unary deg//to-frac))))) - (def: frac-procs Bundle (<| (prefix "frac") @@ -384,7 +343,6 @@ (install "not-a-number" (nullary frac//not-a-number)) (install "positive-infinity" (nullary frac//positive-infinity)) (install "negative-infinity" (nullary frac//negative-infinity)) - (install "to-deg" (unary runtimeT.deg//from-frac)) (install "to-int" (unary (apply1 (python.global "int")))) (install "encode" (unary (apply1 (python.global "repr")))) (install "decode" (unary runtimeT.frac//decode))))) @@ -530,7 +488,6 @@ (|> lux-procs (dict.merge bit-procs) (dict.merge int-procs) - (dict.merge deg-procs) (dict.merge frac-procs) (dict.merge text-procs) (dict.merge array-procs) -- cgit v1.2.3