Re:Teach Yourself Programming in Ten Years (1998)
by hpb42 on Sunday June 06, 2021 @10:50AM
(#27413574)
For arrays/matrices I'm falling back to Fortran. It has builtin support to matrix/vector multiplication (and other operations of course). There's no need to install other libraries, or to deal with virtualenvs, or package managers. Fortran is not that sold creepy thing from the 70s anymore, Fortran90 (and later) is pretty elegant IMO.
Re:Teach Yourself Programming in Ten Years (1998)
by tobmlt on Sunday June 06, 2021 @07:29PM
(#27417349)
Cheers to that! Fortran introduced me to “:” syntax, back before I’d ever heard of numpy. (Or expression templates for that (somewhat tangential) matter)
Re:Teach Yourself Programming in Ten Years (1998)
by Raro on Sunday June 06, 2021 @11:33AM
(#27413832)
Python's NumPy library deliberately emulates much of the functionality of Matlab's core (similarly, fundamental plotting with matplotlib follow similar design cues). As a lapsed long-time Matlab user, I think they're just as fun to use.
There is also Octave, an open-source Matlab alternative, but when I last used it (admittedly quite a while ago) it had limited support for toolboxes (e.g. signal processing). I imagine it has only improved since.
Re:Teach Yourself Programming in Ten Years (1998)
by galangalalgol on Sunday June 06, 2021 @12:20PM
(#27414149)
For elegant matrix syntax I like julia or fortran better, if I need a lack of a license or more speed. Octave is good too, but it is much slower than Matlab. Numpy is in a weird spot. Its still slower than Matlab, but its everywhere, but all the versions and environments are different so you need containers to be portable.
Re:Teach Yourself Programming in Ten Years (1998)
by SiliconMage on Sunday June 06, 2021 @01:05PM
(#27414506)
APL is awesome for matrices.
Re:Teach Yourself Programming in Ten Years (1998)
by belter on Sunday June 06, 2021 @08:34AM
(#27412717)
Careful with Bash...
https://mywiki.wooledge.org/BashPitfalls
Re:Teach Yourself Programming in Ten Years (1998)
by voakbasda on Sunday June 06, 2021 @02:53PM
(#27415330)
I write huge scripts with bash. I know many of the pitfalls referenced on that list (and more), but this a great resource for teaching others. Thanks for sharing it!
Re:Teach Yourself Programming in Ten Years (1998)
by whynaut on Sunday June 06, 2021 @10:42AM
(#27413500)
> I still need to find something good for arrays/ matrices
R?
Re:Teach Yourself Programming in Ten Years (1998)
by trutannus on Sunday June 06, 2021 @11:03AM
(#27413663)
MATLAB, if you can get a license would likely be better. Name literally means "matrix lab". Has excellent matrix manipulation features.
Re:Teach Yourself Programming in Ten Years (1998)
by blacktriangle on Sunday June 06, 2021 @05:16PM
(#27416411)
And Octave(https://www.gnu.org/software/octave/index) if you can't get a license.
I actually had one hectic weekend porting our whole departments MATLAB code over to Octave due to a hardware failure of our licensing server and some stonewalling from Mathworks, Octave is pretty close to fully MATLAB compatible.
Re:Teach Yourself Programming in Ten Years (1998)
by trutannus on Monday June 07, 2021 @02:41PM
(#27426369)
Worth a mention, but it's not comparable in terms of feature set and execution time, sadly. I'd love someone to come along and make a MATLAB (Modern Fortran) knockoff that kills MATLAB.
Re:Teach Yourself Programming in Ten Years (1998)
by barrkel on Sunday June 06, 2021 @10:38AM
(#27413470)
The biggest advantage of bash over scripts is parallelism. It's not bad at job control, and if you write your scripts so they communicate well with streams, you can scale them up with a little bit of bash, xargs -P, parallel, etc.
my favs:
-clojure for processing deeply nested data
-rust for general stuff
-java for concurrency support and general stuff
-c for easy pointer manipulation and "tricks"
-sql
-bash for scripting (I'm that weirdo who would rather make a huge shell script rather than using python)
I still need to find something good for arrays/ matrices. MATLAB was kinda fun I can't see it being used in production in anger too easily