]> gitweb.factorcode.org Git - factor.git/commitdiff
Update remaining >r/r> usages
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 06:42:12 +0000 (00:42 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 06:42:12 +0000 (00:42 -0600)
extra/bubble-chamber/bubble-chamber.factor
extra/descriptive/descriptive.factor
extra/fjsc/fjsc.factor
extra/inverse/inverse.factor
extra/lint/lint.factor
extra/multi-methods/tests/definitions.factor
extra/ori/ori.factor
extra/partial-continuations/partial-continuations.factor
extra/wordtimer/wordtimer.factor

index 76f9f6070e30f6864defa5c29513801e7cc9108f..4bddd4b6328b770072307dcc95aef35d332fe8ef 100644 (file)
@@ -83,7 +83,7 @@ DEFER: collision-theta
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: theta-dd-small? ( par limit -- par ? ) >r dup theta-dd>> abs r> < ;
+: theta-dd-small? ( par limit -- par ? ) [ dup theta-dd>> abs ] dip < ;
 
 : random-theta-dd  ( par a b -- par ) 2random >>theta-dd ;
 
@@ -149,8 +149,8 @@ METHOD: collide ( <axion> -- )
 : axion-white ( dy -- dy ) dup 1 swap dy>alpha gray boa \ stroke-color set ;
 : axion-black ( dy -- dy ) dup 0 swap dy>alpha gray boa \ stroke-color set ;
 
-: axion-point- ( particle dy -- particle ) >r dup pos>> r> v-y point ;
-: axion-point+ ( particle dy -- particle ) >r dup pos>> r> v+y point ;
+: axion-point- ( particle dy -- particle ) [ dup pos>> ] dip v-y point ;
+: axion-point+ ( particle dy -- particle ) [ dup pos>> ] dip v+y point ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
index b1fdf2463e5b183eb6e2ab713d3eee47dc7e1263..dd0042455cc3d66e6ce6fefc0a94ca7a2afc574e 100755 (executable)
@@ -11,7 +11,7 @@ M: descriptive-error summary
 \r
 <PRIVATE\r
 : rethrower ( word inputs -- quot )\r
-    [ length ] keep [ >r narray r> swap 2array flip ] 2curry\r
+    [ length ] keep [ [ narray ] dip swap 2array flip ] 2curry\r
     [ 2 ndip descriptive-error ] 2curry ;\r
 \r
 : [descriptive] ( word def -- newdef )\r
index c308c94054db8b7860f73a5806a1c3587b71041e..cf733dbbfd8aa3a3f1a497c71fe25ba93b052e88 100755 (executable)
@@ -2,7 +2,8 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors kernel peg strings sequences math math.parser
 namespaces make words quotations arrays hashtables io
-io.streams.string assocs ascii peg.parsers accessors ;
+io.streams.string assocs ascii peg.parsers accessors
+words.symbol ;
 IN: fjsc
 
 TUPLE: ast-number value ;
index c34fcf5f57a632d2f3451809f299311752a8bba7..f1ca394e803c6e647bc0f52c684bc1011e60ead1 100755 (executable)
@@ -5,7 +5,7 @@ sequences assocs math arrays stack-checker effects generalizations
 continuations debugger classes.tuple namespaces make vectors
 bit-arrays byte-arrays strings sbufs math.functions macros
 sequences.private combinators mirrors
-combinators.short-circuit fry ;
+combinators.short-circuit fry words.symbol ;
 RENAME: _ fry => __
 IN: inverse
 
@@ -135,9 +135,6 @@ MACRO: undo ( quot -- ) [undo] ;
 \ not [ not ] define-inverse
 \ >boolean [ { t f } memq? assure ] define-inverse
 
-\ >r [ r> ] define-inverse
-\ r> [ >r ] define-inverse
-
 \ tuple>array [ >tuple ] define-inverse
 \ >tuple [ tuple>array ] define-inverse
 \ reverse [ reverse ] define-inverse
index 77b0b11238745b74311de3c089dd175cbbc7fbf5..d3c8f7217fdd14ea326ed7f56ae00ff62c7fd53b 100644 (file)
@@ -15,13 +15,13 @@ SYMBOL: def-hash-keys
 
 : more-defs ( hash -- )
     {
-        { -rot [ swap >r swap r> ] }
+        { -rot [ swap [ swap ] dip ] }
         { -rot [ swap swapd ] }
-        { rot [ >r swap r> swap ] }
+        { rot [ [ swap ] dip swap ] }
         { rot [ swapd swap ] }
         { over [ dup swap ] }
         { tuck [ dup -rot ] }
-        { swapd [ >r swap r> ] }
+        { swapd [ [ swap ] dip ] }
         { 2nip [ nip nip ] }
         { 2drop [ drop drop ] }
         { 3drop [ drop drop drop ] }
index c112a677768202a7355985e32aeb8699a1caff0c..64363af428ae724959cc627be064c722bf2c12c0 100644 (file)
@@ -16,7 +16,7 @@ DEFER: fake
 [ t ] [ { } \ fake <method> method-body? ] unit-test
 
 [
-    [ { } [ ] ] [ \ fake methods prepare-methods >r sort-methods r> ] unit-test
+    [ { } [ ] ] [ \ fake methods prepare-methods [ sort-methods ] dip ] unit-test
 
     [ t ] [ { } \ fake multi-dispatch-quot callable? ] unit-test
 
index 84d33bb77fdf960d15215143978c7f082e04dd6d..b7c2458c6b032db74434f15d64880b026714a43b 100644 (file)
@@ -17,7 +17,7 @@ C: <ori> ori
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: make-matrix ( quot width -- matrix ) >r { } make r> group ; inline
+: make-matrix ( quot width -- matrix ) [ { } make ] dip group ; inline
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
index b80e3a9ddbb499fce1ab8ad629504e27c2ef8f85..7ec294ca2e9137d5364b774c41481725374c878f 100755 (executable)
@@ -7,16 +7,16 @@ USING: kernel continuations arrays sequences quotations ;
     [ 1array swap keep first continue-with ] callcc1 nip ;
 
 : (bshift) ( v r k -- obj )
-    >r dup first -rot r>
+    [ dup first -rot ] dip
     [
         rot set-first
         continue-with
     ] callcc1
-    >r drop nip set-first r> ;
+    [ drop nip set-first ] dip ;
 
 : bshift ( r quot -- )
     swap [ ! quot r k
-        over >r
-        [ (bshift) ] 2curry swap call
-        r> first continue-with
+        over [
+            [ (bshift) ] 2curry swap call
+        ] dip first continue-with
     ] callcc1 2nip ; inline
index 803f0c2a66de1d53146d76cd35f7ffa65e00ef92..7abdc149dd8ed71bf5077c4927739e7f457cb830 100644 (file)
@@ -30,7 +30,7 @@ SYMBOL: *calling*
   *calling* get-global at ; inline
     
 : timed-call ( quot word -- )
-  [ calling ] [ >r benchmark r> register-time ] [ finished ] tri ; inline
+  [ calling ] [ [ benchmark ] dip register-time ] [ finished ] tri ; inline
 
 : time-unless-recursing ( quot word -- )
   dup called-recursively? not
@@ -71,9 +71,10 @@ SYMBOL: *calling*
 
 : wordtimer-call ( quot -- )
   reset-word-timer 
-  benchmark >r
-  correct-for-timing-overhead
-  "total time:" write r> pprint nl
+  benchmark [
+      correct-for-timing-overhead
+      "total time:" write
+  ] dip pprint nl
   print-word-timings nl ;
 
 : profile-vocab ( vocab quot -- )
@@ -81,9 +82,10 @@ SYMBOL: *calling*
   over [ reset-vocab ] [ add-timers ] bi
   reset-word-timer
   "executing quotation..." print flush
-  benchmark >r
-  "resetting annotations..." print flush
-  reset-vocab
-  correct-for-timing-overhead
-  "total time:" write r> pprint
+  benchmark [
+      "resetting annotations..." print flush
+      reset-vocab
+      correct-for-timing-overhead
+      "total time:" write
+  ] dip pprint
   print-word-timings ;