Octave's and Matlab's limitations

classic Classic list List threaded Threaded
44 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Octave's and Matlab's limitations

Jordi Gutiérrez Hermoso-2
On 21 November 2012 10:26, Salva Ardid <[hidden email]> wrote:

> So all this intro is to ask, why do you think Octave is not as
> 'good' as Scipy or R? This was to me coming from you as a Octave
> developer, and I would like to know more if possible...

Basically, I agree with every post in this blog:

    https://abandonmatlab.wordpress.com/2009/07/23/hello-world/

But, for the purpose of full disclosure, here are the things that
peeve me off the most about this language:

    0) Using () both for function calls and indexing makes the code
    very difficult to read and causes so many bugs. Likewise, using '
    both for strings and transposition makes some kinds of code very
    difficult to parse.

    1) Very limited data structures. The "everything is an array"
    mentality made sense when this was Fortran and Netlib we were
    talking about. Not having linked lists nor hashes is frustrating.
    Matlab has "solved" this by gluing Java data types onto the
    original Fortran roots, a dubious solution in my mind.

    2) Impossibility to have true reference semantics. Matlab has
    "solved" this by introducing the horribly complex handle and value
    classes in classdef style. Which we now need to produce in Octave
    too, which has turned out to be an intractable mess of its own.

    3) String manipulation is totally clowny, basically because
    strings are Fortran arrays. Strings are a fundamental type in any
    language. They should be easy and natural to use.

    4) Manipulating data in non-array format is difficult. So having a
    log file, non-tabular data, data of mixed types are all awkward to
    do.

    5) The namespace situation is horrible. Almost every major feature
    that Mathworks has done to Matlab since its creation has been
    attempts to partition the namespace, and they all suck in their
    own ways: subfunctions, nested functions, classes, packages; these
    are all namespace hacks, and none of them actually solves the
    namespace problem.

    6) Confusing semantics for the data types that we actually have.
    Cell and struct arrays are understood by no one. What the hell is
    a cs-list, and why do you get one of those from cell and struct
    arrays, shall I explain yet again?

    7) The Matlab interpreter is needlessly restricted to refuse
    certain kinds of perfectly reasonable syntax such as
    sin(1:3)(end), but at least this we can solve in Octave. Until
    recently, the Matlab interpreter didn't even a emit a useful
    diagnostic about this. Now the Matlab parser seems to be able to
    recognise this syntax, only so it can better complain about it.

    8) Surprising Matlab bugs that we cannot ever fix due to Matlab
    compatibility, and I guess they don't fix due to backwards
    compatibility, such as the short-circuiting rules for & and | or
    the precedence of ^ in 2^2^3.

    9) No one-dimensional arrays, so you gotta keep figuring out the
    orientation of your vectors or arrays and transpose as necessary.

These are just off the top of my head, but ten is a good, round
number, so I'll stop there. I could go on. Matlab is a horrible,
*horrible* general-purpose programming language, and I'm appalled that
people use it to build web servers and GUI applications and who knows
what other atrocities they build with it. Octave has to follow most of
these things from Matlab, because our goal is to fully liberate all of
the many thousands upon millions of lines of free Matlab code out
there.

And to be fair, fine, Matlab and Octave are ok for array-based
numerical computations, but people rarely used them for only that.
They usually want to do things other than crunch numbers.

> I know every language has pros and cons, and this has also to be
> true for Scipy and R, not only Matlab and Octave.

Sure, but Scipy comes from Python, which is a general-purpose
language, so it was built with solving the problems that programmers
generally have. Matlab instead was built to be a wrapper to Netlib and
then grew features like a toad grows warts.

R is a language that was originally for statisticians, so it is
*marvelous* at handling data, and not just the matrix data that a
numerical analyst likes (Matlab originally was for numerical analysis,
not for data manipulation).

I am kinda frustrated how one of Matlab's and Octave's primary use
cases is to draw graphs from data without actually doing any
significant computations on that data. I learned Octave to do
interesting numerical computations such as solving hyperbolic PDEs or
figuring out cantilever problems with FEM, not to produce plots that
would look good on publications. If you just want to grab your data
and create plots for journals, particularly if you're a scientist who
wants to state that your p-value is significant, R is far better
suited for this task.

