Feeds:
Posts
Comments

Archive for the ‘F-Script’ Category

Beyond Blocks

Blocks (aka lambda expressions or closures) are versatile and powerful. I like them. I have even implemented a programming language in which they play a central role.

However, for a number of common programming situations, I think that some alternative approaches based on higher order messaging provide better solutions than classic block-based approaches. Marcel Weiher provides a good example in Blocked-C. He shows some Objective-C code that uses a block to iterate over a collection of strings and to create a new collection with some suffix added to the original strings:

 NSMutableArray *filteredItems = [NSMutableArray array];
 [items enumerateObjects WithOptions:0 withBlock:
    ^(id item, NSUInteger index, BOOL *stop) {
       [filteredItems addObject:[item stringByAppendingString:@"suffix"]];
    }
 ];

Then, he goes on to show how the same can be achieved using a higher order messaging (HOM) technique:

 [[items collect] stringByAppendingString:@"suffix"];

The conciseness and expressiveness of the HOM version is impressive and should at the very least warrant further examination. Regarding this, we are lucky since this approach, and its application to Objective-C, is described in an OOPSLA paper titled "Higher Order Messaging" (download).

With some support in the programming language, higher order messaging techniques can go even further. F-Script is a Smalltalk dialect for Cocoa which extends Smalltalk with array programming and messaging patterns. Messaging pattern is a generalization of message sending that applies to entire collections of objects. In a number of common situations, this provides an interesting alternative to the classic block-based approach. Indeed, here is our example coded in F-Script:

 items stringByAppendingString:'suffix'.

A key aspect of this programming model (and of Weiher’s HOM) is that it liberates us from the classic "one object at a time" style, and lets us manipulate whole collections of objects at once, using higher level constructs. We are freed from the low level details of accessing and dealing with individual elements. In my experience, introducing array programming in object-oriented programming, as F-Script does, has positive effects similar to those of the introduction of vectors in math, which is quite nice… This model is described in another OOPSLA paper titled "OOPAL: Integrating Array Programming in Object-Oriented Programming" (download)

To get a better sense of this programming model, let’s see how it stacks up against classic block based approaches for collections manipulation as seen in Ruby and Smalltalk. For the same price, I also add Python’s list comprehensions and C# Linq to the mix. In some common situations, those are interesting alternatives to blocks that are still representative of the "one object at a time" approach.

In the example below, we have a list of songs (a collection of Song objects) and we want to get their names. Here is how we’d do it using various approaches:

  • Smalltalk and Ruby with blocks
  • Python with list comprehension
  • C# with Linq
  • F-Script with array programming
Smalltalk songs collect:[:aSong| aSong name]
Ruby songs.collect(&:name)
Python [aSong.name() for aSong in songs]
C# from aSong in songs select aSong.name()
F-Script songs name

We can note that the array programming version (F-Script) is free from syntactic noise and low-level iteration logic, as is the brain of the programmer. Actually, in that particular situation, it seems hard to do better.

For the ruby version, we use a feature adopted in Ruby 1.9, which allows for automatic conversion of symbols to blocks. This is a useful trick as it provides a way, in some situations, to have a compact notation for some kind of blocks. Note, however, that when we need to provide more that just a method name, we have to use the classic Ruby block notation. This is the case in our original example (i.e., invoking the stringByAppendingString method with a given argument), for which we would have to do: items.collect {|item| item.stringByAppendingString("suffix")}.

We can carry on the comparison further by introducing some need for filtering. In the following example, we want to get the names of songs with a bit rate greater than or equal to 256 kb/s.

Smalltalk (songs select:[:aSong| aSong bitRate >= 256]) collect:[:aSong| aSong name]
Ruby songs.select {|aSong| aSong.bitRate >= 256}.collect(&:name)
Python [aSong.name() for aSong in songs if aSong.bitRate() >= 256]
C# from aSong in songs select aSong.name() where aSong.bitRate() >= 256
F-Script songs name where: songs bitRate >= 256

