Use run-resource for code distributed with Factor; run-file is for user code.

cvs
Trent Buck 2006-01-21 06:04:03 +00:00
parent 389ebda01d
commit 8914e9b640
23 changed files with 44 additions and 49 deletions

View File

@ -1,9 +1,9 @@
IN: scratchpad
USING: kernel parser sequences words compiler ;
"contrib/crypto/load.factor" run-file
"/contrib/crypto/load.factor" run-resource
{
"net-bytes"
"aim"
} [ "contrib/aim/" swap ".factor" append3 run-file ] each
} [ "/contrib/aim/" swap ".factor" append3 run-resource ] each

View File

@ -12,8 +12,7 @@
! Then, start Factor as usual (./f factor.image) and enter these
! at the listener:
!
! "cairo.factor" run-file
! "cairo_sdl.factor" run-file
! "/contrib/cairo/load.factor" run-resource
! "cairo_simple.factor" run-file
IN: cairo-simple

View File

@ -12,8 +12,7 @@
! Then, start Factor as usual (./f factor.image) and enter these
! at the listener:
!
! "cairo.factor" run-file
! "cairo_sdl.factor" run-file
! "/contrib/cairo/load.factor" run-resource
! "cairo_text.factor" run-file
IN: cairo-text

View File

@ -10,4 +10,4 @@ USING: alien kernel parser compiler words sequences ;
{
"cairo"
"cairo_sdl"
} [ "contrib/cairo/" swap ".factor" append3 run-file ] each
} [ "/contrib/cairo/" swap ".factor" append3 run-resource ] each

View File

@ -19,11 +19,9 @@ processes can share data via Factor's mutable data structures it is
not recommended as the use of shared state concurrency is often a
cause of problems.</p>
<h1>Loading</h1>
<p>The quickest way to get up and running with this library is to
change to the 'concurrency' directory and run Factor. Then execute the
following commands:</p>
<p>The quickest way to get up and running with this library is to type the following into the listener:</p>
<pre class="code">
"load.factor" run-file
"/contrib/concurrency/load.factor" run-resource
USE: concurrency
USE: concurrency-examples
</pre>

View File

@ -1,10 +1,10 @@
IN: scratchpad
USING: kernel parser compiler words sequences ;
"contrib/dlists.factor" run-file
"contrib/math/load.factor" run-file
"/contrib/dlists.factor" run-resource
"/contrib/math/load.factor" run-resource
{
"concurrency"
"concurrency-examples"
} [ "contrib/concurrency/" swap ".factor" append3 run-file ] each
} [ "/contrib/concurrency/" swap ".factor" append3 run-resource ] each

View File

@ -1,8 +1,8 @@
IN: scratchpad
USING: words kernel parser sequences io compiler ;
"contrib/httpd/load.factor" run-file
"contrib/parser-combinators/load.factor" run-file
"/contrib/httpd/load.factor" run-resource
"/contrib/parser-combinators/load.factor" run-resource
{
"cont-examples"
@ -13,4 +13,4 @@ USING: words kernel parser sequences io compiler ;
"eval-responder"
"live-updater-responder"
"cont-testing"
} [ "contrib/cont-responder/" swap ".factor" append3 run-file ] each
} [ "/contrib/cont-responder/" swap ".factor" append3 run-resource ] each

View File

@ -1,10 +1,10 @@
IN: scratchpad
USING: kernel parser sequences words compiler ;
"contrib/math/load.factor" run-file
"/contrib/math/load.factor" run-resource
{
"common"
"md5"
"sha1"
} [ "contrib/crypto/" swap ".factor" append3 run-file ] each
} [ "/contrib/crypto/" swap ".factor" append3 run-resource ] each

View File

@ -20,4 +20,4 @@ USING: words kernel parser sequences io compiler ;
"test/http-client"
"test/httpd"
"test/url-encoding"
} [ "contrib/httpd/" swap ".factor" append3 run-file ] each
} [ "/contrib/httpd/" swap ".factor" append3 run-resource ] each

View File

@ -6,7 +6,7 @@ USING: alien compiler kernel memory parser sequences words ;
"coroutines"
"dlists"
"splay-trees"
} [ "contrib/" swap ".factor" append3 run-file clear ] each
} [ "/contrib/" swap ".factor" append3 run-resource clear ] each
{ "cairo"
"math"
@ -23,4 +23,4 @@ USING: alien compiler kernel memory parser sequences words ;
"parser-combinators"
"cont-responder"
"space-invaders"
} [ "contrib/" swap "/load.factor" append3 run-file clear ] each
} [ "/contrib/" swap "/load.factor" append3 run-resource clear ] each

View File

@ -10,4 +10,4 @@ USING: kernel parser sequences words compiler ;
"matrices"
"statistics"
"numerical-integration"
} [ "contrib/math/" swap ".factor" append3 run-file ] each
} [ "/contrib/math/" swap ".factor" append3 run-resource ] each

View File