And even if you *do* want to do numerical analysis, we're having new
contenders like the Julia language which are already being better
designed from the ground up, much better than Matlab ever was, by
people who actually design programming languages professionally.

> Would you encourage people to stop using Octave and migrate to
> Scipy/R if Matlab compatibility is not a must and if time and effort
> to alleviate the learning curve of learning new languages or
> migrating codes is not an issue?

Absolutely. The only reason Octave needs to exist is to liberate
existing Matlab code. Which is a pretty big reason, and the reason why
I keep working on Octave. If Matlab usage went down, so would
Octave's. Or, we may be able to finally make Octave less stupid, if
nobody wanted to make it run Matlab code anymore.

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

c.-2

On 21 Nov 2012, at 17:07, Jordi Gutiérrez Hermoso wrote:

> R is a language that was originally for statisticians, so it is
> *marvelous* at handling data, and not just the matrix data that a
> numerical analyst likes (Matlab originally was for numerical analysis,
> not for data manipulation).

Being a numerical analyst I may be biased ;)
But indeed, Matlab's language is designed to be as close as possible to the everyday
notation used in numerical analysis and scientific computing. Actually Matlab's
language has even influenced mathematical notation to some degree, it is not uncommon
to see the colon notation for indexing in mathematical papers. It might be just an interpreted
wrapper around numerical libraries but that's exactly what many of its intended
users need. And it is not even that bad to very closely mimic fortran syntax,
actually many of my colleagues still use fortran (even fortran 77 is still used a lot)

> I am kinda frustrated how one of Matlab's and Octave's primary use
> cases is to draw graphs from data without actually doing any
> significant computations on that data. I learned Octave to do
> interesting numerical computations such as solving hyperbolic PDEs or
> figuring out cantilever problems with FEM, not to produce plots that
> would look good on publications. If you just want to grab your data
> and create plots for journals, particularly if you're a scientist who
> wants to state that your p-value is significant, R is far better
> suited for this task.

If you just want to draw plots, gnuplot isn't that bad either.

c.


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Dimitri Maziuk
On 11/21/2012 10:25 AM, c. wrote:

>
> On 21 Nov 2012, at 17:07, Jordi Gutiérrez Hermoso wrote:
>
>> R is a language that was originally for statisticians, so it is
>> *marvelous* at handling data, and not just the matrix data that a
>> numerical analyst likes (Matlab originally was for numerical analysis,
>> not for data manipulation).
>
> Being a numerical analyst I may be biased ;)
> But indeed, Matlab's language is designed to be as close as possible to the everyday
> notation used in numerical analysis and scientific computing. Actually Matlab's
> language has even influenced mathematical notation to some degree, it is not uncommon
> to see the colon notation for indexing in mathematical papers. It might be just an interpreted
> wrapper around numerical libraries but that's exactly what many of its intended
> users need. And it is not even that bad to very closely mimic fortran syntax,
> actually many of my colleagues still use fortran (even fortran 77 is still used a lot)
That is all true, but in many cases the data has to come from somewhere.
When it comes from other applications, it comes in files in various
formats, and that's when you start hating Jordi's #3 and 4 (and also #1
and 9).

And as I said before, when some poor shmuck is handled a bunch of matlab
7.3 scripts that don't even run in 2011b and is told to run that from a
web form, #0, 5, and 6 make sure that isn't doable.

--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave

signature.asc (262 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

c.-2

On 21 Nov 2012, at 18:38, Dimitri Maziuk wrote:

> That is all true, but in many cases the data has to come from somewhere.
> When it comes from other applications, it comes in files in various
> formats, and that's when you start hating Jordi's #3 and 4 (and also #1
> and 9).

Indeed, so just use some other tool for doing the conversion to and from
formats that Octave likes, rather than trying to use Octave's (limited)
data structures for tasks they are not meant to accomplish.
Think of Octave as  essentially being able to deal with arrays of numbers
and little more [*].

> And as I said before, when some poor shmuck is handled a bunch of matlab
> 7.3 scripts that don't even run in 2011b and is told to run that from a
> web form, #0, 5, and 6 make sure that isn't doable.

Possibly true, but my point was that, although he does have my sympathy,
Matlab does not market to that "poor shmuck" ...

Matlab has become a de-facto standard by providing an environment where it
is easy to implement complex numerical algortihms without much knowledge of
complex data structures. This ease of use did come at a cost but, on the other
hand, it has facilitated the implementation of a huge amount of clever and
useful programs written by people who would not have taken the effort to do
so in a different language.

As I see it, Octave's purpose is to make available a similarly convenient number
crunching environment to those users that are not willing to trade Freedom for ease
of use, so it might deviate from Matlab's syntax now and then but I don't think
it would make sense to try and tronsform it into a general purpose.

c.

P.S. On a side note, as you seem to like Python but have to deal with other people's
code written in Octave, have you ever considered using Pytave <https://launchpad.net/pytave> ?


[*] That is of course an over-simplification but if you keep low expectations you sure will
never be disappointed ;)




_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

avlas
In reply to this post by Jordi Gutiérrez Hermoso-2
El Dimecres, 21 de novembre de 2012, a les 11:07:26, Jordi Gutiérrez Hermoso
va escriure:

> On 21 November 2012 10:26, Salva Ardid <[hidden email]> wrote:
> > So all this intro is to ask, why do you think Octave is not as
> > 'good' as Scipy or R? This was to me coming from you as a Octave
> > developer, and I would like to know more if possible...
>
> Basically, I agree with every post in this blog:
>
>     https://abandonmatlab.wordpress.com/2009/07/23/hello-world/
>
> But, for the purpose of full disclosure, here are the things that
> peeve me off the most about this language:
>
>     0) Using () both for function calls and indexing makes the code
>     very difficult to read and causes so many bugs. Likewise, using '
>     both for strings and transposition makes some kinds of code very
>     difficult to parse.
>
>     1) Very limited data structures. The "everything is an array"
>     mentality made sense when this was Fortran and Netlib we were
>     talking about. Not having linked lists nor hashes is frustrating.
>     Matlab has "solved" this by gluing Java data types onto the
>     original Fortran roots, a dubious solution in my mind.
>
>     2) Impossibility to have true reference semantics. Matlab has
>     "solved" this by introducing the horribly complex handle and value
>     classes in classdef style. Which we now need to produce in Octave
>     too, which has turned out to be an intractable mess of its own.
>
>     3) String manipulation is totally clowny, basically because
>     strings are Fortran arrays. Strings are a fundamental type in any
>     language. They should be easy and natural to use.
>
>     4) Manipulating data in non-array format is difficult. So having a
>     log file, non-tabular data, data of mixed types are all awkward to
>     do.
>
>     5) The namespace situation is horrible. Almost every major feature
>     that Mathworks has done to Matlab since its creation has been
>     attempts to partition the namespace, and they all suck in their
>     own ways: subfunctions, nested functions, classes, packages; these
>     are all namespace hacks, and none of them actually solves the
>     namespace problem.
>
>     6) Confusing semantics for the data types that we actually have.
>     Cell and struct arrays are understood by no one. What the hell is
>     a cs-list, and why do you get one of those from cell and struct
>     arrays, shall I explain yet again?
>
>     7) The Matlab interpreter is needlessly restricted to refuse
>     certain kinds of perfectly reasonable syntax such as
>     sin(1:3)(end), but at least this we can solve in Octave. Until
>     recently, the Matlab interpreter didn't even a emit a useful
>     diagnostic about this. Now the Matlab parser seems to be able to
>     recognise this syntax, only so it can better complain about it.
>
>     8) Surprising Matlab bugs that we cannot ever fix due to Matlab
>     compatibility, and I guess they don't fix due to backwards
>     compatibility, such as the short-circuiting rules for & and | or
>     the precedence of ^ in 2^2^3.
>
>     9) No one-dimensional arrays, so you gotta keep figuring out the
>     orientation of your vectors or arrays and transpose as necessary.
>
> These are just off the top of my head, but ten is a good, round
> number, so I'll stop there. I could go on. Matlab is a horrible,
> *horrible* general-purpose programming language, and I'm appalled that
> people use it to build web servers and GUI applications and who knows
> what other atrocities they build with it. Octave has to follow most of
> these things from Matlab, because our goal is to fully liberate all of
> the many thousands upon millions of lines of free Matlab code out
> there.
>
> And to be fair, fine, Matlab and Octave are ok for array-based
> numerical computations, but people rarely used them for only that.
> They usually want to do things other than crunch numbers.
>
> > I know every language has pros and cons, and this has also to be
> > true for Scipy and R, not only Matlab and Octave.
>
> Sure, but Scipy comes from Python, which is a general-purpose
> language, so it was built with solving the problems that programmers
> generally have. Matlab instead was built to be a wrapper to Netlib and
> then grew features like a toad grows warts.
>
> R is a language that was originally for statisticians, so it is
> *marvelous* at handling data, and not just the matrix data that a
> numerical analyst likes (Matlab originally was for numerical analysis,
> not for data manipulation).
>
> I am kinda frustrated how one of Matlab's and Octave's primary use
> cases is to draw graphs from data without actually doing any
> significant computations on that data. I learned Octave to do
> interesting numerical computations such as solving hyperbolic PDEs or
> figuring out cantilever problems with FEM, not to produce plots that
> would look good on publications. If you just want to grab your data
> and create plots for journals, particularly if you're a scientist who
> wants to state that your p-value is significant, R is far better
> suited for this task.
>
> And even if you *do* want to do numerical analysis, we're having new
> contenders like the Julia language which are already being better
> designed from the ground up, much better than Matlab ever was, by
> people who actually design programming languages professionally.
>
> > Would you encourage people to stop using Octave and migrate to
> > Scipy/R if Matlab compatibility is not a must and if time and effort
> > to alleviate the learning curve of learning new languages or
> > migrating codes is not an issue?
>
> Absolutely. The only reason Octave needs to exist is to liberate
> existing Matlab code. Which is a pretty big reason, and the reason why
> I keep working on Octave. If Matlab usage went down, so would
> Octave's. Or, we may be able to finally make Octave less stupid, if
> nobody wanted to make it run Matlab code anymore.
>
> - Jordi G. H.

That's very comprehensive explanation!

I guess it makes sense to spend time learning/using scipy and see how well I
may adapt to eventually make a more educated decision on what to use in the
medium/long run.

Thanks to All for your contribution,
Salva
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Jake-3
In reply to this post by c.-2
Neither MATLAB or Octave are meant for general purpose; I agree with the general consensus and what Jordi said before that basically, "use the right tool for the right job". It looks like some people expect to be able to do everything through one language, and that just isn't practical.


On Wed, Nov 21, 2012 at 10:48 AM, c. <[hidden email]> wrote:

On 21 Nov 2012, at 18:38, Dimitri Maziuk wrote:

> That is all true, but in many cases the data has to come from somewhere.
> When it comes from other applications, it comes in files in various
> formats, and that's when you start hating Jordi's #3 and 4 (and also #1
> and 9).

Indeed, so just use some other tool for doing the conversion to and from
formats that Octave likes, rather than trying to use Octave's (limited)
data structures for tasks they are not meant to accomplish.
Think of Octave as  essentially being able to deal with arrays of numbers
and little more [*].

> And as I said before, when some poor shmuck is handled a bunch of matlab
> 7.3 scripts that don't even run in 2011b and is told to run that from a
> web form, #0, 5, and 6 make sure that isn't doable.

Possibly true, but my point was that, although he does have my sympathy,
Matlab does not market to that "poor shmuck" ...

Matlab has become a de-facto standard by providing an environment where it
is easy to implement complex numerical algortihms without much knowledge of
complex data structures. This ease of use did come at a cost but, on the other
hand, it has facilitated the implementation of a huge amount of clever and
useful programs written by people who would not have taken the effort to do
so in a different language.

As I see it, Octave's purpose is to make available a similarly convenient number
crunching environment to those users that are not willing to trade Freedom for ease
of use, so it might deviate from Matlab's syntax now and then but I don't think
it would make sense to try and tronsform it into a general purpose.

c.

P.S. On a side note, as you seem to like Python but have to deal with other people's
code written in Octave, have you ever considered using Pytave <https://launchpad.net/pytave> ?


[*] That is of course an over-simplification but if you keep low expectations you sure will
never be disappointed ;)




_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

avlas
El Dimecres, 21 de novembre de 2012, a les 11:23:28, Jake va escriure:

> Neither MATLAB or Octave are meant for general purpose; I agree with the
> general consensus and what Jordi said before that basically, "use the right
> tool for the right job". It looks like some people expect to be able to do
> everything through one language, and that just isn't practical.
>
> On Wed, Nov 21, 2012 at 10:48 AM, c. <[hidden email]> wrote:
> > On 21 Nov 2012, at 18:38, Dimitri Maziuk wrote:
> > > That is all true, but in many cases the data has to come from somewhere.
> > > When it comes from other applications, it comes in files in various
> > > formats, and that's when you start hating Jordi's #3 and 4 (and also #1
> > > and 9).
> >
> > Indeed, so just use some other tool for doing the conversion to and from
> > formats that Octave likes, rather than trying to use Octave's (limited)
> > data structures for tasks they are not meant to accomplish.
> > Think of Octave as  essentially being able to deal with arrays of numbers
> > and little more [*].
> >
> > > And as I said before, when some poor shmuck is handled a bunch of matlab
> > > 7.3 scripts that don't even run in 2011b and is told to run that from a
> > > web form, #0, 5, and 6 make sure that isn't doable.
> >
> > Possibly true, but my point was that, although he does have my sympathy,
> > Matlab does not market to that "poor shmuck" ...
> >
> > Matlab has become a de-facto standard by providing an environment where it
> > is easy to implement complex numerical algortihms without much knowledge
> > of
> > complex data structures. This ease of use did come at a cost but, on the
> > other
> > hand, it has facilitated the implementation of a huge amount of clever and
> > useful programs written by people who would not have taken the effort to
> > do
> > so in a different language.
> >
> > As I see it, Octave's purpose is to make available a similarly convenient
> > number
> > crunching environment to those users that are not willing to trade Freedom
> > for ease
> > of use, so it might deviate from Matlab's syntax now and then but I don't
> > think
> > it would make sense to try and tronsform it into a general purpose.
> >
> > c.
> >
> > P.S. On a side note, as you seem to like Python but have to deal with
> > other people's
> > code written in Octave, have you ever considered using Pytave <
> > https://launchpad.net/pytave> ?
> >
> >
> > [*] That is of course an over-simplification but if you keep low
> > expectations you sure will
> > never be disappointed ;)
> >
> >
> >
> >
> > _______________________________________________
> > Help-octave mailing list
> > [hidden email]
> > https://mailman.cae.wisc.edu/listinfo/help-octave

Maybe not, but it's also true that one (avg user) doesn't want to use 10
optimal languages to do each of the 10 parts of something complex, and may be
just satisfied with a flexible near optimal 1 language that is capable of
doing everything...

 
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Francesco Potortì
In reply to this post by Jordi Gutiérrez Hermoso-2
>But, for the purpose of full disclosure, here are the things that
>peeve me off the most about this language:
[...]
>These are just off the top of my head, but ten is a good, round
>number, so I'll stop there. I could go on. Matlab is a horrible,
>*horrible* general-purpose programming language

Well, the fact is, Matlab is not a general-purpose language :)

>and I'm appalled that people use it to build web servers and GUI
>applications and who knows what other atrocities they build with it.

Why ever worrying about that?  I suppose you already know that someone
has written a Tetris game in Sed.

>And to be fair, fine, Matlab and Octave are ok for array-based
>numerical computations, but people rarely used them for only that.

Well, that's their problem...

>I am kinda frustrated how one of Matlab's and Octave's primary use
>cases is to draw graphs from data without actually doing any
>significant computations on that data.

I often use the epsTk toolkit at www.epstk.de, which is good for
producing high-quality plots.  But for quick or simple plots Octave is
good enough.

>And even if you *do* want to do numerical analysis, we're having new
>contenders like the Julia language which are already being better
>designed from the ground up, much better than Matlab ever was, by
>people who actually design programming languages professionally.

That was said for every language after Fortran, yet very few (or none)
have really died.

--
Francesco Potortì (ricercatore)        Voice:  +39.050.315.3058 (op.2111)
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

nrjank
On Wed, Nov 21, 2012 at 2:38 PM, Francesco Potortì <[hidden email]> wrote:
>But, for the purpose of full disclosure, here are the things that
>peeve me off the most about this language:
[...]

<wow snip>

>And even if you *do* want to do numerical analysis, we're having new
>contenders like the Julia language which are already being better
>designed from the ground up, much better than Matlab ever was, by
>people who actually design programming languages professionally.

That was said for every language after Fortran, yet very few (or none)
have really died.

one of my favorites:
http://xkcd.com/927/

usable beats perfect.

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

