[Cuis] 4.1 to 4.2 migration question

Casey Ransberger casey.obrien.r at gmail.com
Mon Feb 16 21:26:56 CST 2015


What is self parserClass expected to answer when one happens to be an
instance of OGLExtManager?

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'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.

--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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20150216/0f94e8d3/attachment-0004.html>


More information about the Cuis mailing list