News for hackers. Stuff that matters.
Re:What's Going On (on "Why Python, Ruby, and Javascript are... by coldtea on Sunday April 14, 2013 @06:53AM (#5546576)
>Yeah: your real bottlenecks are going to be 1) getting data out of your database and 2) sending packets across the internet. These are 100 times and 1000 times slower than your program, the 10x penalty to use ruby/python instead of C/C++/go/rust isn't going to matter.

Only if you're talking about the typical CRUD, website, etc program.

Why should we? People use Python for numerical analysis, scientific computing, etc. Why not let them be able to do that, while still writing in Python (instead of using libraries that delegate to C/Fortran/etc)?

And even a website can do intensive computation work. Why HAVE to write it in 2 languages?

Re:What's Going On (on "Why Python, Ruby, and Javascript are... by anonymous on Sunday April 14, 2013 @09:09AM (#5546806)
The people who use python for numerical analysis use solutions like numpy, with which their programs spend most of their time executing optimised numeric routines.
Re:What's Going On (on "Why Python, Ruby, and Javascript are... by yummyfajitas on Sunday April 14, 2013 @11:10AM (#5547061)
If you can structure your program in such a way that all your inner loops are handled by BLAS/LAPACK/FFTW, then python works great.

The sad fact is you can't always do this. Then you are forced to drop down to C/C++/Fortran.

It would be great if you didn't always have to do this.

Re:What's Going On (on "Why Python, Ruby, and Javascript are... by travisoliphant on Sunday April 14, 2013 @10:01PM (#5549324)
This is exactly what Numba is designed to help with. And it already works extremely well for such cases. Numba lets you have ease of use (un-typed containers) and speed (with typed-containers) in the same run-time and the same syntax. Here is are some IPython notebooks which illustrate:

https://www.wakari.io/nb/travis/Using_Numba https://www.wakari.io/nb/travis/numba

And the slides from PyCon Talk: https://speakerdeck.com/pyconslides/numba-a-dynamic-python-c...

Re:What's Going On (on "Why Python, Ruby, and Javascript are... by yummyfajitas on Monday April 15, 2013 @09:09AM (#5551251)
Numba is great for numerical expressions, but I'd be surprised if it works for trickier bits.

For example, consider the problem here:

http://arxiv.org/abs/0903.1817

Ultimately I needed to run a math formula on some surfels and connect an edge in a graph if the formula came out True. Following that I had to prune a bunch of edges in the graph. In 2009 (when I did it), I had to drop down to c++. (Admittedly, this was also partly due to a lack of a good python graph lib.)

I'd be very surprised if Numba is helpful with something like that - the branching and complex data structures don't seem like a great fit for it.

Re:What's Going On (on "Why Python, Ruby, and Javascript are... by pjmlp on Sunday April 14, 2013 @01:27PM (#5547461)
The scientific community seems to be welcoming Julia open arms, given its performance improvements over Python, if you look at the rate code is being ported to such a young language.
Re:What's Going On (on "Why Python, Ruby, and Javascript are... by pekk on Sunday April 14, 2013 @10:31AM (#5546955)
Do you use Python for numerical analysis, scientific computing, etc.? If so, why are you saying "why not let them be able to do that"? If not, why are you holding forth on Python's unsuitability for these applications without knowing about the available tools?
Re:What's Going On (on "Why Python, Ruby, and Javascript are... by coldtea on Sunday April 14, 2013 @11:50AM (#5547174)
>Do you use Python for numerical analysis, scientific computing, etc.? If so, why are you saying "why not let them be able to do that"?

1) Yes I do (occasionally).

2) Because it applies to everybody, not just me. You surely heard of the plural form of speaking before.

>If not, why are you holding forth on Python's unsuitability for these applications without knowing about the available tools?

I never said Python is "unsuitable for these applications".

On the contrary, I acknowledged that Python IS USED for these applications.

What I said is that the tools you mention (the ones that make it suitable for these applications) are written in other languages, which is kludgy. I'd rather be able to have them written (and modified etc) in Python too.

So, Python + NumPy + etc is suitable for these applications, but Python the interpreted language without external C/Fortran help is not.

Re:What's Going On (on "Why Python, Ruby, and Javascript are... by jes5199 on Sunday April 14, 2013 @10:36PM (#5549437)
if you're doing numerical analysis, you're doing it offline, not in real-time. And so again, bit-packing doesn't matter. If your space usage grows exponentially, that becomes a problem, but in that case the difference between programming languages is just a multiplier, and is dwarfed by your algorithmic problems.
Re:What's Going On (on "Why Python, Ruby, and Javascript are... by wnight on Sunday April 14, 2013 @10:21AM (#5546932)
Why use a hammer and a screwdriver when you can make due with only a hammer?
Re:What's Going On (on "Why Python, Ruby, and Javascript are... by coldtea on Sunday April 14, 2013 @11:57AM (#5547190)
It's even worse than that.

Python and the faster extension languages used are the same kind of tool (well, obviously, both are languages).

So, let's compare them to two hammers.

The difference is Python is made from soft plastic, and while it is light, it only works for softer nails. For harder stuff you need a metallic hammer, which is heavier.

And the sad thing is, the Python-hammer can also be almost as hard as the other hammer while remaining light, it just needs some coating (faster interpreter innards).

So nothing (except besides the man-years of work needed on the interpreter) forbids you to have a hammer both light AND strong (== dynamic and expressive as Python WHILE many times faster).