We see that the F-Script programming model allows for conciseness and expressiveness. Note that, in F-Script, where: is not a keyword or a special construct. It is just a regular message selector. The where: method, defined in a category of NSArray, takes an array of booleans as argument and returns the elements of the receiver whose positional matching element in this boolean array is true. Such boolean array is exactly what is produced by the expression songs bitRate >= 256, as messages are automatically broadcasted to each individual elements of the receivers (i.e., the bitRate message is sent to each element of the songs array, producing an array of numbers whose elements are then sent the >= 256 message, producing the array of booleans). This is the powerful compression operation of array programming adapted to object-oriented programming.

Finally, here is an example of sorting a collection of objects. In this example, we want to create a sorted collection of our songs, sorting on the songs’ names. In the case of Python, since its list comprehensions don’t have specific support for sorting, we use a solution based on lambda expressions.

Smalltalk songs asSortedCollection:[:song1 :song2| song1 name < song2 name]
Ruby songs.sort_by(&:name)
Python sorted(songs, key=lambda aSong: aSong name)
C# from aSong in songs orderby aSong.name() select aSong
F-Script songs at: songs name sort

As in the previous examples, the F-Script version shows that we can do sophisticated collection manipulation without relying on blocks but only using message passing. The result of the sort message sent to the array of song names is an array of integers containing the indices that will arrange the receiver of sort in ascending order. We then pass this array of indices to the at: method. The at: method allows for indexing an array by either a single integer or a whole array of indices. This is this latter capability, a fundamental element of array programming, that we use here to produce our sorted list of songs.

Conclusion

Blocks are great, especially in programming languages which don’t have (and don’t want) specific syntax for classic control structures (if/then/else, while, etc.). However, we should take them with a grain of salt and see that, for some common problems, there are alternative approaches that are worth considering.

Further reading

F-Script documentation set
Blocked-C II
Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs

Special bonus

You can easily, and interactively, experiment with the code provided in the examples: launch F-Script.app, connect to iTunes and immediately start querying and manipulating your iTunes song collection from F-Script.

You connect to iTunes using the standard Cocoa Scripting Bridge technology. For example, you can enter the following code in the F-Script console:

iTunes := SBApplication applicationWithBundleIdentifier:'com.apple.iTunes'

The iTunes variable now points to a dynamically generated Cocoa object that stands for the iTunes application.

You can get at your songs with:

 songs := ((iTunes sources at:0) playlists at:1) tracks

You can then directly paste, in the console, the code of the examples provided in this article. If your song library is huge you might notice some latency, as Cocoa messages are automatically converted to Apple Events that flow back and forth between F-Script and iTunes.

Read Full Post »

NSConference

The NSConference 2010 setup looks great. I’ve been lucky to attend and speak at the 2009 edition, which was terrific, thanks to the vision, work and human qualities of the folks at MDN, Steve Scott and Tim Isted. The videos of the 2009 edition are all available for purchase. This includes the talk I gave on “New Cocoa programming superpowers”.

There are also a number of backstage and interview videos at Pomcast.com (search for "NSConf"), including the super geeky Hacking F-Script & Pick&Play, starring Jason Harris, and the french F-Script interview in the dark.

Read Full Post »

Cédric Luthi takes control of Preview.app with F-Script Anywhere in "Watch a large number of icons with Preview.app".

Read Full Post »

F-Script injected into the Finder:

Looking around with the object browser. Cocoa all over the place!

The NSApplication singleton and its delegate… So cute!

Have you ever seen the Finder’s Cover Flow from the inside? Look at that setFog: method on the IKImageFlowCell… Yummy!

Ultimate proof that the Finder makes use of bindings:

Seems that the names of the Finder specific classes start with ‘T’. Oh well…

Don’t click on that “switchToSimpleFinder” method or else…

That black Cover Flow background is boring. With F-Script, we can change it to something more disco!

Read Full Post »


Garbage collection

New in F-Script 2.0 is a fast, concurrent, generational garbage collector. It was a lot of work to implement. Fortunately, Apple did all of it, as F-Script 2.0 uses the new Objective-C garbage collector. As with Objective-C, when you run F-Script in GC mode you no longer have to manage retain counts and to care for cyclic references. You can still use F-Script in non-GC mode, which is needed if you want to interact with non-GC capable frameworks or libraries. A new option in the F-Script preference panel let you choose your memory management model. Finally, you can embed F-Script in GC or non-GC applications.

Garbage collection is performed concurrently, on its own thread. Another notable aspect is that it works both for objects and for raw memory buffers. Actually, for raw memory buffers, you can either use managed or unmanaged memory. F-Script 2.0 lets you use unmanaged memory as usual (i.e., with the malloc: method) and introduces new methods, in the FSPointer class, for dealing with managed memory. Features such as weak references, explicit GC control, etc. are all available from F-Script using the standard methods provided by Cocoa.

64-bit

F-Script 2.0 provides 64-bit support. Benefits include:

  • Very large virtual address space
  • New Objective-C runtime (optimized message dispatching, zero-cost setup model for exceptions, etc.)
  • Ability to load 64-bit frameworks in F-Script and to embed F-Script in 64-bit applications

You can still run in 32-bit mode and you can use the F-Script framework in 64-bit and 32-bit applications.
The F-Script API itself now exposes both 64-bit and 32-bit capable interfaces, using Cocoa’s NSInteger, NSUInteger and CGFloat macros.

New object browser

The graphical object browser gains a new look and a number of enhancements. This includes:

  • Introspection of Objective-C 2.0 properties
  • Improved introspection of bindings
  • Direct access to the view hierarchy
  • Visual feedback when selecting graphical components on screen
  • Additional information about standards Cocoa objects
  • And more…

Companion article: Exploring Cocoa with F-Script
Discover the graphical object browser and object inspectors in this in-depth article.

   

If you are a Cocoa developer, you already know that the dynamic nature of Objective-C and Cocoa is what makes them so flexible and powerful. In terms of development tools, the power of a dynamic object-oriented environment like Cocoa translates into original tools like Interface Builder or F-Script, an open source project that is presented in this article. F-Script is an integrated set of tools that makes it possible to interactively explore and manipulate Cocoa objects as well as script them using new high-level programming techniques. This article shows you how to use some of its most impressive features and demonstrates how it can be a useful addition to your developer toolkit. Read more…

Dynamic Cocoa class creation

F-Script 2.0 makes it very easy to dynamically define new classes. At run-time, these dynamically generated classes are regular Cocoa classes that happen to execute F-Script code instead of compiled Objective-C code. They can be used from both F-Script and Objective-C. You can subclass existing Cocoa classes in F-Script and, as in Objective-C, define instance variables, instance methods and class methods. In addition, F-Script also supports defining class instance variables.

Companion article: Creating Cocoa Classes with F-Script

   

F-Script 2.0 provides a handy syntax for dynamically creating Cocoa classes on the fly. This is useful for quickly experimenting, prototyping and using Cocoa interactively, as well as for developing sophisticated programs. You can type a class definition in the F-script console, hit return and immediately start playing with your new class. This article provides a quick introduction to this feature. Read more…

System-wide scripting

F-Script 2.0 is able to control scriptable applications and graphically browse and interact with the applications scripting interfaces. This major new feature is based on the MAC OS X Scripting Bridge technology. For example, here is how you can connect to iTunes:

iTunes := SBApplication applicationWithBundleIdentifier:'com.apple.iTunes'

You can then manipulate iTunes from F-script. For example, here is how you make iTunes go to the next track:

iTunes nextTrack

Companion article: System-wide Scripting with F-Script
Learn how to script your applications with this tutorial.

   

Like AppleScript, F-Script can communicate with scriptable application, making it possible to automate processes using these applications and to create workflows spanning multiple applications. This system-wide scripting capability relies on a standard Mac OS X technology called the Scripting Bridge.
Basically, the scripting bridge allows manipulating scriptable applications as if they were Cocoa objects, automatically taking care of the communication details (e.g. creating and sending Apple Events). This allows using F-Script to manipulate other applications through their standard scripting interface. Read More…

Updated embedding and injecting capabilities

F-Script can be easily embedded into your own applications or dynamically injected at runtime into any running Cocoa application. Embedding is great for adding scripting or interactive object querying/manipulation capabilities to your applications, as well as for implementing parts of your apps with F-Script. Injecting is incredibly powerful when it comes to debugging or exploring the innards of applications. F-Script 2 comes with full support for the new plugin model of Interface Builder 3, allowing drag and drop of F-Script graphical components right into your application. F-Script 2 also includes updated injecting tools (aka F-Script Anywhere) which lets you inject a complete F-Script environment at run time into any Cocoa application.

