Try with a string:

INCLUDE: "scriptedmain"



On Fri, Aug 19, 2011 at 6:53 PM, Andrew Pennebaker <
andrew.penneba...@gmail.com> wrote:

> I'm trying to tweak INCLUDE so that it appends ".factor" for you (and
> thereby looks more natural, like USE/USING).
>
> $ cat ~/.factor-rc
> ! An "INCLUDE" macro that imports source code files in the current
> directory
> USING: accessors io.pathnames namespaces source-files vocabs.loader parser
> sequences ;
>
> IN: syntax
> SYNTAX: INCLUDE: scan-object ".factor" append parse-file append ;
>
> $ ./test.factor
> Loading /Users/andrew/.factor-rc
> ./test.factor
>
> 3: INCLUDE: scriptedmain
>                         ^
> No word named “scriptedmain” found in current vocabulary search path
>
>
>
> By the way, aren't USE and USING redundant? Would it make sense to
> deprecate USE?
>
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
> On Fri, Aug 19, 2011 at 9:15 PM, John Benediktsson <mrj...@gmail.com>wrote:
>
>> You could define this syntax word:
>>
>>     SYNTAX: INCLUDE: scan-object parse-file append ;
>>
>> Then use it:
>>
>>     INCLUDE: foo.factor
>>
>> It adds all words from foo.factor into the current vocab.
>>
>>
>> On Fri, Aug 19, 2011 at 6:06 PM, Andrew Pennebaker <
>> andrew.penneba...@gmail.com> wrote:
>>
>>> Could you tweak the RELATIVE macro so that it doesn't require blob.factor
>>> to be in blob/ ?
>>>
>>>
>>> Cheers,
>>>
>>> Andrew Pennebaker
>>> www.yellosoft.us
>>>
>>> On Fri, Aug 19, 2011 at 8:22 PM, Joe Groff <arc...@gmail.com> wrote:
>>>
>>>>
>>>> On Aug 19, 2011, at 5:14 PM, Andrew Pennebaker wrote:
>>>>
>>>> The RELATIVE trick looks promising. Though, it gives me an error.
>>>>
>>>> scriptedmain.factor
>>>> https://github.com/mcandre/scriptedmain/blob/master/scriptedmain.factor
>>>>
>>>> test.factor
>>>> https://github.com/mcandre/scriptedmain/blob/master/test.factor
>>>>
>>>> $ ./test.factor
>>>> Loading /Users/andrew/.factor-rc
>>>> ./test.factor
>>>>
>>>> 4: USING: scriptedmain ;
>>>>                       ^
>>>> Vocabulary does not exist
>>>> name "scriptedmain"
>>>>
>>>>
>>>> "scriptedmain.factor" needs to be in a "scriptedmain" subdirectory:
>>>>
>>>> mkdir scriptedmain
>>>> mv scriptedmain.factor scriptedmain/
>>>>
>>>>  Side note: Could the "Loading /Users/andrew/.factor-rc" message be
>>>> silenced so that it doesn't obscure a script's command line interface?
>>>>
>>>>
>>>> That looks like a bug—in script mode, loading messages should be
>>>> suppressed. I'll fix it.
>>>>
>>>> -Joe
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>>>> user administration capabilities and model configuration. Take
>>>> the hassle out of deploying and managing Subversion and the
>>>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>>>> _______________________________________________
>>>> Factor-talk mailing list
>>>> Factor-talk@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>>> user administration capabilities and model configuration. Take
>>> the hassle out of deploying and managing Subversion and the
>>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>>> _______________________________________________
>>> Factor-talk mailing list
>>> Factor-talk@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>> user administration capabilities and model configuration. Take
>> the hassle out of deploying and managing Subversion and the
>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
>
> ------------------------------------------------------------------------------
> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
> user administration capabilities and model configuration. Take
> the hassle out of deploying and managing Subversion and the
> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to