F-Script 2.0 beta 1 is out (download here). Here is what’s new since the latest alpha:
Handy syntax for specifying dictionaries
Looks like this (for a dictionary with two entries):
#{key1 -> value1, key2 -> value2}
This creates an NSMutableDictionary object.
Easy access to standard IO streams
Three globals, stdin
, stdout
and stderr
give access to the standard IO streams. You can invoke the print:
method on stdout
or stderr
, passing a string to output. For example:
stdout print:'hello world'
You should use this instead of the old sys log:'hello world'
, as the sys
object is not available when developing F-Script classes.
Switching between automatic GC and reference counting
You can now choose to run F-Script.app either with automatic Objective-C garbage collection or in reference counting mode, thanks to a new option in the preference panel. Personally, I use to run with automatic garbage collection whenever I can and switch to reference counting mode when I need to load frameworks or bundles that do not support automatic garbage collection.
F-Script Anywhere
A developer preview version of F-Script Anywhere 2.0 is included in the distribution!
Updated documentation
In particular, a new tutorial, Creating Cocoa classes with F-Script, provides a quick introduction to this new feature of F-Script 2.0.
Enjoy!