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

db4
John Benediktsson 2009-01-10 21:45:53 -08:00
commit fd79fb5f5d
7 changed files with 17 additions and 8 deletions

View File

@ -8,7 +8,7 @@ SINGLETON: gvim
HOOK: gvim-path io-backend ( -- path )
M: gvim vim-command ( file line -- string )
[ gvim-path , swap , "+" swap number>string append , ] { } make ;
[ gvim-path , "+" swap number>string append , , ] { } make ;
gvim vim-editor set-global

View File

@ -1,6 +1,5 @@
! Generate a new factor.vim file for syntax highlighting
USING: http.server.templating http.server.templating.fhtml
io.files ;
USING: html.templates html.templates.fhtml io.files io.pathnames ;
IN: editors.vim.generate-syntax
: generate-vim-syntax ( -- )

View File

@ -209,7 +209,8 @@ ARTICLE: "tools" "Developer tools"
{ $subsection "timing" }
{ $subsection "tools.disassembler" }
"Deployment tools:"
{ $subsection "tools.deploy" } ;
{ $subsection "tools.deploy" }
{ $see-also "ui-tools" } ;
ARTICLE: "article-index" "Article index"
{ $index [ articles get keys ] } ;

View File

@ -34,6 +34,7 @@ ARTICLE: "defining-words" "Defining words"
{ $see POSTPONE: SYMBOL: }
"The key factor in the definition of " { $link POSTPONE: SYMBOL: } " is " { $link CREATE } ", which reads a token from the input and creates a word with that name. This word is then passed to " { $link define-symbol } "."
{ $subsection CREATE }
{ $subsection CREATE-WORD }
"Colon definitions are defined in a more elaborate way:"
{ $subsection POSTPONE: : }
"The " { $link POSTPONE: : } " word first calls " { $link CREATE } ", and then reads input until reaching " { $link POSTPONE: ; } " using a utility word:"

View File

@ -1279,9 +1279,9 @@ HELP: iota
{ $description "Creates an immutable virtual sequence containing the integers from 0 to " { $snippet "n-1" } "." }
{ $examples
{ $example
"USING: math.parser sequences ;"
"USING: math sequences prettyprint ;"
"3 iota [ sq ] map ."
"{ \"0\" \"1\" \"2\" }"
"{ 0 1 4 }"
}
} ;

View File

@ -276,4 +276,8 @@ M: bogus-hashcode hashcode* 2drop 0 >bignum ;
{ 3 0 } [ [ 3drop ] 3each ] must-infer-as
[ V{ 0 3 } ] [ "A" { "A" "B" "C" "A" "D" } indices ] unit-test
[ V{ 0 3 } ] [ "A" { "A" "B" "C" "A" "D" } indices ] unit-test
[ "asdf" iota ] must-fail
[ T{ iota { n 10 } } ] [ 10 iota ] unit-test
[ 0 ] [ 10 iota first ] unit-test

View File

@ -101,11 +101,15 @@ M: integer nth-unsafe drop ;
INSTANCE: integer immutable-sequence
PRIVATE>
! In the future, this will replace integer sequences
TUPLE: iota { n read-only } ;
TUPLE: iota { n integer read-only } ;
: iota ( n -- iota ) \ iota boa ; inline
<PRIVATE
M: iota length n>> ;
M: iota nth-unsafe drop ;