4 ms·
If python did not have a performance problem you wouldn't need to implement any python libraries in C. The point of having Julia is avoiding the usage of two l
by jernfrost 9y ago
If python did not have a performance problem you wouldn't need to implement any python libraries in C.
The point of having Julia is avoiding the usage of two languages. If you can have C performance in a script language why bother with python?
The only reason to pick python is momentum, libraries and mindshare.
The language by itself is nothing special. Julia is faster, is a better glue language, easier to use and more powerful.
- joshuamorton 9y agoIf Julia didn't have a performance problem, you wouldn't need to call out to a BLAS. >is a better glue language I'm confused, I thought you said you were avoiding the usage of two languages. If so, what is Julia "gluing"?
- jernfrost 9y agoYou don't have to as Julia can still get high performance. And BLAS is actually an example of Julia strenghts. The ability to pick exact code specializations help effectively pick the most suitable BLAS function. Python can't pick correct function based on type and number of arguments. As for gluing. That is often needed not for performance reasons but because you don't want to reimplement lots of proven code which is well devugged and tested. One of the reasons to pick BLAS. I use Julia a lot for shell like scripting. That means running a lot of unix commands I don't know how was implemented like the ios code signing tools. Doing this in Julia is far superior to doing it in python. I was actually shocked how clunky it was in python when I attempted a rewrite.
- joshuamorton 9y ago>Python can't pick correct function based on type and number of arguments. What? Numpy does this. >Doing this in Julia is far superior to doing it in python. Then, quite simply, you're doing it wrong in python. Show me an example of this system code that's nice in julia and clunky in python and I'll show you a superior implementation in python.
- tavert 9y ago> What? Numpy does this. And Numpy needs an ad-hoc grafted on type system(s) to do it. > Show me an example of this system code that's nice in julia and clunky in python and I'll show you a superior implementation in python. Silly over-reduction, but show me a nice way of running this in Python in 3 lines: run(`./configure`) run(`make`) run(`make install`)
- fnord123 9y agoos.system('./configure') os.system('make') os.system('make install')
- shele 9y agoI am curious (coming from Julia), what is the difficulty in Python?
- fnord123 9y agoThere's no problem but if you want to shell out there are a few ways to do it to make sure you're in control of the subshell. At the simplest there's: import os os.system('command') Then you might want to capture stdout and stdin or interact with the subshell (e.g. hitting 'y'). So you use: import subprocess cmd = subprocess.Popen("cat <(head tmp)", shell=True, stdout=subprocess.PIPE) stdout, _ = cmd.communicate() And if you want to timeout or parse logs or whatever, you go from there and it gets more and more complicated. If Julia has solved this then the community should be advertising this above all the alleged performance stuff.
- fnord123 9y ago>I use Julia a lot for shell like scripting. That seems absurd. $ time julia -e 'print(1+1, "\n")' 2 real 0m0.996s user 0m0.664s sys 0m0.367s $ time python3 -c 'print(1+1)' 2 real 0m0.160s user 0m0.080s sys 0m0.033s Almost a second just to print a number in Julia. This makes it unattractive for shell scripting. Startup performance is an open issue in Julia and smart people are working on it (I hope); but it's not there yet.
- deleted 9y ago[deleted]
- pwang 9y ago"The only reason to pick python is momentum, libraries and mindshare." I'm confused. Are you using this as an argument for Julia? I don't post "LOL" very often on HN, but congrats... LOL! Unless you code in a vacuum, solving the most basic of problems that don't require integration with other services, formats, and APIs, and can figure everything out yourself, then momentum, libraries, and mindshare are EXACTLY the things you should be optimizing for. (FWIW I think Julia is a nice language and has an amazing dev community.)