Companion article: Embedding F-Script into Cocoa Applications

   

All F-Script functionalities are available through components which can be integrated into applications. This enables you to:

  • Program all or part of an application using the F-Script language.
  • Offer a scripting environment within your applications, allowing users to manipulate your business objects and to automate processes.
  • Interface F-Script with other tools.

Because F-Script and Cocoa share the same object model, integration is easy and advanced. Read more…

Refined syntax and class library

F-Script is a Smalltalk dialect. As such, its syntax is well suited to the manipulation of Objective-C objects, since Objective-C itself borrowed its messaging syntax from Smalltalk. F-Script 2.0 introduces several syntax refinements, including a handy notation for specifying dictionaries. Here is how an NSMutableDictionary instance with two entries looks like:

#{key1 -> value1, key2 -> value2}

There are other syntax enhancements including support for Unicode in string literals and a hexadecimal notation for numbers. Besides, the base class library has been refined, with new methods for dealing with collections, new globals for easy access to the standards IO streams, a new facility for comparing objects with the special nil value and some changes in the way test for object equality is performed. It is also worth noting the introduction of a new public class, FSAssociation, which represents associations between two objects, a “key” and a “value”, and is primarily used for specifying dictionary entries.

If you are not familiar with the F-Script syntax and fundamental elements, the two articles referenced below will get you up to speed in a breeze.

Companion article: Learn F-Script in 20 Minutes and Have Fun Playing with Core Image

   

In this article, our goal will be to produce a nice little animation using fancy Core Image effects. In doing so, we will learn the basics of F-Script. So install yourself comfortably in front of your Mac, download the latest F-Script version from http://www.fscript.org and enjoy the trip! Read more…

Companion article: Scripting Cocoa with F-Script

   

One important application of Cocoa’s openness is its integration with scripting languages. This is very useful because it allows for interactive use and easy gluing of Cocoa components. In this article I want to give you a taste of Cocoa scripting, and to show you the level of integration that you can expect. We will use F-Script, an open source scripting language for Cocoa, to build a little graphical application. Using F-Script, we will directly program against the Application Kit, which is the Cocoa object framework for graphical user interfaces. Read more…

Snow Leopard

F-Script 2 is compatible with both Leopard and Snow Leopard. It lets you directly access a number of the latest Mac OS X frameworks. And other ones are just a simple loading instruction away.

Companion article: Accessing Mac OS X Frameworks with F-Script

   

F-Script.app, the standalone F-Script environment, is automatically linked with a number of Mac OS X frameworks. This is convenient for quickly exploring Mac OS X’s capabilities and directly using the frameworks without any further configuration. Read more…

New project infrastructure

The source code for F-Script is now available at Github.

New group for support and discussions: http://groups.google.com/group/f-script/.

Read Full Post »

Switching in F-Script

There is no switch/case statement or method in F-Script and Smalltalk. Usually, switching is done by taking advantage of object polymorphism or by simply nesting ifTrue:IfFalse: messages. For example, here is some C pseudo code with a switch statement:

switch (aValue)
{
    case 1: doSomething1;
            break;   
    case 2: doSomething2;   
            break;
    case 3: doSomething3;   
            break;
}     

We can write equivalent code in F-Script using ifTrue:IfFalse: messages:

aValue = 1 ifTrue:[doSomething1] ifFalse:[
aValue = 2 ifTrue:[doSomething2] ifFalse:[
aValue = 3 ifTrue:[doSomething3]]]

Another possible technique is based on blocks and dictionary lookup. Basically, we construct a dictionary whose keys are the various cases’ values we want to check against and whose values are blocks of code to execute. We then do a lookup in the dictionary and execute the selected block. With our example, this gives:

cases := #{
  1 -> [doSomething1],
  2 -> [doSomething2],
  3 -> [doSomething3]
}.
(cases objectForKey:aValue) value

Searching for Smalltalk switch case on the Web will get you to additional techniques and discussions on emulating switch statements.

Read Full Post »

