Use run-resource for code distributed with Factor; run-file is for user code.
parent
389ebda01d
commit
8914e9b640
|
|
@ -1,9 +1,9 @@
|
||||||
IN: scratchpad
|
IN: scratchpad
|
||||||
USING: kernel parser sequences words compiler ;
|
USING: kernel parser sequences words compiler ;
|
||||||
|
|
||||||
"contrib/crypto/load.factor" run-file
|
"/contrib/crypto/load.factor" run-resource
|
||||||
|
|
||||||
{
|
{
|
||||||
"net-bytes"
|
"net-bytes"
|
||||||
"aim"
|
"aim"
|
||||||
} [ "contrib/aim/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/aim/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@
|
||||||
! Then, start Factor as usual (./f factor.image) and enter these
|
! Then, start Factor as usual (./f factor.image) and enter these
|
||||||
! at the listener:
|
! at the listener:
|
||||||
!
|
!
|
||||||
! "cairo.factor" run-file
|
! "/contrib/cairo/load.factor" run-resource
|
||||||
! "cairo_sdl.factor" run-file
|
|
||||||
! "cairo_simple.factor" run-file
|
! "cairo_simple.factor" run-file
|
||||||
|
|
||||||
IN: cairo-simple
|
IN: cairo-simple
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@
|
||||||
! Then, start Factor as usual (./f factor.image) and enter these
|
! Then, start Factor as usual (./f factor.image) and enter these
|
||||||
! at the listener:
|
! at the listener:
|
||||||
!
|
!
|
||||||
! "cairo.factor" run-file
|
! "/contrib/cairo/load.factor" run-resource
|
||||||
! "cairo_sdl.factor" run-file
|
|
||||||
! "cairo_text.factor" run-file
|
! "cairo_text.factor" run-file
|
||||||
|
|
||||||
IN: cairo-text
|
IN: cairo-text
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,4 @@ USING: alien kernel parser compiler words sequences ;
|
||||||
{
|
{
|
||||||
"cairo"
|
"cairo"
|
||||||
"cairo_sdl"
|
"cairo_sdl"
|
||||||
} [ "contrib/cairo/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/cairo/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -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
|
not recommended as the use of shared state concurrency is often a
|
||||||
cause of problems.</p>
|
cause of problems.</p>
|
||||||
<h1>Loading</h1>
|
<h1>Loading</h1>
|
||||||
<p>The quickest way to get up and running with this library is to
|
<p>The quickest way to get up and running with this library is to type the following into the listener:</p>
|
||||||
change to the 'concurrency' directory and run Factor. Then execute the
|
|
||||||
following commands:</p>
|
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
"load.factor" run-file
|
"/contrib/concurrency/load.factor" run-resource
|
||||||
USE: concurrency
|
USE: concurrency
|
||||||
USE: concurrency-examples
|
USE: concurrency-examples
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
IN: scratchpad
|
IN: scratchpad
|
||||||
USING: kernel parser compiler words sequences ;
|
USING: kernel parser compiler words sequences ;
|
||||||
|
|
||||||
"contrib/dlists.factor" run-file
|
"/contrib/dlists.factor" run-resource
|
||||||
"contrib/math/load.factor" run-file
|
"/contrib/math/load.factor" run-resource
|
||||||
|
|
||||||
{
|
{
|
||||||
"concurrency"
|
"concurrency"
|
||||||
"concurrency-examples"
|
"concurrency-examples"
|
||||||
} [ "contrib/concurrency/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/concurrency/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
IN: scratchpad
|
IN: scratchpad
|
||||||
USING: words kernel parser sequences io compiler ;
|
USING: words kernel parser sequences io compiler ;
|
||||||
|
|
||||||
"contrib/httpd/load.factor" run-file
|
"/contrib/httpd/load.factor" run-resource
|
||||||
"contrib/parser-combinators/load.factor" run-file
|
"/contrib/parser-combinators/load.factor" run-resource
|
||||||
|
|
||||||
{
|
{
|
||||||
"cont-examples"
|
"cont-examples"
|
||||||
|
|
@ -13,4 +13,4 @@ USING: words kernel parser sequences io compiler ;
|
||||||
"eval-responder"
|
"eval-responder"
|
||||||
"live-updater-responder"
|
"live-updater-responder"
|
||||||
"cont-testing"
|
"cont-testing"
|
||||||
} [ "contrib/cont-responder/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/cont-responder/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
IN: scratchpad
|
IN: scratchpad
|
||||||
USING: kernel parser sequences words compiler ;
|
USING: kernel parser sequences words compiler ;
|
||||||
|
|
||||||
"contrib/math/load.factor" run-file
|
"/contrib/math/load.factor" run-resource
|
||||||
|
|
||||||
{
|
{
|
||||||
"common"
|
"common"
|
||||||
"md5"
|
"md5"
|
||||||
"sha1"
|
"sha1"
|
||||||
} [ "contrib/crypto/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/crypto/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,4 @@ USING: words kernel parser sequences io compiler ;
|
||||||
"test/http-client"
|
"test/http-client"
|
||||||
"test/httpd"
|
"test/httpd"
|
||||||
"test/url-encoding"
|
"test/url-encoding"
|
||||||
} [ "contrib/httpd/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/httpd/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ USING: alien compiler kernel memory parser sequences words ;
|
||||||
"coroutines"
|
"coroutines"
|
||||||
"dlists"
|
"dlists"
|
||||||
"splay-trees"
|
"splay-trees"
|
||||||
} [ "contrib/" swap ".factor" append3 run-file clear ] each
|
} [ "/contrib/" swap ".factor" append3 run-resource clear ] each
|
||||||
|
|
||||||
{ "cairo"
|
{ "cairo"
|
||||||
"math"
|
"math"
|
||||||
|
|
@ -23,4 +23,4 @@ USING: alien compiler kernel memory parser sequences words ;
|
||||||
"parser-combinators"
|
"parser-combinators"
|
||||||
"cont-responder"
|
"cont-responder"
|
||||||
"space-invaders"
|
"space-invaders"
|
||||||
} [ "contrib/" swap "/load.factor" append3 run-file clear ] each
|
} [ "/contrib/" swap "/load.factor" append3 run-resource clear ] each
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,4 @@ USING: kernel parser sequences words compiler ;
|
||||||
"matrices"
|
"matrices"
|
||||||
"statistics"
|
"statistics"
|
||||||
"numerical-integration"
|
"numerical-integration"
|
||||||
} [ "contrib/math/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/math/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@ USING: kernel parser sequences words compiler ;
|
||||||
"parser-combinators"
|
"parser-combinators"
|
||||||
"lazy-examples"
|
"lazy-examples"
|
||||||
"tests"
|
"tests"
|
||||||
} [ "contrib/parser-combinators/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/parser-combinators/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,4 @@ USING: alien compiler kernel parser sequences words ;
|
||||||
"postgresql"
|
"postgresql"
|
||||||
"postgresql-test"
|
"postgresql-test"
|
||||||
! "private" ! Put your password in this file
|
! "private" ! Put your password in this file
|
||||||
} [ "contrib/postgresql/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/postgresql/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
IN: scratchpad
|
IN: scratchpad
|
||||||
USING: kernel parser compiler words sequences io ;
|
USING: kernel parser compiler words sequences io ;
|
||||||
|
|
||||||
"contrib/parser-combinators/load.factor" run-file
|
"/contrib/parser-combinators/load.factor" run-resource
|
||||||
|
|
||||||
{
|
{
|
||||||
"cpu-8080"
|
"cpu-8080"
|
||||||
"space-invaders"
|
"space-invaders"
|
||||||
} [ "contrib/space-invaders/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/space-invaders/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,4 @@ USING: kernel alien parser compiler words sequences ;
|
||||||
"tuple-db"
|
"tuple-db"
|
||||||
"test"
|
"test"
|
||||||
"tuple-db-tests"
|
"tuple-db-tests"
|
||||||
} [ "contrib/sqlite/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/sqlite/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -51,19 +51,16 @@ following command:</p>
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
./f boot.image.le32 -libraries:sqlite:name=libsqlite3.so
|
./f boot.image.le32 -libraries:sqlite:name=libsqlite3.so
|
||||||
</pre>
|
</pre>
|
||||||
<p>The quickest way to get up and running with this library is to
|
<p>The quickest way to get up and running with this library is to type the following into the listener:</p>
|
||||||
change to the 'sqlite' directory and run Factor. Then execute the
|
|
||||||
following commands:</p>
|
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
"sqlite.factor" run-file
|
"/contrib/sqlite/load.factor" run-resource
|
||||||
"tuple-db.factor" run-file
|
|
||||||
USE: sqlite
|
USE: sqlite
|
||||||
USE: tuple-db
|
USE: tuple-db
|
||||||
</pre>
|
</pre>
|
||||||
<p>Some simple tests can be run to check that everything is working
|
<p>Some simple tests can be run to check that everything is working
|
||||||
ok:</p>
|
ok:</p>
|
||||||
<pre class="code">
|
<pre class="code">
|
||||||
"tuple-db-tests.factor" run-file
|
"/contrib/sqlite/tuple-db-tests.factor" run-resource
|
||||||
</pre>
|
</pre>
|
||||||
<h1>Basic Usage</h1>
|
<h1>Basic Usage</h1>
|
||||||
<p>This library can be used for storing simple Factor tuples in a
|
<p>This library can be used for storing simple Factor tuples in a
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@ USING: kernel parser sequences words compiler ;
|
||||||
"dimensioned"
|
"dimensioned"
|
||||||
"si-units"
|
"si-units"
|
||||||
"constants"
|
"constants"
|
||||||
} [ "contrib/units/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/units/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,4 @@ USING: alien compiler kernel parser sequences words ;
|
||||||
"types"
|
"types"
|
||||||
"kernel32"
|
"kernel32"
|
||||||
"user32"
|
"user32"
|
||||||
} [ "contrib/win32/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/win32/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
USING: kernel parser words compiler sequences ;
|
USING: kernel parser words compiler sequences ;
|
||||||
|
|
||||||
"lindenmayer.factor" run-file
|
"/contrib/x11/examples/lindenmayer/lindenmayer.factor" run-resource
|
||||||
|
|
||||||
"lindenmayer" words [ try-compile ] each clear
|
"lindenmayer" words [ try-compile ] each clear
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,6 @@ USING: alien compiler kernel parser sequences words ;
|
||||||
"concurrent-widgets"
|
"concurrent-widgets"
|
||||||
"glx"
|
"glx"
|
||||||
"gl"
|
"gl"
|
||||||
} [ "contrib/x11/" swap ".factor" append3 run-file ] each
|
} [ "/contrib/x11/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
||||||
! { "xlib" "x11" } [ words [ try-compile ] each ] each
|
! { "xlib" "x11" } [ words [ try-compile ] each ] each
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ USING: kernel alien parser sequences words compiler ;
|
||||||
"keysymdef.factor"
|
"keysymdef.factor"
|
||||||
"x-events.factor"
|
"x-events.factor"
|
||||||
"glx.factor"
|
"glx.factor"
|
||||||
] [ "contrib/x11/" swap append run-file ] each
|
] [ "/contrib/x11/" swap append run-resource ] each
|
||||||
|
|
||||||
"x11" words [ try-compile ] each
|
"x11" words [ try-compile ] each
|
||||||
"xlib" words [ try-compile ] each
|
"xlib" words [ try-compile ] each
|
||||||
|
|
|
||||||
|
|
@ -582,7 +582,7 @@ The 'cont-testing.factor' file (in the contrib/cont-responder
|
||||||
directory) contains some simple words that maintains this state for
|
directory) contains some simple words that maintains this state for
|
||||||
you in such a way that you can test the words from the console:
|
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
|
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
|
above. First we need to put a 'testing state' object on the stack. All
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
USING: io parser ;
|
USING: io parser ;
|
||||||
|
|
||||||
"examples/factoroids/utils.factor" run-file
|
{
|
||||||
"examples/factoroids/models.factor" run-file
|
"utils"
|
||||||
"examples/factoroids/bodies.factor" run-file
|
"models"
|
||||||
"examples/factoroids/actors.factor" run-file
|
"bodies"
|
||||||
"examples/factoroids/projectiles.factor" run-file
|
"actors"
|
||||||
"examples/factoroids/ai.factor" run-file
|
"projectiles"
|
||||||
"examples/factoroids/input.factor" run-file
|
"ai"
|
||||||
"examples/factoroids/factoroids.factor" run-file
|
"input"
|
||||||
|
"factoroids"
|
||||||
|
} [ "/examples/factoroids/" swap ".factor" append3 run-resource ] each
|
||||||
|
|
||||||
"To play Factoroids, enter the following in the listener:" print
|
"To play Factoroids, enter the following in the listener:" print
|
||||||
terpri
|
terpri
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue