A Weekly Summary

It has been a long week. But I haven't made any significant progress on my main projects (currently Retro for iOS). A summary of developments this week:

  • wrote a small color selector application
  • started work on support for saving images under retro (no UI implemented for this yet)
  • more experiments with auto layout and storyboards
  • began notes for a couple of work-related tools

I haven't watched the latest Apple event yet, but I did take a look at the new stuff. A few initial thoughts: I really like the idea of a Retina iMac (after using the iPhone 6+ for a few weeks, I really notice the lower resolution screens now). I'm afraid that if I go and look at one that I'll end up being really tempted to buy one (and I can't afford it currently). Maybe someday...

It was good to see the Mac Mini updated, but it's disappointing that RAM and drive upgrades are much more difficult. (I have an old Mac Mini that's due for replacement, but has run smoothly 24/7 for several years).

The updates to iPad Air 2 look really good. A8X, laminated display, touch id. It's tempting. The 3rd generation mini is disappointing though. Apart from adding touch id, nothing else appears to be new. This is a shame as I prefer the mini form factor.

The biggest disappointments are that the original iPad mini is still being sold and that the iPod touch hasn't seen any updates. This makes it probable that iOS 9 will still support the A5 and non-retina form factors, meaning that I'll be stuck supporting the older architectures longer than I had hoped.


I've upgraded to OS X Yosemite. I won't review it (others have done far better than I can), but it installed without any issues and seems stable so far. I'm still adapting to the UI changes. I think it'd probably look better on a retina display, but it's acceptable on the low-res display on this MacBook Air.


And so the week ends. It was long. But mostly uneventful apart from some changes at work. I think that next week should be better, so I'll hopefully be able to make some progress on getting Retro for iOS close to a releasable state.

Retro on iOS (10/12 Update)

I'm continuing to make headway on building Retro for iOS. As of today here's what's done:

  • basic interface (editor / evaluate, with results displayed)
  • stack display
  • embedded documentation
  • runs 11.6 with most libraries preloaded

I'm still working on support for saving the image and editor contents, and then will try to allow selection from a list of images that can be supported by the current Ngaro.

For anyone wanting to test this: Apple still hasn't turned on external testers in TestFlight yet, but if you send your UDID I should be able to build an ad-hoc .ipa that can be installed via iTunes. Send me an email (or private message on IRC) if you are interested.

Apologue 1.2

Release 1.2 of Apologue is now available.

  • New API endpoint (consolidates multiple separate endpoints into one)
  • Updated to latest Parable (20140929)
  • Improved logo

This lays the groundwork for future updates. With the endpoint issues fixed, it'll be much easier to add new features and keep in sync with the latest Parable code base. Going forward, there are a few big things that I want to tackle: support for multiple projects, code sharing, a dark color theme, more examples, and editor improvements.

But first, I'll be shifting gears. For the rest of the month I am going to focus on getting an initial release of Retro for iOS ready. I don't expect this to be too problematic. I already have a basic UI in place, with a secondary view for the stack display. The other bits I want to add are an image selector, and persistent storage of the current session. I'll also have to deal with some potential issues that may cause crashes (divide by zero).

You can get Apologue on the App Store.  

Some Thoughts on Quotations

In several of my experiments with concatenative languages, I have offered various forms of quotations. Today they form crucial parts of both Retro and Parable. While I personally find them incredibly useful, there is a strong dislike of them in the larger Forth community.

A big thing I dislike in Forth is the number of special syntax forms used for control structures. With quotations, these can reduce down to much simpler forms where the code in question is packaged as a quote and passed to a combinator.

    if ... then
    if ... else ... then
    for ... next
    do ... loop
    begin ... again
    : ... ;
    :noname ... ;
[ ... ] if-true
[ ... ] [ ... ] if
[ ... ] repeat
[ ... ] loop
[ ... true ] while-true
[ ... ] '...' define
[ ... ]

Quotations can also help reduce stack noise. Primitive stack shufflers (e.g., swap, dup, drop, nip, etc) have their places. But often the added stack noise can make it more difficult to keep a mental picture of what's going on.

1 2 3 >r + r>
1 2 3 dup >r + r>
base @ >r ... r> base !
10 dup >r 10 * r> 20 *
<array> dup sum swap length /

s" john" s" John"
  swap to-uppercase
  swap to-uppercase
  compare
#1 #2 #3 [ + ] dip
#1 #2 #3 [ + ] sip
&base [ ... ] preserve
#10 [ #10 * ] [ #20 * ] bi
<array> [ sum ] [ length ] bi /

'john' 'John'
[ to-uppercase ] bi@ =

Quotes and combinators also make it easier to experiment interactively. In most Forth dialects, you need to define a function before using control structures. So you can't just do something like this at the interpreter:

base @ 10 = if s" decimal" else s" not decimal" then

Once quotes are added into the mix, it's just a couple of anonymous definitions and a combinator. This could be used interactively or in a definition:

&base @ #10 = [ 'decimal' ] ['not decimal' ] if

I'm curious as to why Forth users in general seem to dislike this. While it's certainly different than traditional Forth, the added flexibility and reduction in special syntax forms make this a net win in my opinion.

Retro on iOS (continued)

I'm getting closer to being ready to release this (as a beta). Today I fixed several issues with the storyboard, so the UI now scales properly (in portrait only) across all iPhone screen sizes. I have also started doing some work on a couple of additional views, but these aren't functional yet. (The initial implementation will have three views: editor/display, stack contents, and documentation.)

I also spent some time today experimenting with TestFlight. I might have try this out by having a beta period if there is anyone interested in testing this.