edmund ronald
On Wed, Nov 21, 2012 at 9:19 PM, Nicholas Jankowski <[hidden email]> wrote:

> On Wed, Nov 21, 2012 at 2:38 PM, Francesco Potortì <[hidden email]>
> wrote:
>>
>> >But, for the purpose of full disclosure, here are the things that
>> >peeve me off the most about this language:
>> [...]
>>
> <wow snip>
>
>> >And even if you *do* want to do numerical analysis, we're having new
>> >contenders like the Julia language which are already being better
>> >designed from the ground up, much better than Matlab ever was, by
>> >people who actually design programming languages professionally.
>>
>> That was said for every language after Fortran, yet very few (or none)
>> have really died.
>
>

If Matlab were legally downloadable for free I think it would eat up
the market. As it stands, frankly I would advise anyone who can afford
to pay for Matlab to just use Matlab, the benefits of strong platform
integration on each platform, GUI builders and tons of documented
toolboxes are very real. I like Octave because it is free and has a
spare design, but let's face it not everyone wants to be an abstemious
digital monk.

Edmund
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Kjetil brinchmann Halvorsen
In reply to this post by Jake-3
see inline:

On Wed, Nov 21, 2012 at 4:23 PM, Jake <[hidden email]> wrote:
> Neither MATLAB or Octave are meant for general purpose; I agree with the
> general consensus and what Jordi said before that basically, "use the right
> tool for the right job". It looks like some people expect to be able to do
> everything through one language, and that just isn't practical.

Well, that might be true, in principle, but learning many dofferent
programming languages isn't
really practical, either! Especially not for non-programmers. Therefor
people tend to try to do everything in one language, and as a
parctical choice, that is very reasonable.

I for one have a tendency to mix languages, use more than one at the
same time, my work in each of them becomes less efficient!

Kjetil

>
>
> On Wed, Nov 21, 2012 at 10:48 AM, c. <[hidden email]> wrote:
>>
>>
>> On 21 Nov 2012, at 18:38, Dimitri Maziuk wrote:
>>
>> > That is all true, but in many cases the data has to come from somewhere.
>> > When it comes from other applications, it comes in files in various
>> > formats, and that's when you start hating Jordi's #3 and 4 (and also #1
>> > and 9).
>>
>> Indeed, so just use some other tool for doing the conversion to and from
>> formats that Octave likes, rather than trying to use Octave's (limited)
>> data structures for tasks they are not meant to accomplish.
>> Think of Octave as  essentially being able to deal with arrays of numbers
>> and little more [*].
>>
>> > And as I said before, when some poor shmuck is handled a bunch of matlab
>> > 7.3 scripts that don't even run in 2011b and is told to run that from a
>> > web form, #0, 5, and 6 make sure that isn't doable.
>>
>> Possibly true, but my point was that, although he does have my sympathy,
>> Matlab does not market to that "poor shmuck" ...
>>
>> Matlab has become a de-facto standard by providing an environment where it
>> is easy to implement complex numerical algortihms without much knowledge
>> of
>> complex data structures. This ease of use did come at a cost but, on the
>> other
>> hand, it has facilitated the implementation of a huge amount of clever and
>> useful programs written by people who would not have taken the effort to
>> do
>> so in a different language.
>>
>> As I see it, Octave's purpose is to make available a similarly convenient
>> number
>> crunching environment to those users that are not willing to trade Freedom
>> for ease
>> of use, so it might deviate from Matlab's syntax now and then but I don't
>> think
>> it would make sense to try and tronsform it into a general purpose.
>>
>> c.
>>
>> P.S. On a side note, as you seem to like Python but have to deal with
>> other people's
>> code written in Octave, have you ever considered using Pytave
>> <https://launchpad.net/pytave> ?
>>
>>
>> [*] That is of course an over-simplification but if you keep low
>> expectations you sure will
>> never be disappointed ;)
>>
>>
>>
>>
>>
>> _______________________________________________
>> Help-octave mailing list
>> [hidden email]
>> https://mailman.cae.wisc.edu/listinfo/help-octave
>
>
>
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://mailman.cae.wisc.edu/listinfo/help-octave
>



--
"If you want a picture of the future - imagine a boot stamping on the
human face - forever."

