[Factor-talk] Pull request: math.primes.factors:divisors

2009-06-29 Thread Samuel Tardieu
The following changes since commit 55ed9456a59fc97bcd55c609d9dab00109114501: Slava Pestov (1): Fix conflict are available in the git repository at: git://git.rfc1149.net/factor.git for-slava Samuel Tardieu (1): Add divisors to math.primes.factors

[Factor-talk] Regarding the stack effects of the quotations used by the produce word

2009-06-29 Thread Harold Hausman
Hi. Regarding this produce word: http://docs.factorcode.org/content/word-produce,sequences.html I'm confused that the two quotations it uses have stack effects with nothing on the left side of the --. Certainly at least the predicate needs some parameters? Thanks in advance for any insight,

Re: [Factor-talk] Regarding the stack effects of the quotations used by the produce word

2009-06-29 Thread Emeka
Thanks so much for raising this issue because I am studying the same page. USING: kernel math prettyprint sequences ; 1337 [ dup 0 ] [ 2/ dup ] produce nip . { 668 334 167 83 41 20 10 5 2 1 0 } I am pretty new here and I am poorly equipped to chip in. However from Lisp (FP) you will have

Re: [Factor-talk] Regarding the stack effects of the quotations used by the produce word

2009-06-29 Thread Slava Pestov
Hi Harold, The quotations can optionally access values from the stack as long as they leave the right number of values at the end (the predicate must leave a boolean and the other quotation must not change the stack height). Slava On Mon, Jun 29, 2009 at 12:23 PM, Harold

Re: [Factor-talk] Regarding the stack effects of the quotations used by the produce word

2009-06-29 Thread Harold Hausman
On Mon, Jun 29, 2009 at 12:25 PM, Slava Pestovsl...@factorcode.org wrote: Hi Harold, The quotations can optionally access values from the stack as long as they leave the right number of values at the end (the predicate must leave a boolean and the other quotation must not change the stack

Re: [Factor-talk] Regarding the stack effects of the quotations used by the produce word

2009-06-29 Thread Slava Pestov
On Mon, Jun 29, 2009 at 3:11 PM, Harold Hausmanhhaus...@gmail.com wrote: Thanks for this explanation, I think it makes sense. Is it then true to say that these two stack effects are equivalent: ( -- ? ) ( x -- x ? ) Or does the stack effect checker care? e.g., does it confirm that (at