News for hackers. Stuff that matters.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by CharlesW on Sunday October 19, 2025 @03:18PM (#45637054)
For anyone else who hadn't heard of Octave, it's an open source near-clone of the proprietary MATLAB: https://en.wikipedia.org/wiki/GNU_Octave
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by wiz21c on Sunday October 19, 2025 @03:33PM (#45637183)
"near clone" is a bit exaggerated. As much as I'm a free software zealot, I don't think Octave comes close to matlab yet (provided you do anything a bit more advanced than the practical of some courses)

See https://stackoverflow.com/questions/12084246/differences-bet...

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by bee_rider on Sunday October 19, 2025 @04:33PM (#45637695)
I don’t think Matlab or Octave are great languages for software engineering. Actually, these languages are like example #1 of the difference between engineering software vs software engineering: they are excellent tools for writing, like, 10-100 line numerical experiments.

Anyone who runs up against a limitation of Octave has probably hit the point where they should consider switching, but not to Matlab or some other scripting language, but to Fortran or maybe Julia or something.

Therefore, I disagree with the accepted answer in that StackOverflow thread. The language is only good in the first place for short codes anyway, so fixing any little octave/matlab regionalisms is not a big deal. And, since it is a mathematical experiments, you should understand what every line of code does, so running the code without reading it is not really an option.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by rs186 on Sunday October 19, 2025 @05:32PM (#45638211)
They are never meant for general software engineer but for numerical analysis/data analysis and engineering. In fact they are quite horrible for writing general software code -- the APIs for IO and HTTP requests are very lacking compared what you can find in other languages, for example.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by duped on Sunday October 19, 2025 @09:13PM (#45639418)
I haven't found a better CLI calculator utility for writing more than one-liner numerical stuff with some plots than MATLAB and octave. They're fantastic.

Python is trash, by comparison.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by almostgotcaught on Sunday October 19, 2025 @09:54PM (#45639578)
You think MATLAB is better than (checks notes) a scripting language for writing one liners/throwaway code? Is that what you're saying here? Lol
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by viccis on Sunday October 19, 2025 @11:25PM (#45639958)
>a scripting language for writing one liners/throwaway code

Just objectively not an accurate description of Python

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by duped on Monday October 20, 2025 @10:49AM (#45644577)
1000% yes, because this kind of stuff is not oneliners and you don't want to throw it away.

You also don't have the rats nest that is python environment and package management.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by DarmokJalad1701 on Sunday October 19, 2025 @11:02PM (#45639886)
> 10-100 line numerical experiments

There's plenty of satellites, rockets, re-entry vehicles whose guidance and control code were designed and written using MATLAB/Simulink and then "autocoded" to C using "MATLAB Coder".

While not my preferred way of doing things, it is popular for this purpose throughout the aerospace industry.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by ok123456 on Sunday October 19, 2025 @07:09PM (#45638860)
People who use MATLAB use it for the toolboxes.

The language itself is awful.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by enriquto on Sunday October 19, 2025 @09:52PM (#45639567)
> The language itself is awful.

As a programming language freak, I must disagree... in what other programming language can you solve a linear system Ax=b in one line

    x = A\b
without any external libraries or imports, just with the base language?

I never used any official matlab "toolbox", but still love the language via the octave interpreter. It's so clean and straightforward!

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by torrance on Sunday October 19, 2025 @11:00PM (#45639877)
Well, in Julia, for one.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by ok123456 on Monday October 20, 2025 @12:44AM (#45640240)
Also APL: b ⌹ A
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by almostgotcaught on Sunday October 19, 2025 @09:58PM (#45639592)
> without any external libraries or imports

Why does this matter in the least? Like you must understand that this is a library call right? Like just put `import numpy as np` in your PYTHONSTARTUP and it's the exact same UX in python.

https://docs.python.org/3/using/cmdline.html#envvar-PYTHONST...

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by anthk on Monday October 20, 2025 @04:22AM (#45641240)
GNU Maxima.

Not a general purpose one, but good enough.

Also, qalc from libqalculate for trivial stuff.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by _glass on Monday October 20, 2025 @06:16AM (#45642208)
In Python you can use a library, then it is: x = np.linalg.solve(A, b). But yeah, Octave is nice, because it stays very symbolic.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by electroly on Monday October 20, 2025 @12:05PM (#45645486)
In R, this is: x <- solve(A, b)
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by username223 on Sunday October 19, 2025 @10:15PM (#45639663)
Matlab/Octave is great for numerical programs that perform within an order of magnitude of Fortran. If some things aren't fast enough, you can rewrite them in C or Fortran without too much trouble. If you're doing anything other than numerical computing, it's awful, and you should use a different language.

(Source: I did a PhD using a mixture of Octave for numerical stuff, Perl for text-processing and automation, and C++ for the parts that were too slow. Choose the right tool for the job.)

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by ok123456 on Monday October 20, 2025 @12:53AM (#45640269)
Modern Fortran is better all around. The compiler will check usage based on interface. It has a working and supported module system (unlike C++). A couple of openmp pragmas will parallelize it. Multidimensional dense arrays are first class objects. The compiler can emit code with array bounds checking. Keyword and optional arguments. Standardized C FFI. f2py inter-op with Python/numpy.

Most people encounter large FORTRAN IV or FORTRAN 77 heirloom codes, and assume that's what Fortran is like in 2025.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by le-mark on Sunday October 19, 2025 @03:38PM (#45637224)
I used octave in place of matlab in undergrad numerical analysis course 15 years ago. The language was completely compatible for what we did.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by kjgkjhfkjf on Sunday October 19, 2025 @03:40PM (#45637246)
Early versions of Andrew Ng's ML MOOC used Octave, if you are looking for examples and exercises.

YouTube playlist: https://www.youtube.com/playlist?list=PLiPvV5TNogxIS4bHQVW4p...

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by znpy on Sunday October 19, 2025 @04:12PM (#45637532)
Oh, the times when Coursera and Udacity were just starting... They were supposed to disrupt academia, it's a shame they never actually did.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by jhbadger on Sunday October 19, 2025 @09:31PM (#45639494)
There's a great recent book (Anne Trumbore's _The Teacher_in_The_Machine_) on using technology to "disrupt" education (starting much earlier than you would think, with mechanical devices in the early 20th century that could drill students with multiple choice questions, running through basically pre-computer MOOCS that used radio and then TV to broadcast lectures, various educational software, and finally MOOCs like Coursera and Udacity).
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by lispisok on Sunday October 19, 2025 @10:47PM (#45639825)
The real value of a degree unfortunately isnt the education it's the exclusivity of the program. When bootcamps realized this some started having more stringent admissions.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by tomku on Sunday October 19, 2025 @05:21PM (#45638106)
I was in one of those early cohorts that used Octave, one of the things the course had to deal with was that at the time (I don't know about now) Octave did not ship with an optimization function suitable for the coursework so we ended up using an implementation of `fmincg` provided along with the homework by the course staff. If you're following along with the lectures, you might need to track down that file, it's probably available somewhere.

Using Octave for a beginning ML class felt like the worst of both worlds - you got the awkward, ugly language of MATLAB without any of the upsides of MATLAB-the-product because it didn't have the GUI environment or the huge pile of toolbox functions. None of that is meant as criticism at Octave as a project, it's fine for what it is, it just ended up being more of a stumbling block for beginners than a booster in that specific context.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by airza on Sunday October 19, 2025 @07:18PM (#45638897)
It’s nice to know that someone else suffered this pain. And that i bet on PGMs which really turned out to be the wrong horse…
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by mark_l_watson on Sunday October 19, 2025 @08:34PM (#45639228)
ha! I took at least one PGM class myself. I had a difficult time with the material.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by imploded_sub on Monday October 20, 2025 @02:14AM (#45640535)
I did that with Octave too. I didn't mind the language much, but it wasn't great. I had significant experience with both coding and simple models when doing it, so I wasn't a beginner; I can see it being an additional hurdle for some people. What are they using now? Python?
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by tomku on Tuesday October 21, 2025 @05:42PM (#45662091)
Believe Andrew Ng's new course is all Python now, yeah. Amusingly enough another class that I took (Linear Algebra: Foundations to Frontiers) kinda did the opposite move - when I took it, it was all Python, but shortly after they transitioned to full-powered MATLAB with limited student licenses. Guess it makes sense given that LAFF was primarily about the math.
Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by analog31 on Sunday October 19, 2025 @06:52PM (#45638759)
I'm not a Matlab user, but from what I can tell, even if the language can be cloned, there's a lot more to Matlab: It's a GUI driven software suite, with a lot of pre-written apps that eliminate the need for coding in many cases.

It comes with vendor support and "official-ness" for lack of a better word.

Things are changing rapidly in this area but it wasn't very long ago that most people reacted to open-source software as something weird that shouldn't be trusted.

Re:GNU Octave Meets JupyterLite: Compute Anywhere, Anytime by 29athrowaway on Sunday October 19, 2025 @07:40PM (#45638992)
Scilab is another MATLAB clone, but emphasizes features rather than compatibility.