Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Hammertime
May 21, 2003
stop

m0nk3yz posted:

Speaking of decorators, this popped up on pypi this morning - simple threaded/threadpool decorators:
http://pypi.python.org/pypi/threadec/

I'm relatively python ignorant, I've only been learning it for a week or so ...

What's the point of threading in python with the GIL, excluding heavy I/O situations?

I'm ripping through project Euler and tested the multi threading of python/ironpython on one of the problems.

Single threaded python: 24 seconds
Dual threaded python: 35 seconds
Single threaded ironpython: 16 seconds
Dual threaded ironpython: 9 seconds

Note:This was an example containing pure mathematical computation.

I'm a multithreading junkie but it needs to be multi-core viable.

Adbot
ADBOT LOVES YOU

Hammertime
May 21, 2003
stop

duck monster posted:

For what its worth, I tend to use stackless python for multithreading stuff these days. That poo poo scales like crazy. I mean, insane-loving-lala crazy. Coroutines rock.

I'm googling stackless python but I'm not turning up anything that useful.

Do you have a good link or another sentence or two? Does it get around GIL?

I *really* love python, but I also *really* love parallelism at the thread level. I'm buying the django book and I want to bring python in as a language I can leverage in case RoR pisses me off too much(full time software dev).

Edit: I'm stupid, found some good links in another search, interesting stuff, downloading it now, then I'll check out the tutorials.

Home Page (with download): http://www.stackless.com/
Tutorial/walkthrough: http://members.verizon.net/olsongt/stackless/why_stackless.html

Edit2: Well, it removes much of python's threading overhead. Doesn't solve the GIL problem though, still bound to a single core. Neat idea, seems a big waste of effort though, unless I've missed something. :(

Hammertime fucked around with this message at 11:17 on Nov 19, 2007

Hammertime
May 21, 2003
stop

duck monster posted:

Heaps of Stuff

Thanks for the explanation.

You made the threading model/scheduling and scalability really easy to digest.

As others have suggested I'm looking into process level parallelism, parallelpython and such.

Hammertime
May 21, 2003
stop

Typh posted:

Didn't see anyone mention it, but The Definitive Guide to Django: Web Development Done Right is (finally) out.

I bought it in ebook format, but I'm sure it'll be at djangobook.com soon enough.

I've pre-ordered a copy from amazon.

One question:
How have they covered form generation in the book? My django knowledge is very limited but I understand there's oldforms and newforms (which will just be forms when it's ready).

Hammertime
May 21, 2003
stop

m0nk3yz posted:

Dangit, he asked though. He should have read the thread! :argh:

Apologies, I'd actually read the newform articles you'd previously linked to. My question was more in the direction of how the book specifically handles it, since it seems to me the book has been written when quite a lot is still in flux.

i.e. is this book(in paper form) going to be outdated within a month?

  • Locked thread