@ -6,4 +6,4 @@ USING: kernel parser sequences words compiler ;
"parser-combinators"
"lazy-examples"
"tests"
} [ "contrib/parser-combinators/" swap ".factor" append3 run-file ] each
} [ "/contrib/parser-combinators/" swap ".factor" append3 run-resource ] each

View File

@ -8,4 +8,4 @@ USING: alien compiler kernel parser sequences words ;
"postgresql"
"postgresql-test"
! "private" ! Put your password in this file
} [ "contrib/postgresql/" swap ".factor" append3 run-file ] each
} [ "/contrib/postgresql/" swap ".factor" append3 run-resource ] each

View File

@ -1,9 +1,9 @@
IN: scratchpad
USING: kernel parser compiler words sequences io ;
"contrib/parser-combinators/load.factor" run-file
"/contrib/parser-combinators/load.factor" run-resource
{
"cpu-8080"
"space-invaders"
} [ "contrib/space-invaders/" swap ".factor" append3 run-file ] each
} [ "/contrib/space-invaders/" swap ".factor" append3 run-resource ] each

View File

@ -8,4 +8,4 @@ USING: kernel alien parser compiler words sequences ;
"tuple-db"
"test"
"tuple-db-tests"
} [ "contrib/sqlite/" swap ".factor" append3 run-file ] each
} [ "/contrib/sqlite/" swap ".factor" append3 run-resource ] each

View File

@ -51,19 +51,16 @@ following command:</p>
<pre class="code">
./f boot.image.le32 -libraries:sqlite:name=libsqlite3.so
</pre>
<p>The quickest way to get up and running with this library is to
change to the 'sqlite' directory and run Factor. Then execute the
following commands:</p>
<p>The quickest way to get up and running with this library is to type the following into the listener:</p>
<pre class="code">
"sqlite.factor" run-file
"tuple-db.factor" run-file
"/contrib/sqlite/load.factor" run-resource
USE: sqlite
USE: tuple-db
</pre>
<p>Some simple tests can be run to check that everything is working
ok:</p>
<pre class="code">
"tuple-db-tests.factor" run-file
"/contrib/sqlite/tuple-db-tests.factor" run-resource
</pre>
<h1>Basic Usage</h1>
<p>This library can be used for storing simple Factor tuples in a

View File

@ -5,4 +5,4 @@ USING: kernel parser sequences words compiler ;
"dimensioned"
"si-units"
"constants"
} [ "contrib/units/" swap ".factor" append3 run-file ] each
} [ "/contrib/units/" swap ".factor" append3 run-resource ] each

View File

@ -11,4 +11,4 @@ USING: alien compiler kernel parser sequences words ;
"types"
"kernel32"
"user32"
} [ "contrib/win32/" swap ".factor" append3 run-file ] each
} [ "/contrib/win32/" swap ".factor" append3 run-resource ] each

View File

@ -1,5 +1,5 @@
USING: kernel parser words compiler sequences ;
"lindenmayer.factor" run-file
"/contrib/x11/examples/lindenmayer/lindenmayer.factor" run-resource
"lindenmayer" words [ try-compile ] each clear

View File

@ -11,6 +11,6 @@ USING: alien compiler kernel parser sequences words ;
"concurrent-widgets"
"glx"
"gl"
} [ "contrib/x11/" swap ".factor" append3 run-file ] each
} [ "/contrib/x11/" swap ".factor" append3 run-resource ] each
! { "xlib" "x11" } [ words [ try-compile ] each ] each

View File

@ -8,7 +8,7 @@ USING: kernel alien parser sequences words compiler ;
"keysymdef.factor"
"x-events.factor"
"glx.factor"
] [ "contrib/x11/" swap append run-file ] each
] [ "/contrib/x11/" swap append run-resource ] each
"x11" words [ try-compile ] each
"xlib" words [ try-compile ] each

View File

@ -582,7 +582,7 @@ The 'cont-testing.factor' file (in the contrib/cont-responder
directory) contains some simple words that maintains this state for
you in such a way that you can test the words from the console:
"cont-testing.factor" run-file
"/contrib/cont-testing/load.factor" run-resource
For this example we'll call the 'subroutine-example1' responder from
above. First we need to put a 'testing state' object on the stack. All
@ -671,4 +671,4 @@ Now we submit the post data along to the 'action' url:
</body>
</html>
As you can see the post data was sent correctly.
As you can see the post data was sent correctly.

View File

@ -1,13 +1,15 @@
USING: io parser ;
"examples/factoroids/utils.factor" run-file
"examples/factoroids/models.factor" run-file
"examples/factoroids/bodies.factor" run-file
"examples/factoroids/actors.factor" run-file
"examples/factoroids/projectiles.factor" run-file
"examples/factoroids/ai.factor" run-file
"examples/factoroids/input.factor" run-file
"examples/factoroids/factoroids.factor" run-file
{
"utils"
"models"
"bodies"
"actors"
"projectiles"
"ai"
"input"
"factoroids"
} [ "/examples/factoroids/" swap ".factor" append3 run-resource ] each
"To play Factoroids, enter the following in the listener:" print
terpri