Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-05-09 Thread stepharo
Nice :) https://pharo.fogbugz.com/f/cases/15490/provide-a-way-to-specify-external-binding-to-the-compiler This Slice adds an API to the compiler to set a dictionary with bindings to be taken into account. They are compiled as pushLinteralVariable: (thus refer to the association of the dicti

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-05-05 Thread Sean P. DeNigris
Marcus Denker-4 wrote >> Smalltalk compiler >> bindings: { #a -> 3 } asDictionary; >> evaluate: '1+a’. > > This is now in Pharo5 update #032 Cool :) - Cheers, Sean -- View this message in context: http://forum.world.st/How-can-I-specify-the-bindings-when-evaluating-an-expr

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-05-05 Thread Thierry Goubier
2015-05-05 15:17 GMT+02:00 Marcus Denker : > > On 05 May 2015, at 13:39, Marcus Denker wrote: > > >> yes, we could move it up to Association... but we should keep >> VariableBinding as a subclass of >> Literal so that people in the future e.g. can put a halt on a variable >> defined in the >> wor

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-05-05 Thread Marcus Denker
> On 05 May 2015, at 13:39, Marcus Denker wrote: > >> > yes, we could move it up to Association… but we should keep VariableBinding > as a subclass of > Literal so that people in the future e.g. can put a halt on a variable > defined in the > workspace. > > And yes, in general we need a nice

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-05-05 Thread Marcus Denker
> > > yes, we could move it up to Association… but we should keep > VariableBinding as a subclass of > Literal so that people in the future e.g. can put a halt on a variable > defined in the > workspace. > > And yes, in general we need a nice API for the compiler to hand bindings > to it… it is on

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-02-09 Thread Marcus Denker
> On 05 Feb 2015, at 10:09, Nicolai Hess wrote: > > > > 2015-02-05 2:20 GMT+01:00 Sean P. DeNigris >: > Nicolai Hess wrote > > We lost this feature in 40097 > > Which feature? Using bare associations instead of WorkspaceVariables? > > Yes, maybe feature is the

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-02-05 Thread Nicolai Hess
2015-02-05 2:20 GMT+01:00 Sean P. DeNigris : > Nicolai Hess wrote > > We lost this feature in 40097 > > Which feature? Using bare associations instead of WorkspaceVariables? > Yes, maybe feature is the wrong word - ability? What is missing now is, convert an association into a "VariableBinding" s

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-02-04 Thread Sean P. DeNigris
Nicolai Hess wrote > We lost this feature in 40097 Which feature? Using bare associations instead of WorkspaceVariables? - Cheers, Sean -- View this message in context: http://forum.world.st/How-can-I-specify-the-bindings-when-evaluating-an-expression-tp4794352p4803810.html Sent from the P

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-02-04 Thread Nicolai Hess
2015-02-04 23:07 GMT+01:00 Sean P. DeNigris : > Nicolai Hess wrote > > Dictionary newFrom:{ WorkspaceVariable key:#a value:3. > > WorkspaceVariable key:#b value:4} > > Thanks! That works great :) > > n.b. in Pharo 3.0, just replace the WorkspaceVariables with regular > associations: > Smalltalk

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2015-02-04 Thread Sean P. DeNigris
Nicolai Hess wrote > Dictionary newFrom:{ WorkspaceVariable key:#a value:3. > WorkspaceVariable key:#b value:4} Thanks! That works great :) n.b. in Pharo 3.0, just replace the WorkspaceVariables with regular associations: Smalltalk compiler evaluate:'a+b' notifying: (Dictionary newFrom: { #

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2014-12-28 Thread Marcus Denker
> On 23 Dec 2014, at 09:45, stepharo wrote: > > Marcus > > could you add this issue somewhere because this is something that I'm > expected from a compiler > Yes… I will check. Right now the API is too much focused on implementation artefacts vs. concepts. (requestor vs. binding, for exampl

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2014-12-23 Thread stepharo
Marcus could you add this issue somewhere because this is something that I'm expected from a compiler Stef Le 6/12/14 11:18, Marcus Denker a écrit : On 05 Dec 2014, at 15:18, stepharo wrote: I would like to be able to express Compiler new bindings: { a -> 3. b -> 4}; evaluate: 'a +

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2014-12-06 Thread Nicolai Hess
2014-12-06 11:18 GMT+01:00 Marcus Denker : > > > On 05 Dec 2014, at 15:18, stepharo wrote: > > > > I would like to be able to express > > > > Compiler new > >bindings: { a -> 3. b -> 4}; > >evaluate: 'a + b'; > >result > > and get 7 > > > > How can I do that? > > > > Not directly, as

Re: [Pharo-dev] How can I specify the bindings when evaluating an expression?

2014-12-06 Thread Marcus Denker
> On 05 Dec 2014, at 15:18, stepharo wrote: > > I would like to be able to express > > Compiler new >bindings: { a -> 3. b -> 4}; >evaluate: 'a + b'; >result > and get 7 > > How can I do that? > Not directly, as evaluate is just a doit… but it can be added as the machinery is the

[Pharo-dev] How can I specify the bindings when evaluating an expression?

2014-12-05 Thread stepharo
I would like to be able to express Compiler new bindings: { a -> 3. b -> 4}; evaluate: 'a + b'; result and get 7 How can I do that? Stef