Core 2.5.2 - Less aggressive evaluation - howto evaluate ?
[1/11] from: ingo::2b1::de at: 7-May-2002 11:34
Hi Carl, Rebols,
it may be that I don't see the obvious, but given
>> a: context[ b: context[ c: 1]]
>> f: func ['word] [print word]
>> f a/b/c
a/b/c
what do I have to do to get 'word evaluated?
Thanks in advance,
Ingo
[2/11] from: cyphre:seznam:cz at: 7-May-2002 14:55
Hi Ingo and all,
I hit this problem in January and Carl answered: "Not quite ready yet... but
very soon you will be able to use DO to evaluate such paths."
However it looks we still have to use for example:
>> z: to-path 'system/schemes
== system/schemes
less agressive evaluation results:
>> type? z
== path!
>> type? do z
== path!
I've found only two possibilities how to evaluate such paths:
>> type? do compose [(z)]
== object!
or
>> type? first reduce compose [(z)]
== object!
Anyone?
regards,
Cyphre
[3/11] from: greggirwin:mindspring at: 7-May-2002 10:15
Hi Ingo,
<<
>> a: context[ b: context[ c: 1]]
>> f: func ['word] [print word]
>> f a/b/c
a/b/c
what do I have to do to get 'word evaluated?
>>
This seems to work, but I can't tell you *why* it works. :)
>> f: func ['word] [print reduce [word]]
--Gregg
[4/11] from: rotenca:telvia:it at: 7-May-2002 19:39
Hi Cyphre,
> >> type? first reduce compose [(z)]
> == object!
>
> Anyone?
>> z: to-path 'system/schemes
== system/schemes
1)
>> type? first reduce [z]
== object!
2)
>> type? do func [x][x] z
== object!
3)
>> type? use [][z]
== object!
4)
>> type? do [z]
== object!
View 1.2.1.3.1
---
Ciao
Romano
[5/11] from: cyphre:seznam:cz at: 7-May-2002 22:40
Hi Romano, ;-)
>> z: to-path 'system/schemes
== system/schemes
1)
>> type? first reduce [z]
== path!
2)
>> type? do func [x][x] z
== path!
3)
>> type? use [][z]
== path!
4)
>> type? do [z]
== path!
View 1.2.5.3.1 and Core 2.5.2.3.1
regards,
Cyphre
----- Original Message -----
From: "Romano Paolo Tenca" <[rotenca--telvia--it]>
To: <[rebol-list--rebol--com]>
Sent: Tuesday, May 07, 2002 7:39 PM
Subject: [REBOL] Re: Core 2.5.2 - Less aggressive evaluation - howto
evaluate ?
[6/11] from: ingo:2b1 at: 7-May-2002 20:13
Cyphre wrote:
> Hi Ingo and all,
>
> I hit this problem in January and Carl answered: "Not quite ready yet... but
> very soon you will be able to use DO to evaluate such paths."
That's what I tried first :-)
> However it looks we still have to use for example:
>>>z: to-path 'system/schemes
<<quoted lines omitted: 16>>
> == object!
> Anyone?
... not quite elegant, but shorter:
>> type? do form z
== object!
Kind regards,
Ingo
[7/11] from: ingo:2b1 at: 7-May-2002 23:29
Hi Gregg,
Gregg Irwin wrote:
> Hi Ingo,
> <<
<<quoted lines omitted: 5>>
> This seems to work, but I can't tell you *why* it works. :)
>>>f: func ['word] [print reduce [word]]
But by now I can sorta tell you why. This works, too:
f: func ['word] [reduce reduce [word]]
and 'print reduces its arguments, too.
Kind regards,
Ingo
[8/11] from: ingo:2b1 at: 7-May-2002 23:39
Hi Romano,
Romano Paolo Tenca wrote:
> Hi Cyphre,
>
>>>>type? first reduce compose [(z)]
>>>
>>== object!
>>
>>Anyone?
<...>
>>>type? first reduce [z]
>>
> == object!
>
> 2)
<...>
> View 1.2.1.3.1
Sorry, but we're talking about core 2.5.2, which would be view
1.2.5.4.2 and none of you're ideas work there ...
Kind regards,
Ingo
[9/11] from: rotenca:telvia:it at: 8-May-2002 1:01
Hi Cyphre,
> >> z: to-path 'system/schemes
> == system/schemes
<<quoted lines omitted: 7>>
> == path!
> View 1.2.5.3.1 and Core 2.5.2.3.1
Gasp! Not a good situation in 2.5.
In 2.5, I have only found:
>> type? first reduce reduce [z]
== object!
>> type? do reduce [z]
== object!
If the path is global, one can also use
>> type? do mold z
== object!
>> type? do mold/only z
== object!
---
Ciao
Romano
> regards,
> Cyphre
<<quoted lines omitted: 52>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
---
Ciao
Romano
[10/11] from: ammon:rcslv at: 10-May-2002 11:17
Ingo,
I just tried that on Command:
>> a: context[ b: context[ c: 1]]
>> f: func ['word] [print word]
>> f a/b/c
1
I don't know if it is a problem with Core that is non-existant in Command.
Enjoy!!
Ammon
A short time ago, Ingo Hohmann, sent an email stating:
[11/11] from: ingo:2b1 at: 12-May-2002 16:47
Hi Ammon,
Ammon Johnson wrote:
> I just tried that on Command:
>>>a: context[ b: context[ c: 1]]
<<quoted lines omitted: 3>>
> 1
> I don't know if it is a problem with Core that is non-existant in Command.
As the subject was meant to express, we are talking about a change in
the next beta Version of Rebol. So the phenomenon may only be seen in
the new betas, not on any of the stable versions.
Kind regards,
Ingo
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted