Merge branch 'master' of git://factorcode.org/git/factor
						commit
						fd79fb5f5d
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 ( -- )
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 ] } ;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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:"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 }"
 | 
			
		||||
  }
 | 
			
		||||
} ;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -277,3 +277,7 @@ 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
 | 
			
		||||
 | 
			
		||||
[ "asdf" iota ] must-fail
 | 
			
		||||
[ T{ iota { n 10 } } ] [ 10 iota ] unit-test
 | 
			
		||||
[ 0 ] [ 10 iota first ] unit-test
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 ;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue