| Pages: [1] 2 3 :: one page |
| Author |
Thread Statistics | Show CCP posts - 1 post(s) |

Problem Kid
|
Posted - 2010.08.18 00:20:00 -
[1]
In case any of you care here are the new features of 2.7
Python 2.7 was released on July 3rd, 2010.
Python 2.7 is scheduled to be the last major version in the 2.x series before it moves into an extended maintenance period. This release contains many of the features that were first released in Python 3.1. Improvements in this release include:
* An ordered dictionary type * New unittest features including test skipping, new assert methods, and test discovery * A much faster io module * Automatic numbering of fields in the str.format() method * Float repr improvements backported from 3.x * Tile support for Tkinter * A backport of the memoryview object from 3.x * Set literals * Set and dictionary comprehensions * Dictionary views * New syntax for nested with statements * The sysconfig module
I bolded the most important feature with respect to CCP. 
|

Stick Cult
Unspoken Autonomy.
|
Posted - 2010.08.18 00:22:00 -
[2]
you so clever!

Originally by: CCP Tuxford my bad. Rest assured I'm being ridiculed by my co-workers.
|

Jocliutzak
|
Posted - 2010.08.18 00:34:00 -
[3]
I know right but overall the changes don't seem so impressive. The significant thing is that there will be no more updates to the 2.X platform and all users of 2.X will only receive minor bug fixes. Essentially they want everyone to move to 3.X sooner rather then later. Which I don't think will be a smooth transition at all with things as they are.
|

Stick Cult
Unspoken Autonomy.
|
Posted - 2010.08.18 00:38:00 -
[4]
Originally by: Jocliutzak I know right but overall the changes don't seem so impressive. The significant thing is that there will be no more updates to the 2.X platform and all users of 2.X will only receive minor bug fixes. Essentially they want everyone to move to 3.X sooner rather then later. Which I don't think will be a smooth transition at all with things as they are.
No, I doubt moving to 3.x will be smooth especially with CCP's changes to Python. Maybe 2.7 will get a little more speed? I dunno, haven't read about it.
Originally by: CCP Tuxford my bad. Rest assured I'm being ridiculed by my co-workers.
|
|

CCP Fallout

|
Posted - 2010.08.18 00:39:00 -
[5]
More information regarding Python 2.7 will be coming in a blog early next week, actually.
Fallout Associate Community Manager CCP Hf, EVE Online Contact us |
|

Stick Cult
Unspoken Autonomy.
|
Posted - 2010.08.18 00:41:00 -
[6]
Originally by: CCP Fallout More information regarding Python 2.7 will be coming in a blog early next week, actually.
I love you.  
Originally by: CCP Tuxford my bad. Rest assured I'm being ridiculed by my co-workers.
|

Jocliutzak
|
Posted - 2010.08.18 00:48:00 -
[7]
Cool, I know CCP probably works alot with the rest of the python community, probably pushed faster io's a lot because we all know the servers are burdened by io alot. Anyways can't wait to read about it and thanks for the communication.
|

Lalitah My
|
Posted - 2010.08.18 00:58:00 -
[8]
the problem with python how many versions are even released, cant make a ferrari out of a volkswagen,
but the real problem ccp suffers is the neverending queries of a sql database, its slow, has 2 times redundant query routines, its microsoft
looking forward in 17 months ow to fix that, my beliefs are perhaps limited but we will see
|

Barakkus
Brutor tribe
|
Posted - 2010.08.18 01:08:00 -
[9]
Originally by: Lalitah My the problem with python how many versions are even released, cant make a ferrari out of a volkswagen,
but the real problem ccp suffers is the neverending queries of a sql database, its slow, has 2 times redundant query routines, its microsoft
looking forward in 17 months ow to fix that, my beliefs are perhaps limited but we will see
Both PostgreSQL and MySQL have less performance for what CCP is doing with it, plus you can't properly cluster PostgreSQL and MySQL sucks for performance on heavy usage in regards to data manipulation. The only other possibilty for them is Oracle, and well that's a bloated piece of crap.
Originally by: CCP Dropbear
rofl
edit: ah crap, dev account. Oh well, official rofl at you sir.
|

pmchem
Minmatar GoonWaffe Goonswarm Federation
|
Posted - 2010.08.18 01:24:00 -
[10]
Originally by: CCP Fallout More information regarding Python 2.7 will be coming in a blog early next week, actually.
Python 2.7 had so many changes it's virtually impossible to speculate about what CCP was interested in, but I'll take a shot anyway:
from http://docs.python.org/dev/whatsnew/2.7.html
http://bugs.python.org/issue4074 scalability improvement in list building http://bugs.python.org/issue4688 garbage collection (memory management) speedup http://bugs.python.org/issue5084 pickling memory+speed optimization http://bugs.python.org/issue5670 pickling speedup when dealing with dicts http://bugs.python.org/issue3582 windows-specific threading optimization
or maybe it's just groundwork for multicore programming since all the python parallel programming related toys tend to do their development with recent releases of python, e.g. http://mpi4py.scipy.org/
|

stoicfaux
|
Posted - 2010.08.18 01:40:00 -
[11]
Originally by: pmchem
from http://docs.python.org/dev/whatsnew/2.7.html
http://bugs.python.org/issue4074 scalability improvement in list building http://bugs.python.org/issue4688 garbage collection (memory management) speedup http://bugs.python.org/issue5084 pickling memory+speed optimization http://bugs.python.org/issue5670 pickling speedup when dealing with dicts http://bugs.python.org/issue3582 windows-specific threading optimization
or maybe it's just groundwork for multicore programming since all the python parallel programming related toys tend to do their development with recent releases of python, e.g. http://mpi4py.scipy.org/
I know Python is used in the client, but I just can't imagine Python being used on the server side, so I wouldn't think that performance was a major reason for upgrading.
----- "Are you a sociopathic paranoid schizophrenic with accounting skills? We have the game for you! -- Eve, the game of Alts, Economics, Machiavelli, and PvP"
|

Liang Nuren
Parsec Flux War.Pigs.
|
Posted - 2010.08.18 01:45:00 -
[12]
Originally by: stoicfaux I know Python is used in the client, but I just can't imagine Python being used on the server side, so I wouldn't think that performance was a major reason for upgrading.
I'd be very surprised if Python isn't used on the server.
-Liang -- Eve Forum ***** Extraordinaire On Twitter Blog
|

Xessej
|
Posted - 2010.08.18 01:50:00 -
[13]
Originally by: stoicfaux I know Python is used in the client, but I just can't imagine Python being used on the server side, so I wouldn't think that performance was a major reason for upgrading.
Python is definitely the primary programming language of the server code. According to CCP's own statements only performance critical code is being converted to C++.
I know its crazy but that's is what they've said many times.
|

Mr LaForge
|
Posted - 2010.08.18 01:54:00 -
[14]
Their entire codebase needs to become C++. Its more stable and its faster. And if they rewrite it then we can finally stop kicking the POS dead horse.
|

Stick Cult
Unspoken Autonomy.
|
Posted - 2010.08.18 01:58:00 -
[15]
Originally by: Mr LaForge Their entire codebase needs to become C++. Its more stable and its faster. And if they rewrite it then we can finally stop kicking the POS dead horse.
It should, yea, but it never will.
Originally by: CCP Tuxford my bad. Rest assured I'm being ridiculed by my co-workers.
|

Xessej
|
Posted - 2010.08.18 02:06:00 -
[16]
It's kind of amazing that the original designer(s) thought an interpreted scripting language was the way to go in developing a MMO. At this point it is way past time that all new code be in C++ and some team be chugging away at converting the codebase. Unfortunately they seem attached to Python which means they will never achieve the performance they could get.
|

Lykouleon
Trust Doesn't Rust Mostly Cookie
|
Posted - 2010.08.18 02:08:00 -
[17]
Originally by: Mr LaForge Their entire codebase needs to become C++.
...I hope you're kidding. Recoding the whole game from Python + C++ to only C++ would be enough to make any software developer hang themselves
Quote: Aedun Sole > flying with lyk is like flying a bus filled with 5 year old children
|

stoicfaux
|
Posted - 2010.08.18 02:27:00 -
[18]
You profile the code to see where the bottlenecks are and convert them to C++. It's too expensive and unnecessary to convert everything to C++/C/hand-crafted assembly.
One of my beefs with Python is that a strongly typed language that's only strongly typed at runtime can be pretty expensive to troubleshoot (i.e., you only find typecast errors when you actually run a given line of with a given set of objects.) I've always considered it pretty bad when a language has less compile time checking than Perl.
I'd be interested to hear what kind of code testing procedures they have in place to deal with a large Python project.
----- "Are you a sociopathic paranoid schizophrenic with accounting skills? We have the game for you! -- Eve, the game of Alts, Economics, Machiavelli, and PvP"
|

