[Pharo-project] jtalk fun

Richard Durr richard.durr at googlemail.com
Fri Apr 8 22:18:35 CEST 2011


I do hope ^^

This makes working with "native" Javascript-Libraries hard (remembers me of
how this is done in ObjJ).
Another problem is the extension of native JS "types" which can conflict
with other libraries as well. I have a feeling that his can be solved by
using some form of automatic wrapping like underscore.js uses to extend
native JS-Arrays: _(someArray).canCallCoolforEachMethodNow() .

A ST dispatch method
(asSmalltalkObject(someJavascriptObject).nowICanCallSmalltalkObjectsMethods()
) could also swap "undefined" and "null" for nil then automatically.
However, this would bring a small runtime cost. Switching to a fully
externalized and decoupled message-send implementation like in ObjJ would
allow DNU then as well. smalltalkMessageSend(someObject, 'doSomething:',
anObject);

RD

On Fri, Apr 8, 2011 at 9:44 PM, nicolas petton <petton.nicolas at gmail.com>wrote:

> Good point Richard, and this isn't written in stone ;)
>
> nico
>
>
> 2011/4/8 Richard Durr <richard.durr at googlemail.com>
>
>> Cool. The only problem in JTalk is for interfacing with JS you have to
>> create new classes and use jsbody-methods ({'alert("hello")'}). In OMeta's
>> JS/Smalltalk, you can reference and call JS-Objects directly (alert value:
>> 'hello') at the cost of semantic ("atput" "a: t: p: u: t:" and "atput:" all
>> refer to the same method/function, for example).
>>
>> Somehow I find CoffeeScript cleaner in this regard. CoffeeScript is no
>> Smalltalk, though. :(
>>
>>
>>
>>
>> On Wed, Apr 6, 2011 at 1:34 PM, laurent laffont <
>> laurent.laffont at gmail.com> wrote:
>>
>>>
>>> On Wed, Apr 6, 2011 at 12:48 PM, Nicolas Petton <
>>> petton.nicolas at gmail.com> wrote:
>>>
>>>> Le mercredi 06 avril 2011 à 12:28 +0200, Noury Bouraqadi a écrit :
>>>> > Cool. But how do we move parts?
>>>>
>>>> Hmm, you don't...
>>>>
>>>> I only wrote the field and pieces, the game isn't working yet (and I
>>>> didn't think someone would find it... kudos to Laurent :-)
>>>>
>>>
>>> Ahaha I was just looking for examples and this is in the example category
>>> ;)
>>>
>>> Laurent
>>>
>>>
>>>>
>>>> Cheers,
>>>> Nico
>>>> >
>>>> >
>>>> > On 5 avr. 2011, at 15:16, laurent laffont wrote:
>>>> >
>>>> > > Go to http://jtalk-project.org/
>>>> > >
>>>> > > Open development tools -> Workspace
>>>> > >
>>>> > > Evaluate:
>>>> > >
>>>> > > Tetris new appendToJQuery: 'body' asJQuery
>>>> > >
>>>> > > play.
>>>> > >
>>>> > >
>>>> > > Laurent.
>>>> >
>>>> > Noury Bouraqadi
>>>> > http://car.mines-douai.fr/noury
>>>> > --
>>>> > -6th National Conference on
>>>> > “Control Architecture of Robots”
>>>> > 24-25 may 2011, Grenoble area, France
>>>> > http://car2011.inrialpes.fr/
>>>> >
>>>> > -19th ESUG International Smalltalk Conference
>>>> > 22-26 August 2011, Edinburgh, UK
>>>> > http://www.esug.org/Conferences/2011
>>>> >
>>>> > -19èmes Journées Francophones sur les Systèmes Multi-Agents (JFSMA’11)
>>>> > http://www.univ-valenciennes.fr/congres/jfsma2011/
>>>> > 17-19 Octobre 2011, Valenciennes, France
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>>
>>>> --
>>>> Nicolas Petton
>>>> http://www.nicolas-petton.fr
>>>>
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110408/8f55b4ab/attachment.htm>


More information about the Pharo-project mailing list