Am Tue, 28 Jul 2015 23:41:59 +0200 schrieb Björn Lindqvist <[email protected]>:
> I'm not sure I understand you. By default, "resource:" is setup as an
> alias the the directory containing the image file. But you can
> override it:
>
> factor -resource-path=/bla/bla -i=factor.image
>
> Essentially, "resource:" is just a convenient alias and you are free
> to put your vocab roots anywhere on the filesystem. For example, you
> could add "." first on the vocab roots and then you'd have a vocab
> lookup similar to how Python looks up modules.
>
It's about the existing vocabularies. They seem to disappear when I use
an image file located elsewhere. Without vocabularies the listener
crashes too. So I wrote a script scratchVocabulary.factor:
---------------------------------------------------------
USING:
io io.backend io.pathnames prettyprint
;
"" "resource:" prepend-path normalize-path . flush
"" "vocab:" prepend-path normalize-path . flush
---------------------------------------------------------
With this script I can see that "vocab:" is affected by the location of
the image file:
---------------------------------------------------------
$ cp /home/pub/factor/factor.image .
$ factor-lang scratchVocabulary.factor
"/home/pub/factor/"
"/home/pub/factor/core"
$ factor-lang -i=factor.image scratchVocabulary.factor
"/home/factor/scratchVocabulary/"
"/home/factor"
---------------------------------------------------------
The reason seems to be the value of "vocab-roots":
V{
"resource:core"
"resource:basis"
"resource:extra"
"resource:work"
}
So that seems to be intended and I have to live with it.
Now I also tried overriding as you suggested. No effect:
---------------------------------------------------------
$ factor-lang -resource=/home/pub/factor -i=factor.image \
> scratchVocabulary.factor
"/home/factor/scratchVocabulary/"
"/home/factor"
---------------------------------------------------------
In addition I could not find any documentation about the command line
switch "-resource".
signature.asc
Description: PGP signature
------------------------------------------------------------------------------
_______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
