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 -- )
[
1+ dup 3 <= [ ":" % # " " % ] [ # " :res " % ] if
restart-name %
name>> %
] "" make print ;
: restarts. ( -- )

View File

@ -48,7 +48,7 @@ IN: heaps.tests
: test-entry-indices ( n -- ? )
random-alist
<min-heap> [ 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

View File

@ -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

View File

@ -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

View File

@ -75,7 +75,7 @@ TUPLE: quote local ;
C: <quote> 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> 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 ] }

View File

@ -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] } "." } ;

View File

@ -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" }
}
} ;

View File

@ -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
] ;

View File

@ -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 ;

View File

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