Clamato & jQuery (was Re: <script language="smalltalk">)

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

Clamato & jQuery (was Re: <script language="smalltalk">)

Chris Cunnington
Hi Colin,

I think you're probably right. Clamato would be a simpler, more direct solution. I activated WebDAV and made it work about a year ago. Even still, looking at the files, I feel like I'm playing Whac-A-Mole. I can't really get a handle on it.

It translates Avi's Smalltalk-ese into JavaScript. It does so using a parser and parsing expression grammar based on Lukas's parser work.

Write in the Smalltalk-ese - magic happens - and it alters the DOM. jQuery factors into this somehow.

How does jQuery facilitate this?

Happy Thanksgiving,

Chris




Reply | Threaded
Open this post in threaded view
|

Re: Clamato & jQuery (was Re: <script language="smalltalk">)

Colin Putney-3
On Thu, Nov 25, 2010 at 7:52 PM, Chris Cunnington
<[hidden email]> wrote:


> Write in the Smalltalk-ese - magic happens - and it alters the DOM. jQuery
> factors into this somehow.
>
> How does jQuery facilitate this?

No magic. The Clamato bootstrap code parses the Smalltalk code and
generates the equivalent Javascript. If you look at the JQuery class
in the Clamato browser you can see how the jQuery API is wrapped in
Smalltalk.

What's tricky is debugging–sometimes it's hard to map an error message
from the browser back into the Smalltalk source.

Colin

Reply | Threaded
Open this post in threaded view
|

Re: Clamato & jQuery (was Re: <script language="smalltalk">)

Diogenes Moreira
Hi and I'm sorry for this comment in the middle of conversation
Any wrapper ST to JS, may be a good approach and partial solution, but
alway the programmer need think i this fact.
And ST without real closures and it context, is such as dancing with
your sister. You loose something.
Best Regards

2010/11/26, Colin Putney <[hidden email]>:

> On Thu, Nov 25, 2010 at 7:52 PM, Chris Cunnington
> <[hidden email]> wrote:
>
>
>> Write in the Smalltalk-ese - magic happens - and it alters the DOM. jQuery
>> factors into this somehow.
>>
>> How does jQuery facilitate this?
>
> No magic. The Clamato bootstrap code parses the Smalltalk code and
> generates the equivalent Javascript. If you look at the JQuery class
> in the Clamato browser you can see how the jQuery API is wrapped in
> Smalltalk.
>
> What's tricky is debugging–sometimes it's hard to map an error message
> from the browser back into the Smalltalk source.
>
> Colin
>
>

--
Enviado desde mi dispositivo móvil

Reply | Threaded
Open this post in threaded view
|

Re: Clamato & jQuery (was Re: <script language="smalltalk">)

Colin Putney-3
On Fri, Nov 26, 2010 at 3:02 AM, Diogenes Moreira
<[hidden email]> wrote:
> Hi and I'm sorry for this comment in the middle of conversation
> Any wrapper ST to JS, may be a good approach and partial solution, but
> alway the programmer need think i this fact.
> And ST without real closures and it context, is such as dancing with
> your sister. You loose something.

Agreed. Javascript has real closures (and so does Clamato), but
Javascript is not as powerful as Smalltalk, no doubt about it.

To have no-compromises support for <script language="smalltalk"> is an
enormous task, both technically and socially. It's basically
impossible. Even Microsoft wasn't successful in getting people to
adopt VBScript.

Personally, I've decided to just bite the bullet and write the
simplest, plainest Javascript that I can, cumbersome as that can be. I
think Clamato is about as close as we can realistically get to
Smalltalk in the browser, and for me the benefits don't quite outweigh
the costs. YMMV.

Colin

Reply | Threaded
Open this post in threaded view
|

Re: Clamato & jQuery (was Re: <script language="smalltalk">)

Diogenes Moreira
I imagine that the community  adopt Smalltalk faster and with better
eyes. Smalltalk don't is VBScript.
I can guess that implement a smalltalk in the browser could be a huge
technical task, but not impossible.
I can't imagine how would the process for the software factories, like
FF or MS or Apple, to include smalltalk in their products.

What I do hope happens is that html 6 DOM's model improvement.

Best Regard.

On Fri, Nov 26, 2010 at 1:51 PM, Colin Putney <[hidden email]> wrote:

> On Fri, Nov 26, 2010 at 3:02 AM, Diogenes Moreira
> <[hidden email]> wrote:
>> Hi and I'm sorry for this comment in the middle of conversation
>> Any wrapper ST to JS, may be a good approach and partial solution, but
>> alway the programmer need think i this fact.
>> And ST without real closures and it context, is such as dancing with
>> your sister. You loose something.
>
> Agreed. Javascript has real closures (and so does Clamato), but
> Javascript is not as powerful as Smalltalk, no doubt about it.
>
> To have no-compromises support for <script language="smalltalk"> is an
> enormous task, both technically and socially. It's basically
> impossible. Even Microsoft wasn't successful in getting people to
> adopt VBScript.
>
> Personally, I've decided to just bite the bullet and write the
> simplest, plainest Javascript that I can, cumbersome as that can be. I
> think Clamato is about as close as we can realistically get to
> Smalltalk in the browser, and for me the benefits don't quite outweigh
> the costs. YMMV.
>
> Colin
>
>