GTExample with dependencies no longer considered example

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GTExample with dependencies no longer considered example

Peter Uhnak
Hi,

apparently CompiledMethod>>#isGTExampleMethod

has been changed from

isGTExampleMethod
^ self pragmas anySatisfy: [ :each | each isGTExamplePragma ]

to

isGTExampleMethod
^ (self pragmas anySatisfy: [ :each | each isGTExamplePragma ])
and: [ self numArgs = 0 ]


In either case this means that if an example has dependencies it is no longer an example, because it has arguments.

Thanks,
Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GTExample with dependencies no longer considered example

Tudor Girba-2
Hi Peter,

Nice catch :). Let me explain.

Indeed, we are working right now on the new examples engine, and last night we switched the Moose configurations to use the new engine.

The new engine no longer uses pragmas to describe dependencies, but plain unary message sends. So, now the engine recognizes these dependencies:

exampleA
        <gtExample>
        ^ 41

exampleB
        <gtExample>
        | a |
        a := self exampleA.
        ^ a + 1

Cheers,
Doru


> On Oct 7, 2017, at 2:41 PM, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> apparently CompiledMethod>>#isGTExampleMethod
>
> has been changed from
>
> isGTExampleMethod
> ^ self pragmas anySatisfy: [ :each | each isGTExamplePragma ]
>
> to
>
> isGTExampleMethod
> ^ (self pragmas anySatisfy: [ :each | each isGTExamplePragma ])
> and: [ self numArgs = 0 ]
>
> ( https://github.com/feenkcom/gtoolkit-examples/blob/master/src/GToolkit-Examples.package/CompiledMethod.extension/instance/isGTExampleMethod.st , also strange that I don't see the history of the method on github).
>
> In either case this means that if an example has dependencies it is no longer an example, because it has arguments.
>
> Thanks,
> Peter
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"Presenting is storytelling."

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GTExample with dependencies no longer considered example

Peter Uhnak


On Sat, Oct 7, 2017 at 4:12 PM, Tudor Girba <[hidden email]> wrote:
Hi Peter,

Nice catch :). Let me explain.

Indeed, we are working right now on the new examples engine, and last night we switched the Moose configurations to use the new engine.

The new engine no longer uses pragmas to describe dependencies, but plain unary message sends. So, now the engine recognizes these dependencies:

exampleA
        <gtExample>
        ^ 41

exampleB
        <gtExample>
        | a |
        a := self exampleA.
        ^ a + 1


Ah, I see. This is indeed more practical when I want to call the method directly.

Thanks!
Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev