Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2008-08-29 17:53:10 -05:00
commit 4459a9c281
10 changed files with 16 additions and 18 deletions

View File

@ -44,7 +44,7 @@ M: string error. print ;
: restart. ( restart n -- ) : restart. ( restart n -- )
[ [
1+ dup 3 <= [ ":" % # " " % ] [ # " :res " % ] if 1+ dup 3 <= [ ":" % # " " % ] [ # " :res " % ] if
restart-name % name>> %
] "" make print ; ] "" make print ;
: restarts. ( -- ) : restarts. ( -- )

View File

@ -48,7 +48,7 @@ IN: heaps.tests
: test-entry-indices ( n -- ? ) : test-entry-indices ( n -- ? )
random-alist random-alist
<min-heap> [ heap-push-all ] keep <min-heap> [ heap-push-all ] keep
data>> dup length swap [ entry-index ] map sequence= ; data>> dup length swap [ index>> ] map sequence= ;
14 [ 14 [
[ t ] swap [ 2^ test-entry-indices ] curry unit-test [ t ] swap [ 2^ test-entry-indices ] curry unit-test

View File

@ -72,7 +72,7 @@ M: tuple error. describe ;
namestack namestack. ; namestack namestack. ;
: :vars ( -- ) : :vars ( -- )
error-continuation get continuation-name namestack. ; error-continuation get name>> namestack. ;
SYMBOL: inspector-hook SYMBOL: inspector-hook

View File

@ -1,8 +1,6 @@
! Copyright (C) 2005, 2008 Slava Pestov. ! Copyright (C) 2005, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: hashtables io colors ; USING: hashtables io colors ;
IN: io.styles IN: io.styles
SYMBOL: plain SYMBOL: plain

View File

@ -75,7 +75,7 @@ TUPLE: quote local ;
C: <quote> quote C: <quote> quote
: local-index ( obj args -- n ) : 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 ) : read-local-quot ( obj args -- quot )
local-index 1+ [ get-local ] curry ; local-index 1+ [ get-local ] curry ;
@ -87,7 +87,7 @@ C: <quote> quote
: localize ( obj args -- quot ) : localize ( obj args -- quot )
{ {
{ [ over local? ] [ read-local-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-word? ] [ read-local-quot [ call ] append ] }
{ [ over local-reader? ] [ read-local-quot [ local-value ] append ] } { [ over local-reader? ] [ read-local-quot [ local-value ] append ] }
{ [ over local-writer? ] [ localize-writer ] } { [ over local-writer? ] [ localize-writer ] }

View File

@ -88,7 +88,7 @@ ABOUT: "math-intervals"
HELP: interval 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." { $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 $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 $nl
"Intervals are created by calling " { $link [a,b] } ", " { $link (a,b) } ", " { $link [a,b) } ", " { $link (a,b] } " or " { $link [a,a] } "." } ; "Intervals are created by calling " { $link [a,b] } ", " { $link (a,b) } ", " { $link [a,b) } ", " { $link (a,b] } " or " { $link [a,a] } "." } ;

View File

@ -91,11 +91,11 @@ HELP: do-attribs
HELP: sprite 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:" { $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 { $list
{ { $link dlist>> } " - an OpenGL display list ID" } { { $snippet "dlist" } " - an OpenGL display list ID" }
{ { $link texture>> } " - an OpenGL texture ID" } { { $snippet "texture" } " - an OpenGL texture ID" }
{ { $link loc>> } " - top-left corner of the sprite" } { { $snippet "loc" } " - top-left corner of the sprite" }
{ { $link dim>> } " - dimensions of the sprite" } { { $snippet "dim" } " - dimensions of the sprite" }
{ { $link dim2>> } " - dimensions of the sprite, rounded up to the nearest powers of two" } { { $snippet "dim2" } " - dimensions of the sprite, rounded up to the nearest powers of two" }
} }
} ; } ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007, 2008 Chris Double, Doug Coleman. ! Copyright (C) 2007, 2008 Chris Double, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel sequences strings namespaces math assocs shuffle USING: kernel sequences strings namespaces math assocs shuffle
vectors arrays math.parser vectors arrays math.parser accessors
unicode.categories sequences.deep peg peg.private unicode.categories sequences.deep peg peg.private
peg.search math.ranges words ; peg.search math.ranges words ;
IN: peg.parsers IN: peg.parsers
@ -11,7 +11,7 @@ TUPLE: just-parser p1 ;
: just-pattern : just-pattern
[ [
execute dup [ execute dup [
dup parse-result-remaining empty? [ drop f ] unless dup remaining>> empty? [ drop f ] unless
] when ] when
] ; ] ;

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: threads kernel prettyprint prettyprint.config USING: threads kernel prettyprint prettyprint.config
io io.styles sequences assocs namespaces sorting boxes 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 IN: tools.threads
: thread. ( thread -- ) : thread. ( thread -- )
@ -14,7 +14,7 @@ IN: tools.threads
] with-cell ] with-cell
[ [
thread-sleep-entry [ thread-sleep-entry [
entry-key millis [-] number>string write key>> millis [-] number>string write
" ms" write " ms" write
] when* ] when*
] with-cell ; ] with-cell ;

View File

@ -324,7 +324,7 @@ TUPLE: pathname string ;
C: <pathname> pathname C: <pathname> pathname
M: pathname <=> [ pathname-string ] compare ; M: pathname <=> [ string>> ] compare ;
! Home directory ! Home directory
HOOK: home os ( -- dir ) HOOK: home os ( -- dir )