F-Script 2.0.2 is now available at http://www.fscript.org/download/F-Script20091026.zip

This version improves integration with Snow Leopard and fixes a memory management bug in the F-Script class creation system when running in reference counting mode. You are advised to upgrade.

Read Full Post »

F-Script Anywhere is this amazing utility that lets you dynamically inject a complete F-Script environment into any Cocoa application at run-time. Kind of the ultimate tool to explore and take control of applications from the inside.

Unfortunately, the current version does not work on Snow Leopard… But we have a workaround! It is included in a new distribution that has just been made available: F-Script 2.0.1 (download).

It is very simple to use. I’ll show you how it works and how to automate it.

Injecting F-Script into an application

  1. Locate the F-Script framework on your disk. The F-Script framework is part of the F-Script distribution and is named “FScript.framework”. In the following, we assume you put it in /Library/Frameworks/
  2. Open the UNIX terminal and launch gdb by typing:
    gdb

    Note that if gdb is not on your system, you can get it by installing the Xcode package provided on the installation DVD of Mac OS X.

  3. Attach gdb to the target application, using the “attach” instruction. For example, to attach to TextEdit type:
    attach TextEdit
  4. Load the F-Script framework into the target application by typing the following (we assume the F-Script framework is located at /Library/Frameworks/FScript.framework. Modify the command if this is not the case):
    p (char)[[NSBundle bundleWithPath:@"/Library/Frameworks/FScript.framework"] load]
  5. Add an F-Script menu to the target application by typing:
    p (void)[FScriptMenuItem insertInMainMenu]
  6. Let the application run by typing:
    continue

An F-Script menu should now appear in the menu bar of the target application. Using it, you can access the injected F-Script environment and play with the application from the inside.

Automating the injection procedure

Those steps are easy to automate by defining a new gdb command. To have this new command permanently available in gdb, you can add its definition to a .gdbinit file (a text file) that you put in your home directory. Your .gdbinit file is automatically executed each time gdb is launched. Here is the command definition that you can put in your .gdbinit file:

define loadfs 
    attach $arg0
    p (char)[[NSBundle bundleWithPath:@"/Library/Frameworks/FScript.framework"] load]
    p (void)[FScriptMenuItem insertInMainMenu]
    continue 
end

This defines a command named loadfs that takes the name of the application you want to inject into as argument.

For example, to inject F-Script into TextEdit you can type the following in gdb:

loadfs TextEdit

This automates steps 3 to 6.

Thanks to Ken Ferry for suggesting this injection technique.

Read Full Post »

F-Script 2.0

F-Script 2.0 is now available.

Companion article: Welcome to F-Script 2.0.

Enjoy!

Read Full Post »

Also on oyasuhisa, a cool demo of animating views into crazy transparent windows, making use of Cocoa’s animation techniques. (download).

AnimatingViews.png

I reproduce the code below (slightly modified), so you just have to copy and paste in your F-Script console to play with it:

DURATION := 0.5.
WIDTH    := 800.
HEIGHT   := 360.
TOOLBOX_HEIGHT := 64.
NUM_OF_BOXES := 50.

window := NSWindow alloc initWithContentRect:(120<>60 extent:WIDTH<>(HEIGHT + TOOLBOX_HEIGHT))
                                   styleMask:NSTexturedBackgroundWindowMask + NSTitledWindowMask + NSClosableWindowMask
                                     backing:NSBackingStoreBuffered
                                       defer:NO.
window setOpaque:NO;
       setBackgroundColor:NSColor clearColor;
       setHasShadow:NO.

make_box := [:frame |
             | box |
             box := NSBox alloc initWithFrame:frame.
             box setBoxType:NSBoxCustom;
                 setBorderType:NSLineBorder;
                 setTitlePosition:NSNoTitle.
             box].

toolbox := make_box value:(0<>0 extent:WIDTH<>TOOLBOX_HEIGHT).
toolbox setFillColor:(NSColor colorWithCalibratedWhite:0.5 alpha:0.3);
        setContentViewMargins:(NSValue sizeWithWidth:0 height:0).
window contentView addSubview:toolbox.

