Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Octave for Android (play.google.com)
96 points by bshanks on Feb 12, 2013 | hide | past | favorite | 43 comments


Thanks to mjcohen for posting about this ( http://news.ycombinator.com/item?id=5198369 ).


The interesting bit about this to me is not the interface, but the fact that they got it running on Android. I was curious in seeing if R could be ported to Android a few years back, and thought I remember reading there were some roadblocks pertaining to getting a decent BLAS to work on Android and iOS (which doesn't have a fortran compiler, iirc). The fact that Octave runs on Android means they must've figured out how to get a BLAS running on Android. Does anyone know what it's running? NetLib?


You can easily build a Fortran compiler for Android, the NDK source code is available and it contains gfortran. The official binary NDK however has only gcc and g++ build.

BLAS and Lapack can be compiled natively for Android with gfortran.


Which BLAS though? The reference BLAS implementation? That will have terrible performance. Would be interested to see if something better like ATLAS or OpenBLAS can be compiled for it. Recent versions of ATLAS do work on ARM Linux, so wondering if those can be easily ported to Android.


Reference BLAS ...


Thanks for the info. I'll have to check this out.


Not having a fortran compiler isn't really a roadblock as you can use f2c to get C code, which is IIRC how we got CBLAS.


Just what I expected, an uninspired port. The interface is.. terrible..


Feel free to write a UI that wraps it.


Any suggestions for improving it?


Take a look at Calculator++

https://play.google.com/store/search?q=Calculator%2B%2B&...

Also look at how Maple 16 does it. The keyword here is 'buttons'.


You are confusing Octave (which is a Matlab substitute where you "write" in a command window, not so much use for "buttons") with Maple ... Please stop trolling.


I'm not trolling (intentionally), just pointing out how a nice user interface makes the difference between crapps and apps.


I use octave quite a bit by SSH via connectbot to a linux box and there is no visual difference between native octave port and connecting via SSH for text-mode. I don't graph what I'm working on very much so the graphics mode doesn't matter... although I do have a VNC client..

However, connectbot is 676 precious K of storage vs 22 megs for the native port, and I can do a lot more once connected via connectbot than just octave. I can't afford to use the native port, which is too bad.


Ask HN: Who uses Octave? If you had access to Matlab, would you use it instead? Why not Python/R/Julia?


You would use Octave instead of Matlab because it is free as opposed to $1000 for a basic license plus additional $$ for every time you sneeze and need a toolbox.

You would use Octave/ Matlab instead of Julia, R or Python because Matlab syntax is the cleanest and most succinct way currently to articulate complex (in both senses) matrix algorithms. It isn't nearly as good for general programming, but it is much better than anything else for its niche. While some of that is obviously just fuzzy opinion, I am pretty sure you need fewer characters or LOC to say the same thing in Matlab than in the other scientific languages mentioned.

Matlab (and thus Octave) also has a HUGE installed base of engineers who don't really care that HN thinks the language du jour is X, Y, or Z and continue to use Matlab to get their work done (and will for the next 20 years). If you are working with them, you use Matlab. If you are working with them and don't have $1000 for a license, you use Octave.

Octave also has some syntactical improvements like "+=" that are missing in Matlab.


> You would use Octave/ Matlab instead of Julia, R or Python because Matlab syntax is the cleanest and most succinct way currently to articulate complex (in both senses) matrix algorithms...I am pretty sure you need fewer characters or LOC to say the same thing in Matlab than in the other scientific languages mentioned.

Julia syntax is mostly Matlab syntax with the parens-for-array-indexing replaced with square brackets. Its main shortcoming WRT Matlab is that it's a new language and a lot of things still need to be implemented, but the built-in linalg support is pretty good.

Python is also not that bad with pylab, which eliminates most of the verbosity of calling numpy/scipy functions directly, although it might still end up being more LOC than Matlab in some cases. I have only minimal experience with R, so I can't comment there.


I have used Julia, R, and Numpy/Python, the latter two extensively (10,000s of lines, if you count all the scratch work). What turned me off from Julia is that it encourages looping instead of vectorization; looping is both more verbose and farther away from the way a mathematician would articulate a problem. R is ... well, really really ugly in that 1970s way that makes me want to choke whenever I read SAS. Pylab etc is nice, but (1) I have come to detest syntactical indentation, (2) I hate zero indexing almost as badly, and (3) it can be a bit brittle in its type hierarchy -- and it is still more verbose (slightly).

So, I am back to Old Faithful. Really, I hate all languages, I just find Octave the least annoying in the mathematical programming space. (I used to love all languages, now I am old and bitter ;) )

Don't get me wrong -- lots of great ideas in all of the above languages. If Julia were to make vector / matrix thinking natural, I would switch.


sounds like you need Mathematica :)


