Slashdot Mirror


GNU Octave 3.0 Released After 11 Years

Digana writes "GNU Octave is a free numerical computing environment highly compatible with the MATLAB language. After 11 years of development since version 2.0, stable version 3.0 released yesterday. This version is interesting because unlike other free or semi-free MATLAB competitors like Scilab, specific compatibility with MATLAB code is a design goal. This has manifested itself in goodies like better support for MATLAB's Handle Graphics, a syntax closer to MATLAB's own for many functions, and many functions from the sister project Octave-Forge ported to the core Octave project for an enriched functionality closer to the toolboxes provided by MATLAB. GUI development is underway, but still no JIT compiling, which is a show-stopper for Octave newbies coming from MATLAB with unvectorized code."

49 of 222 comments (clear)

  1. 11 Years? by Anonymous Coward · · Score: 2, Interesting

    11 Years no GUI, and no JIT and only partial MATLAB support. Tell me again why GNU FreeSoftware is a better development model if you don't mind.

    1. Re:11 Years? by nacturation · · Score: 5, Funny

      11 Years no GUI, and no JIT and only partial MATLAB support.

      Tell me again why GNU FreeSoftware is a better development model if you don't mind. It may not be the best now, but just wait until HURD is released... then this development model's superiority will be obvious!
      --
      Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
    2. Re:11 Years? by the_humeister · · Score: 3, Funny

      Indeed. I can't wait to play Duke Nukem Forever on my new GNU/HURD system...

    3. Re:11 years? by BlueParrot · · Score: 2, Funny

      Ok, I was supposed to make a joke about my kernel version here, so I pressed ctrl+alt+enter to spawn a terminal to run uname in. It took me a whole minute until I remembered that I'm visiting my relatives over christmas and that all this free software (firefox, xchat, VLC, Pidgin, Open Office, LyX ... ) is actually running on my dad's windows box. Microsoft are going to be in deep shit when KDE is released for windows.

    4. Re:11 Years? by betterunixthanunix · · Score: 5, Insightful
      Features? Maybe I can't beat you there. Reliability? Absolutely (GNU code is at least on par with BSD and other Unixes, and far more reliable than other systems, in my experience). GNU won't waste your time with a license check; when my school's Matlab license server went down, me and my peers were left out in the cold, with final projects looming over our heads.

      My school will not give students a copy of Matlab for any purpose, because of license restrictions. We can either use a school terminal (ever wonder what a crowded computer lab looks like?), or run it off a Solaris server (X11 forwarding, leaving Windows and most Apple users out of the loop) which has strict resource limits imposed (forget processing anything big). Of course, with this setup, it is completely impossible to hook up any specialized hardware to the system running Matlab, so to process data from the real world, we must first collect it on one computer, then copy it over to a computer with Matlab installed (which is rarely in the same room as the equipment in use), and no, you cannot process anything as it happens, and yes, our disk space on the Solaris server is limited to 100MB, so your data can't be too large (not that you get enough CPU cycles to process anything large).

      Octave? Right on my system. On any system I want, actually. I miss a few features, and bit of Matlab compatibility (not nearly as bad as it sounds, I have yet to have it be an actual problem), and a GUI (which I am not at all concerned about -- I'll take a functional CLI over a dysfunctional GUI any day), but in the end, I get what I needed: Something that allows me to work with other people's Matlab code, without having to wait in line for a computer or worrying about a resource limit on a Unix server. If Mathworks stopped screwing around with license restrictions, that are even worse than Wolfram (the maker of Mathematica, which is also mangled in license restrictions), I would never have even looked into Octave.

      --
      Palm trees and 8
    5. Re:11 Years? by betterunixthanunix · · Score: 3, Interesting
      While I know that MacOS X ships with an X server, I have met only one Apple user so far who has set it up, and beyond that, none of the rest are even aware of X11. X11 is not enabled by default. The Apple users I've encountered have very little knowledge of X11, ssh, forwarding, non-Apple Unixes, or how a program can run on one computer and be displayed on another. Apple designed a GUI-centric OS, and its users are often loathe to open a shell and start typing in commands (considered to be too "unintuitive"), at least in my experience.

      Most Linux or BSD users, who happen to be using a GUI, will already have X11 running, and will therefore have a much easier time running Matlab off our Unix servers. There is certainly no problem running an X server in MacOS, nor is there a problem running it in Windows -- but these systems are not being marketed to people who have the technical skill to set that up. Not to start a flame war, but Apple just isn't trying to attract users who are aware of X11, Unix terminals, programming, etc. If anything, Apple has tried as hard as possible to remove the "nerdiness" from computing, and present there systems as intuitive, simple, straightforward computers that any idiot with no computing skills whatsoever can figure out how to use. That's fine, but when it comes to doing something that doesn't fit into the desktop computer model -- running a program on a server, and having its GUI rendered on your PC does not fit into the desktop model, at least not as Apple has implemented it -- they are not marketing to people who are comfortable, knowledgeable, or appreciative of such things. You don't have to be their target market to use Apple systems, but you have to be aware of what their target market is, and that the overwhelming majority of Apple users have no interest in anything beyond the desktop metaphor that Apple has created.

      It is necessary for me to stress that I am not criticizing Apple or its users; I am criticizing my university and the Mathworks company, for creating an environment where only people who are involved in computing can access Matlab outside of our computer labs. My point is that, because of the terms of Mathworks' site license, the software must be on a specific number of university owned systems, and that while there is nothing stopping Apple or Microsoft users from accessing that software, the majority are not knowledgeable enough to do that. The university doesn't do much to educate or encourage students to set up X servers and run Matlab/Mathematica/Maple on our servers (can't say I blame them; the increased network and server load would probably bring everything to a grinding halt), and most students who use this software aren't even aware that they can access it in that manner anyway.

      --
      Palm trees and 8
    6. Re:11 Years? by lm317t · · Score: 3, Insightful

      Well I've been a matlab and octave user for 10 years and I think I used the matlab GUI once, but its so much slower than vim that I ditched it.

      Octave needs a gui like python or bash does.

      --
      EOF
    7. Re:11 Years? by EvilRyry · · Score: 3, Informative

      Or windows users for that matter. There are plenty of X servers out there for Windows including Xming. Putty even has an option for X11 forwarding, so no one can really argue that its remotely difficult to set up.

    8. Re:11 Years? by nadaou · · Score: 2, Informative

      Matlab from the terminal:

      local$ ssh -X solaris_server
      solaris$ matlab -nosplash -nojvm
      Welcome to Matlab v. ...
      >>

      The plot windows etc will still be rendered, but you do away with slowly pushing the entire GUI over the network.

      If you don't open plot windows and things, you don't even need an X-server.

      Connect with Putty or Cygwin from MS Windows, Terminal from OSX.

      X11 forwarding on Mac: try 'ssh -Y solaris_server'
      (... after installing X11 from the OSX install DVD ...)

      Mathematica replacement: http://maxima.sourceforge.net/

      If you have a problem with The Mathworks or Wolfram's license terms, I suggest you take it up with them BEFORE buying their product and agreeing to their terms. else take it up with the person at your university taking care of the purchasing decisions. It is really not their fault if you buy their product under known terms.

      -- Happy user of Octave at home & in the field where the ML license server won't reach. Lots of kids buy the student ML edition, it is fully functional, not tied to a network server, and no longer array size limited these days.

      --
      ~.~
      I'm a peripheral visionary.
    9. Re:11 Years? by novakyu · · Score: 3, Informative

      Or Windows users, for that matter. The Xmingw X server works pretty well on Windows, and if you are allergic to free software (after all, I don't see why anyone would be using Windows otherwise), Hummingbird makes an X server.

    10. Re:11 Years? by Gerzel · · Score: 2, Insightful

      Yes. Sure. Lets base judgment of an entire paradise on a single relatively small bit of software in that paradime.

      Just like closed source, open source has some lemons too.

      I mean after 5 years of development by the biggest software company in the world Vista shows that closed source isn't that great either.

    11. Re:11 Years? by torako · · Score: 2, Informative

      At least on Mac OS X 10.5, X11 is installed by default and should be available on any 10.5 Mac (unless the user specifically disabled that option during setup).

  2. Good and bad news by mangu · · Score: 5, Insightful
    The good news is that they are doing in a free way what the Matlab Co. has been charging (a lot!) for, which is distributing an API to use all those libraries the US Federal Government labs give away for free.


    The bad news is that they are wasting their time using the Matlab syntax, while there is a much better alternative for doing exactly the same thing. Python is universal, if there's anything you can do with a computer, the simplest way to do it is with Python, so why do it the hard way?

    1. Re:Good and bad news by betterunixthanunix · · Score: 4, Insightful
      Matlab syntax is weird, but sometimes you are forced to work with other people who may be using Matlab. Python is not universal, 95% of the world's computers (that is to say, the ones running the most popular desktop OS) still do not ship with a Python interpreter, and many engineers are using Windows systems with Matlab and neither Python nor PERL environments.

      Like Windows, Matlab has become too popular for everyone to just drop and move on to some other platform. Python may be great, maybe even for scientific computing, but Matlab is just what people are used to. It is good that Octave exists as a free software clone of Matlab -- a great way to show people (my fellow engineers included) that it is entirely possible to live without proprietary software, and a great way to bring non-programmers into the free software movement.

      --
      Palm trees and 8
    2. Re:Good and bad news by mangu · · Score: 2, Informative

      95% of the world's computers (that is to say, the ones running the most popular desktop OS) still do not ship with a Python interpreter

      Then I have great news for you, there's single package that you can download for free and it will install everything you need to develop scientific programs in Python in a Microsoft computer.


      Even if you have years of experience in Matlab, try it, you have nothing to lose. Wherever possible, they made the function calls the same as Matlab's.

    3. Re:Good and bad news by samkass · · Score: 5, Insightful

      The good news is that they are doing in a free way what the Matlab Co. has been charging (a lot!) for

      But taking their time at it. Don't get me wrong-- I'm glad open source exists. But this project kind of supports the idea that open source can't really innovate, only follow (sometimes far) behind what proprietary companies invent. It would have been really interesting to see what some of the open source folks could do if their goal was to surpass MATLAB instead of be an almost-free version that's almost as good as something that people almost like to use.

      --
      E pluribus unum
    4. Re:Good and bad news by CaptainPinko · · Score: 4, Insightful

      I suppose you mean the spaces vs. tabs thing, maybe you're right, but no one can deny that Python has an extremely simple syntax. You can do anything with it, from HTML parsing to a game physics engine to 3d graphics to Excel spreadsheets to... you name it. You've also just described Lisp/Scheme (i.e. simple syntax and (a) languages(s) you can do anything with))... but switching to their syntax would be quite contentious. If you are gonna argue for a syntax switch you are going to have to have better points than that, especially when the default is (near-)compatibility with a popular product with a large codebase out there.
      --
      Your CPU is not doing anything else, at least do something.
    5. Re:Good and bad news by RAMMS+EIN · · Score: 3, Interesting

      ``But this project kind of supports the idea that open source can't really innovate, only follow (sometimes far) behind what proprietary companies invent.''

      I don't know how _one_ open source project copying a proprietary project is supposed to support the idea that open source as a whole can't really innovate. Reasoning that way is completely bogus.

      ``It would have been really interesting to see what some of the open source folks could do if their goal was to surpass MATLAB instead of be an almost-free version that's almost as good as something that people almost like to use.''

      I agree with you, and a lot of open source development does exactly that. Or implements things that there is no proprietary software for. But Octave, like a lot of other GNU software, has a different goal, apparently: allowing users to take their MATLAB code and run it using only Free software. That's a worthwhile goal, too. Although it's not something I'm personally interested in - and, apparently, not something many people are interested in at all, or progress would be quicker (either in Octave or in a sister project fueled by developers who resent Octave's slow progress).

      --
      Please correct me if I got my facts wrong.
    6. Re:Good and bad news by insignificant1 · · Score: 5, Insightful

      Wow. The leagues of uninformed.

      You think there are two things here, Matlab and Octave. Matlab is proprietary, and Octave followed it. It's as simple as that to you.

      But wait, where does much of the meat in Matlab come from? Netlib. OPEN SOURCE! HAHAHAHA (Some of the Netlib code has license restrictions, some does not.)

      http://www.netlib.org/

      What does Matlab use for optimized BLAS routines to run super-quick on your Windows/Linux/Mac? ATLAS. Check out the Sourceforge page:

      http://math-atlas.sourceforge.net/

      The really important thing for me is that now that Octave is out there (actually, Octave has been around since about 1994), the explorations that I made in undergrad in Matlab can be done entirely in Octave now and forever. A good tool doesn't get worse as it gets old, it just gets used more.

      If there was once a patent on hammers, there is no less usefulness in (but much lower prices on) hammers after the patent expires. Now we get much of Matlab's functionality completely free. Congratulations John Eaton, et al., for giving all who follow another tool to use freely to build bigger and better tools.

      And as others have mentioned, if you don't like Matlab/Octave, use another tool that tried to accomplish the task of a high-level numerical tool in a different way. To me, however, I can code up an algorithm, test out concepts, and produce incredibly helpful visualizations in a matter of minutes using Matlab or Octave. Any tool this powerful has a learning curve to get over before it is so efficient, and I climbed that learning curve with Matlab, but I was able to use Octave immediately because I had already gone through that process using Matlab.

      If you made a completely innovative new tool, it likely wouldn't be worth it for me to use for a while because I am so fast at coding Matlab/Octave, and the whole point in these tools is to make the programmer's job easy (if I wanted fast code execution, C or Fortran could be used).

    7. Re:Good and bad news by gbarta · · Score: 2, Insightful

      The comment about lack of pointers in FORTRAN made by the grandparent doesn't mean what you think it does. It refers to indirect access to values and goes for references just as well as pointers. It has nothing to do with garbage collection and little to do with pointer arithmetic. The statement that "computer scientists find the lack of pointers terrible" is likely to refer to the algorithmic benefits of indirection, not a desire to shoot themselves in the foot with pointer arithmetic or the like.

      The reason it might be seen as a strength is that since FORTRAN doesn't have pointers, FORTRAN compilers generally don't have to deal with something called 'pointer aliasing' (which could just as easily be called reference aliasing, again it has to do with inderection and is nothing to do with GC or pointer arithmetic) and so can often assume that two different variables must have independent values and can make many low-level optimizations that other languages cannot make so easily.

      This includes pulling values from memory into registers and changing their values in the register without having to worry about the potiential other references to this memory (the aliases) becoming being out of date.

      It also includes being able to use hardware vectorisation without having to make as many checks that memory does not overlap in two array sequences.

      It probably includes other things as well, but you would have to ask a compiler writer or maybe a FORTRAN programmer, sadly I am neither.

      (PS I think this all refers to older versions of FORTRAN; I am pretty sure recent versions do in fact have pointers to allow enough indirection to keep the computer scientists happy.)

  3. Help them by wikinerd · · Score: 2, Informative
  4. Not entirely compatable by Anonymous Coward · · Score: 4, Insightful

    One of the reasons I haven't moved my students completely to Scilab or Octave is an excellent implementation of 802.11 in Matlab. It uses a bunch of toolkits and blocksets. I'm not even thinking of translating it.
    http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=3540&objectType=FILE

    I wonder how many other such applications there are.

  5. 11 years? by Junior+J.+Junior+III · · Score: 4, Funny

    It turns out that Octave is one of the lesser-known products of 3DRealms. Also, Duke Nukem Forever/Hurd will be out next quarter.

    --
    You see? You see? Your stupid minds! Stupid! Stupid!
  6. 11 years to switch between 2.0 and 3.0 by coryking · · Score: 3, Interesting

    But it was under development the whole time.

    I know some people might disagree with me, but I'm beginning to think some open source projects would benefit from using a year for the public version number:

    Octave 2008 (3.0.x)
    Thunderbird 2006 (2.0.x)
    Firefox 2008 (3.0.x)

    FreeBSD 2006 (6.0)
    FreeBSD 2008 (7.0)

    PostgreSQL 2006 (8.1)
    PostgreSQL 2007 (8.2)
    PostgreSQL 2008 (8.3)

    While internally, the product could use the same version scheme it did before, I think many open source projects are far too anal about version numbers. The stubborn refusal to bump up the "big" version field doesn't help public image because if it never moves up people think the project is dead.

    The only version number that matters is the build number and repository version, the rest is marketing. Granted the year scheme isn't perfect in the early stages of a product when functionality is drastically changing every 3 months, but on mature products, I think we could all really benefit from number schemes that use the year the product was release.

    1. Re:11 years to switch between 2.0 and 3.0 by JohnFluxx · · Score: 4, Informative

      For a lot of projects, the major number indicates binary compatibility.

      For example, in KDE 3, a KDE 3.0 app would run on the latest KDE 3.5.8 libraries, but not on KDE 4.

      The second number indicates new API. a program written for, say, KDE 3.5 might not work on KDE 3.4 if it uses any of the new functions.

      The third number is just minor patches and fixes, and shouldn't break anything.

    2. Re:11 years to switch between 2.0 and 3.0 by swillden · · Score: 2, Informative

      The third number is just minor patches and fixes, and shouldn't break anything.

      To be very precise (at least for libraries that use this scheme):

      There is no compatibility across major number versions. Applications built against a library of one major version are not expected to run with libraries of any other major version. API changes of any sort are allowed. Interfaces may be changed, added or removed.

      There is forward compatibility across minor versions. An application built against library version x.y.z will run with any library with minor number y or greater. This means that API extensions are allowed, but API changes or removals are not.

      There is forward and backward compatibility across sub-minor versions. An application built against library version 3.5.8 will run with library 3.5.1. This means that API changes of any sort are disallowed.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  7. Development accelerating by jpswensen · · Score: 4, Informative

    I have been using Octave heavily over the past few years (and done a little light development), and I can say for certain that development is accelerating. In the last few years, there have been several new large contributors. One of them has made significant improvements to getting the bleeding edge Octave running with all the bells and whistles and installers on Windows, another dedicated to putting out binaries for Macs. All the core distributions have fully optimized Octave packages available. Most of the handle graphics compatibility has been done in the last 12 months. I know there is a push by people who are not the core developers to make an IDE (some based on Eclipse, others on GtkSourceView/VTE, others on QT). There has been work to make the debugger better. I guess my point is that a lot of project like this can take time to develop critical mass and that I think Octave is well on its way. Just as an aside, I think the design and implementation of Octave is great. It is the first kindof big open source project that I have really been able to wrap my head around in terms of understanding the code base and where things are/how to hack on it.

  8. cat gack by epine · · Score: 2, Interesting
    I was trying to preview my markup for this post, the preview function refused to work with a blank subject line, insulting me with "cat got your tongue?" so I'm posting under my working title.

    Math software shows up here fairly regularly. I keep taking notes, but never get around to using any. The R statistical package also gets frequent good mention, which I understand is accessible from within Sage.

    Where does Octave stand relative to Sage?
    1. Re:cat gack by mhansen444 · · Score: 2, Informative

      Octave does not come included with Sage, but Sage can make use of any installed version of Octave. There is a Sage spkg for Octave which can be installed by running the command "sage -i octave-2.1.73". With the new release of Octave, that spkg should be updated soon.

      For an interesting post by the lead developer of Sage (William Stein) on the relationship between Sage and Octave in terms of overall goals, see this http://sagemath.blogspot.com/2007/12/why-isnt-sage-just-part-of-octave.html

      --Mike (a Sage developer)

  9. Re: You can do anything with it! by WeblionX · · Score: 3, Funny

    Ah, but can it give me a larger penis and a rolex? Not that I need either, but I certainly wouldn't turn down the chance to get them.

    --
    (\(\
    (=_=) Bani!
    (")")
  10. That sucks too, but we have a winner. by r00t · · Score: 4, Insightful

    Python is about equally bad as far as syntax goes. Python behavior also presents difficult obstacles to optimization; the Matlab system apparantly does not (one can convert to C).

    The LISP guy has a point, though that syntax is even uglier. (like being in a sensory deprivation tank)

    If you really do want to crunch numbers, you don't screw around with any of the above. You use FORTRAN. Maybe that isn't cool, trendy, hot, exciting, whatever... but it works damn well. Assuming your idea of the C language doesn't include heavy use of the "restrict" keyword, FORTRAN optimizes even better than C. FORTRAN has a genuine international standard; it won't suddenly change because Guido gets a random urge. For number crunching, the world is full of FORTRAN code. Really, you can't do better.

    1. Re:That sucks too, but we have a winner. by RAMMS+EIN · · Score: 3, Informative

      ``The LISP guy has a point, though that syntax is even uglier.''

      That's an old argument, but for the sake of people who haven't heard it before, I will enter the debate again.

      Lisp syntax is actually very beautiful for describing tree structures. And tree structures are very useful. For example, web pages have tree structures. And many types of relational data. And with the addition of references, trees can be used to describe graphs, and thus, all data and all relations. Oh! And lest I forget, computer programs!

      Now, why would you want to describe your program like a tree? Why would you want _everything_ to start with an open paren, then have a bunch of child nodes (which could be simple words or numbers, or could also start with an open paren, etc.), and finish with a closing paren? What is the advantage of this over having a bunch of curly braces, commas, semicolons, and infix operators thrown in for variety?

      Well, the advantage of Lisp syntax is that it is extremely regular. And this is good for analysis and transformations. And _that_ is what Lisp is all about.

      In most languages, you write your program in some complex surface syntax, which is then run through a complicated parser. The parser converts it into a tree (hey...wasn't there something about trees before?), and the compiler then performs all kinds of transformations on that tree. Transformations that are relatively easy to describe on trees, but not so much on the surface syntax of the programming language - that's why you generate the parse tree. Of course, this all happens behind the scenes. But not so in Lisp. In Lisp, your program already _is_ a tree the way you wrote it down. A convenient format for performing (and understanding!) transformations to be performed on the source code. And this is something Lisp programmers do all the time, and something that is rarely seen outside Lisp.

      I believe this is largely due to the difficulty of describing and understanding program transformations in other languages. Lisp has a very simple macro system; a macro takes a tree you wrote, and runs some Lisp code, and eventually returns a new tree. And then it is as if you had written that new tree instead of the old one. So, where in Java you will see code like...

      x.setFoo(y.getFoo());
      x.setBar(y.getBar());
      x.setBaz(y.getBaz()); ...in Lisp you will see something like...

      (copy-fields x y foo bar baz) ...which will be transformed into the code that actually does the copying. And where in Java you will see...

      FileInputStream stream = new FileInputStream("filename");
      try { // Do something with stream
      } finally { // Make sure stream is closed, even if an exception was thrown
          stream.close();
      } ...in Lisp you will see...

      (with-open-file (stream "filename")
          ; Do something with stream
          ) ...which is a macro that expands into the appropriate code.

      As it happens, the macro in the second example happens to be part of Common Lisp's standard library and the one in the first example doesn't. Of course, it can easily be written. What the macros have in common, however, is that they allow you to do the same things that the Java snippets do, but with less code, less repetition, and fewer weird characters. I don't know how you can not find that beautiful.

      --
      Please correct me if I got my facts wrong.
    2. Re:That sucks too, but we have a winner. by RAMMS+EIN · · Score: 2, Interesting

      At first, I was going to ignore your comment as completely idiotic, but looking at some of your other posts I found a few good ones, so I feel you deserve a good answer.

      ``the way they always trot out the same "with-foo" example. Yeah, it's a minor syntactic improvement over try/finally, but can't you think of something else?''

      First of all: obviously I not only can, but _did_ think of something else; it's right in the very same post.

      Secondly, I don't agree that with-open-file is just "a minor syntactic improvement over try/finally". It opens the file _and_ makes sure the file is closed no matter what. It does the right thing in case an exception occurs, but, more importantly, you can't forget to write code to close the file...because you don't have to write anything more.

      Thirdly, I'd like to turn the "can't you think of something else?" around and turn it into an argument in favor of macros, instead of a baseless ad hominem. The beauty with macros is that they give you a very powerful abstraction mechanism. So that when you _do_ think of something else, you can implement that. Show me how to do the first example from my earlier post without macros. I can give you more examples of cases where macros are or would have been very helpful, but I'm not going to spend the time unless I am convinced you are actually interseted in learning, rather than bashing macro advocates for no reason I can fathom.

      --
      Please correct me if I got my facts wrong.
    3. Re:That sucks too, but we have a winner. by RAMMS+EIN · · Score: 2, Interesting
      Good job. That post shows that you are actually interested in getting things right, and not just in perpetrating whatever idea you have no matter what the facts are. It also shows you know what you're talking about. I am happy I decided to reply to your original post, and I apologize for the strong language I used.

      Now I will nitpick a bit, for the benefit of people reading this thread (yeah, right ;-) ) who want to have a more complete understanding of what is going on. It took me a bit to understand your code (which is very elegant, by the way), but what I eventually got was this (first repeating the code for completeness):

      sub copy_fields {
      my ($x, $y) = splice @_, 0, 2;
      $x->$_($y->$_) for @_;
      }

      This is a function which, when called, will assign its first argument to $x and its second argument to $y. It will then iterate over the rest of the arguments, and, for each argument, use it as a property on the object in $x and the object in $y, assigning the value of that property of $y to the identically-named property on $x.

      So, when you call the function like copy_fields($a, $b, 'firstname', 'lastname', 'birthday'); (I hope passing the field names as strings is the right way to do it in Perl; I'm not a Perl hacker), you will end up with $a->firstname being the same as $b->firstname, $a->lastname the same as $b->lastname, and $a->birthday the same as $b->birthday.

      In Common Lisp, you can write code that does exactly the same thing. For example,

      (defun copy-fields-function (x y &rest fields)
      (loop for field in fields
      do (setf (slot-value x field) (slot-value y field))))

      You can then call this function like (copy-fields-function a b 'firstname 'lastname 'birthday) and get the named fields from b copied to a, just like in the Perl code above.

      The above code uses regular functions (both in Perl and in Lisp). So, if copy-fields can be implemented as a normal function, why did I drag macros into this? Well, the difference between functions and macros lies in when things are evaluated.

      Astute readers will have noticed that the names of the fields in the call to copy-fields-function above have quotes in front of them, whereas the copy-fields in my original post took them without quotes. This is because, when you call a function, the arguments are evaluated first, and the values that result from that are passed to the function. So if you wrote (copy-fields-function a b firstname lastname birthday), you would be asking to pass the _values_ assigned to firstname, lastname, and birthday into the function, which would likely result in an error. Instead, putting quotes in front of the symbols causes the symbols themselves to be passed to the function, which is what you want in this case. (Without the quotes, the equivalent call to the Perl version would be copy_fields($a, $b, $firstname, $lastname, $birthday);).

      By contrast, arguments to macros are always passed to the macro as written, without evaluating them first. This is what allows macros to perform transformations on source code. Functions cannot do this, because, by the time the function actually gets to do anything, all its arguments will have been evaluated already. And this is an essential point, because it means that macros can control order of evaluation. The source code given as an argument to a macro may be evaluated once, more than once, or not at all. Thus, you can use macros to implement control structures, like conditionals, loops, pattern matching, etc. Or lazy evaluation. Or object systems. Macros allow you to extend the language...without having to modify the compiler. That's a lot of power for a single construct.

      Another thing to mention is that, whereas functions (at least semantically) do their work

      --
      Please correct me if I got my facts wrong.
  11. You're right, it's not obvious by Anonymous Coward · · Score: 2, Informative

    If I am going to process a signal, it doesn't much matter how I implement the program as long as the program does the right thing. For instance, I can implement a filter (IIR, FIR, you name it) on a mainframe, in a spreadsheet http://www.conestogac.on.ca/eet/courses/d-com1/lab1/lab1.html , on a DSP chip, even on a fairly anemic microcontroller. Every implementation will do the same thing, albeit at different speeds.

    In the case of the Matlab 802.11 model, every part of the protocol is implemented. That means you can look at the guts of the whole thing. Not only that but the channel is modeled for a fading channel. You can look at the eye diagram and watch the eye close as the s/n ratio deteriorates. You can also watch the constellation deteriorate from 64 tight dots to two blobs.

    As a teaching tool, the model is amazing. In theory it could be done in any language (just about) or on any hardware (as long as speed doesn't matter). In practice, it was created in Matlab.

  12. Re:Well, if they ever become competitive to Matlab by 0100010001010011 · · Score: 4, Informative

    Define not "not treating customers well."

    I've called them with a fairly high level support problem. I got patched directly through to an engineer and within 7 hours (we had been pounding our heads against the wall for a week) we had a solution.

    I've heard numerous other stories of similar fate (which is where I got the idea to call).

    While Octave is fine for supporting *most* of the features of Matlab. There is a segment of the market that Octave is never going to touch. Simulink, most of the extra toolboxes, direct from Simulink to ECM Flash software. Some of the high level Power Sim blocks, hardware in the loop stuff (From dSpace). "Matlab" is just the tip of the iceberg when it comes to Mathworks software. We even have people writing S-Functions, I'm picking up MEX to speed up some data routines.

    I live and breathe on Matlab and for most of the stuff I do, Octave won't touch it. For 'us' Octave will never be competitive.

  13. Re:Well, if they ever become competitive to Matlab by ScrewMaster · · Score: 4, Insightful

    Okay, I'll define it. The math man at our company only uses Matlab intermittently (the occasional R&D project) and for the past few years it was decided that we couldn't justify buying support or upgrades. This year he was asked to look into what it would cost to upgrade. He was told that we'd need to make up all the money that Matlab didn't get all those years first, before we could even be considered for an upgrade, and conveniently just purchasing a new copy would be even more expensive. Now this was in spite of the fact that they had provided no support or services in that period. Ended up being about fifteen grand for one seat. Let me tell you, that's a sense of entitlement with a vengeance, one that even the RIAA could appreciate. In other words, play our game and pay us our yearly juice money or we'll shove it up your ass.

    I know Matlab is a complex product that took decades to develop, but demanding money for services not rendered, just because you know the customer has nowhere else to go, is usurious at best. I presume you've never had to deal with them in that vein because you've obviously bought into their system and it's worth it to you to keep paying them. I have no problem with that. But their attitude left a very bad taste in our corporate mouth, and given that our needs are simplistic compared to yours, we'll be evaluating what else is out there. Their behavior in this regard is not what I expect of a truly customer-oriented operation, but it is what you expect when a single company achieves a de-facto near monopoly.

    --
    The higher the technology, the sharper that two-edged sword.
  14. Compatibility by Dr.+Tom · · Score: 2, Informative

    The standard line is that Octave is as compatible with Matlab as Matlab is with itself. Every new release of Matlab breaks something. Porting your code to Octave is similar. But Octave fixes some of the brain damage in Matlab's horrible syntax, making it easier to write cleaner code. And they also fixed a lot of the weirdness surrounding the whole 'one function per file' thing. In Octave, you can not only write complex programs in a single file, you can make them executable scripts!

  15. Re:Well, if they ever become competitive to Matlab by Anonymous Coward · · Score: 3, Interesting

    > Define not "not treating customers well."

    OK, I'll define it for you.

    I have been a Matlab user since my first graduate classes in control systems in the early nineties, when it ran on old PCs in our controls labs and didn't have the current integrated GUI. It was a revelation to be able to perform matrix and control system analyses in such a simple way, with the many built-in functions (lsim, step, bode, margin, etc.) There was nothing else like it and it taught me a lot.

    In my subsequent work as a controls engineer in the astronomy field, I have used Matlab consistently for many years, occasionally requesting technical support - as you mention - and normally getting a good response. I have downloaded free evaluations of new toolboxes and sometimes we have followed up with a purchase, if the product is worth it. We use Simulink a lot for design, and this is also a really good tool.

    Over the last two years or so, Matlab - the company - has been getting more unfriendly. When I decided not to renew my ongoing 'maintenance' package with them, after I saw we were getting poor value for money per year (a few .x.x upgrades for more than a thousand US dollars a year), I received several of the usual reminders to renew, followed by a very strange email:

    "September 25, 2006

    Dear Mr. (Name Deleted):

    (Company Name Deleted) is a valued customer of The MathWorks, Inc. and we appreciate your business. As you are probably aware from reading press and industry reports, software license compliance remains a challenge for the computer software industry. Like many of our peer companies, The MathWorks is implementing a license compliance audit process and has engaged an independent third-party auditing firm to assist us in performing this work.

    This letter does not indicate that your company has been selected for an audit, but rather, serves as a general announcement of the program. While we are in the planning stages of the program, we wanted to take the opportunity to inform you of this activity. We realize it is very important to answer any questions you may have about the program and we want to work hard to eliminate any surprise if your company does get selected for review.

    As we move forward with our program, we will begin to select various customers to conduct compliance audits pursuant to the terms of our software licensing agreement. If your company is selected, you will be notified in advance by a representative of The MathWorks. Our auditors will then contact your company to discuss the audit timing and procedures, and request documents to help make the process run as efficiently as possible.

    The procedures our auditors will follow are designed to validate software licenses deployed and measure deployment against historical records. We understand that you are busy and every step will be taken to minimize the impact to your daily operations during the process.

    If you have questions about your current usage of MathWorks products, please do not hesitate to contact the Installation and Licensing Team by e-mailing: support@mathworks.com

    We value our relationship with your organization and look forward to your support.

    Sincerely,

    The MathWorks Licensing Compliance Team

    To update your address, send e-mail to: service@mathworks.com

    The MathWorks, Inc. - 3 Apple Hill Drive, Natick, MA 01760 - 508-647-7000"

    I never heard more about this, but it looked suspiciously like applying a bit of pressure - 'if you don't want a visit - or the possibility of one - from our licensing compliance goons, why not just cough up that maintenance fee'. I mean, if piracy and so on is such an issue, then check out every single customer, irrespective of their maintenance status. What have you got to hide, eh?

    What finally pissed me off was when I wanted to download a trial of a toolbox I was interested in purchasing. Here is the friendly reply:

    "(Name Deleted),

    Here is a quote to add the (Toolb

  16. Re:Well, if they ever become competitive to Matlab by ScrewMaster · · Score: 3, Insightful

    I didn't say it was the price for one seat. It was the cost to pay for the software maintenance that we had chosen not to pay for the past few years. I wish people would read what I post instead of just the first line. And there was no negotiation involved: just a simple email request for current pricing. I saw the response from Mathworks. We were all kinda surprised at the amount.

    --
    The higher the technology, the sharper that two-edged sword.
  17. Re:Well, if they ever become competitive to Matlab by datan · · Score: 2, Interesting

    about your first point regarding the audit letter--it may or may not simply be a coincidence.
    but your second point you definitely have no grounds to complain. They allow only people who are on software maintenance to have a free trial of the toolboxes. That's one of the benefits of software maintenance. "we were getting poor value for money per year (a few .x.x upgrades for more than a thousand US dollars a year), " -- you're forgetting the ability to download free trials of toolboxes. If you need any technical support you're entitled to a certain xx hours per year.

  18. Re:Well, if they ever become competitive to Matlab by steve_bedrick · · Score: 5, Interesting
    I bought a license for Matlab for my old PowerPC-based PowerBook about a year ago, and was initially quite pleased with Mathworks- the times I had to call them for support, they were helpful and responsive. All that changed when I switched to an Intel-based Mac a month or so ago. While moving all of my software over to my new laptop, I observed that most software companies used one of two possible approaches to the software redistribution problem:
    1. Release an Intel-compatible binary of their product, and make it available to current license-holders free of charge; or
    2. Take advantage of the opportunity to do a new major-version revision of their product, which license-holders would have to pay to upgrade to.

    Each of these, to me, seem like reasonable solutions— if it's a major-version update, I'd have to pay for it anyway... and if it's just a recompiled version of the product I already have, it should be free to current users. It turns out, however, that there was a third possibility, which is what Mathworks chose:

    3. Release a new minor-version Universal Binary update, and then make all current customers buy a new full-price license in order to get it.

    So, in order to run Matlab on an Intel-based Mac, current PowerPC license holders have to re-purchase their expensive software from scratch. No upgrade path, no nothing— just a nice, loud, "screw you" from Mathworks to their users. And it's not like we could just use our PowerPC verisons under Rosetta- there was a workaround, but it involved disabling all of the graphing/visualization features. Basically, it was a "pay for a full new license or don't use Matlab on your new computer" kind of thing.

    I dunno, maybe it's not that big of a deal, but it still felt pretty crappy. From a customer service standpoint, it wasn't exactly a master-stroke- it wouldn't have really cost them anything just to let current license-holders have an Intel-compatible copy of the software they'd already paid for...

  19. Re:Well, if they ever become competitive to Matlab by Nexus7 · · Score: 4, Informative

    No, he isn't lying.

    MATLAB did the same thing to us, made us pay maintenance for all the years that it had lapsed, because we wanted to upgrade an users' desktop to the latest version.

    Guess what my desktop runs now?

  20. Re:Well, if they ever become competitive to Matlab by insignificant1 · · Score: 2, Informative

    I call bullshit. Check out the price list, which I have only picked items that make sense for tasks that I do regularly (and hence this is not too broad of a scope):

    The bare minimum for signal processing stuff:
    MATLAB: $1900
    Simulink: $3000
    Signal Processing: $800
    Signal Processing Blockset: $1000
    Subtotal: $6,700

    A few more helpful tools that almost every engineer can make use of, not very extravagant:

    Control System Toolbox: $1000
    Filter Design Toolbox: $1000
    Subtotal now: $8,700

    I do a lot of RF comms stuff, so the following are very useful for me:

    Communications Toolbox: $1000
    Communications Blockset: $1000
    RF Blockset: $2000
    RF Toolbox: $1000
    Subtotal now: $13,700

    Implementing algorithms in the real world almost always involves fixed-point computation, so:

    Simulink Fixed Point: $1000
    Fixed-Point Toolbox: $1000

    Grand total: $15,700

    In fact, if you look at the MathWorks product listing for each category:

    MATLAB CATEGORIES:
    Math & Optimization: $4,100
    Statistics & Data Analysis: $9,800
    Control System Design and Analysis: $6,700
    Signal Processing and Communications: $7,800
    Image Processing: $2,900
    Test & Measurement: $4,900
    Computational Biology: $4,000
    Financial Modeling and Analysis: $5,500
    Application Deployment: $5,200
    Application Deployment Targets: $12,000 (.NET, Excel, and Java each are $4k)
    Database Connectivity and Reporting: $1,500

    SIMULINK CATEGORIES:
    Fixed-point Modeling: $1,000
    Event-based Modeling: $5,800
    Physical Modeling: $11,000
    Simulation Graphics: $1,700
    Control System Design and Analysis: $4,000
    Signal Processing and Communications: $5,000
    Code Generation: $30,300
    PC-Based Rapid Control Prototyping and HIL: $10,000
    Embedded Targets: $12,000 (Each processor is $3k apiece)
    Verification, Validation, and Testing: $9,000

    Find their product price list here:
    http://www.mathworks.com/store/default.do

    And you can add up what they recommend for signal processing applications yourself (Hint: just getting the recommended Matlab, Simulink, and Real-Time Workshop is $12,400.)
    http://www.mathworks.com/applications/dsp_comm/products.html

    They have recommendations for other fields of R&D also if you want to look.

    Wow, I can't see how ANYONE could POSSIBLY rack up a $15k MathWorks bill. My educated guess is that you are not a moron, but that you are uninformed about more than just the moron status of this guy's "math guy." Maybe you got a very nice academic discount. Maybe you just got Matlab and a couple of toolboxes. But that's not the situation a lot of folks face when they actually want to accomplish something with Matlab/Simulink.

  21. Too ba for Debian users... by agw · · Score: 3, Funny

    as it will take another 11 years for a Debian version to be released which then includes Ocatave 3.0.

  22. This is the reason that we run Octave by Realistic_Dragon · · Score: 2, Informative

    Date: Fri, 14 Jun 2002 11:14:42 -0400 Subject: Re: Case ID: ****** other

    This is in response to Case ID: ******

    Dear ******,

    Thank you for the additional information, unfortunately, MATLAB Student Version is only available for the Windows platform for our International customers.

    For more information about the Student Version please visit us online at: http://www.mathworks.com/products/studentversion/

    Sincerely,

    /Removed/
    --
    Beep beep.
  23. SciPy by nguy · · Score: 2, Interesting

    Octave is a great effort, and it is very useful for being able to be able to run Matlab code freely. However, most of the effort in open source numerical computing is happening with NumPy and SciPy (www.scipy.org). For most applications, SciPy is already far superior to even the commercial version of Matlab, and SciPy is the de-facto standard in several scientific communities. There are a few areas where Matlab still has toolboxes that have no good equivalent for SciPy yet, but that's going to get fixed.

    So, if you're looking for an open source Matlab alternative, use SciPy for new development and stick to Octave only for occasional backwards compatibility and testing during porting.

  24. matlab's real value is in visualization by edwinolson · · Score: 2, Interesting

    I think that Matlab's biggest strength is how it easy it is to visualize and manipulate plots. Matlab plots can be easily tweaked, enough so that they can be used as figures in academic papers. In contrast, Octave's previous use of gnuplot always felt clunky-- it was hard to get it to do exactly what you wanted, and the results were often ugly.

    I will check out Octave 3's improved "graphics handle" support-- I hope it closes the gap. But for my own part, I care much less about language compatibility and more about making it really easy to visualize and explore your data.

    -Ed

  25. OK, I'll tell you. by hey! · · Score: 2, Informative

    Well, if that's how you judge a development process, to be honest you also have to include the failed commercial products -- of which there are countless. I myself use open source (and certainly non-proprietary) systems as much as possible because I've been burned by products that were "repositioned", the feature sets, pricing and licensing all radically altered. This is often a first step, not to revitalizing the business of supporting the product, but the product going away entirely.

    The open source model is all about market efficiencies. The closed source model is all about individual companies beating the market by differentiating their products. Open source makes software functionality a service you can buy, and that service is in effect a commodity. Pork bellies don't disappear because a particular slaughterhouse stops producing them.

    In this case, you have another case of market efficiencies. There aren't enough people demanding a fully functional or compatible open source version of MATLAB on one hand, or programmers capable of contributing to such a product on the other, to produce the product on short order. If a commercial outfit was working on this, they'd hire people to produce it who otherwise wouldn't work on the product. They'd then have to sell the product against MATLAB, which they can only do by offering new features or lower prices. However they're very unlikely to be able to price it lower, since MATLAB's development costs are already recovered. So they add features. MATLAB comes out with its own incompatible versions of the same features, trims its price a bit, and competitor goes out of business.

    All the money used to create the closed source alternative might as well have been piled up and burned. There is no value delivered to the market by the failed project. The vendor might as well have picked their customers' pockets for all the value the delivered to them in the end.

    By comparison, an open source project taking a long time is a model of efficiency. It is not obvious to most people that an open source MATLAB is the highest use of their resources, therefore the project doesn't get that much resources. However it still produces value: users who don't need the missing features can use whatever is there. Developers on other projects can use the source code (subject to license) or even embed the entire product.

    So, rather than rapidly consuming large quantities of resources to produce zero value, the open source model here is consuming small quantities of resources to steadily produce modest quantities of value.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.