field := make_box value:(0<>TOOLBOX_HEIGHT extent:WIDTH<>HEIGHT).
field setFillColor:(NSColor colorWithCalibratedWhite:1.0 alpha:0.1);
      setContentViewMargins:(NSValue sizeWithWidth:0 height:0).
window contentView addSubview:field.

SIZE := (WIDTH min:HEIGHT) / 10 floor.
BOX_EXTENT := SIZE<>SIZE.
boxes := {}.
box_frame := ((WIDTH - SIZE) / 2)<>HEIGHT extent:BOX_EXTENT.
NUM_OF_BOXES timesRepeat:[boxes addObject:(make_box value:box_frame)].
setFillColors := [boxes setFillColor:(NSColor colorWithCalibratedHue:@(boxes count iota / boxes count)
                                                          saturation:1.0
                                                          brightness:1.0
                                                               alpha:0.8)].
setFillColors value.
field addSubview:@boxes.

animationContext := [:block :duration |
                     NSAnimationContext beginGrouping.
                     NSAnimationContext currentContext setDuration:duration.
                     block value.
                     NSAnimationContext endGrouping].

rules := {{'left', 120<>15,
           [:count |
            | iota base |
            iota := count iota.
            base := (HEIGHT / SIZE) floor min:(count raisedTo:0.5) floor.
            (  (           (iota   / base) integerPart     * SIZE)
             <>(           (iota rem:base)                 * SIZE))]},
          {'top', 200<>30,
           [:count |
            | iota base |
            iota := count iota.
            base := (WIDTH / SIZE) floor.
            (  (           (iota rem:base)                 * SIZE )
             <>(HEIGHT - @((iota   / base) integerPart + 1 * SIZE)))]},
          {'bottom', 200<>0,
           [:count |
            | iota base height |
            base   := (WIDTH / SIZE) floor.
            height := (count / base) ceiling.
            iota := count iota + (height * base - count).
            height := height * SIZE.
            (  (WIDTH  - @((iota rem:base)             + 1 * SIZE))
             <>(height - @((iota   / base) integerPart + 1 * SIZE)))]},
          {'right' , 280<>15,
           [:count |
            | iota base |
            iota := count iota.
            base := (HEIGHT / SIZE) floor.
            (  (WIDTH - @((iota   / base) integerPart + 1 * SIZE))
             <>(          (iota rem:base)                 * SIZE ))]},
          {'random', 20<>15,
           [:count |
            | array |
            array := {}.
            count timesRepeat:[array addObject:((WIDTH - SIZE) random)<>((HEIGHT - SIZE) random)].
            array]}}.
animate := [:make_origins |
            | origins frames |
            origins := make_origins value:boxes count.
            frames  := origins extent:BOX_EXTENT.
            animationContext value:[boxes animator setFrame:frames]
                             value:DURATION].
make_targets := [:make_origins | 
                 [last_rule := make_origins.
                  animate value:make_origins]].
rules@ at:2 put:@(make_targets value:@(rules@ at:2)).

removed_box := nil.
REMOVED_BORDER_COLOR := NSColor colorWithCalibratedWhite:0.0 alpha:0.0.
rules addObject:{'add', (WIDTH - 240)<>30,
                 [| box |
                  box := make_box value:((WIDTH - 240 + 40)<>0 extent:BOX_EXTENT).
                  field addSubview:box.
                  boxes addObject:box.
                  animate value:last_rule.
                  setFillColors value]};
      addObject:{'remove', (WIDTH - 240)<>0,
                 [| count |
                  count := boxes count.
                  (removed_box ~~ nil)
                  ifTrue:[removed_box removeFromSuperview.
                          removed_box := nil].
                  (0 < count)
                  ifTrue:[| frame |
                          removed_box := boxes at:(boxes count random).
                          removed_box setBorderColor:REMOVED_BORDER_COLOR.
                          frame := (removed_box frame origin x)<>(-1 * SIZE) extent:BOX_EXTENT.
                          boxes removeObject:removed_box.
                          setFillColors value.
                          animate value:last_rule.
                          animationContext value:[removed_box animator setFrame:frame]
                                           value:DURATION * 2]]}.

