5 ms·
Speaking as someone who has a lot of work invested in the numeric Python system I share a lot of the same sentiment. I'm unhappy with how lot of the current thi
by freyrs3 13y ago
Speaking as someone who has a lot of work invested in the numeric Python system I share a lot of the same sentiment. I'm unhappy with how lot of the current thinking is centered around building essentially large embedded DSLs to invoke C libraries. Although it's a technique that works and has been successful, it's become a big pain to maintain and extend over the years. Just look at how much work has been spent just trying to get simple things like NA values into NumPy.
My recommendation to other numeric Python devs is that if you don't have any investment in a specific numeric Python library think about moving your project to Julia, I suspect the ecosystem will bloom pretty rapidly and provide a much more future-proof set of tools for technical computing.
- Derbasti 13y agoOne of the nice things in Python is that it is nit limited to scientific computation. I remember the days when I tried to do command line automation in Matlab, or tried to read some XML from some internet resource. This stuff is super simple in Python, but very hard in Matlab, because Matlab focuses so much on science and so little on general usefulness. Python is not as integrated with regards to the scientific core functionality, but it doesn't limit you to it, either.
- drunkpotato 13y agoMatlab leaves something to be desired for general programming tasks. If you can, it's sometimes nice to define stages and pipe between them. I love Python for text processing and XML, but I find Matlab way easier for shoving matrices around. I liked using the strengths of both by pre-processing raw text and XML files through a Python script, spitting out a CSV or tab-delimited file, and slurping that up in Matlab. Matlab has come a long way though. Coming from a functional programming background, I was delighted to find that you can pass functions as arguments to some matrix operators and get some very terse map+reduce operations.
- dagw 13y agoThere's Oct2py and mlabwrap which lets you call octave and matlab functions from python. I've used Oct2py a few times just like you describe and it worked fine. Read, parse and format my data in python, passing it to some matlab functions (which happend to work in octave) and then formatting and writing the results back in python.
- simonster 13y agoYes, for many things, Python is better than MATLAB. But the choice of language is no longer dichotomous, and Julia manages to be better for command line automation than Python. A pipe operator combined with custom interpolation for command literals gives you really beautiful syntax: fname = "/tmp/myfile with spaces" f = open(fname, "w") run(`echo hi` |> f) close(f) pipe, process = readsfrom(`cat $fname`) cmdoutput = readall(pipe) println(cmdoutput) I'd write all of my command line scripts in Julia, except the interpreter currently takes far too long to start. But people are working on that.