For this week’s meeting, there will be two mini-presentations on F-Script and view-based animations in Core Animation. Source code and sample apps will be available afterwards. Read more…
Next CocoaCoder meeting in Austin: F-Script And View-Backed in Core Animations
January 15, 2011 by Philippe Mougin
I was going to send you an email but It’s easier to just comment here.
F-Script is unbelievable. Amazing. Insanely great.
I *cannot* believe that I could be programming like that instead of in Objective-C.
Please, please tell me you are in talks with Apple to make F-Script at least officially supported.
Dude, you’ve made Objective-C come alive. This is great work. I can’t believe this.
Really, I read your on-line articles with my jaw on the floor. I was actually looking for how you decided on a syntax to define classes, methods, categories, etc, but couldn’t find it. Nevertheless, this is truly amazing.
I heard/read that Apple wants to make MacRuby an official language for their OSs. Have they not seen F-Script? Why would they even waste time on MacRuby when F-Script makes objects come alive in the true Smalltalk spirit, the way Alan Kay intended. That’s beyond me.
Seriously, if you can, tell me whether you know if Apple has ever seen your work. If you can’t say anything, at least give me a hint, something!
If Apple ever adopted this, you would have singlehandedly *saved* an OS from the claws of mediocre C-based languages.
I eagerly await your reply.
Thank you
Hi Peter, thanks for sharing your enthusiasm! AFAIK, some people at Apple use F-Script (we even gave a Google tech talk on F-Script together with Ken Ferry of the AppKit group a few years ago). I don’t know about any plan from Apple related to F-Script, tough. I like the power and simplicity of Smalltalk and, like you, I hope the future of computing will be more Smalltakish and less C-ish!
Thanks for replying, Philippe!
I found the link on the syntax for new classes and categories. Great stuff.
From now on I’ll be using F-Script at least for prototyping, and definitely for embedded scripting. I’ll be sure to make a donation in the near future.
Let’s hope the word spreads and Apple takes notice of what you have here.
I’d be pretty disappointed if they didn’t do anything in this direction.
MacRuby will never get to be this good.
Can you give me a link to something that explains how F-Script works exactly? I’m sure it’s nothing like the way the Nu language works.
Hi Peter,
All resources including a user guide are provided on fscript.org. You’ve probably them in hand already.
If you’re looking for a description of the internals of F-Script, you’ll find some info in the OOPSLA paper, section 8, at thttp://www.fscript.org/documentation/OOPAL.pdf . Other than that, you’ll have look at the source code.
AFAIK, F-Script and Nu use a lot of common techniques to interact with/make use of the Objective-C runtime.
Enjoy!
I understand very well how Nu works and it’s very simple. If F-Script works anything like that, I’d be amazed and relieved.
Nu is basically a lisp interpreter written in Objective-C that parses strings containing Nu code. It is capable of referencing objective-c objects by means of a dictionary that goes from strings (e.g. “myObject”) to pointers of objective-c objects. That much is even explicit in the way one uses Nu. Here’s a snippet that was kindly written by Nu commiter Grayson to showcase exactly that:
// Objective-C
NSString *example = @”This is an “;
NSString *nuCode = @”(+ exampleInjection \”example\”)”;
id parser = [Nu parser];
[parser setValue:example forKey:@"exampleInjection"];
NSLog( [parser parseEval:nuCode] ); // result: “this is an example”
As you can see, [parser setValue:forKey:] is setting up the string “exampleInjection” to point to the objective-c object NSString *example.
You can find more on: http://www.fromconcentratesoftware.com/2011/06/03/a-simple-example-of-nu-and-cocoa/
So, I haven’t taken a look at the F-Script source yet, but if it’s anything like that I’ll be impressed, because that’s a really simple technique and yet the results for F-Script seem more powerful than those for Nu (or maybe I’m just drooling over the live programming that the REPL makes possible?).
Also, that would also mean F-Script can technically be run on iOS.