button_frames := (rules@ at:1) extent:80<>30.
buttons := [:frame | NSButton alloc initWithFrame:frame] value:@button_frames.
buttons setTitle:(rules@ at:0);
        setBezelStyle:NSRoundedBezelStyle;
        setTarget:(rules@ at:2);
        setAction:#value.
toolbox addSubview:@buttons.

window orderFront:nil.
((rules at:((rules@ at:0) ! 'random')) at:2) value. "Initialize last_rule"

Read Full Post »

Posted on oyasuhisa, a package that integrates F-Script and Emacs (download).

Read Full Post »

F-Script 2.0 Release Candidate 1 is now available for download at http://www.fscript.org/download/F-Script20090809.zip

Enjoy! (and don’t forget to report issues)

Read Full Post »

A meeting for Cocoa developers in Paris.

Main subjects today:

Location: La Cantine – 151 rue Montmartre, Passage des Panoramas
12 Galerie Montmartre, 75002 Paris

More information here.

Read Full Post »

Daylite, the popular business productivity suite from MarketCircle, employs F-Script as a user-facing component allowing advanced control over various tasks, including producing custom reports. Daylite’s report engine (which is also used in Billings, MarketCircle’s other flagship product) provides a powerful platform to produce reports of all kinds, tapping directly into business data. Eric O’Connell’s new book, Daylite Reporting Fundamentals, covers this technology in detail, including advanced usage with F-Script.

Read Full Post »

One day of workshops + a two days conference for Mac developers in Hatfield, near London, UK. The conference is organized by the excellent Mac Developer Network, publisher of Late Night Cocoa, Mac Developer Round Table and other popular shows. More information at the conference web site.

Here is the conference program:

Sessions

Designing and Developing Custom Cocoa Controls – Matt Gemmell

Take a look at any of the most popular Mac applications and it quickly becomes clear that standard UI controls no longer suffice. Custom user interface is the order of the day, but consistency and intuitive interaction have never been more important – and that principle applies both to what the user sees, and to the code which makes it work. In this session, Matt Gemmell discusses how to create your own controls while maintaining consistency and usability, for both the user and other developers who may use your code.

Pimp My App – Mike Lee

In a global software economy, it’s foolish for Europeans to compete on price. Someone who lives in a smaller economy than yours can always undercut you. Instead, you must compete on merit. You need to make your application better than any free knockoff. You have to sweat the details and add value to your application. You need to pimp your app.

We’ll start at Pimp 101, and learn about the second 80%, the work that begins when you think you’re done. We’ll talk about the idea of a hook, the thing that makes people want to talk about your app with their friends — and other facets of polishing an application, such as performance, stability, and beauty. We’ll talk about the importance of professional artists.

Then we’ll delve into human interaction, and the subtle art of empathy. We’ll talk about your feature list, and how discipline in application design can save you time and make you money. We’ll talk about rule #1: don’t annoy the user, and some common mistakes. Finally, we’ll apply all we’ve learned by pimping an existing app.

Foundations of Objective-C – Andre Pang

One reason for Mac OS X’s success is Objective-C, combining the dynamism of a scripting language with the performance of a compiled language. However, how does Objective-C work its magic and what principles is it based upon? In this session, we explore the inner workings of the Objective-C runtime, and see how a little knowledge about programming language foundations–such as lambda calculus and type theory–can go a long way to tackling difficult topics in Cocoa such as error handling and concurrency. We’ll cover a broad range of areas such as garbage collection, blocks, and data structure design, with a focus on practical tips and techniques that can immediately improve your own code’s quality and maintainability.

New Cocoa Programming Superpowers – Philippe Mougin

In some ways, we are still in infancy when it comes to harvest the enormous amount of power brought by dynamic object systems and frameworks such as Objective-C/Cocoa. Fortunately, new tools and technologies can help us. In this session, Philippe will get you up to speed with F-Script 2.0, a set of open source tools that complement Xcode and Interface Builder. You will learn how to use them, discover how they can bring Cocoa development productivity and fun to new highs, and acquire new programming superpowers not seen before on any other platform!

Integrating with Apple’s Photography Applications and APIs – Fraser Speirs

