I just pushed a vocab with some ideas that might help you get started:

USE: literate

<LITERATE

This is a section that is mostly text... you can even include "factor" stuff
that doesn't get parsed like the following:

: does-this-work? ( -- x ) "no it doesn't!" ;

But, then if you want to run some code, you can do this:

> : this-totally-works! ( -- x ) 12345 ;

And then some more text, for fun...

LITERATE>

Try it and you'll see that the first definition is ignored, but the second
is parsed:

    IN: scratchpad \ does-this-work? see
    No word named “does-this-work?” found in current vocabulary search path

    IN: scratchpad \ this-totally-works! see
    : this-totally-works! ( -- x ) 12345 ;

Is something like this what you're looking for?



On Wed, Aug 29, 2012 at 11:07 AM, P. <uploa...@gmail.com> wrote:

> And just to add that thanks to the ability to manipulate the lexer in
> Factor, you can write a literate programming syntax library and it could be
> however you want it, including exactly like Haskell's.
>
> - rien
>
>
> On Wed, Aug 29, 2012 at 2:03 PM, Jon Harper <jon.harpe...@gmail.com>wrote:
>
>> Short answer: no.
>> The factor documentation system is described here:
>> http://docs.factorcode.org/content/article-writing-help.html
>> Interestingly, the documentation system is written in factor and
>> documented using itself, so this html page is a good example of the output
>> it produces.
>> Jon
>>
>>
>> On Wed, Aug 29, 2012 at 1:41 AM, graham telfer <gakouse...@hotmail.com>wrote:
>>
>>>  Does Factor have any tools to develop programs using a literate
>>> programming method? Something like Bird notation used with Haskell or a
>>> document generator like DocGen with VFXForth.
>>>
>>> The usual thing in code is to mark the comments and leave the code, but
>>> in a literate programming approach (where there is going to be more comment
>>> than code) marking the code explicitly would be better.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Factor-talk mailing list
>>> Factor-talk@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to