Re: [Factor-talk] length
Which platform? On Tue, Aug 28, 2012 at 6:38 PM, graham telfer gakouse...@hotmail.com wrote: Using sequences in Factor 0.95 I type something like { 1 2 3 } length in the Listener but get nothing returned. The stack is not empty though because ' .s ' does not report stack underflow. It prints out a blank. Typing ' . . ' prints a blank line rather than the length of the sequence and then the stack underflow message as expected. -- 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
Re: [Factor-talk] Literate Programming
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.comwrote: 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
Re: [Factor-talk] Literate Programming
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.comwrote: 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
Re: [Factor-talk] Literate Programming
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.comwrote: 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.comwrote: 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
Re: [Factor-talk] Literate Programming
Tangential thought, but I always loved that Factor's documentation is separate from the actual source code (i.e., that foo.factor's docs live in foo-docs.factor). In really any other language I can think of, you have to clutter what might otherwise be easy-to-read code with gobs of explanations, examples, warnings, doctests, markup, etc. I always wondered why using inline comments for documentation generation is the default for various programming languages, when it seems so ugly. Not that other modes of documentation aren't useful. I just sometimes feel like I'm alone in appreciating this particular point. :P Carry on, --Alex Vondrak From: Jon Harper [jon.harpe...@gmail.com] Sent: Wednesday, August 29, 2012 11:03 AM To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Literate Programming 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.commailto: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.netmailto: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
Re: [Factor-talk] Literate Programming
On Wed, Aug 29, 2012 at 12:22 PM, John Benediktsson mrj...@gmail.com wrote: 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? It would be cool to be able to extend the vocab loader with file extension associations, each with a different default syntax and lexer environment. `.factor` would of course be associated with the core `syntax` and `lexer`, but you could then have for example `.lfactor` files be searched for and loaded as if implicitly inside LITERATE LITERATE tags. Other languages we've implemented as factor syntax extensions, such as peg, infix, lisp, and smalltalk, could also have top-level associations. -Joe -- 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
Re: [Factor-talk] Literate Programming
You're not alone at all, I completely agree -- a printed page worth of code in factor is often much more elegant due to separate documentation. On Wed, Aug 29, 2012 at 1:33 PM, Alexander J. Vondrak ajvond...@csupomona.edu wrote: Tangential thought, but I always loved that Factor's documentation is separate from the actual source code (i.e., that foo.factor's docs live in foo-docs.factor). In really any other language I can think of, you have to clutter what might otherwise be easy-to-read code with gobs of explanations, examples, warnings, doctests, markup, etc. I always wondered why using inline comments for documentation generation is the default for various programming languages, when it seems so ugly. Not that other modes of documentation aren't useful. I just sometimes feel like I'm alone in appreciating this particular point. :P Carry on, --Alex Vondrak From: Jon Harper [jon.harpe...@gmail.com] Sent: Wednesday, August 29, 2012 11:03 AM To: factor-talk@lists.sourceforge.net Subject: Re: [Factor-talk] Literate Programming 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 mailto: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.netmailto: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
Re: [Factor-talk] length
I'm using Windows Vista. From: gakouse...@hotmail.com To: factor-talk@lists.sourceforge.net Subject: length Date: Wed, 29 Aug 2012 01:38:15 + Using sequences in Factor 0.95 I type something like { 1 2 3 } length in the Listener but get nothing returned. The stack is not empty though because ' .s ' does not report stack underflow. It prints out a blank. Typing ' . . ' prints a blank line rather than the length of the sequence and then the stack underflow message as expected. -- 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
Re: [Factor-talk] Literate Programming
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 + 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