Stefan Scholl | 21 Apr 16:47
Picon
Favicon

The Evaluate Service on MacOS X needs more vocabs ready

[MacOS X 10.4.11 Intel, git factor 1 or 2 days old.]

I entered "20 20 * ." in a Mac program that supports the use of
the Services menu. Marked it and after Services -> Factor ->
Evaluate Selection I get

<interactive>:1
20 20 * .
       ^
Word not found in current vocabulary search path
"delegate" f
"name"     "*"

The following restarts are available:

:1    Use the word IN: math MATH: * ( x y -- z )

Type :help for debugging help.

--

-- 
Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Slava Pestov | 21 Apr 18:13

Re: The Evaluate Service on MacOS X needs more vocabs ready

Try adding a USE: there

USING: math prettyprint ;
20 20 * .

Do you think the evaluate service should use a default set of  
vocabularies, just like the listener does?

Slava

On Apr 21, 2008, at 9:49 AM, Stefan Scholl wrote:

> [MacOS X 10.4.11 Intel, git factor 1 or 2 days old.]
>
> I entered "20 20 * ." in a Mac program that supports the use of
> the Services menu. Marked it and after Services -> Factor ->
> Evaluate Selection I get
>
>
>
> <interactive>:1
> 20 20 * .
>       ^
> Word not found in current vocabulary search path
> "delegate" f
> "name"     "*"
>
> The following restarts are available:
>
> :1    Use the word IN: math MATH: * ( x y -- z )
(Continue reading)

Stefan Scholl | 21 Apr 18:53
Picon
Favicon

Re: The Evaluate Service on MacOS X needs more vocabs?ready

Yes.

"Evaluate Selection" and "Evaluate in Listener" would produce the
same output. And I remember that "Evaluate Selection" once worked
with a broader set of default vocabularies.

It's a nice service and it should be as convenient as possible.

If only to impress people in demonstrations. ;-)

Slava Pestov <slava@...> wrote:
> Try adding a USE: there
> 
> USING: math prettyprint ;
> 20 20 * .
> 
> Do you think the evaluate service should use a default set of  
> vocabularies, just like the listener does?
> 
> Slava
> 
> On Apr 21, 2008, at 9:49 AM, Stefan Scholl wrote:
> 
>> [MacOS X 10.4.11 Intel, git factor 1 or 2 days old.]
>>
>> I entered "20 20 * ." in a Mac program that supports the use of
>> the Services menu. Marked it and after Services -> Factor ->
>> Evaluate Selection I get
>>
>>
(Continue reading)

Stefan Scholl | 1 May 19:03
Picon
Favicon

Re: The Evaluate Service on MacOS X needs more vocabs?ready

Slava Pestov <slava@...> wrote:
> Try adding a USE: there
> 
> USING: math prettyprint ;
> 20 20 * .
> 
> Do you think the evaluate service should use a default set of  
> vocabularies, just like the listener does?

Default set would be nice.

I've browsed the code a bit and I see two possible solutions:

1.) A new eval>string (or eval without parse-fresh) that includes
more vocabs.

2.) Prepending a fat "USING: ... ; " string in
extra/ui/cocoa/tools/tools.factor before calling eval>string

Solution 2 seems easy, but feels strange.

--

-- 
Web (en): http://www.no-spoon.de/ -*- Web (de): http://www.frell.de/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
(Continue reading)


Gmane