[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Objective-C - Smalltalk bridge
From: |
Nicolas Roard |
Subject: |
Re: Objective-C - Smalltalk bridge |
Date: |
Sat, 21 May 2005 23:51:43 +0100 |
Le 21 mai 05 à 13:38, Marcel Weiher a écrit :
With Objective-Smalltalk, you get that, but without a bridge or
proxies:
marcel@tpol[marcel]cat > stexec.m
#import <MPWTalk/MPWStCompiler.h>
int main( int argc, char *argv[] ) {
id pool = [NSAutoreleasePool new];
id eval = [MPWStCompiler new];
id result = [eval evaluate:@"1+1."];
NSLog(@"result: %d",[result intValue]);
exit(0);
return 0;
}
marcel@tpol[marcel]cc -O -Wall -o stexec stexec.m -framework
MPWTalk -framework MPWFoundation -framework Foundation
stexec.m: In function 'main':
stexec.m:4: warning: unused variable 'pool'
marcel@tpol[marcel]./stexec
2005-05-21 13:11:34.516 stexec[714] result: 2
marcel@tpol[marcel]
very cool, indeed :-)
What is Objective-Smalltalk? In a nutshell: a Smalltalk syntax
for the Objective-C runtime + language semantics. So there are no
proxies and no two runtimes that have to talk to each other. This
allows Objective-ST to be very compact, currently only around 1.5
KLOC, with several hundred of those being the unit tests. That
includes a basic compiler/interpreter (compiler for the syntax,
'interpreter' for running the returned Objective-C objects that
represent a script/method) ready for integration. It is still
early days, but good enough to use in some of my shipping products.
is it possible to play with it already ? else, any release planned
soon ? and what licence do you think you will use ?
I am currently working on a (very primitive) little method browser:
(snip)
Another part: stsh, a smalltalk shell, both for interactive and
scripting use.
that's really interesting :-) -- now I want it :-D
In the works: a gcc front end, though that is *quite* a struggle.
Doing a JIT might be simpler... :-(
another question though, do you have a garbage collector ? Hm... I
guess there's probably no GC, as in fact Objective-Smalltalk just
provides a different "syntax" to access the objc runtime ?
Ah, and how tied is it to the NeXT runtime (apparently, it runs on
OSX, not on GNUstep) ?
Cheers,
--
Nicolas Roard
"Any sufficiently advanced technology is indistinguishable from magic."
-Arthur C. Clarke