Ivy: iOS app written in Go
itunes.apple.com
itunes.apple.com
[1]: https://twitter.com/rob_pike/status/619995629566058496
I ran 2123456 in both and Python was quite fast, Ivy on gohperjs quite slow
2[star][star]123456
in a HN comment, the HN software will decide that this means a 2, then an emphasized empty string, then 123456, and the results will be indistinguishable to readers from the much smaller number 2123456.I know GopherJS math package uses some native JavaScript funcs that are fast, but I think math/big does not have a native implementation.
Video about it (Nov 2014): "Implementing a bignum calculator" https://www.youtube.com/watch?v=PXoG0WX0r_E
[1]: https://www.reddit.com/r/golang/comments/3d0stz/ivy_first_an...
Now, I want to learn to write iOS apps in Go as well.. Super neat and a great app to start with
More importantly, why should they be forced to?
It's a bug.
[0] http://blog.codinghorror.com/if-you-dont-change-the-ui-nobod...
What matters is: how extensive is the support for this language on iOS? As far as this app shows, the support for Go looks very primitive and not really applicable to anything but toy apps.
Writing a single shared library for different platforms makes sense. I think Google do this currently with java & then convert the java to objc, but if go provides an alternative it might finally be time for me to learn it...
i've always taken this approach... like since the 90s, although not necessarily a library, but shared code. there has always been a way to do this thanks to the ubiquity of C - its just been that Google has been reluctant to allow 3rd parties to do on android what they do internally for reasons I really don't know...
its still a 3rd class citizen, despite being the backbone of the platform.
This app uses a different mode of the same tool, `gomobile bind`. This lets you use a Go package from inside an Android app, or from ObjC in an iOS app. It is related but parallel work.
Cocoa/UIKit works in ObjC.
ObjC is a super set of C that translates the objc parts to calls to objc_msgsend.
Go supports ARM/OSX.
Go makes it pretty easy to call into C
Therefore it should be pretty easy to port to iOS, all you need to do is to write a bit of go to interface with objc_msgsend.
Over the past several months, several open source contributors (most notably minux) and I have been working on darwin/arm and darwin/arm64 support for Go 1.5. We can build binaries, and we can build Go packages as C archives that can be compiled into an ObjC program.
At the same time Hana has been extending gobind (http://golang.org/s/gobind) with ObjC support, and came up with the idea of turning Rob's Ivy into an app. Hana built the Android app, I did the iOS app.
This is a few hundred lines of ObjC/UIKit for the UI, calling into a Go function:
func Exec(line string) (string, error)
With the bulk of the app being the actual Ivy implementation in Go.It will be open source when I find the hours in the next week.
I'm curious why they chose to have expressions evaluated in right-associative order.... Basically why is operator precedence equivalent?
Was it done because it was easier to code? Don't understand why this would be of significant difficulty.
Won't this complete diversion from accepted notation hinder adoption?(not intending to imply they are aiming for widespread adoption)
Could anyone who would use the app for an actual purpose chime in here?
Totally understand this is a pet-project/example btw. Just wondering.
Cool shit googlers :)
(BTW, IPFS on iOS: not ready for primetime, but .. what a world it will be when it is!)
See the Sky project https://github.com/domokit/sky_sdk/ which uses Dart as the UI framework. Currently runs on Android- but I believe the intent is to have it run on iOS as well.
From my perspective, Dart makes a lot more sense as an application language when compared to Go.
I think you're thinking of when iOS decided not to support Flash in the browser.
"Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs"
Steve Jobs also wrote some emails on the issue [2], but by September 2010 and following a potential Federal Trade Commission investigation, the clause had been removed again [3].
[1] https://daringfireball.net/2010/04/iphone_agreement_bans_fla...
[2] https://www.taoeffect.com/blog/2010/04/steve-jobs-response-o...
[3] http://www.peterfriese.de/apples-updated-developer-license-t...