From 759f1de159cdd3052ddb5b39fb671597c57b35cd Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 16:54:28 -0500 Subject: [PATCH 1/9] new accessor --- basis/inspector/inspector.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/inspector/inspector.factor b/basis/inspector/inspector.factor index 7d7af5d4fd..c8fb7d365a 100755 --- a/basis/inspector/inspector.factor +++ b/basis/inspector/inspector.factor @@ -72,7 +72,7 @@ M: tuple error. describe ; namestack namestack. ; : :vars ( -- ) - error-continuation get continuation-name namestack. ; + error-continuation get name>> namestack. ; SYMBOL: inspector-hook From b7cb19a86e72272ecb5272af83831a6cfdafbf55 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 16:55:28 -0500 Subject: [PATCH 2/9] new accessor --- basis/debugger/debugger.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index eb5e3efa5b..51ef806ebe 100755 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -44,7 +44,7 @@ M: string error. print ; : restart. ( restart n -- ) [ 1+ dup 3 <= [ ":" % # " " % ] [ # " :res " % ] if - restart-name % + name>> % ] "" make print ; : restarts. ( -- ) From 06a8e418c4e346577a937bbe72cb16d944873bf4 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 16:59:57 -0500 Subject: [PATCH 3/9] fix accessor docs --- basis/opengl/opengl-docs.factor | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/opengl/opengl-docs.factor b/basis/opengl/opengl-docs.factor index 5318e31270..87981789a7 100644 --- a/basis/opengl/opengl-docs.factor +++ b/basis/opengl/opengl-docs.factor @@ -91,11 +91,11 @@ HELP: do-attribs HELP: sprite { $class-description "A sprite is an OpenGL texture together with a display list which renders a textured quad. Sprites are used to draw text in the UI. Sprites have the following slots:" { $list - { { $link dlist>> } " - an OpenGL display list ID" } - { { $link texture>> } " - an OpenGL texture ID" } - { { $link loc>> } " - top-left corner of the sprite" } - { { $link dim>> } " - dimensions of the sprite" } - { { $link dim2>> } " - dimensions of the sprite, rounded up to the nearest powers of two" } + { { $snippet "dlist" } " - an OpenGL display list ID" } + { { $snippet "texture" } " - an OpenGL texture ID" } + { { $snippet "loc" } " - top-left corner of the sprite" } + { { $snippet "dim" } " - dimensions of the sprite" } + { { $snippet "dim2" } " - dimensions of the sprite, rounded up to the nearest powers of two" } } } ; From 2d1b642f539d5be238be9d58cb978dcce9aacaca Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 17:00:19 -0500 Subject: [PATCH 4/9] new accessors --- basis/peg/parsers/parsers.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/peg/parsers/parsers.factor b/basis/peg/parsers/parsers.factor index b5b2886a5e..6342deb79e 100755 --- a/basis/peg/parsers/parsers.factor +++ b/basis/peg/parsers/parsers.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2008 Chris Double, Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: kernel sequences strings namespaces math assocs shuffle - vectors arrays math.parser + vectors arrays math.parser accessors unicode.categories sequences.deep peg peg.private peg.search math.ranges words ; IN: peg.parsers @@ -11,7 +11,7 @@ TUPLE: just-parser p1 ; : just-pattern [ execute dup [ - dup parse-result-remaining empty? [ drop f ] unless + dup remaining>> empty? [ drop f ] unless ] when ] ; From 6452f75a3f358fa3a6cfdec0ddc7d7c52911c7b3 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 17:03:36 -0500 Subject: [PATCH 5/9] fix docs --- basis/math/intervals/intervals-docs.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/math/intervals/intervals-docs.factor b/basis/math/intervals/intervals-docs.factor index b5cd231402..c5e5a6e7b8 100644 --- a/basis/math/intervals/intervals-docs.factor +++ b/basis/math/intervals/intervals-docs.factor @@ -88,7 +88,7 @@ ABOUT: "math-intervals" HELP: interval { $class-description "An interval represents a set of real numbers between two endpoints; the endpoints can either be included or excluded from the interval." $nl -"The " { $link interval-from } " and " { $link interval-to } " slots store endpoints, represented as arrays of the shape " { $snippet "{ number included? }" } "." +"The " { $snippet "from" } " and " { $snippet "to" } " slots store endpoints, represented as arrays of the shape " { $snippet "{ number included? }" } "." $nl "Intervals are created by calling " { $link [a,b] } ", " { $link (a,b) } ", " { $link [a,b) } ", " { $link (a,b] } " or " { $link [a,a] } "." } ; From 7652c3ec95dcead02ef361466080438232cbb3db Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 17:04:52 -0500 Subject: [PATCH 6/9] new accessors --- basis/locals/locals.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/locals/locals.factor b/basis/locals/locals.factor index bc05814348..3ba52ea391 100755 --- a/basis/locals/locals.factor +++ b/basis/locals/locals.factor @@ -75,7 +75,7 @@ TUPLE: quote local ; C: quote : local-index ( obj args -- n ) - [ dup quote? [ quote-local ] when eq? ] with find drop ; + [ dup quote? [ local>> ] when eq? ] with find drop ; : read-local-quot ( obj args -- quot ) local-index 1+ [ get-local ] curry ; @@ -87,7 +87,7 @@ C: quote : localize ( obj args -- quot ) { { [ over local? ] [ read-local-quot ] } - { [ over quote? ] [ >r quote-local r> read-local-quot ] } + { [ over quote? ] [ >r local>> r> read-local-quot ] } { [ over local-word? ] [ read-local-quot [ call ] append ] } { [ over local-reader? ] [ read-local-quot [ local-value ] append ] } { [ over local-writer? ] [ localize-writer ] } From e81d69ab34a87590a7cbcf19102ed653ecb3bff9 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 17:07:30 -0500 Subject: [PATCH 7/9] new accessors --- basis/heaps/heaps-tests.factor | 2 +- basis/tools/threads/threads.factor | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basis/heaps/heaps-tests.factor b/basis/heaps/heaps-tests.factor index fbd38db7fa..13b6a97654 100755 --- a/basis/heaps/heaps-tests.factor +++ b/basis/heaps/heaps-tests.factor @@ -48,7 +48,7 @@ IN: heaps.tests : test-entry-indices ( n -- ? ) random-alist [ heap-push-all ] keep - data>> dup length swap [ entry-index ] map sequence= ; + data>> dup length swap [ index>> ] map sequence= ; 14 [ [ t ] swap [ 2^ test-entry-indices ] curry unit-test diff --git a/basis/tools/threads/threads.factor b/basis/tools/threads/threads.factor index 2bd38cf304..2c01f04bb3 100755 --- a/basis/tools/threads/threads.factor +++ b/basis/tools/threads/threads.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: threads kernel prettyprint prettyprint.config io io.styles sequences assocs namespaces sorting boxes -heaps.private system math math.parser math.order ; +heaps.private system math math.parser math.order accessors ; IN: tools.threads : thread. ( thread -- ) @@ -14,7 +14,7 @@ IN: tools.threads ] with-cell [ thread-sleep-entry [ - entry-key millis [-] number>string write + key>> millis [-] number>string write " ms" write ] when* ] with-cell ; From 313b68f600eebf170f415bf707037cabc6db9602 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 17:09:11 -0500 Subject: [PATCH 8/9] spacing --- basis/io/styles/styles.factor | 2 -- 1 file changed, 2 deletions(-) diff --git a/basis/io/styles/styles.factor b/basis/io/styles/styles.factor index 752f413458..b0eb327927 100644 --- a/basis/io/styles/styles.factor +++ b/basis/io/styles/styles.factor @@ -1,8 +1,6 @@ ! Copyright (C) 2005, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. - USING: hashtables io colors ; - IN: io.styles SYMBOL: plain From 922e1f4371a23ca857c1a162849e3b2a7378c17f Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Aug 2008 17:09:19 -0500 Subject: [PATCH 9/9] new accessors --- core/io/files/files.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/files/files.factor b/core/io/files/files.factor index db0d2da1ef..cf87506bf9 100755 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -324,7 +324,7 @@ TUPLE: pathname string ; C: pathname -M: pathname <=> [ pathname-string ] compare ; +M: pathname <=> [ string>> ] compare ; ! Home directory HOOK: home os ( -- dir )