Hacker News new | past | comments | ask | show | jobs | submit | alexjarvis's comments login

bitrise (https://www.bitrise.io) is the best that I've used so far for building iOS apps. Its elite package is also really fast if you can afford it. I've used travis (slow, 45 min build times) and gitlab-ci with a dedicated mac pro runner and bitrise wins hands down for speed and simplicity. Also don't forget fastlane (https://fastlane.tools). Most of my build configuration is in fastlane (for iOS and Android) and bitrise just triggers fastlane via the script step. Good luck!


Doesn‘t look like bitrise supports macOS?


You could try Flow (https://flow.org) as you're already familiar with JavaScript. I've been using it after primarily using static languages and it's been great so far.


No because it's cheap to produce hashes for git.


It is cheap to make GIT hashes but it remains impossible to day to generate git collisions.

The cost of hashing only has to do with the creation of blocks. Which blocks are not required to be cryptographically verifiable.


How are blocks not required to be cryptographically verifiable?


Postgres doesn't do distributed consensus though does it.


I'll assume this isn't a joke and that you just aren't well versed in computer science nor in database theory. While Postgres doesn't use distributed consensus it does use distributed transactions to maintain consistency (a major tenet of ACID compliance).

In a distributed consensus environment a substantial number of proofs of work (in Bitcoins case a hash) must be performed to gradually ensure that a block in the chain is consistent and thus come to a consensus that it is in fact valid.

In Postgres a transaction can be verified and guaranteed to be consistent among nodes using a two phase commit protocol. Essentially a transaction is attempted, verified, and then committed by the nodes of the network in a guaranteed, and very secure, manner.

The upside to the Postgres method is you do not need a substantial number of individual processors to perform proof of work to securely verify consistency.


Sorry, I wasn't clear, I meant trust-less consensus (proof of work).

Distributed transactions in an RDBMS requires trusting all the hosts it runs on.


Yes it does, via configuring multiple postgres servers with synchrnous and streaming replication options.

https://www.postgresql.org/docs/9.2/static/warm-standby.html...

https://github.com/sorintlab/stolon


Yes it's more cognitive overhead but it's a more functional than imperative style which usually has many advantages. If the functions are named well (naming being the hardest problem) then it should be easy to read without knowing exactly what the implementation of the function does.


I fail to see how reduceDepositedCoinsBy is in any way more functional.


I agree that you can split validation parts into separate functions but this is conflating two concerns, for example the rewriting of the guard statement from

  guard item.count > 0 else {
    throw VendingMachineError.OutOfStock
  }
to

  if count == 0 {
    throw VendingMachineError.OutOfStock
  }
only proves that you can refactor the code to not use guard whereas the article starts by talking about small functions, where you could in fact still use guard in this case.


Yes. And if all your code is composed of three-lines methods, then ok. Otherwise guard is extremely usefull, because unlike 'if' it leaves your constant/variable accessible outside the guard scope.


SEEKING WORK – London UK, remote ok

Lead iOS Engineer (Swift, Objective-C).

Six years experience creating and publishing apps to Apple and iOS since it was called iPhone OS 3 (2009).

Experience working remote.

Some of my work:

• 6Tribes http://6tribes.com

• WeCycle http://www.travelai.info

Apps that I built for myself:

• ZombieChat http://getzombiechat.com

• Meep http://meep.io

Get in touch!

Email: alex@panaxiom.co.uk

GitHub: http://github.com/alexanderjarvis

LinkedIn: http://uk.linkedin.com/in/alexanderjarvis/


extensions let you do this with enums (as well as protocols):

  enum Car { 
    case Red 
    case Blue 
  }    
  extension Car { 
    func hello() { 
      print("hello") 
    } 
  } 
  let x = Car.Blue
  x.hello()
https://developer.apple.com/library/ios/documentation/Swift/...

edit: although you can't add a new case to the enum.


> although you can't add a new case to the enum.

That's the point. We all know you can add impls or extensions.


Yeah you're right. If you want to stick with value types and store those values in an Array where the array can only store one type then you have to use an Enum instead of classes. I think there are a few people getting confused by not identifying enums in Swift as a more powerful construct than in C/ObjC.


We basically have that same issue in Rust :)


And with associated values in enum types they behave in a similar way to case classes in Scala that extend a sealed trait.

For example I've been working on a Json library that stores everything in an enum (ADT):

  public enum JsValue {
    case JsString(String)
    case JsNumber(Double)
    case JsObject([String: JsValue])
    case JsArray([JsValue])
    case JsBoolean(Bool)
    case JsNull
  }


Don't trait objects (https://doc.rust-lang.org/stable/reference.html#trait-object...) solve this problem?


Well, yes. But that wasn't what I was talking about.

Trait objects in Rust let you emulate inheritance. The issue I was talking about is that folks from inheritance-heavy languages use this as the de facto design pattern, and then stuff doesn't work so well, because you're not supposed to use inheritance so much (the languages aren't designed with this in mind). The correct option is to use enums and composition over inheritance wherever possible.


In functional languages, functionality should be extrinsic (case match values from the outside), while in OO languages like functionality is intrinsic (polymorphic method members called on the value). However, for things like hashing, intrinsic works way better (hence traits, protocols, type classes, and so on).

Saying use composition over inheritance "wherever possible" can lead to some cargo culting on its own. It is always possible to use composition over inheritance, but it isn't always wise.


> but it isn't always wise.

Pretty much what I meant, when I said "wherever possible" I meant "wherever possible with decent code", sorry about the confusion.


I'm also having battery issues since the GM release. Beta 5 was fine, but now it doesn't even get through the morning.


Interesting, I'm on the GM and have better battery life than WatchOS 1.


Apparently un-pairing and pairing again fixes the issue, so will give this a try.


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: