[Cuis] 4.1 to 4.2 migration question

Casey Ransberger casey.obrien.r at gmail.com
Mon Feb 16 22:37:23 CST 2015


If memory serves (and it may not) Igor mentioned having automatically generated bindings based on the API at one point when I asked about it. The comment in there made me suspect that you might be adapting generated code that he'd had his hands in. Might be worth asking him. 

One reason I'm interested here is, the Croquet stuff isn't just tangled up with a synched messaging model, it's also written in a style of GL that doesn't really seem to be supported anymore. So automatically generating bindings for something like e.g. OpenGL ES on the Pi is really compelling right now. 

One comment inline. 

> On Feb 16, 2015, at 8:09 PM, "Phil (list)" <pbpublist at gmail.com> wrote:
> 
>> On Mon, 2015-02-16 at 19:26 -0800, Casey Ransberger wrote:
>> What is self parserClass expected to answer when one happens to be an
>> instance of OGLExtManager?
> In Cuis 4.1 it answers with Parser

Hmm. And that worked with this stuff in 4.1? Seems odd to explicitly call out the default parser. Might be worth looking at what comes back in Squeak and (gut says) Pharo to be sure. 

>> This *is* interesting. Is that Igor's generated code? Stasenko, he
>> might be someone who'd know what was supposed to be going on here.
>> Odds are, if we can figure out what sort of parser is supposed to be
>> answered, we can make it work in Cuis.
> I think it predates Igor's stuff (isn't his all that newfangled
> NativeBoost stuff or am I thinking of something else?).  This package
> was based on some old Squeak FFI-based packages that I managed to track
> down ~5 years ago IIRC (before that I had a hacky extract from an old
> Croquet image.. it was ugly)
> 
>> I'm interested in this stuff myself, because Cuis would be a great
>> platform to make games on if we had some solid support for OpenGL,
>> mainly because it wastes less time on the Morphic loop than the other
>> dialects.
> I've had OpenGL running in Cuis since 1.0 (OK, maybe not 1.0, but pretty
> sure it was early 1.x :-)
>> 
>> --C
>> 
>> On Mon, Feb 16, 2015 at 7:15 PM, Phil (list) <pbpublist at gmail.com>
>> wrote:
>>        On Mon, 2015-02-16 at 18:49 -0800, Casey Ransberger wrote:
>>> I think parserClass was there to give everyone a hook to
>>        implement
>>> their own parsers, because Smalltalk was (in part) a prog
>>        language
>>> research platform. Given that Cuis aims to be a minimal
>>        system,
>>> someone may have removed it as unnecessary. Also, when Juan
>>        changes
>>> some critical behavior, he tends to prefer coming up with a
>>        new name
>>> for the method and associated variables, so that folks with
>>        existing
>>> code aren't confused when their dependencies start behaving
>>        in
>>> unexpected ways; this might also be what happened.
>> 
>>        I'm fine with it being removed... just wanted to understand
>>        why it was
>>        removed.  I know there's been a lot of cog/compiler/vm stuff
>>        going on
>>        recently that I haven't kept up on so thought I'd check in
>>        before just
>>        making the minimal changes to get it working again if
>>        something bigger
>>        is going on.
>> 
>>> It would be interesting to look at what wants to refer to
>>        parserClass.
>>> Could be one of those packages is doing something very, very
>>> interesting:)
>>        It's from OGLExtManager...
>> 
>>        forwardExtMethod: aSelector
>>                "Compile a forwarder method in OpenGL"
>>                | code parser fwdCode |
>>                code := self class sourceCodeAt: aSelector.
>>                parser := self parserClass new.
>>                parser parseSelector: code.
>>                code := code copyFrom: 1 to: (parser endOfLastToken
>>        min: code size).
>>                fwdCode := String streamContents:[:s|
>>                        s nextPutAll: code.
>>                        s newLineTab: 1; nextPutAll: '"This method was
>>        automatically
>>        generated"'.
>>                        s newLineTab: 1; nextPutAll: '^glExt ';
>>        nextPutAll: code.
>>                ].
>>                (OpenGL sourceCodeAt: aSelector ifAbsent:['']) =
>>        fwdCode
>>        ifTrue:[^self]. "no change"
>>                OpenGL compile: fwdCode classified: (self class
>>        organization
>>        categoryOfElement: aSelector).
>> 
>> 
>> 
>> 
>>        _______________________________________________
>>        Cuis mailing list
>>        Cuis at jvuletich.org
>>        http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>> 
>> 
>> 
>> _______________________________________________
>> Cuis mailing list
>> Cuis at jvuletich.org
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
> 
> 
> 
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org




More information about the Cuis mailing list