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
This is pretty much what I was thinking of. I will check out the vocabulary.
On the matter of approaching the design of software I like to write my thoughts
as I develop a project. It is not about just commenting code but seeing how
that code developed out of a thought process.
Perhaps I got into that way of working because I worked as a technical author
for many years.
From: gakouse...@hotmail.com
To: factor-talk@lists.sourceforge.net
Subject: Literate Programming
Date: Tue, 28 Aug 2012 23:41:06 +0000
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