Spurty
Caldari D00M. Northern Coalition.
|
Posted - 2010.08.18 03:17:00 -
[19]
Ah, I'm still updating out of date 2.4 stuff I wrote way back >.<
|

Xianthar
STK Scientific The Initiative.
|
Posted - 2010.08.18 03:47:00 -
[20]
You really think that the programming language chosen is the key to performance? interpreted or not?
Architecture is many times more important. If your solution to a scalability problem is to throw faster CPU cores at the issue, your doing it wrong.
google probably has the most robust distributed architecture currently in existence, they process terabytes of data per day and demand high levels of performance for all services.
they use a mixture of java, python and C++ on the backend, 2 of 3 are interpreted and the last is likely used in performance critical parts of the code. Sound familiar?
The limiting factor for eve in its current incarnation is the python GIL, some of the features of 2.7, specifically in the area of message passing could be a catalyst to improve communication between node processes, allowing greater horizontal scaling in the future, which given the trend of cpu development, is the only path forward.
Some attempts to remove the python GIL have been made, the results showed that fine grain locking resulted in a performance loss until the 3-4 core per process range was reached. Thats not sustainable today from a hardware perspective.
Eve's code is written around the concept of green threads (aka stackless python), changing that now would probably require a full rewrite, which isn't going to happen.
|

Aera Aiana
Amarr
|
Posted - 2010.08.18 04:30:00 -
[21]
Edited by: Aera Aiana on 18/08/2010 04:30:47
Originally by: Xessej It's kind of amazing that the original designer(s) thought an interpreted scripting language was the way to go in developing a MMO.
I think they cared more about producing some revenue first, given that uh, they couldn't pay their bills at the time.
Originally by: Xessej At this point it is way past time that all new code be in C++ and some team be chugging away at converting the codebase. Unfortunately they seem attached to Python which means they will never achieve the performance they could get.
In an ideal world I'm sure they'd like to do that. But in this world, they probably figure it would be best to start with the performance sensitive code. -
|

Liang Nuren
Parsec Flux War.Pigs.
|
Posted - 2010.08.18 04:45:00 -
[22]
Edited by: Liang Nuren on 18/08/2010 04:46:40
Originally by: Mr LaForge Their entire codebase needs to become C++. Its more stable and its faster. And if they rewrite it then we can finally stop kicking the POS dead horse.
Originally by: Mr LaForge Its more stable and its faster.
Originally by: Mr LaForge Its more stable
Originally by: Mr LaForge more stable
Originally by: Mr LaForge more stable
Originally by: Mr LaForge stable
Uh huh. Yeah. Sure it is. Its also a million times easier to program in, maintain, and change. 
Here's an interesting test for you: Euler #4 A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99. Find the largest palindrome made from the product of two 3-digit numbers.
C++:
#include <vector> #include <iostream> #include <sstream> #include <algorithm> #include <string>
using namespace std;
int is_palindrome(int possible_answer);
int main(int argc, char ** argv) { vector<int> answers; for (int possible_answer = 100 * 100; possible_answer < 999 * 999; ++possible_answer) { for (int possible_divisor = 100; possible_divisor < 999; ++possible_divisor) { if ( possible_answer / possible_divisor >= 100 && possible_answer / possible_divisor <= 999 && possible_answer % possible_divisor == 0 && is_palindrome(possible_answer) ) { answers.push_back(possible_answer); } } }
cout << "The palindrome is " << *max_element(answers.begin(), answers.end()) << endl;
return EXIT_SUCCESS; }
int is_palindrome(int possible_answer) { string first_half, second_half; ostringstream ostr; ostr << possible_answer;
if (ostr.str().length() % 2 != 0) return 0;
first_half = ostr.str().substr(0, ostr.str().length() / 2); second_half = ostr.str().substr(ostr.str().length() / 2, ostr.str().length());
reverse(second_half.begin(), second_half.end());
if (first_half == second_half) return 1; else return 0; }
vs
Python:
def construct_palindrome(n): s = str(n) return int(s + s[::-1])
def is_divisible_by_three_digit_numbers(n): for x in range(999, 100, -1): div, mod = divmod(n, x) if mod == 0 and div < 1000 and div >= 100: return True return False
for n in range(999, 100, -1): pal = construct_palindrome(n) if is_divisible_by_three_digit_numbers(pal): print(pal) break
XXX@XXXXXXX$ time ./problem4 The palindrome is 906609
real 0m9.370s user 0m9.370s sys 0m0.000s
XXX@XXXXXXX$ time python problem4.py The palindrome is 906609
real 0m0.038s user 0m0.030s sys 0m0.005s
Life is about more than your programming language's speed. Its also about how it encourages you to think about problems and how easy it is to maintain.
-Liang
Ed: code tags. Also, I don't claim either implementation is necessarily great - in fact I deliberately did a bad job with C++ to illustrate my point. -- Eve Forum ***** Extraordinaire On Twitter Blog
|

