io
about
blog
community
docs
downloads

    2007 07 26         Cairo Binding

    Trevor Fancher has added binding for the Cairo graphics library which is now available in the repo. Thanks Trevor!

    2007 07 18         Multiple Dispatch

    Multiple-dispatch or multi-methods is the feature of some object-oriented programming languages in which a function or method can be specialized on the type of more than one of its arguments. - Wikipedia

    A typical multiple-dispatch example is a game with Asteriods, Bullets and Ships that have collision methods for each combination of interactions. In this case (and perhaps almost all cases), we only care about the first argument. And the problem is having to write switch statements like this:

    Ship collideWith := method(other,
       if(other isKindOf(Ship), ....; return)
       if(other isKindOf(Asteriod), ....; return)
       if(other isKindOf(Bullet), ....; return)
    )
    

    Here is a simple solution provided by Rich Collins:

    Ship collideWith := method(other, other collideWithShip(self))
    Ship collideWithShip := method(aShip, ....)
    Ship collideWithAsteriod := method(anAsteriod, ....)
    Ship collideWithBullet := method(aBullet, ....)
    
    // with similar implementations for other objects
    
    which also works with inheritance, delegation and proxies without the need for any formal type system.

    2007 06 29         Io Style Guide

    Link

    2007 06 26         Io at Pixar

    James Burgess writes:

    Image processing scripting tool powered by Io:

    https://renderman.pixar.com/products/tools/it.html

    Many thanks for the cool language!

    My favorite part of this product is the renderman plugin version. We have a complex multi-threaded app loading a plugin multiple times that has Io with all its coro fun bound to a sophisticated multi-threaded image processing library. Oh yeah, on windows, osx, linux 32 and 64...

    Congrats James!

    2007 06 26         Line History

    Jonathan Wright has added line history/editing support to the Io command line which makes command line much more user friendly.

    2007 05 31         Video Player

    Sample code for a minimal video (with synchronized audio) player in Io:

    Flux
    
    Application clone do(
      appDidStart := method(
            self videoView := VideoView clone
            mainWindow contentView addSubview(videoView)
            videoView resizeWithSuperview resizeToFitSuperview
            videoView open(System args at(1))
            mainWindow reshapeToSize(videoView video videoSize)
      )
    ) run
    
    Io uses the multiplatform ffmpeg API, so it supports any video and audio formats supported by ffmpeg.

    2007 05 15         Tips for Building on Windows

    By Robert Shiplett

    Link

    next  |  prev  |  +  |  rss