Not logged in
Overview
SHA1 Hash:8c64fabb65e66149e398cdff3b0933d8a6033c9f
Date: 2010-09-12 16:38:54
User: charleschilders
Comment:Remove some code that is now part of Retro
Timelines: family | ancestors | descendants | both | trunk
Other Links: files | manifest
Tags And Properties
Changes
[hide diffs]    [patch]

Deleted user/crc/fixed-point/fixed-point.retro version [ef91e5e4cf6cfb9e]

@@ -1,49 +0,0 @@
-( Fixed Point Numbers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
-( This is an implementation of fixed point math for Retro.    )
-( Basically it gives us a way to handle numbers with decimals )
-( in a sane manner. It's also more accurate than floating     )
-( point.                                                      )
-(                                                             )
-( We represent a fixed point number by two values on the data )
-( stack. One is the actual value, the other is the position   )
-( of the decimal point. The words operating on fixed point    )
-( values check to make sure the decimal places are the same.  )
-( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
-( __f         Add 'f' prefix for fixed point numbers          )
-( \f.+        Add two fixed point numbers                     )
-( \f.-        Subtract two fixed point numbers                )
-( \f.*        Multiply two fixed point numbers                )
-( \f./        Divide two fixed point numbers                  )
-( \f.mod      Get remainder of two fixed point nums           )
-( \f.display  Display two fixed point numbers                 )
-( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
-
-chain: f
-{{
-  : x:c   (  d-aa ) dup @d->xt swap @d->class ;
-  : prior (  "-   )
-    @last push @last @ !last
-    32 accept tib find if x:c with-class else notfound then
-    pop !last ; immediate
-  : scale   ( n-n ) 1 swap for 10 * next ;
-  : zpad    ( n-  )
-    dup scale swap 1- for 10 / 2dup <if 0 (.) then next drop ;
-  : parse (  -a   ) 32 accept tib ;
-  : copy  ( $-nn$ )
-    repeat @+ 0; dup
-           char: . =if drop dup getLength swap else , then
-    again ;
-  : place (       ) copy drop swap >number ;
----reveal---
-  : __f   ( $-nn  )
-    here swap place
-    @compiler if .data .data ;then swap ;  parsing
-  : display ( nn- )
-    tuck scale /mod (.) '. emit swap zpad (.) ;
-  : +   ( nnnn-nn ) push nip prior + pop .data ;
-  : -   ( nnnn-nn ) push nip prior - pop .data ;
-  : *   ( nnnn-nn ) push nip prior * pop .data ;
-  : /   ( nnnn-nn ) push nip prior / pop .data ;
-  : mod ( nnnn-nn ) push nip prior mod pop .data ;
-}}
-;chain

Deleted user/crc/fixed-point/test.fixed-point.retro version [14538f00b1fc56a8]

@@ -1,15 +0,0 @@
-include fixed-point.retro
-
-with f
-
-( some tests )
-f10.21 display
-f1002.313 display
-f10.09 display
-
-f100.21
-f231.31
-+
-display
-
-f10.009 display

Deleted user/crc/quotes.rx version [bff39bc1fc6de4b3]

@@ -1,17 +0,0 @@
-( Quotes: Anonymous, nestable blocks of code ~~~~~~~~~~~~~~~~ )
-( Copyright [c] 2010, Charles Childers                        )
-( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ )
-
-{{
-  variable here
-  : done? (  qn-   ) dup 0 =if pop drop 2drop ;then ;
----reveal---
-  : mark  (    -   ) @heap !here ;
-  : free  (    -   ) @here !heap ;
-  : [[    (    -na ) @compiler ahead ] ; immediate
-  : ]]    (  na-q  ) dup ` ;then 1+ swap !compiler .data ; immediate
-  : i     (    -n  ) pop pop pop pop dup @heap ! push push push push @heap @ ;
-  : I     (    -n  ) pop i swap push not -1 * ;
-  : times (  nq-   ) repeat swap done? 1- push dup push execute pop pop swap again ;
-  : ifte  ( fqq-   ) rot if drop else nip then execute ;
-}}