From 748c868680683df1949f62aac274040ac5bf43da Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 30 Jul 2018 23:40:48 -0400 Subject: Now implementing math functionality in stdlib instead of the compiler. --- .../lang/translation/ruby/procedure/common.jvm.lux | 47 ---------------------- 1 file changed, 47 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/ruby') diff --git a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux index bed68a0a0..ba6a1241a 100644 --- a/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/ruby/procedure/common.jvm.lux @@ -360,52 +360,6 @@ (install "clip" (trinary text//clip)) ))) -## [[Math]] -(do-template [ ] - [(def: - Unary - (|>> (list) (ruby.apply )))] - - [math//cos "Math.cos"] - [math//sin "Math.sin"] - [math//tan "Math.tan"] - [math//acos "Math.acos"] - [math//asin "Math.asin"] - [math//atan "Math.atan"] - [math//exp "Math.exp"] - [math//log "Math.log"] - ) - -(do-template [ ] - [(def: - Unary - (ruby.send (list)))] - - [math//ceil "ceil"] - [math//floor "floor"] - ) - -(def: (math//pow [inputO paramO]) - Binary - (ruby.pow paramO inputO)) - -(def: math-procs - Bundle - (<| (prefix "math") - (|> (dict.new text.Hash) - (install "cos" (unary math//cos)) - (install "sin" (unary math//sin)) - (install "tan" (unary math//tan)) - (install "acos" (unary math//acos)) - (install "asin" (unary math//asin)) - (install "atan" (unary math//atan)) - (install "exp" (unary math//exp)) - (install "log" (unary math//log)) - (install "ceil" (unary math//ceil)) - (install "floor" (unary math//floor)) - (install "pow" (binary math//pow)) - ))) - ## [[IO]] (def: (io//log messageO) Unary @@ -506,7 +460,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) -- cgit v1.2.3