--- /dev/null
+Code generation for C99 complex number support
--- /dev/null
+Utilities used in implementation of alien parsing words
--- /dev/null
+Prettyprinting aliens and DLLs
--- /dev/null
+Passing Factor strings as C strings and vice versa
--- /dev/null
+Default string encoding on Unix
--- /dev/null
+Default string encoding on Windows
--- /dev/null
+Struct field implementation and reflection support
--- /dev/null
+Priority queue with fast insertion, removal of first element, and lookup of arbitrary elements by key
--- /dev/null
+Reading sequences of bits from a byte stream
: load-help ( -- )
"help.lint" require
+ "tools.vocabs.browser" require
"alien.syntax" require
"compiler" require
-USING: arrays byte-arrays help.markup help.syntax kernel\r
-byte-vectors.private combinators ;\r
+USING: arrays byte-arrays help.markup help.syntax kernel combinators ;\r
IN: byte-vectors\r
\r
ARTICLE: "byte-vectors" "Byte vectors"\r
-"A byte vector is a resizable mutable sequence of unsigned bytes. Byte vector words are found in the " { $vocab-link "byte-vectors" } " vocabulary."\r
+"The " { $vocab-link "byte-vectors" } " vocabulary implements resizable mutable sequence of unsigned bytes. Byte vectors implement the " { $link "sequence-protocol" } " and thus all " { $link "sequences" } " can be used with them."\r
$nl\r
"Byte vectors form a class:"\r
{ $subsection byte-vector }\r
--- /dev/null
+Low-level alien interface to Cairo library
--- /dev/null
+UI gadget for rendering graphics with Cairo
--- /dev/null
+Implementation details for calendar.format
--- /dev/null
+Unix-specific timezone support and C library time data types
--- /dev/null
+Windows-specific timezone support
--- /dev/null
+Calling arbitrary quotations and executing arbitrary words with a static stack effect
--- /dev/null
+Adler-32 checksum algorithm
--- /dev/null
+MD5 checksum algorithm
--- /dev/null
+Dummy checksum algorithm
--- /dev/null
+OpenSSL's MD5 and SHA1 checksums
--- /dev/null
+SHA1 checksum algorithm
--- /dev/null
+SHA2 checksum algorithm
--- /dev/null
+Computing checksums of streaming data
--- /dev/null
+Support for iterating over NSFastEnumerations
--- /dev/null
+Reading and writing Cocoa property lists
--- /dev/null
+Grayscale colors
--- /dev/null
+Hue-saturation-value colors
--- /dev/null
+Short-circuiting logical operations which infer the arity
--- /dev/null
+Short-circuiting logical operations
--- /dev/null
+Combinators which infer arities
--- /dev/null
+Common code used for analysis and code generation of alien bindings
--- /dev/null
+Alias analysis for stack operations, array elements and tuple slots
--- /dev/null
+Common code used by several passes to perform copy propagation
--- /dev/null
+Dead-code elimination
--- /dev/null
+Tools for debugging low-level optimizer
--- /dev/null
+Common code used by several passes for def-use analysis
--- /dev/null
+Utility for constructing basic blocks
--- /dev/null
+Stack height normalization coalesces height changes at start of basic block
--- /dev/null
+Basic block instructions
--- /dev/null
+Parsing word for defining instructions
--- /dev/null
+Generating instructions for alien calls
--- /dev/null
+Generating instructions for inline memory allocation
--- /dev/null
+Generating instructions for fixnum arithmetic
--- /dev/null
+Generating instructions for floating point arithmetic
--- /dev/null
+Generating instructions for miscellaneous primitives
--- /dev/null
+Generating instructions for slot access
--- /dev/null
+Generating instructions from certain primitives
--- /dev/null
+Utility for iterating for high-level IR
--- /dev/null
+Allocating registers for live intervals
--- /dev/null
+Assigning registers to live intervals
--- /dev/null
+Tools for debugging register allocator
--- /dev/null
+Live intervals
--- /dev/null
+Linear-scan register allocation
--- /dev/null
+Flattening CFG into MR (machine representation)
--- /dev/null
+Top-level harness for CFG optimization
--- /dev/null
+Computing predecessors of basic blocks in CFG
--- /dev/null
+Virtual single-assignment registers
--- /dev/null
+Reverse post-order linearization of CFG
--- /dev/null
+Computing stack frame size and layout
--- /dev/null
+Generating instructions for accessing the data and retain stacks
--- /dev/null
+Low-level control flow graph IR
--- /dev/null
+Converting three-operand instructions into two-operand form
--- /dev/null
+Eliminating unreachable basic blocks and unconditional jumps
--- /dev/null
+Utility words used by CFG optimization
--- /dev/null
+Value numbering expressions
--- /dev/null
+Value numbering expression graph
--- /dev/null
+Propagation pass to update code after value numbering
--- /dev/null
+Algebraic simplification of expressions
--- /dev/null
+Local value numbering for common subexpression elimination
--- /dev/null
+Write barrier elimination
--- /dev/null
+Code generation from MR (machine representation)
--- /dev/null
+Constructing high-level tree IR
--- /dev/null
+Debugging tool for checking various invariants of tree IR
--- /dev/null
+Finalizing speculative inlining and constant folding from propagation pass
--- /dev/null
+Combinators for iterating over tree IR
--- /dev/null
+Utilities for working with binary comparison operations
--- /dev/null
+Dead branch elimination
--- /dev/null
+Liveness analysis
--- /dev/null
+Dead code elimination for inline recursive combinators
--- /dev/null
+Dead code elimination for straight-line code
--- /dev/null
+Dead code elimination
--- /dev/null
+Tools for debugging high-level optimizer
--- /dev/null
+Variant form of def-use chains used by modular arithmetic optimization
--- /dev/null
+Tracking memory allocations
--- /dev/null
+Escape analysis for conditionals
--- /dev/null
+Skipping escape analysis pass for code which does not allocate
--- /dev/null
+Per-node dispatch for escape analysis
--- /dev/null
+Escape analysis for inline recursive combinators
--- /dev/null
+Escape analysis for straight-line code
--- /dev/null
+Escape analysis for tuple unboxing
--- /dev/null
+Final pass cleans up high-level IR
--- /dev/null
+Applying arithmetic identities to integer code
--- /dev/null
+Utilities used by several optimization passes run in the later stages
--- /dev/null
+Modular arithmetic optimization
--- /dev/null
+Coalesce value introduction nodes to beginning of each tree leaf
--- /dev/null
+Support for renaming values
--- /dev/null
+Normalize IR created by high level IR builder to simplify subsequent passes
--- /dev/null
+Top-level harness for high-level optimizer
--- /dev/null
+Sparse propagation for branches
--- /dev/null
+Support for predicated value info
--- /dev/null
+Copy propagation
--- /dev/null
+Value info data type and operations
--- /dev/null
+Method inlining and dispatch elimination
--- /dev/null
+Propagation rules for certain known words
--- /dev/null
+Node dispatch for propagation pass
--- /dev/null
+Propagation for inline recursive combinators
--- /dev/null
+Propagation for straight-line code
--- /dev/null
+Propagation for read-only tuple slots and array lengths
--- /dev/null
+Analysis of inline recursive combinators and loop detection
--- /dev/null
+Tuple unboxing
--- /dev/null
+Utilities used by high-level IR optimizations
--- /dev/null
+LZW compression and decompression
--- /dev/null
+Low-level FFI bindings to ZLIB compression library
--- /dev/null
+Wrapper ZLIB compression library
--- /dev/null
+Flags for cross-thread notification of conditions
--- /dev/null
+Mailboxes for inter-thread message passing
--- /dev/null
+Utility to simplify tuple constructors
--- /dev/null
+Wrapper for CFArray data type
--- /dev/null
+Wrapper for CFBundle data type
--- /dev/null
+Wrapper for various CF data types
--- /dev/null
+Wrapper for CFFileDescriptor
--- /dev/null
+Wrapper for FSEventStream
--- /dev/null
+Wrapper for CFString
--- /dev/null
+Wrapper for CF time-related data types
--- /dev/null
+Wrapper for CFTimer
--- /dev/null
+Wrapper for CFURL
--- /dev/null
+Linux/PPC ABI support
--- /dev/null
+Mac OS X/PPC ABI support
--- /dev/null
+32-bit x86 code generator
--- /dev/null
+64-bit x86 Unix ABI support
--- /dev/null
+64-bit x86 Windows ABI support
--- /dev/null
+x86 assembler
--- /dev/null
+Parsing words used by x86 assembler
--- /dev/null
+Errors thrown by database library
--- /dev/null
+Database connection pooling
--- /dev/null
+PostgreSQL database connector
--- /dev/null
+Database queries
--- /dev/null
+SQLite database connector
--- /dev/null
+O/R mapper
--- /dev/null
+SQL data type support
"Type :help for debugging help." print flush ;
: try ( quot -- )
- [ print-error-and-restarts ] recover ;
+ [ print-error-and-restarts ] recover ; inline
: expired-error. ( obj -- )
"Object did not survive image save/load: " write third . ;
--- /dev/null
+Various core protocols for use with delegation
--- /dev/null
+Utilities for working with big-endian and little-endian data
--- /dev/null
+Mac OS X environment variables implementation
--- /dev/null
+Unix environment variables implementation
--- /dev/null
+Windows environment variables implementation
--- /dev/null
+FTP client
--- /dev/null
+FTP server
--- /dev/null
+Common code shared by FTP client and server
--- /dev/null
+Converting help to HTML
--- /dev/null
+HTML utilities
--- /dev/null
+Compiling Chloe templates to Factor quotations
--- /dev/null
+Dispatcher responder for dispaching requests to a set of child responders
--- /dev/null
+Filter responders which wrap an underlying responder
--- /dev/null
+Redirection responses which redirect the client to another URL
--- /dev/null
+Support for port remapping
--- /dev/null
+Constructing various simple responses
--- /dev/null
+Serving static files
--- /dev/null
+Windows BMP image loader
--- /dev/null
+Loading bitmap images from files
--- /dev/null
+Bitmap images
--- /dev/null
+TIFF image loader
--- /dev/null
+Interpolating variable values into strings
--- /dev/null
+Linux epoll multiplexer
--- /dev/null
+BSD and Mac OS X kqueue multiplexer
--- /dev/null
+Mac OS X CFRunLoop multiplexer
--- /dev/null
+Generic Unix select multiplexer
--- /dev/null
+Generic protocol for Unix I/O multiplexers
--- /dev/null
+Recursive directory traversal
--- /dev/null
+GB18030 encoding for Chinese text
-Encoding and decoding strings
+Converting strings to byte arrays and vice versa
--- /dev/null
+UTF16 encoding with native byte order
--- /dev/null
+File types for file-info and directory listing
--- /dev/null
+Temporary files with unique names
--- /dev/null
+Pipes for inter-process communication
--- /dev/null
+Streams for reading and writing bytes in a byte array
--- /dev/null
+Streams with a maximum length cutoff
--- /dev/null
+Streams for reading data directly from memory
--- /dev/null
+Pretty HTML rendering of diffs
--- /dev/null
+Definition protocol implementation for lambda words
--- /dev/null
+Errors thrown by locals implementation
--- /dev/null
+Support for mixing fry and locals
--- /dev/null
+Support for macro expansion inside lambdas
--- /dev/null
+Utility words used by locals parsing words
--- /dev/null
+Prettyprinting of lambdas
--- /dev/null
+Rewriting closures to not have any free variables
--- /dev/null
+Rewriting applicative code to use the retain stack instead of named values
--- /dev/null
+Desugaring locals in literals and let binding
--- /dev/null
+Data types used by locals implementation
--- /dev/null
+Macro expansion utility, used for debugging and in the locals implementation
--- /dev/null
+Partially-dispatched math operations, used by the compiler
--- /dev/null
+MIME multipart parser
--- /dev/null
+MIME types database
--- /dev/null
+Composed models combine the values of a sequence of models into one
--- /dev/null
+Delay models update a fixed period of time after the underlying model changes
--- /dev/null
+Filter models apply a quotation to the value of an underlying model
--- /dev/null
+History models remember prior values
--- /dev/null
+Mapping models combine an assoc of models into a single model
--- /dev/null
+Range models bound their values
--- /dev/null
+Space-efficient arrays of 4-bit values
--- /dev/null
+Low-level FFI binding to libcrypto
--- /dev/null
+Low-level FFI binding to libssl
--- /dev/null
+Packing and unpacking binary data
-Grammar for parsing EBNF
+Declarative EBNF language for writing PEG parsers
--- /dev/null
+Additional PEG parsers
-Parsing Expression Grammar and Packrat Parser
+Parsing expression grammar and packrat parser
--- /dev/null
+Protocol for extending the prettyprinter on custom data types
--- /dev/null
+Dummy RNG for testing
--- /dev/null
+Native Unix RNG
--- /dev/null
+Native Windows RNG
--- /dev/null
+SMTP server for testing purposes
--- /dev/null
+Sorting by tuple slots
--- /dev/null
+Code generation for direct specialized arrays
--- /dev/null
+Code generation for specialized arrays
--- /dev/null
+Code generation for specialized vectors
--- /dev/null
+Stack effect inference for alien calls
--- /dev/null
+Stack effect inference for conditionals
--- /dev/null
+Stack effect inference for inline and inline recursive words
--- /dev/null
+Tracking word nesting during stack effect inference
--- /dev/null
+Simple binary tree
--- /dev/null
+Abstract stack checker values
--- /dev/null
+Dummy implementation of node visitor protocol
--- /dev/null
+Node visitor protocol
: staging-command-line ( profile -- flags )
[
"-staging" ,
-
dup empty? [
"-i=" my-boot-image-name append ,
] [
dup but-last ?make-staging-image
-
"-resource-path=" "" resource-path append ,
-
"-i=" over but-last staging-image-name append ,
-
"-run=tools.deploy.restage" ,
] if
-
"-output-image=" over staging-image-name append ,
-
"-include=" swap " " join append ,
-
strip-word-names? [ "-no-stack-traces" , ] when
-
"-no-user-init" ,
] { } make ;
[
"-i=" bootstrap-profile staging-image-name append ,
-
"-resource-path=" "" resource-path append ,
-
"-run=tools.deploy.shaker" ,
-
[ "-deploy-vocab=" prepend , ]
[ make-deploy-config "-deploy-config=" prepend , ] bi
-
"-output-image=" prepend ,
-
strip-word-names? [ "-no-stack-traces" , ] when
] { } make
] bind ;
"tools.deploy.test.10" shake-and-bake\r
run-temp-image\r
] unit-test\r
+\r
+[ ] [\r
+ "tools.deploy.test.11" shake-and-bake\r
+ run-temp-image\r
+] unit-test
\ No newline at end of file
-! Copyright (C) 2007, 2008 Slava Pestov.
+! Copyright (C) 2007, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors io.backend io.streams.c init fry
namespaces make assocs kernel parser lexer strings.parser vocabs
"tools"
"io.launcher"
"random"
- "compiler"
"stack-checker"
"bootstrap"
"listener"
strip-dictionary? [
"libraries" "alien" lookup ,
- { } { "cpu" } strip-vocab-globals %
+ { } { "cpu" "compiler" } strip-vocab-globals %
{
gensym
SYMBOL: deploy-vocab
-: set-boot-quot* ( word -- )
+: [:c] ( -- word ) ":c" "debugger" lookup ;
+
+: [print-error] ( -- word ) "print-error" "debugger" lookup ;
+
+: deploy-boot-quot ( word -- )
[
- \ boot ,
+ [ boot ] %
init-hooks get values concat %
- ,
- strip-io? [ \ flush , ] unless
+ strip-debugger? [ , ] [
+ ! Don't reference try directly
+ [:c]
+ [print-error]
+ '[
+ [ _ execute ] [
+ _ execute nl
+ _ execute
+ ] recover
+ ] %
+ ] if
+ strip-io? [ [ flush ] % ] unless
[ 0 exit ] %
] [ ] make
set-boot-quot ;
strip-init-hooks
strip-c-io
f 5 setenv ! we can't use the Factor debugger or Factor I/O anymore
- deploy-vocab get vocab-main set-boot-quot*
+ deploy-vocab get vocab-main deploy-boot-quot
stripped-word-props
stripped-globals strip-globals
compress-byte-arrays
compress-wrappers
strip-words ;
+: deploy-error-handler ( quot -- )
+ [
+ strip-debugger?
+ [ error-continuation get call>> callstack>array die ]
+ ! Don't reference these words literally, if we're stripping the
+ ! debugger out we don't want to load the prettyprinter at all
+ [ [:c] execute nl [print-error] execute flush ] if
+ 1 exit
+ ] recover ; inline
+
: (deploy) ( final-image vocab config -- )
#! Does the actual work of a deployment in the slave
#! stage2 image
[
[
+ strip-debugger? [
+ "debugger" require
+ "inspector" require
+ ] unless
deploy-vocab set
deploy-vocab get require
+ deploy-vocab get vocab-main [
+ "Vocabulary has no MAIN: word." print flush 1 exit
+ ] unless
strip
finish-deploy
- ] [ error-continuation get call>> callstack>array die 1 exit ] recover
+ ] deploy-error-handler
] bind ;
: do-deploy ( -- )
--- /dev/null
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: tools.test tools.deploy.test.11 ;
+IN: tools.deploy.test.11.tests
--- /dev/null
+! Copyright (C) 2009 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: eval ;
+IN: tools.deploy.test.11
+
+: foo ( -- ) "USING: math prettyprint ; 2 2 + ." eval ;
+
+MAIN: foo
\ No newline at end of file
--- /dev/null
+Slava Pestov
\ No newline at end of file
--- /dev/null
+USING: tools.deploy.config ;
+H{
+ { deploy-reflection 5 }
+ { deploy-word-props? f }
+ { deploy-c-types? f }
+ { deploy-name "tools.deploy.test.11" }
+ { "stop-after-last-window?" t }
+ { deploy-word-defs? f }
+ { deploy-math? f }
+ { deploy-unicode? f }
+ { deploy-threads? f }
+ { deploy-compiler? f }
+ { deploy-io 2 }
+ { deploy-ui? f }
+}
--- /dev/null
+File listing and disk usage tools
--- /dev/null
+Tool to create the scaffolding for new vocabularies
--- /dev/null
+Listing running threads
--- /dev/null
+Browsing vocabularies
--- /dev/null
+Reloading vocabularies and cross-referencing vocabularies
--- /dev/null
+Canvas gadget for caching rendering to a display list
--- /dev/null
+Graphical front-end for deploy tool
--- /dev/null
+Windows UI backend
--- /dev/null
+X11 UI backend
--- /dev/null
+Unicode grapheme and word breaking
--- /dev/null
+Unicode case conversion
--- /dev/null
+Unicode character categories
--- /dev/null
+Unicode string comparison and sorting (collation)
--- /dev/null
+Parsing Unicode data files
--- /dev/null
+Unicode string normalization
-Unicode 5.0 support
+Unicode 5.1 support
--- /dev/null
+Parsing words used by Unicode implementation
--- /dev/null
+Working with Unix user groups
--- /dev/null
+Working with Unix users
--- /dev/null
+Deque implementation with constant-time insertion and removal at either end, and better space efficiency than a double-linked list
--- /dev/null
+Support for https:// URLs
--- /dev/null
+Persistent sequence implementation optimizing the case where there is no sharing
ALIAS: ShellExecute ShellExecuteW
: open-in-explorer ( dir -- )
- f "open" rot (normalize-path) f f SW_SHOWNORMAL ShellExecute drop ;
+ [ f "open" ] dip (normalize-path) f f SW_SHOWNORMAL ShellExecute drop ;
: shell32-directory ( n -- str )
f swap f SHGFP_TYPE_DEFAULT
--- /dev/null
+Word-wrapping strings
--- /dev/null
+Word-wrapping words
--- /dev/null
+Standard HTML entities
--- /dev/null
+Syntax highlighting code as HTML
--- /dev/null
+Tokenizing lines of text with a syntax mode
USING: help.markup help.syntax
-kernel kernel.private prettyprint sequences.private ;
+kernel kernel.private prettyprint sequences.private sequences ;
IN: arrays
+ARTICLE: "arrays-unsafe" "Unsafe array operations"
+"These two words are used internally by the Factor implementation. User code should never need to call them; instead use " { $link nth } " and " { $link set-nth } "."
+{ $subsection array-nth }
+{ $subsection set-array-nth } ;
+
ARTICLE: "arrays" "Arrays"
-"Arrays are fixed-size mutable sequences (" { $link "sequence-protocol" } "). The literal syntax is covered in " { $link "syntax-arrays" } ". Resizable arrays also exist and are called vectors; see " { $link "vectors" } "."
+"The " { $vocab-link "arrays" } " vocabulary implements fixed-size mutable sequences which support the " { $link "sequence-protocol" } "."
+$nl
+"The " { $vocab-link "arrays" } " vocabulary only includes words for creating new arrays. To access and modify array elements, use " { $link "sequences" } " in the " { $vocab-link "sequences" } " vocabulary."
$nl
-"Array words are in the " { $vocab-link "arrays" } " vocabulary. Unsafe implementation words are in the " { $vocab-link "sequences.private" } " vocabulary."
+"Array literal syntax is documented in " { $link "syntax-arrays" } ". Resizable arrays also exist and are known as " { $link "vectors" } "."
$nl
"Arrays form a class of objects:"
{ $subsection array }
{ $subsection 2array }
{ $subsection 3array }
{ $subsection 4array }
-"Arrays can be accessed without bounds checks in a pointer unsafe way."
-{ $subsection array-nth }
-{ $subsection set-array-nth }
"The class of two-element arrays:"
-{ $subsection pair } ;
+{ $subsection pair }
+"Arrays can be accessed without bounds checks in a pointer unsafe way."
+{ $subsection "arrays-unsafe" } ;
ABOUT: "arrays"
--- /dev/null
+Set-theoretic operations on classes
--- /dev/null
+Built-in classes
--- /dev/null
+Intersection classes
--- /dev/null
+Utilities for class-defining parsing words
--- /dev/null
+Singleton classes
--- /dev/null
+Utilities for tuple-defining parsing words
-Object system implementation
+Tuple classes
-Complex conditionals (cond, case) and support words for quotation construction
+Complex conditionals (cond, case) and generalized dataflow combinators (cleave, spread)
--- /dev/null
+Parsing stack effect declarations
--- /dev/null
+Utilities for generic word and method defining parsing words
--- /dev/null
+Chained-conditional dispatch strategy
--- /dev/null
+Generic word dispatch strategy implementation
--- /dev/null
+Jump table keyed by pointer tag dispatch strategy
--- /dev/null
+Tuple class dispatch strategy
ARTICLE: "hashtables" "Hashtables"
"A hashtable provides efficient (expected constant time) lookup and storage of key/value pairs. Keys are compared for equality, and a hashing function is used to reduce the number of comparisons made. The literal syntax is covered in " { $link "syntax-hashtables" } "."
$nl
-"Hashtable words are in the " { $vocab-link "hashtables" } " vocabulary. Unsafe implementation words are in the " { $vocab-link "hashtables.private" } " vocabulary."
-$nl
-"Hashtables implement the " { $link "assocs-protocol" } "."
+"Words for constructing hashtables are in the " { $vocab-link "hashtables" } " vocabulary. Hashtables implement the " { $link "assocs-protocol" } ", and all " { $link "assocs" } " can be used on them; there are no hashtable-specific words to access and modify keys, because associative mapping operations are generic and work with all associative mappings."
$nl
"Hashtables are a class of objects."
{ $subsection hashtable }
--- /dev/null
+Dummy implementation of stream protocol
--- /dev/null
+Generic protocol for totally-ordered objects
IN: sbufs
ARTICLE: "sbufs" "String buffers"
-"A string buffer is a resizable mutable sequence of characters. The literal syntax is covered in " { $link "syntax-sbufs" } "."
+"The " { $vocab-link "sbufs" } " vocabulary implements resizable mutable sequence of characters. The literal syntax is covered in " { $link "syntax-sbufs" } "."
$nl
-"String buffers can be used to construct new strings by accumilating substrings and characters, however usually they are only used indirectly, since the sequence construction words are more convenient to use in most cases (see " { $link "namespaces-make" } ")."
-$nl
-"String buffer words are found in the " { $vocab-link "sbufs" } " vocabulary."
+"String buffers implement the " { $link "sequence-protocol" } " and thus all " { $link "sequences" } " can be used with them. String buffers can be used to construct new strings by accumilating substrings and characters, however usually they are only used indirectly, since the sequence construction words are more convenient to use in most cases (see " { $link "namespaces-make" } ")."
$nl
"String buffers form a class of objects:"
{ $subsection sbuf }
HELP: array-nth
{ $values { "n" "a non-negative fixnum" } { "array" "an array" } { "elt" object } }
{ $description "Low-level array element accessor." }
-{ $warning "This word is in the " { $vocab-link "sequences.private" } " vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory." } ;
+{ $warning "This word is in the " { $vocab-link "sequences.private" } " vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory. User code must use " { $link nth } " instead." } ;
HELP: set-array-nth
{ $values { "elt" object } { "n" "a non-negative fixnum" } { "array" "an array" } }
{ $description "Low-level array element mutator." }
-{ $warning "This word is in the " { $vocab-link "sequences.private" } " vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory." } ;
+{ $warning "This word is in the " { $vocab-link "sequences.private" } " vocabulary because it is unsafe. It does not check types or array bounds, and improper use can corrupt memory. User code must use " { $link set-nth } " instead." } ;
HELP: collect
{ $values { "n" "a non-negative integer" } { "quot" { $quotation "( n -- value )" } } { "into" "a sequence of length at least " { $snippet "n" } } }
--- /dev/null
+Parsing strings
USING: arrays byte-arrays help.markup help.syntax
kernel kernel.private strings.private sequences vectors
-sbufs math ;
+sbufs math tools.vocabs.browser ;
IN: strings
ARTICLE: "strings" "Strings"
-"A string is a fixed-size mutable sequence of Unicode 5.1 code points."
+"The " { $vocab-link "strings" } " vocabulary implements fixed-size mutable sequences of of Unicode 5.1 code points."
$nl
-"Characters are not a first-class type; they are simply represented as integers between 0 and 16777216 (2^24). Only characters up to 2097152 (2^21) have a defined meaning in Unicode."
+"Code points, or characters as they're informally known, are not a first-class type; they are simply represented as integers in the range 0 and 16,777,216 (2^24), inclusive. Only characters up to 2,097,152 (2^21) have a defined meaning in Unicode."
$nl
"String literal syntax is covered in " { $link "syntax-strings" } "."
$nl
-"String words are found in the " { $vocab-link "strings" } " vocabulary."
+"Since strings implement the " { $link "sequence-protocol" } ", basic string manipulation can be performed with " { $link "sequences" } " in the " { $vocab-link "sequences" } " vocabulary. More text processing functionality can be found in vocabularies carrying the " { $link T{ vocab-tag { name "text" } } } " tag."
$nl
"Strings form a class:"
{ $subsection string }
{ $subsection string? }
-"Creating strings:"
+"Creating new strings:"
{ $subsection >string }
{ $subsection <string> }
"Creating a string from a single character:"
-{ $subsection 1string }
-"Since strings are sequences, basic string manipulation can be performed using sequence operations (" { $link "sequences" } "). More advanced functionality can be found in other vocabularies, including but not limited to:"
-{ $list
- { { $link "ascii" } " - ASCII algorithms for interoperability with legacy applications" }
- { { $link "unicode" } " - Unicode algorithms for modern multilingual applications" }
- { { $vocab-link "regexp" } " - regular expressions" }
- { { $vocab-link "peg" } " - parser expression grammars" }
-} ;
+{ $subsection 1string } ;
ABOUT: "strings"
-OS and CPU queries, environment variables, paths
+OS and CPU queries and other system-level tasks
IN: vectors
ARTICLE: "vectors" "Vectors"
-"A vector is a resizable mutable sequence of objects. The literal syntax is covered in " { $link "syntax-vectors" } ". Vector words are found in the " { $vocab-link "vectors" } " vocabulary."
+"The " { $vocab-link "vectors" } " vocabulary implements resizable mutable sequence which support the " { $link "sequence-protocol" } "."
$nl
-"Vectors form a class:"
+"The " { $vocab-link "vectors" } " vocabulary only includes words for creating new vectors. To access and modify vector elements, use " { $link "sequences" } " in the " { $vocab-link "sequences" } " vocabulary."
+$nl
+"Vector literal syntax is documented in " { $link "syntax-vectors" } "."
+$nl
+"Vectors are intended to be used with " { $link "sequences-destructive" } ". Code that does not modify sequences in-place can use fixed-size arrays without loss of generality; see " { $link "arrays" } "."
+$nl
+"Vectors form a class of objects:"
{ $subsection vector }
{ $subsection vector? }
-"Creating vectors:"
+"Creating new vectors:"
{ $subsection >vector }
{ $subsection <vector> }
"Creating a vector from a single element:"
{ $subsection 1vector }
-"If you don't care about initial capacity, a more elegant way to create a new vector is to write:"
+"If you don't care about initial capacity, an elegant way to create a new vector is to write:"
{ $code "V{ } clone" } ;
ABOUT: "vectors"
--- /dev/null
+Utilities for parsing and defining words
--- /dev/null
+Implementation of constant words
--- /dev/null
+Implementation of symbol words
-text
javascript
parsing
languages
-text
javascript
parsing
languages
-text
javascript
parsing
languages
-text
javascript
parsing
languages