many thanks
> On 29 Jul 2015, at 12:04, Björn Lindqvist wrote:
>
> Georg solved your problem, but in the future you can easily use
> Factors introspection to see why it complains about stack effects. For
> example, the first quotation given to the inner if is [ 0 ] and you
> can infer its stack
Georg solved your problem, but in the future you can easily use
Factors introspection to see why it complains about stack effects. For
example, the first quotation given to the inner if is [ 0 ] and you
can infer its stack effect:
IN: scratchpad [ 0 ] infer.
( -- x )
Then because the two quotatio
thanks, getting my iprefix Scheme code confused with postffix factor
> On 29 Jul 2015, at 09:01, Georg Simon wrote:
>
> Am Wed, 29 Jul 2015 08:44:20 +0100
> schrieb Iain Gray :
>
> Just guessing:
> Replace [ 0 < amount 0 coins = or [ 0 ]
> with [ 0 amount < 0 coins = or [ 0 ]
>
Am Wed, 29 Jul 2015 08:44:20 +0100
schrieb Iain Gray :
Just guessing:
Replace [ 0 < amount 0 coins = or [ 0 ]
with [ 0 amount < 0 coins = or [ 0 ]
signature.asc
Description: PGP signature
--
_
Er, nevermind, seems to work now somehow.
On 08/24/2014 01:01 PM, mr wzrd wrote:
> Hello list.
>
> Sometimes I get an error that a stack effect declaration is wrong,
> and then can't figure out why.
>
> --- The word
> historical-prices-from-year cannot be executed
If you are typing this directly in the listener, the non-optimizing
compiler is used, which doesn't enforce static stack effects on words. If
you write this code in a file and compile it with the optimizing compiler,
you will get an error.
Regards,
Jon
Le 2 mars 2012 22:32, "Arkady Rost" a écrit :
You're using the datastack as a data structure. That's like calling a
varargs function in C -- in your case, loop could consume any number
of elements on the stack.
The implementation of the listener doesn't restrict code like this,
but the compiler does. You have to know how many arguments from t
On Fri, Mar 2, 2012 at 1:32 PM, Arkady Rost wrote:
> Hi!
> Today I was trying to write some factor code and it turned out that I can
> write such code:
> 1 5 4 3 2 [ 5 = not ] loop
> It works and produces stack with one element 1. I expect that at least I
> would have a warning because loop word t
They're count-binding, but not type-binding.
>Ignore for now the fact that you can declare nested effects. Take
>the basic case. What if I really want word sum-of-integers to be
>able to add only integers and not, say, floats?:
Then I suggest you try some other language which has st
On Thu, Nov 18, 2010 at 05:58:48AM -0600, Shaping wrote:
>A word could be defined with the following stack effects and the behavior
>would be the same:
>
>: foo ( a quot -- )
>
>: foo ( apples bananas -- )
>
>: foo ( !...@# @#$ -- )
Yes.
>Likewise, with nested stack ef
On Thu, Nov 18, 2010 at 5:28 PM, Shaping wrote:
> I was looking for a definition. "quot:" does not seem to behave like a
> word or literal. "quot:"
>
> Yes, that is the part that concerns me. Why did we design this convention?
>
The convention comes from Forth best practices, in which word de
I was looking for a definition. "quot:" does not seem to behave like a word
or literal. "quot:" occurs only once on the above page in an example of a
row-polymorphic combinator, but is not defined. However, "quot" is
mentioned briefly in the table of 13 "names":
There's no documentation for "qu
On Thu, Nov 18, 2010 at 4:26 PM, Shaping wrote:
>
> I was looking for a definition. "quot:" does not seem to behave like a
> word or literal. "quot:" occurs only once on the above page in an example
> of a row-polymorphic combinator, but is not defined. However, "quot" is
> mentioned briefly in
> I can't find any info in Browser on "quot:".
http://docs.factorcode.org/content/article-effects.html
I was looking for a definition. "quot:" does not seem to behave like a word
or literal. "quot:" occurs only once on the above page in an example of a
row-polymorphic combinator, but is n
> Hi Joe,
>
> The new 'beep' code causes a bootstrap failure on Unix platforms with
> X11.
Doh, forgot to commit the change to x11.xlib to add the XBell
function. Fixed.
By the way, trying to build Factor with X11=1 on OS X Leopard bumps
into this bug:
http://wiki.finkproject.org/index.php/F
On Jun 11, 2008, at 4:34 PM, Slava Pestov wrote:
> The new 'beep' code causes a bootstrap failure on Unix platforms with
> X11.
I found and fixed the problem; never mind.
Slava
-
Check out the new SourceForge.net Marketpl
On Jun 9, 2008, at 10:20 PM, Joe Groff wrote:
>> By the way, the COM code defines some words with 'define'. Can you
>> update it to use 'define-declared' please? The new stack effect
>> literal syntax (look at (() might help.
>
> Sure thing--the change is in git://repo.or.cz/factor/jcg.git . I've
> By the way, the COM code defines some words with 'define'. Can you
> update it to use 'define-declared' please? The new stack effect
> literal syntax (look at (() might help.
Sure thing--the change is in git://repo.or.cz/factor/jcg.git . I've
got a couple of other patches in there too: one add
Joe,
Eventually I might do something like that; when I implement multi-
methods, it might make sense for the parser to always expect ( after
the word name. For now, I'm enforcing this in the compiler, not the
parser.
By the way, the COM code defines some words with 'define'. Can you
update
> Since my plan is to use Factor to take over the world and get
> disgustingly rich, this is not an acceptable state of affairs. There
> are two solutions:
>
> 1) Revive the old stack effect inference algorithm which did not
> require annotations at all.
>
> 2) Require stack effect declarations on
I vote for #2, I probably need/want stack effect declarations even more than
the compiler when I look at code.
But, I vote for
2b) Require stack effect declarations on all words
On Sat, Jun 7, 2008 at 12:00 PM, Slava Pestov <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> For a while now Factor has requ
21 matches
Mail list logo