AccesiViale
Gallente The Artful Dodgers
|
Posted - 2010.08.18 05:14:00 -
[23]
Edited by: AccesiViale on 18/08/2010 05:17:17
Originally by: Liang Nuren
Life is about more than your programming language's speed. Its also about how it encourages you to think about problems and how easy it is to maintain.
So ... well planned and executed OO C++ would def be the better route ...
People capable of doing this well are too expensive and dev time is slower which doesn't really fit with CCP's 10 new unfinished features every 6 months model.
Eve lacks so much polish if it were a car wed be looking at hand pounded sheet metal with a single coat of primer on it so really anybody who things there is even the slightest chance of a total rewrite for a predominantly C/C++ codebase is seriously off their rocker.
I <3 C++ but I think it's just a bit too rigid to use alone...not just because I have no faith in CCP but also game dev should be a bit more flexible then say...telcom or operating system code.
... just a lowly code monkeys opinion
edit: lol liang i wonder how many peoples eyes glaze over at the beginning of your post before they skip to the bottom and hit reply. The sky was blue but there was no god. |

Liang Nuren
Parsec Flux War.Pigs.
|
Posted - 2010.08.18 05:24:00 -
[24]
Edited by: Liang Nuren on 18/08/2010 05:26:39
Originally by: AccesiViale So ... well planned and executed OO C++ would def be the better route ...
You're wrong in so many ways. As I said - it does not matter whether your C++ is well planned and executed OO code. It really doesn't - the cost of ownership is much higher than if you'd used a higher level language that simply has less overhead and less to keep in mind.
Let me ask it to you this way: If you hand the best engineer/mechanic (depending on your biases) the schematics for a car and tell them to build it from super low level parts... do you think that this car will run faster and be less maintenance free than a car put together from off the shelf parts? Of course not - there are huge advantages from being able to slap a prefab door on the side of the car instead of building the door yourself before throwing it on the car.
And of course the real kick in the nuts comes when someone comes along and says "yeah that's great but I really wanted the leather seats". "I'm gonna need lots of leather. Someone call the butcher."
-Liang
Ed: BTW, I agree with most of your post. C++ is fantastic in parts of the code.... but most of the time its just going to get in the way of what you want to do. At work we use C++ where it's appropriate and higher level languages for the bulk of the development.
Quote: edit: lol liang i wonder how many peoples eyes glaze over at the beginning of your code sections post before they skip to the bottom and hit reply...or simply avoid this thread all together
 -- Eve Forum ***** Extraordinaire On Twitter Blog
|

HenkieBoy
Best Path Inc. Atlas Alliance
|
Posted - 2010.08.18 05:30:00 -
[25]
Edited by: HenkieBoy on 18/08/2010 05:30:25
Originally by: Lalitah My the problem with python how many versions are even released, cant make a ferrari out of a volkswagen,
but the real problem ccp suffers is the neverending queries of a sql database, its slow, has 2 times redundant query routines, its microsoft
looking forward in 17 months ow to fix that, my beliefs are perhaps limited but we will see
Oracle being the only real other option, they suck. Their product may be good but they are really bad for any company. They ask bucket loads of money for even the most trival options.
I think CCP has a direct line with Microsoft to solve any problem they encounter. Microsoft can learn alot from EVE and CCP can use alot of help on the database part.
|

