sergejsb's comments

sergejsb | 11 years ago | on: Show HN: Math Machine – a game based on the concept of a stack machine

FYI - I wasn't able to find your app on my nexus when searching for "math machine". I found it only when looked for "woodencloset".

As for the app - great idea and nice implementation, but for someone who understands what to do right from the beginning, "hints"-popups are really annoying. Maybe add a button "I know what I'm doing" or something like that to allow to skip them?

sergejsb | 12 years ago | on: Flappy Bird in Swift

A couple more interesting swift features that seemed a bit weird to me after skipping through the reference:

1. Strings, arrays and dictionaries are value types (like structs in C# - stored on stack, not on the heap) with special copying rules for arrays.

2. Custom operators - can be defined as a sequence of "/ = - + * % < > ! & | ^ . ~" characters and made prefix, infix or postfix. There is an example in the reference that defines a prefix operator "+++" for vectors

sergejsb | 12 years ago | on: Flappy Bird in Swift

Are you sure this should work? I checked the grammar once more and it seems that closure-expression should always be enclosed in { ... }

sergejsb | 12 years ago | on: Flappy Bird in Swift

I don't have XCode to try it out, but according to the book, you can replace

  var spawn = SKAction.runBlock({() in self.spawnPipes()})
with

  var spawn = SKAction.runBlock({self.spawnPipes()})
or even

  var spawn = SKAction.runBlock() {self.spawnPipes()}
or

  var spawn = SKAction.runBlock {self.spawnPipes()}
EDIT: formatting for code
page 1