I use octave. As long as it gives me the same answers as Matlab, I'm happy with it. I have access to Matlab, but only two licenses. With octave, I can run as many copies as I want on our computing grid without worrying that any jobs are going to fail because they couldn't check out the license.

Why not Python, etc? For the same reason that most matlab users would probably give: the research scientist that gives me code uses matlab.


Who uses Octave?

Me.

If you had access to Matlab, would you use it instead?

Probably.

Why not Python/R/Julia?

I know the Matlab syntax/commands/language and that enables me to be productive with Octave quickly. I just don't have the time to learn and evaluate Python/R/Julia (although Julia looks intriguing, but again, I just don't have the time).

edit: TL/DR - what forkandwait wrote.


I always got the feeling people used Octave as "the next best thing" to having Matlab. Not everyone can shell out the money to MathWorks, especially outside academia, without having an employer pay for it. I used Matlab in college and found Octave to be mediocre. The speed leaves a great deal to be desired, especially if you've grown accustomed to the Parallel Toolbox and the inherent parallelization of the Statistics Toolbox since Matlab 2011a.

As for Python/R/Julia: Python is more general purpose than Matlab/Octave, though I have seen a push for NumPy and SciPy. R and Matlab work in somewhat different fields (exceptions to the rule: Functional data people in statistics seem to like Matlab). I always got the feeling the math/linear algebra/engineering people went with Matlab, while us statisticians went with R. There's plenty of information on Google about why that divide exists. Julia is more direct comparison to Matlab, and the only reason I can offer why people would not use it versus Matlab is age and wealth of libraries. Julia's a very new language, relative to Matlab, so we may see a wider adoption in the coming years from the Julia project.


I would use it to open other people's MatLab work if it was 100% compatible. Unfortunately it isn't.


What incompatibilities do you see? There is something with if conditions, but otherwise it has been spot on with me. I use matlab code all the time.


There are a number of incompatibilities caused by outright different function names ("tfeestimate" in Matlab vs "tfe" in Octave for transfer function computations for example) or the order of input arguments in functions. Also, there are several functions in Matlab that don't exist yet in Octave.

Try downloading the AbraVibe collection of functions at http://bcs.wiley.com/he-bcs/Books?action=index&bcsId=632... and running them on Octave. Some of those functions require modification before they will run, especially functions generating graphical output.


Interesting. I find with small utilities that I download, Octave runs matlab fine. With bigger things (optimization packages in my case) you do hit incompatibilities. I guess I don't use the latter that much.


At the bank I work we use Matlab, when I'm working I tend to do things in the Octave's CLI for prototyping and only translating it to Matlab if others need to work with it.

EDIT: Also I work with Python, and prefer it to Matlab, although not much for numerical stuff, the majority of department are civil and mechanical engineers who are not that computer savvy as electrical/computer engineers are, they generally know some C and Matlab.


You have civil and mechanical engineers at your bank?


Yes, lots of them in various departments. I live in Brazil, by the way.


Interesting. Then again, I lived overseas and the government bank there was an enormous entity that could very well have employed engineers for various reasons. I just had this picture of a Bank of America branch laying its own sewer lines :P


Oh, I work in a private bank, here engineers are used to model risk and other quantitative things, there are many of them in insurance and securities as well. I do not know outside of Brazil but there are a huge pool of engineers here in São Paulo working in the same career paths. Actually I saw a number of engineers in NYC who worked in finance as well.


More than 10,000 people, mostly students, on Android alone. The number of downloads is much higher, but this is based on the number of active users. Growing quickly.


This begs the question for me, could the ipython HTML notebook* be wrapped in an Android app?

* http://ipython.org/ipython-doc/dev/interactive/htmlnotebook....



Fair enough, I used the wrong phrase. On the other hand, yours is the second reply pointing this out. Only one reply addressing the actual question I raised. I suppose I could go hang out on a logic and rhetoric forum, but that's not really my focus. Innovation and technical solutions for hard problems is. Ach schade.


Mine was the first response, and I only presented the link for your information. I don't care one way or another how you use it.


Perhaps[1], but have never tried.

[1] http://code.google.com/p/python-for-android/


begs the question -> raises the question


See also "Octave Remote" for iOS in the Apple App Store.

It connects to a server running in the "cloud", but unfortunately the connection times out when running under iOS 6.


Looks neat on my Nexus 7! I'm curious what they've used to replace the Gnuplot functionality from the original.


The author has some other apps in the store, including a gnuplot port.

One of them appears to wrap octave and gnuplot in a more native interface:

https://play.google.com/store/apps/details?id=com.addi


Download droidplot. It is a port of gnuplot for Android.


Octave is a nice language for doing matrix operations, I'm glad someone made a port for Android.




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

Search: