News for hackers. Stuff that matters.
Re:Python has a GIL, and lots of complainers by nailer on Friday July 09, 2010 @06:03PM (#1502371)
I think it's OK to have an opinion on anything you like. You shouldn't expect anyone to fix it for free though.

I've never written a VM, and I don't think I'd be very good at it. I've written useful modules other people use, spoken at a Python conference, and have other OSS code in various places. I'm not a succubus, at least I hope I'm not. I don't even mind multithreading in Python, since I use Threads and Queues and they work just fine for my purposes. But I'm sure, other more cooler things would happen if CPython had the same kind of multithreaded coolness that Jython and IronPython have. I don't think it makes me a bad person if I say that.

Re:Python has a GIL, and lots of complainers by nkurz on Saturday July 10, 2010 @02:31AM (#1503189)
I agree: it's good to have and to express opinions. But as you point out there is a real difference between "wouldn't it be cool if..." and "you really should be working on this problem of mine" instead of doing whatever it is you currently think is more important.

I don't even really know who is right about a Python GIL. When working with C, I have a strong preference for separate processes and mmaps. When working with Perl (which I use a lot more than Python), I've never really felt much urge to use threading. Aesthetically, although I haven't really used it, I think Erlang's message passing approach is much better than native threads. But maybe Gustavo's right --- better threading would indeed allow lots of cool things to be done.

That aside, what saddens me about the exchange between Gustavo and Brett is the misconnect. It strikes me as obvious that the key for Gustavo here is to show that it's in Brett's self-interest to improve threading in Python. I didn't see any attempt of this. Instead, he seems to be taking exactly the tack Brett just finished saying was ruinous to his morale.

Re:Python has a GIL, and lots of complainers by jnoller on Saturday July 10, 2010 @09:17AM (#1503587)
Except Gustavo is wrong in that he has to convince Brett that free threading is a Good Thing. Part of Brett's post was we already know that - but we're not willing to sacrifice backwards compatibility for it, and we do not have/have not thought of any good solutions to fix it.

So having people say "this sucks you guys should fix it" 100x a day, with increasing levels of "you owe me" or "you suck" tone in their voices is depressing and frustrating.

Re:Python has a GIL, and lots of complainers by j_baker on Saturday July 10, 2010 @10:27AM (#1503673)
I don't disagree with you, but that's just part of working on a popular project. There are plenty of armchair language designers who could of course do everything better than you.
Re:Python has a GIL, and lots of complainers by jnoller on Saturday July 10, 2010 @11:27AM (#1503776)
Oh, I agree with you! But I think we both know that while we all end up growing thick skins (or quitting) it can still get under your nails and make you sad sometimes.

Especially when you've been at it awhile. Guido must have skin like a bloody rhinoceros.

Re:Python has a GIL, and lots of complainers by silentbicycle on Friday July 09, 2010 @11:26PM (#1502961)
> I've never written a VM, and I don't think I'd be very good at it.

It's really not that hard. You don't even have to use C, you can do it in Python. Can you write a brainfuck interpreter? Congratulations, you now have a virtual machine with eight bytecodes. Build from there.

Kein-Hong Man's "No-Frills Guide" to the Lua VM documents one set of reasonably general bytecodes. (http://luaforge.net/docman/view.php/83/98/ANoFrillsIntroToLu...) There's a good section on virtual machines in the last chapter of _The Practice of Programming_, too.

Re:Python has a GIL, and lots of complainers by jnoller on Saturday July 10, 2010 @11:29AM (#1503779)
The trick to writing a good interpreter is not in the writing of it; it's in the part wherein you manage to completely avoid making any decisions you might regret in 10 years.
Re:Python has a GIL, and lots of complainers by silentbicycle on Saturday July 10, 2010 @06:36PM (#1504473)
Oh, sure. :) But a lot of people seem to find them impossibly intimidating, one of those things that are "perceived to be magical artifacts, carefully crafted by the wizards, and unfathomable by the mere mortals."* They're really not that tricky at an implementation level, until/unless you're going for extremely high performance.

Keeping reverse compatibility is a huge pain, though. No argument there!

* From Abdulaziz Ghuloum's excellent "An Incremental Approach to Compiler Construction" (http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf).

Re:Python has a GIL, and lots of complainers by jacobolus on Friday July 09, 2010 @08:04PM (#1502654)
It makes you an annoying person if you say it without any research, and without even reading any of the decade of accumulated identical discussions, on the mailing list devoted to python development, distracting contributors from actually fruitful discussions and developments.
Re:Python has a GIL, and lots of complainers by tomjen3 on Friday July 09, 2010 @08:29PM (#1502713)
>I've never written a VM, and I don't think I'd be very good at it

Don't be so sure, there are a lot of research in this area and it is not black magic.

Re:Python has a GIL, and lots of complainers by aarongough on Friday July 09, 2010 @08:58PM (#1502753)
I agree! I'm actually in the process of writing my first VM right now, and it's not as hard as you would think...
Re:Python has a GIL, and lots of complainers by mkramlich on Saturday July 10, 2010 @12:33AM (#1503043)
All projects are easy at the start. See I just open this empty file here and start typing...
Re:Python has a GIL, and lots of complainers by aarongough on Saturday July 10, 2010 @01:02PM (#1503950)
Whoever said I was at the start? The prototype is nearly done, and already working in the meantime.
Re:Python has a GIL, and lots of complainers by mkramlich on Saturday July 10, 2010 @02:24PM (#1504092)
"The prototype is nearly done."

you're still pretty early in the project's lifecycle. software projects generally move fastest and have the least difficult challenges early on, as a general rule, in my experience. once you have a lot of users, and legacy dependencies, and have to work right on N platforms, and handle edge cases, and be performant, and the codebase becomes so big you no longer remember all the details, and maybe a few years have passed since you were working on it full-time, etc., then you'll find that velocity and agility decreases.