|
Bozart posted:This, 1000 times. IANAWU (I am not a windows user) - but during the 2.6 release process, I had some multiprocessing bugs that came up on windows I needed to break the vmware out for. I can not even begin to image the pain of regular windows users when it comes to the windows build process. I eventually gave up, winged the patch and deleted the VM. Also, gently caress mingw.
|
# ? Sep 30, 2008 19:21 |
|
|
# ? May 11, 2024 16:52 |
|
m0nk3yz posted:IANAWU (I am not a windows user) - but during the 2.6 release process, I had some multiprocessing bugs that came up on windows I needed to break the vmware out for. I can not even begin to image the pain of regular windows users when it comes to the windows build process. I eventually gave up, winged the patch and deleted the VM. Also, gently caress mingw. I tend to roll my eyes whenever David Hanssen (the Rails guy) speaks, but he said something relatively fitting a couple years ago, something about how "web developers who continue choosing to develop primarily on Windows will become increasingly marginalized", and I think that sentiment can be extended generally (not just Web development). Unix (and by extension OS X, system framework problems aside) is just such a better development environment in almost every fashion. It's a real shame Microsoft had to do their own thing back when they started DOS/Windows; I'm imagining a world where they did what Apple did circa 2001, and took Unix and put their own stuff on top of it. It'd be a very different climate, I feel (although I doubt they'd approach it quite the same way Apple did). /derail
|
# ? Sep 30, 2008 19:51 |
|
bitprophet posted:I'm imagining a world where they did what Apple did circa 2001, Lets all run Xenix and AUX
|
# ? Sep 30, 2008 20:50 |
|
m0nk3yz posted:IANAWU (I am not a windows user) - but during the 2.6 release process, I had some multiprocessing bugs that came up on windows I needed to break the vmware out for. I can not even begin to image the pain of regular windows users when it comes to the windows build process. I eventually gave up, winged the patch and deleted the VM. Also, gently caress mingw. This literally made me reinstall linux after staying with windows for 3 years.
|
# ? Sep 30, 2008 20:54 |
|
bitprophet posted:I tend to roll my eyes whenever David Hanssen (the Rails guy) speaks, but he said something relatively fitting a couple years ago, something about how "web developers who continue choosing to develop primarily on Windows will become increasingly marginalized", and I think that sentiment can be extended generally (not just Web development). my company is an ASP.NET shop and they haven't upgraded to 2008 yet because it actually costs money to upgrade the IDE because in order to write the programs you need so much boilerplate automagically done by the IDE it's not even funny.
|
# ? Sep 30, 2008 21:07 |
|
I hope you're just being silly and aren't missing the fact that I'm alluding to OS X A/UX is a cute historical footnote but isn't what I was going for.
|
# ? Sep 30, 2008 22:33 |
|
I guess what I'm trying to say that both companies have dabbled in unix before.
|
# ? Oct 1, 2008 00:10 |
|
tef posted:I guess what I'm trying to say that both companies have dabbled in unix before. Right, but Apple has actually gone a very long ways with it now and made a very compelling OS with the idea; Microsoft hasn't. Anyway...this is no longer Python related, so I'll shut up now
|
# ? Oct 1, 2008 01:41 |
|
ahem http://www.andlinux.org/ Basically installs linux as a windows process. Note: Not a VM, its a linux kernel that runs on windows, and it all works rather well. Similar sort of experience to parallells on the mac I guess. edit: Or just run parallells on a mac
|
# ? Oct 1, 2008 06:59 |
|
How do you reset an iterator in a for loop?code:
|
# ? Oct 2, 2008 07:31 |
|
my stepdads beer posted:How do you reset an iterator in a for loop? code:
|
# ? Oct 2, 2008 07:47 |
|
Yeah, I'm coming from C. Thanks for the quick response!
|
# ? Oct 2, 2008 08:01 |
|
2.6 is out, w00t!
|
# ? Oct 2, 2008 12:30 |
|
Yup, as Bonus pointed out, 2.6 is live: http://www.python.org/download/releases/2.6/ I posted a bit of info about the changes, and the MP package too: http://jessenoller.com/2008/10/02/python-26-is-released/
|
# ? Oct 2, 2008 14:35 |
|
2.6!
|
# ? Oct 2, 2008 14:58 |
|
Congrats m0nk3yz (and the rest of the core team obviously)! I wish I was more excited, though; I'm not even making use of everything new in 2.5, and it feels like only yesterday that 2.5 even became widely available in package managers, versus 2.4. So it's not like I'll realistically be able to make use of 2.6 in a "run on something that's not my personal workstation" capacity for goodness knows how long Still! The road to 3.0...
|
# ? Oct 2, 2008 15:20 |
|
bitprophet posted:Congrats m0nk3yz (and the rest of the core team obviously)! I know, that's what sucks. One of the biggest reasons we dropped 3.0 on the floor was to get 2.6 done soon enough to be able to be included in things like Snow Leopard, and the rest of the OS ecosystem.
|
# ? Oct 2, 2008 15:53 |
|
Hooray, python 2.6! (Too bad we probably won't start using it at work until some time after the heat death of the universe.) Now, a question: does anyone know of an already-existing SOAP filter (2.2) or hook (3.0) for cherrypy? I'm sticking a SOAP API into an existing cherrypy URL tree, and I would prefer to not have to hack one together myself out of SOAPpy or something similar. Thanks!
|
# ? Oct 2, 2008 15:54 |
|
I have a huge array (400k+) of dicts that I'm trying to work with without iterating over the list multiple times since it's a time-sensitive execution. I'm trying to just break out the value of the dictionary back into the array. [{'DxY': 17L}, {'DxY': 9L}, {'DxY': 8L}, ............ {'DxY': 7L}, {'DxY': 6L}, {'DxY': 4L}] What I want is [17L, 9L, 8L, ..........., 7L, 6L, 4L] but, without having to do something like code:
The list I'm receiving is already sorted and I'm trying to find out what position a new integer would be in the list. I don't need to insert it just identify the position. I was planning on using bisect to identify the position in the array since it's a pretty optimized function ATLbeer fucked around with this message at 16:09 on Oct 2, 2008 |
# ? Oct 2, 2008 16:04 |
|
Use generators! (What a surprise! )code:
|
# ? Oct 2, 2008 16:10 |
|
Bonus posted:Use generators! (What a surprise! ) Grr... I always forget about generators. I need to just write a few hundred and play with them so they get stuck in my head. Unfortunately in this case (I updated my OP) I don't know if a generator is going to be the best solution since I don't need (or really want) to iterate over the list I need to search through the list. Or do I need to get another coffee? vvv I'm not storing them that way. I'm just getting them that way. I'm looking at trying to solve it upstream ATLbeer fucked around with this message at 16:43 on Oct 2, 2008 |
# ? Oct 2, 2008 16:12 |
|
ATLbeer posted:I have a huge array (400k+) of dicts that I'm trying to work with without iterating over the list multiple times since it's a time-sensitive execution. I'm trying to just break out the value of the dictionary back into the array. Are the dicts always 1 entry, with the key DxY? Why are you even storing them like this, since the DxY is constant?
|
# ? Oct 2, 2008 16:13 |
|
Then you can just implement normal bisection on the list that you have, only instead of doing your_list[x], you do your_list[x]['DxY'].
|
# ? Oct 2, 2008 16:19 |
|
m0nk3yz posted:Yup, as Bonus pointed out, 2.6 is live: http://www.python.org/download/releases/2.6/ I gotta say the MP package looks great. This will probably be the first thing I play around with in 2.6
|
# ? Oct 2, 2008 16:35 |
|
Oh hey the BSD DB lib is getting axed in 3.0... Did anyone ever actually use that thing for anything? I'd of thought that SQLlite has been the flat file db of choice for a while now
|
# ? Oct 2, 2008 16:45 |
|
Bonus posted:Use generators! (What a surprise! ) 4x factor improvement... I'm def going to start practicing generators
|
# ? Oct 2, 2008 16:59 |
|
duck monster posted:Oh hey the BSD DB lib is getting axed in 3.0... Did anyone ever actually use that thing for anything? I'd of thought that SQLlite has been the flat file db of choice for a while now One of the problems with it is the lack of maintenance, no one takes care of it, so it's just gonna split from the main core, if someone needs it they can make it a module.
|
# ? Oct 2, 2008 17:14 |
|
bitprophet posted:Congrats m0nk3yz (and the rest of the core team obviously)! While I agree, 2.5 does have basically one of the better things of 2.6 which is context managers. Also 2.6 starts moving towards more PEP8 compatibility and the new print() which is always a good thing. 2.6 is more of a revision IMHO but a good solid step forward.
|
# ? Oct 2, 2008 17:17 |
|
deimos posted:While I agree, 2.5 does have basically one of the better things of 2.6 which is context managers. Also 2.6 starts moving towards more PEP8 compatibility and the new print() which is always a good thing. 2.6 is more of a revision IMHO but a good solid step forward. That's true, a few of the 2.6 stuff leaked into 2.5, didn't it...and yes, I'm well aware that 2.6 is largely a stepping-stone release to help folks get onto 3.0, but I still won't be able to do stuff like aforementioned new print() until I can expect to use 2.6 everywhere. Poop. Ironically...this may matter less as I find myself moving at least partially into the Ruby/Rails camp, due to my job (Rails and PHP shop, and christ do I hate PHP, and sadly can't spend 100% of my time doing my sysadmin duties). Speaking of which, I plan to "open up" a blog (don't have one yet) with a series of posts comparing -- at a realistic, daily-usage level -- the two ecosystems (Ruby/Rails vs Python/Django). I haven't seen anything else at this level, just high level overviews, which makes sense -- I expect very few people would ever be in my situation, being well versed in one framework but essentially "forced" to become fluent in another. Most people will get good at one and then stick with it due to simple inertia if nothing else. Anyone find that idea interesting? Wonder if it would make sense to do it as a thread here instead -- I definitely plan to get feedback, somehow, from both sides, as I expect to miss or misunderstand some stuff
|
# ? Oct 2, 2008 18:22 |
|
Sounds really interesting - be sure to submit it to sn.printf.net so it shows up in my goon feed.
|
# ? Oct 2, 2008 18:31 |
|
bitprophet posted:I haven't seen anything else at this level, just high level overviews, which makes sense -- I expect very few people would ever be in my situation, being well versed in one framework but essentially "forced" to become fluent in another. Most people will get good at one and then stick with it due to simple inertia if nothing else. I am stuck doing ASP.NET 2.0 (VS 2k5) and I miss django so much.
|
# ? Oct 2, 2008 19:46 |
|
So I just decided to give pyglet another shot, since everyone here was raving about how much the sprite performance has improved. I wrote a simple program to display 400 sprites on the screen, and I'm only getting about 15fps. I think I might be doing it wrong though. I'm creating and populating a new sprite batch in my draw method, because eventually I'll be moving around the screen and replacing sprites with new ones and such. Should I actually be keeping a static sprite batch and manually updating the properties of the sprites in every iteration of my draw method? Seems like a really wonky way of doing things. edit: Actually, I just tried that and it's not much better. If I only create as many sprites as are on the screen, it's great, but since I'm keeping a static batch, I need to create sprites for all the off-screen objects instead, and that seems to slow it down horribly. I guess I could remove the sprites from the batch when they go off the screen, and add them back in when they come back on? Seems like an awful lot of work compared to sprites in pygame though. SlightlyMadman fucked around with this message at 21:46 on Oct 2, 2008 |
# ? Oct 2, 2008 21:32 |
|
JoeNotCharles posted:Sounds really interesting - be sure to submit it to sn.printf.net so it shows up in my goon feed. I added m0nk3ys blog to sn.printf.net, on the asumption he doesn't mind being associated with goons
|
# ? Oct 3, 2008 11:18 |
|
deimos posted:While I agree, 2.5 does have basically one of the better things of 2.6 which is context managers. OK, I surrender. What's a "context manager"?
|
# ? Oct 3, 2008 12:05 |
|
tef posted:I added m0nk3ys blog to sn.printf.net, on the asumption he doesn't mind being associated with goons It's all good
|
# ? Oct 3, 2008 13:38 |
|
outlier posted:OK, I surrender. What's a "context manager"? Well that's a loaded question - it's funny, I wrote an article on context managers for Python Magazine, it was in the July issue. In a nutshell, Context Managers came about with PEP 343 (http://www.python.org/dev/peps/pep-0343/)- PEP 343 defines a new keyword "with", which allows you to refactor the normal: code:
code:
Here's one of my favorite examples: code:
code:
When I am done putting things to be processed in the queue, and the inner function exits - the __exit__ method is called, and the queue is shut down gracefully. In order to use context managers - you don't need to create your own classes, you can instead use contextlib to decorate functions which can yield control internally to achieve the same effect. For more on contextlib, see: http://blog.doughellmann.com/2008/05/pymotw-contextlib.html Hope that helps.
|
# ? Oct 3, 2008 13:57 |
|
m0nk3yz posted:I wrote an article on context managers for Python Magazine, it was in the July issue. I love that magazine, and I loved your article. (Had no idea about the goon connection.)
|
# ? Oct 3, 2008 20:57 |
|
I've been writing stuff in python pretty much every day for a year and it's only now coming to my attention how little of the language I'm actually using day-to-day. Context management seems exciting and I'm looking forward to getting better. I think this was floated earlier in reference to podcasts, but what are the python RSS I should consider staying with. I think I'm interested in items similar to "here's a feature you might be under-utilizing, and here's why it's useful." Lurchington fucked around with this message at 03:09 on Oct 6, 2008 |
# ? Oct 6, 2008 03:06 |
|
Sounds like you'd enjoy the Python Module of the Week. It runs the gamut from the mundane parts of the standard library to stuff you didn't even realize existed. The articles are pretty thorough and include example code. There's also Planet Python (and its unofficial counterpart) if you want to keep up on what any number of people on the web are blogging about.
|
# ? Oct 6, 2008 03:19 |
|
|
# ? May 11, 2024 16:52 |
|
Thanks for both of those. I need something informative to balance out 5 simulataneous listings for a new Gameboy DS color scheme
|
# ? Oct 6, 2008 04:03 |