George Orwell (1984)
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Jordi Gutiérrez Hermoso-2
In reply to this post by edmund ronald
On 21 November 2012 15:27, edmund ronald <[hidden email]> wrote:
> I like Octave because it is free and has a
> spare design, but let's face it not everyone wants to be an abstemious
> digital monk.

We are trying to make Octave less for digital monks, but it's hard work.

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Jake-3
I didn't read *all* of the chain of emails before this little discussion started, so I'm not keen on the base purpose here. My comment at this point would be that if someone finds MATLAB or Octave limiting to their needs (and they don't want to use another language), then the only solution is to help themselves and others by writing code to make the software less limiting, e.g. if someone doesn't like string processing, then make some string processing functions to meet your needs.


On Wed, Nov 21, 2012 at 12:35 PM, Jordi Gutiérrez Hermoso <[hidden email]> wrote:
On 21 November 2012 15:27, edmund ronald <[hidden email]> wrote:
> I like Octave because it is free and has a
> spare design, but let's face it not everyone wants to be an abstemious
> digital monk.

We are trying to make Octave less for digital monks, but it's hard work.

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Dimitri Maziuk
In reply to this post by c.-2
On 11/21/2012 12:48 PM, c. wrote:
... use matlab for matrices ...

It's all fine but how often and how well do you document matrices in
your matlab scripts? You can't use "other tools" to convert data to
load()'able format if nobody knows what that format is supposed to be.

> P.S. On a side note, as you seem to like Python but have to deal with other people's
> code written in Octave, have you ever considered using Pytave <https://launchpad.net/pytave> ?

I don't particularly like python, but it's more readable than perl, more
powerful than shell, and comes without Oracle lawyers who might show up
tomorrow and demand you pay up for the privilege. It's kinda what basic
used to be: not that great but easy, available, and better than the
alternatives.

Unfortunately, I don't have to deal with code written in octave: if that
were the case, I'd just run it. I have to deal with the "clever and
useful" code written in matlab 7.3.

--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave

signature.asc (262 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

c.-2

On 21 Nov 2012, at 22:04, Dimitri Maziuk wrote:

> It's all fine but how often and how well do you document matrices in
> your matlab scripts? You can't use "other tools" to convert data to
> load()'able format if nobody knows what that format is supposed to be.

sorry, I don't think I get the meaning of this sentence, are you asking for
matlab file format specification?

> I don't particularly like python, but it's more readable than perl, more
> powerful than shell, and comes without Oracle lawyers who might show up
> tomorrow and demand you pay up for the privilege. It's kinda what basic
> used to be: not that great but easy, available, and better than the
> alternatives.

so, it'd be really nice if you would give Pytave a try, it should allow you
to run Octave functions from within Octave. If you do try it, I'd be really
interested in knowing your impressions.

c.

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Dimitri Maziuk
On 11/21/2012 03:39 PM, c. wrote:

>
> On 21 Nov 2012, at 22:04, Dimitri Maziuk wrote:
>
>> It's all fine but how often and how well do you document matrices in
>> your matlab scripts? You can't use "other tools" to convert data to
>> load()'able format if nobody knows what that format is supposed to be.
>
> sorry, I don't think I get the meaning of this sentence, are you
> asking for
> matlab file format specification?
>
I have an input file like this

1 M     HE    2.140
1 M     CE   16.600
2 Q     HA    4.410
...
10 P     HA    4.480
10 P    HB2    1.840
10 P    HB3    2.280
10 P    HG2    2.100
10 P    HG3    2.030
10 P    HD2    3.920
10 P    HD3    3.750
10 P      C  175.850
10 P     CA   62.280
10 P     CB   32.150
10 P     CG   27.400
10 P     CD   51.100
11 A      H    8.500
11 A     HA    3.920
11 A     HB    1.060
11 A     CA   49.600
11 A     CB   16.280
11 A      N  121.750
12 P     HA    4.590
12 P    HB2    1.970
12 P    HB3    1.870

I see that matlab script uses matrix like this:

10 13 62.28   32.15  4.48  175.85  -100.00    -100.00     2.06
11  1 49.60   16.28  3.92 -100.00     8.50     121.75     1.06
12 13 59.90 -100.00  4.59 -100.00  -100.00    -100.00     1.92

-- explain to me how one converts to the other.

What I mean is if it had

% first 9 residues (always 9) are excluded because blah
% residues are mapped to numbers (2nd col) using foo.m
% from 3rd col on: alpha and beta carbon, alpha proton, ...,
% if beta-hydrogen is a methylene group, average of the 2 vals is stored
% missing values are set to -100
% if both alpha an beta carbons are missing, the residue is excluded

That'd be easy. How often do you put something like that in your scripts?

> so, it'd be really nice if you would give Pytave a try, it should allow you
> to run Octave functions from within Octave. If you do try it, I'd be really
> interested in knowing your impressions.

I don't have any octave code to try (like I said, I only have matlab 7.3
scripts) and anyway pytave is not available from the standard rpm
repositories for redhat 6.

I don't quite see the point: you can always run actual octave in a
popen() call, the advantage of "pytave.eval( 'matlab code' )" over
"os.popen( ['octave', '--eval', 'matlab code'] )" is lost on me -- if
that's what they're trying to do: there seems to be zero documentation
on the site, so who knows.


--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave

signature.asc (262 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Jordi Gutiérrez Hermoso-2
On 21 November 2012 17:22, Dimitri Maziuk <[hidden email]> wrote:

> I don't quite see the point: you can always run actual octave in a
> popen() call, the advantage of "pytave.eval( 'matlab code' )" over
> "os.popen( ['octave', '--eval', 'matlab code'] )" is lost on me -- if
> that's what they're trying to do: there seems to be zero documentation
> on the site, so who knows.

The actual benefit to Pytave is that it translates Octave data types
into Numpy datatypes. If you just did Popen, you'd have to parse the
text output that you get from Octave, but Pytave already does this and
does it without pipes or parsing.

I like Pytave. I think I'll try to improve its packaging and get it
packaged for Debian and RHEL.

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Dimitri Maziuk
On 11/21/2012 04:35 PM, Jordi Gutiérrez Hermoso wrote:

> The actual benefit to Pytave is that it translates Octave data types
> into Numpy datatypes. If you just did Popen, you'd have to parse the
> text output that you get from Octave, but Pytave already does this and
> does it without pipes or parsing.

Ah, that makes sense. They should probably spell it out on the webpage
because it's not obvious from the "features" sentence. Or at least
wasn't obvious to me.

--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave

signature.asc (262 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Sergei Steshenko
In reply to this post by c.-2




----- Original Message -----
> From: c. <[hidden email]>
> To: Dimitri Maziuk <[hidden email]>
> Cc: [hidden email]
> Sent: Wednesday, November 21, 2012 8:48 PM
> Subject: Re: Octave's and Matlab's limitations
>
>
[snip]
>
> Matlab has become a de-facto standard by providing an environment where it
> is easy to implement complex numerical algortihms without much knowledge of
> complex data structures. This ease of use did come at a cost but, on the other
> hand, it has facilitated the implementation of a huge amount of clever and
> useful programs written by people who would not have taken the effort to do
> so in a different language.
>
[snip
> c.
>

The code is smart, the language is idiotic.

Writing in a more normal language the same code would be much easier.

I.e. I completely disagree with "who would not have taken the effort to do so in a different language".

Again, I am using Octave just because of packages, and I had to upgrade to newer Octave versions with the accompanying suffering (I was quite happy with 3.0.5) because the packages started demanding it.

Hadn't it been for packages, I wouldn't have used Octave at all. My Perl + "C" combination covers practically all my needs; from curiosity and understanding of benefits of functional paradigm I would like to add OCaml to my toolbox.

Regards,
  Sergei.

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave's and Matlab's limitations

Sergei Steshenko
In reply to this post by Jake-3
>________________________________
> From: Jake <[hidden email]>
>To: c. <[hidden email]>
>Cc: [hidden email]
>Sent: Wednesday, November 21, 2012 9:23 PM
>Subject: Re: Octave's and Matlab's limitations
>
>
>Neither MATLAB or Octave are meant for general purpose; I agree with the general consensus and what Jordi said before that basically, "use the right tool for the right job". It looks like some people expect to be able to do everything through one language, and that just isn't practical.
>
>


Though I agree with you that typically more than one language is necessary, there is _nothing_ Matlab/Octave can do and other language can't with the same ease or even easier and more elegantly and less bug-prone.


As I have just written, it's the _packages_ which makes people using Matlab/Octave.


Regards,
  Sergei.

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
123