4 ms·
I often wonder what inspires folks to start from scratch in the face of a gigantic ecosystem like the one that Python brings with it, which will also keep impro
by fareesh 8y ago
I often wonder what inspires folks to start from scratch in the face of a gigantic ecosystem like the one that Python brings with it, which will also keep improving.
- 3JPLW 8y agoIn the case of Julia, you can check out the original motivation back in 2012 or this recent answer on the message board. https://julialang.org/blog/2012/02/why-we-created-julia https://julialang.org/blog/2012/02/why-we-created-julia https://discourse.julialang.org/t/julia-motivation-why-werent-numpy-scipy-numba-good-enough/2236/10 https://discourse.julialang.org/t/julia-motivation-why-weren...
- Gravityloss 8y agoIf you have some Matlab background, working with Python is frustrating. It is hard to explain, but vectors and matrices should be the primary concepts, with absolutely minimum extra glue needed.
- prestonh 8y agoI don't have much experience with Matlab, so forgive me if this is incorrect, but numpy should be able to do everything that matlab can at comparable speeds. No one performing matrix/vector-like operations is doing so with standard Python lists if numpy is available.
- Gravityloss 8y agoI'm not talking about execution speed but the human interface. The syntax of Python just is not nice and using libraries just adds more and more boilerplate. I don't expect anyone who has not spent a lot of time with Matlab to "get" it.
- acdha 8y agoIt's interesting because those were the reasons I heard from MATLAB users for switching to Python: moving to a language with a cleaner, less ad-hoc design and less boilerplate / copy-paste code made a big difference once you had more than a little code. Has the language improved dramatically in the last few decade?
- Gravityloss 8y agoMatlab is good for non-software engineers and scientists to explore and solve problems. Once you have a solution there, write it up in some proper language. I don't think it is likely for a software engineer to understand Matlab's niche and effectiveness. It comes from a different direction. A ball point pen, a paint brush and a piece of drafting graphite all have their uses.
- twtw 8y agoI'm an electrical engineer oriented towards signal processing and controls, and I'm also incapable of understanding Matlab's niche and effectiveness. I wish Matlab could just vanish. It's a glorified calculator that has mutated over the years into a crap programming language, with random features just bolted on and the strangest semantics of all time. It also has the drawback that most of its users generate write-only code, so everyone that learns it also learns to write code that way.
- geoalchimista 8y agoI second this. And to make matters worse, a lot of MATLAB users are not aware of coding style. Poorly readable MATLAB code stinks. I sometimes rather wish to read Fortran 90 instead of MATLAB code.
- ChrisRackauckas 8y agoPython is much better than MATLAB in non-mathematical domains. Hell, MATLAB didn't even have arrays of strings until 2017! But in the mathematical area, SciPy is really lacking syntax-wise. Here's a quick side-by-side comparison which is also useful for teaching between the languages: https://cheatsheets.quantecon.org/ https://cheatsheets.quantecon.org/ You can go as far as to say that Python is verbose in many cases, and non-intuitive in others (A @ B?). That said, you would never want to write a webapp in MATLAB, so as people expand from "math scripting" to "programming" they run into MATLAB issues which have absolutely no good solution. This is where the Python pickup comes from: it's still decent for scientific computing, but it also is an actual programming language. However, Julia keeps the nice syntax of MATLAB in the mathematical domain, keeps the technical computing focus of its community, adds some speed, and also is a general-purpose languages where webservers etc. are being written. In that sense, Julia is a really good fit for people looking to ditch MATLAB. (A lot of MATLAB's bad syntax was bolted on later. It started as MATrix LAB, and later became a programming language. You can easily see the elegance of its initial design, and the terrible choices when extending it.)
- goatlover 8y agoBut numpy is the underlying library used by the rest of the SciPy stack, right? I use Pandas, so taking that as an example, it can be slow when you're doing stuff that isn't mostly leveraging Numpy. If I have to loop over a relatively large dataset to do some complicated row checking/filtering stuff, then it can be very slow, and I might as well take a coffee break. You can rewrite that into using just the numpy values array and it will be performant, but you lose all the nice Pandas features when you do that. Also, if I'm just restricted to using Pandas on a laptop or small server instance, then loading in a several gigabyte csv file can really tax the memory.
- goatlover 8y agoThat's definitely a thing. I like Pandas, but the syntax is a bit cumbersome compared to R or Julia.
- kgwgk 8y agoHubris. Which is one of the three great virtues of a programmer.
- simonbyrne 8y agoI'm pretty sure the other two were as well.
- ScottPJones 8y agoSometimes languages get stuck by their history, and (without really becoming a rather different incompatible language) the only way forward is to start from scratch. Also, Julia is good at letting you use those old ecosystems, C and Fortran libraries, Python, Java, R, all from the comfort of home (Julia)
- cdsousa 8y agoIn part, the fact that there are major problems moving the "giant" to where one would like (speed), e.g., unladen swallow, pypy, pyston, ...
- ChrisRackauckas 8y agoWell, there are big areas where the ecosystem is quite underdeveloped, like differential equations, which have a lot of holes that need new algorithms and improvement. It would be extremely difficult to develop all of the necessary algorithms in C/C++/Fortran, and pretty much impossible in Python/MATLAB (I tried at first), but it's a breeze to tackle this in Julia. So for these kinds of scientific computing areas where there's tons of work with few people with the necessary expertise, Julia is a great way to start getting some good implementations out there for people to use.