3 ms·
>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.
by 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.