News for hackers. Stuff that matters.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by akandiah on Sunday August 28, 2016 @09:39PM (#12379469)
The problem with a lot of these optimizing tools for Python is that they only support Python 2.7 not Python 3.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by njbooher on Sunday August 28, 2016 @09:42PM (#12379476)
Not really a problem here as most of science still seems to be using Python 2.

edit: Cython was always great for Python 2 and apparently supports 3. http://cython.org

Re:Pythran: a Python to C++ compiler with a focus on scienti... by ericfrederich on Sunday August 28, 2016 @10:13PM (#12379567)
Yeah. I came across C library that used Cython to create Python bindings. It was funny, they could easily support both Python 2 and Python 3 at the same time since all their binding code was in Cython, it was only their installation script witch used an incompatibility (print statement)
Re:Pythran: a Python to C++ compiler with a focus on scienti... by brian_herman on Sunday August 28, 2016 @10:25PM (#12379606)
What was the library?
Re:Pythran: a Python to C++ compiler with a focus on scienti... by shoyer on Monday August 29, 2016 @12:15AM (#12379978)
Numba also supports Python 3.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by mrweasel on Monday August 29, 2016 @03:19AM (#12380529)
I never looked into, but I wonder if there's something in Python 3 that makes it hard to do these kind of things to, compared to Python 2.7.

Python 3 is the platform I use for almost everything, going back to 2.7 is always a major pain. 10 minutes into some 2.7 work and you have to deal with encoding and you start wondering if it would be quicker to just upgrade to 3.5.

Of cause if you mainly do numbers, there's perhaps little gained from Python 3.

Re:Pythran: a Python to C++ compiler with a focus on scienti... by Arkanosis on Monday August 29, 2016 @10:41AM (#12382136)
Can't talk for Pythran devs and others, but in the case of shedskin, one of the issues is the removal of the “compiler” module in Python 3, on which shedskin relies to, well, parse the Python code. This, plus some syntax changes, that are not really bigger that some that were introduced between, say, 2.6 and 2.7, but that are mandatory and breaking backward compatibility.

So, nothing “hard”, really, you just have to do the work again (and prepare to support two versions for a long time, instead of virtually only one).

Re:Pythran: a Python to C++ compiler with a focus on scienti... by bmer on Sunday August 28, 2016 @11:21PM (#12379799)
I use Python for my research work...and this has never been a problem for me, I suppose because I use Python 2.7, and I guess I am "part of the problem"?
Re:Pythran: a Python to C++ compiler with a focus on scienti... by chestervonwinch on Monday August 29, 2016 @06:59AM (#12381121)
Same - grad student. I use python / numpy / scipy / matplotlib / sklearn daily for one-offs, proofs-of-concept, etc. There hasn't been any real incentive for me to switch.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by saboot on Monday August 29, 2016 @10:25AM (#12382015)
I am similar, I did decide to switch though as for just about all my numeric scripts all I needed to do was change the print statement syntax
Re:Pythran: a Python to C++ compiler with a focus on scienti... by frozenport on Sunday August 28, 2016 @11:34PM (#12379848)
Yes you are.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by labrador on Monday August 29, 2016 @03:00AM (#12380454)
You have the problem, not bmer.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by goatlover on Monday August 29, 2016 @04:29AM (#12380717)
The problem is not upgrading after years of 3 being out.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by snovv_crash on Monday August 29, 2016 @06:30AM (#12381027)
What if you don't care about the version of python, but you have a bunch of code that runs on 2.7. You don't get anything from moving to 3, you have to learn the new syntax features (friction), you need to upgrade all you code (friction) and some of the libraries you used before don't work and need fixing (friction). If you don't use asyncio, and you already had venv working, what do you gain?

For someone to whom python is just a fancy pipe-wrench, why keep up with the new shiny?

Re:Pythran: a Python to C++ compiler with a focus on scienti... by jjawssd on Monday August 29, 2016 @09:03AM (#12381548)
You are right. Just like we should all just be using Word 97 on Windows 95 because, you know, word processing is just word processing in the end, isn't it?
Re:Pythran: a Python to C++ compiler with a focus on scienti... by dagw on Monday August 29, 2016 @09:17AM (#12381625)
I take it you don't remember the Office 2000 -> 2003 upgrade debacle and peoples unwillingness to just get on board. Most people I know simply skipped 2003 and only reluctantly hopped to 2007 after much gnashing of teeth. I still know a handful of people still using Word 2000.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by snovv_crash on Monday August 29, 2016 @11:23AM (#12382455)
Use whatever you know works for your usecase. Look at George R.R. Martin for one example.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by Demiurge on Sunday August 28, 2016 @09:49PM (#12379501)
As a happy Python user for 10 years, I didn't even wonder whether it supports python3. Maybe the problem is somewhere else, and not with the library I'm looking forward to trying?
Re:Pythran: a Python to C++ compiler with a focus on scienti... by nerdponx on Sunday August 28, 2016 @10:42PM (#12379658)
Are you insinuating that the problem is with Python 3? What is actually so much more amazing about Python 2 that you would rather freeze the language than upgrade?
Re:Pythran: a Python to C++ compiler with a focus on scienti... by kolokolo on Sunday August 28, 2016 @11:57PM (#12379924)
It ain't broken. Why fix it?
Re:Pythran: a Python to C++ compiler with a focus on scienti... by witty_username on Monday August 29, 2016 @01:48AM (#12380244)
Python 3 has many new features and fixes. Maybe 5 years ago this was true, but not today.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by snovv_crash on Monday August 29, 2016 @06:33AM (#12381037)
What is there in 3 that would benefit scientific computing which 2.7 doesn't have? TBH I don't see the value proposition.

For web stuff you have asyncio, and for hackers there is the venv improvements, but what is there for scientific users who have work to get done?

Re:Pythran: a Python to C++ compiler with a focus on scienti... by Nullabillity on Monday August 29, 2016 @02:19AM (#12380339)
And how many of them can't be backported to 2?

You don't need to freeze the language, but if the alternative is breaking backwards compatibility after all that time...

Re:Pythran: a Python to C++ compiler with a focus on scienti... by goatlover on Monday August 29, 2016 @04:28AM (#12380712)
It's been seven years. Get over it already. That attitude keeps Python a fractured community.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by kolokolo on Monday August 29, 2016 @07:44AM (#12381239)
This argument is just as valid as "You've been trying for 7 years. Give up already."
Re:Pythran: a Python to C++ compiler with a focus on scienti... by nerdponx on Monday August 29, 2016 @06:18AM (#12380998)
You could've said the same thing about black-and-white TV, AM radio, horse drawn carriages, et al.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by kolokolo on Monday August 29, 2016 @07:46AM (#12381244)
And there's still a lot of use for AM radio, for one.
Re:Pythran: a Python to C++ compiler with a focus on scienti... by nerdponx on Monday August 29, 2016 @04:29PM (#12385048)
In niche uses yes. But nobody uses it because "it ain't broke," they have a specific purpose on mind and can actually answer when someone asks what that purpose is.

So far I have not heard anything like a real justification for why Py2 is still better

Re:Pythran: a Python to C++ compiler with a focus on scienti... by srean on Monday August 29, 2016 @11:53PM (#12387412)
> So far I have not heard anything like a real justification for why Py2 is still better

I think it needs to be the other way around. If you want me to move from something that works to something that you want me to move to, the onus is on you to show what the new thing does better (or would likely do better in the future). For scientific loads the Python3 story is mostly "not worth the trouble".

Re:Pythran: a Python to C++ compiler with a focus on scienti... by kolokolo on Monday August 29, 2016 @07:27PM (#12386241)
This comment branch starts with "tools that only support Py2". This ecosystem is what makes Py2 better for many.