Xessej
|
Posted - 2010.08.18 05:31:00 -
[26]
Originally by: Liang Nuren A bunch of BS-Liang
Ed: code tags. Also, I don't claim either implementation is necessarily great - in fact I deliberately did a bad job with C++ to illustrate my point.
You intentionally wrote bad code as if that would prove anything. Any code you can write in Python I can write in C++ and it will run faster (Python is written in C++ and is typeless so it has to produce less efficient code than well written C++ that is a simple fact.)
|

Liang Nuren
Parsec Flux War.Pigs.
|
Posted - 2010.08.18 05:41:00 -
[27]
Edited by: Liang Nuren on 18/08/2010 05:42:41
Originally by: Xessej You intentionally wrote bad code as if that would prove anything. Any code you can write in Python I can write in C++ and it will run faster (Python is written in C++ and is typeless so it has to produce less efficient code than well written C++ that is a simple fact.)
Congratulations for completely missing the point. See, the point was that its all about the algorithm. People say "Switch to C++!" like its some magic cure-all but the truth of the matter is that its likely to be an enormous time investment for very little performance gain - if any. And that argument totally neglects how easy it is to maintain one over the other.
Consider: XXX@XXXXXXX$ cat s2.C
#include <fstream>
using namespace std;
int main(int argc, char ** argv) { ofstream of("output_file.txt", ios::out); for (int i = 0; i < 1000000; ++i) of << i << endl; of.close(); return EXIT_SUCCESS; }
XXX@XXXXXXX$ cat p2.py
fp = file('output_file.txt', 'w') for x in range(1000000): fp.write("%d\n" % x) fp.close()
XXX@XXXXXXX$ time ./s2
real 0m1.215s user 0m0.290s sys 0m0.919s XXX@XXXXXXX$ time python p2.py
real 0m1.074s user 0m1.010s sys 0m0.060s
And yes, I compiled it with O3.
-Liang
Ed: code tags. -- Eve Forum ***** Extraordinaire On Twitter Blog
|

Liang Nuren
Parsec Flux War.Pigs.
|
Posted - 2010.08.18 05:44:00 -
[28]
Edited by: Liang Nuren on 18/08/2010 05:45:28
Originally by: HenkieBoy
Oracle being the only real other option, they suck. Their product may be good but they are really bad for any company. They ask bucket loads of money for even the most trival options.
Excuse me, but PostgreSQL and many other open source (free!) databases would like a word with you. And yes I know for fact that you can achieve amazing performance out of a single instance Postgres DB
-Liang
Ed: Um. I decided that I would delete part of my post. It is sufficient to /fanboi without going over the top with technical details. -- Eve Forum ***** Extraordinaire On Twitter Blog
|

Xessej
|
Posted - 2010.08.18 05:49:00 -
[29]
Originally by: Liang Nuren Edited by: Liang Nuren on 18/08/2010 05:42:41
Originally by: Xessej You intentionally wrote bad code as if that would prove anything. Any code you can write in Python I can write in C++ and it will run faster (Python is written in C++ and is typeless so it has to produce less efficient code than well written C++ that is a simple fact.)
Congratulations for completely missing the point. See, the point was that its all about the algorithm. People say "Switch to C++!" like its some magic cure-all but the truth of the matter is that its likely to be an enormous time investment for very little performance gain - if any. And that argument totally neglects how easy it is to maintain one over the other.
You do know that your metrics are meaningless since you are intentionally writing inefficient C++ code and comparing it to efficient (well as efficient as Python can get) Python.
|

AccesiViale
Gallente The Artful Dodgers
|
Posted - 2010.08.18 05:52:00 -
[30]
Less maintenance with prefab...maybe
Faster(lol continued car analogy) definitely. You'd dump the prefab parts on them and they'd say "well this engine is **** but ill do what I can...thanks...i guess"
If someone wanted the leather seats they should have had them in the spec before hand. Good planning makes for a good product. Adding and cutting features right up until release is awful but done anyway as we see with CCP all the time. :)
I guess i just wish CCP was "Ferrari" but I'd be happy to settle for Volvo. Right now it seems they like to drift in 80 4banger mustangs.
*sigh* car analogies.
Cool to see someone even spend the time throwing a small test to illustrate a point. Code <3 The sky was blue but there was no god. |
| |
|
| Pages: [1] 2 3 :: one page |
| First page | Previous page | Next page | Last page |