[Seaside] Jtalk, a Smalltalk for web developers

Norbert Hartl norbert at hartl.name
Sat Mar 19 13:08:08 UTC 2011


Am 19.03.2011 um 13:55 schrieb Hannes Hirzel:

> Hello Nicolas
> 
> You mentioned the jtalk is a compiler.
> 
> I did in the workspace
> 
> 1 to: 10 do: [ :i | Transcript show: (i printString, ' ',(i*i)
> printString, ' ', (i*i*i) printString); cr]. Transcript cr.
> 
> And the result showed in the Transcript.
> 
> Is there a place to see the translation of the Smalltalk code?
> 
> Or put the question otherwise: how do I use the compiler?
> 
To see the code I would use

Compiler new compileExpression: '3 + 4'

in the workspace. If you print it you get 

 'smalltalk.method({
selector: "doIt",
source: unescape("doIt%20%5E%5B3%20+%204%5D%20value"),
fn: function(){
var self=this;
return (function(){return (3).__plus((4));})._value();
return self;}
})' 

If you execute it you use

Compiler new loadExpression: '3 + 4'

That is my short insight. Nicholas may come up with the real meat :)

hope it helps,

Norbert




More information about the seaside mailing list