Earlier quoted context omitted.
Personally, barring any major JIT advances, I'm considering the book closed on the topic of whether JITs can take a dynamic language and make it as fast as C or C++. It's possible to close more of the speed gap, but these JITs have to be able to: * identify and use native primitives (avoid overflow and so forth) * prefer stack allocation over heap (improved escape analysis) * inline memory allocation and freeing and…
I think you're fundamentally confused about how computers work. It is always faster to do things in software than in hardware. Naive optimizations are always faster than data flow analysis from profiling. More layers of indirection make things faster, so the fastest languages put interpreters inside of their interpreters. War is peace. Slavery is freedom. The kids are getting smarter.
Python 3 can revive Python
231–240 of 242 posts
Re: Python 3 can revive Python
#232This isn't intended to be obstreperous, but I'm genuinely curious: How many Python developers are in a position to really care about 2 vs 3? The people I know who use Python, including myself, range from utter beginners to experienced programmers, but are using a relatively small subset of the available libraries, and are just using whichever version we started with. I could translate my code to version 3 in a heartb…
Most libraries are migrating and honestly I haven't seen that much complaint in places other than ycombinator
:(
I guess I have to roll up my sleeves on that one.
It's a dependency for networkx, to draw diagrams...
Re: Python 3 can revive Python
#233Earlier quoted context omitted.
I think you're fundamentally confused about how computers work. It is always faster to do things in software than in hardware. Naive optimizations are always faster than data flow analysis from profiling. More layers of indirection make things faster, so the fastest languages put interpreters inside of their interpreters. War is peace. Slavery is freedom. The kids are getting smarter.
Why the heck are you posting stuff on this hell hole? Why am I posting stuff?
Re: Python 3 can revive Python
#234I love how you call Julia a wannabe but then go on to list features it has to build up the newer greater Python =P
Re: Python 3 can revive Python
#235Is Python really dying? I think the original article proclaiming it's death was written by a MS guy (aren't they coming out with a new version of asp or .net or something?). I use it every day and even though I love JS (and have been thinking about looking into Go because of all the positive noise) I don't see Python going anywhere for me at least. It is simply too handy and familiar. Maybe it just will be used sligh…
The Go noise got to me too. I worked through a book on it, implementing a project in it, and ended up writing it off. The problem for me was the insane concept they adopted around C-style error codes and abandoning exceptions. The idea that errors should pass by default rather than halt by default is just putting more on the programmer to manage. Which I'm almost universally against unless there are significant gains…
Exceptions are arguably one of C++'s largest mistakes, and it requires careful thought to write code in a completely (e.g. strongly) exception-safe way (not to mention it's caused somewhat of a fracture in the C++ community over the years...). Presumably, this is why they don't exist in Go, and it's certainly why they don't exist in Rust.
FWIW, I'm a C++ programmer, and I was a C programmer before that, so my experience with Python is rather limited.
Re: Python 3 can revive Python
#236Earlier quoted context omitted.
The people who call Go a systems programming language are fundamentally misguided. It is an applications programming language under any reasonable definition.
You know that "the people who call Go a systems programming language" are its authors, do you not?
"Systems" in Rob/Ken's time was services/servers - what we call applications these days.
Re: Python 3 can revive Python
#237Earlier quoted context omitted.
"People are leaving Python for Go because people have always left Python for fast compiled languages." I think the angst about Go comes from the fact that someone who leaves Python for Java may still come back, because you can develop far more quickly in Python than Java. But someone who leaves Python for Go probably isn't coming back... my experience is that it is slightly slower (10-20%, YMMV but we're certainly no…
My experience was Go was about 2-3x slower (development speed) than Python for prototyping. Web programming, though, which is a particular strength of Python and a particular weakness of Go. YMMV, of course. I actually really do miss list comprehensions and properties and pervasive protocols for built-in types and really concise keyword/literal syntax. I don't miss metaclasses, and I only vaguely miss decorators. (Go…
Re: Python 3 can revive Python
#238As far as I am concerned, a mere user, hacking python for 'academic research' in multiple aspects of structural biology and bioinformatics, I have yet to see a single practical argument for switching to or even investing time in learning Python 3 'right now'. Maybe in six years it'll be a different story, but from where I stand, python vs python 3 is a remote and ephemeral distinction, created by the grand poobahs, o…
Why did you bother to learn Python 2? Scientific code typically translates cleanly using 2to3, even. You can get up to speed with all those "terribly complex" changes in Python 3 in about five minutes. Scientific code in particular typically has no advanced unicode handling and no custom CPython extensions, so switching is trivial. I totally agree with you: Py 2 vs 3 is of very little significance to us scientists. W…
http://sourceforge.net/projects/pymol/
Both work on Python 2 only! So guess what, I have to write all the extensions and analysis plugins in Python 2 if want them working with those packages.
Want to even dare trying to move those two packages to Python 3? See you in a decade!
Re: Python 3 can revive Python
#239Anyone who complains about updating their code hasn't done it: upgrading code from Python 2 to Python 3 is dead simple. I've migrated a few large projects manually (not using 2to3 because I wanted to be sure relevant areas of the code were tested). None of these took more than a few hours. Writing code that is compatible with both Python 2 and 3 is a little bit harder, but it's still not prohibitively difficult.
The fact that difficulty of migration is still cited as the main reason for not migrating shows that people simply aren't trying it. So we really have to look at why people aren't trying to migrate. It seems pretty clear to me that people don't see incentives for the change. There's just not enough different about Python 3.
And the author is spot on talking about improving the standard libraries, although I think where they could really get a big win is not necessarily by improving the existing libraries, but by adding new libraries. The thing that got me excited about Python in the first place was the "batteries included" nature of the standard library: so much of what I wanted to do was just an import away. And I'm not the only one who felt that way[1]. But there are tons of holes in the standard library that could be filled with simple wrappers around existing open-source tools or by implementing public standards. Just ones I've run into recently: BSON, AES, RSA. Python supporst SQLite, but what about baking in support for PostgreSQL or MySQL? What about building in a templating engine?
Re: Python 3 can revive Python
#240Earlier quoted context omitted.
My experience was Go was about 2-3x slower (development speed) than Python for prototyping. Web programming, though, which is a particular strength of Python and a particular weakness of Go. YMMV, of course. I actually really do miss list comprehensions and properties and pervasive protocols for built-in types and really concise keyword/literal syntax. I don't miss metaclasses, and I only vaguely miss decorators. (Go…
What are you considering for a prototyping datastore? Postgres? App Engine?