"Example of porting a Go application to mobile
ivy is a command line tool developed by Rob Pike.
It’s a useful desktop calculator that hangles big int, rational and floating-point numbers, vectors, matrices. It’s an interpreter for an APL-like language.
It is ~5k lines of Go code (not including tests, docs). It imports math, math/big, unicode, etc.
Rewriting all that in Java or Objective-C would be a lot of work and is a non-starter, since this is already just works in Go.
It's not a companion, Rob Pike wrote the Ivy package and the app was part of a demonstration that it is possible to now interop Go code and Obj-C code.
While I understand accurate handling of big numbers is difficult, I'm surprised it's not the general norm for calculator programs/apps by now. Glad to see someone has done so (not the first, but they are rare).
1e100000000 would require about 41 MB [0] of storage so that's not as crazy as I thought. No idea what kind of CPU you need for anything other than an addition though.
https://sourcegraph.com/blog/live/gophercon2015/123653512740
"Example of porting a Go application to mobile ivy is a command line tool developed by Rob Pike.
It’s a useful desktop calculator that hangles big int, rational and floating-point numbers, vectors, matrices. It’s an interpreter for an APL-like language.
It is ~5k lines of Go code (not including tests, docs). It imports math, math/big, unicode, etc.
Rewriting all that in Java or Objective-C would be a lot of work and is a non-starter, since this is already just works in Go.
After 2 hours, Hana had a working prorotype."