Learn how to integrate your service or application with Apple’s photography applications iPhoto and Aperture. If your application consumes images, you’ll want to know how to get the most out of the Apple photography ecosystem. In this session, Fraser Speirs will cover the SDKs for iPhoto and Aperture and touch on some of the major System APIs you’ll want to be aware of when dealing with photographs on Mac OS X.

Building a secure Cocoa application – Graham Lee

Mac OS X has a reputation for being a secure operating platform, and many of its security features are available for third-party developers to use in their own application. But there’s also a more fundamental aspect to security – understanding how your software will be used and anticipating how it may be misused. In this session Graham Lee will describe techniques for designing secure applications, then take a tour through the OS X security capabilities developers can use to turn the security dial all the way to 11.

Spotlight and QuickLook vs. Core Data – Marcus Zarra

Marcus will walk through how to integrate a Core Data based application with both Spotlight and QuickLook. Add these important, and usually overlooked features, into your application to add that additional polish that we all expect from OS X applications. In this session we will discuss how these features work and how to get them to work with Core Data in a performance aware way.

Building Applications with Core Animation – Bill Dudney

Core Animation is one of those technologies that is too easy to over hype. It does so many cool things that it is hard to not be overly enthusiastic about what you can do with it. Well Core Animation is not magic but it does make doing several things with your user interface much easier. In this session we are going to see what Core Animation is and how you can use it in your UI. In addition to learning about doing animations with Core Animation we will also learn how to use Core Animation to simplify your drawing and maximize the performance of your application. Come to this session and learn how to build applications that take advantage of this really exciting technology

What a Performance – Drew McCormack

Take a journey through the Mac performance cosmos, with stopovers in exotic destinations like Xgrid Foundation, NSOperation, and Grand Central Dispatch. Never observed an XGActionMonitor in full flight, or got your NSOperation priorities right? Join us for this once in a lifetime opportunity. We’ll look at the emerging trends, and common threads that bind all levels of the performance equation. How are the techniques used in High-Performance Computing similar to those used in modern Cocoa apps running on the latest multi-core laptops? Don’t know, but come along and we’ll see if we can figure it out. This talk will cover everything, from the death of multi-threading, to Snow Leopard niceties like blocks in C and OpenCL. Not to be missed.

Conference Workshops

iPhone Development – Bill Dudney

If your an experienced Mac Developer looking to write your first iPhone application Bill will spend a day helping you get up to speed.

The iPhone is on a tear. With the millions and millions of iPhones sold the market is almost too big to ignore especially for experienced Mac developers. In this workshop you will be brought up to speed on what is different with iPhone development. While Cocoa Touch is very much like App Kit there are differences. This workshop will pull you up the learning curve fast. Here is a list of the topics we will cover;

  • View Controllers (what they are how they work etc)
  • Table Views (how to use them, esp how to add custom cells)
  • Drawing (how its diff on the iphone, no lockFocus backing store is always a layer etc)
  • Multi Touch Event Handling (how to do pinch/zoom)
  • Accelerometer/Location (cool tech that is only on the phone)
  • Photos and Address Book (integration with personal data)

User Interfaces – Mike Lee

This workshop will spend the day looking at how decisions should be made when designing user interfaces.

Core Data – Marcus Zarra

This workshop will spend the day looking at practical issues of using Core Data in your applications.

Core Data for Cocoa Developers
A very brief introduction into Core Data followed up by best practices for configuring both the Core Data stack and Xcode to make the project as maintainable as possible. Also known as “Pimpin Apple’s Code”. Followed by Q&A.

Model Design
How to get the most performance out of your data model, how to choose the best persistent store for your data storage and access needs. Tips include how to pre-populate data into your Core Data persistent store and add data in later versions of the application simply and easily. Followed by Q&A.

Data Model Versioning and Migration
How to make your persistent store upgrades smooth for you as the developer and for your users. Tips and tricks to help reduce the headaches of data migration and how to avoid a Arithmetic progression of NSMappingModels. Followed by Q&A.

Evening Agenda

If you are staying for the evening activities you will get to attend

The Conference Dinner

A great conference dinner where developers can spend the evening talking geek stuff with nobody complaining.

The Mac Developer Roundtable “LIVE”

There will be a late after hours recording of The Mac Developer Roundtable “LIVE”.

Read Full Post »

« Newer Posts - Older Posts »