These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE General Discussion

 
  • Topic is locked indefinitely.
 

Quick question for Devs - Why Python?

Author
Jett0
Ministry of War
Amarr Empire
#1 - 2011-10-08 15:25:33 UTC
I've started learning some programming, and I've been poking around various languages.

If I'm reading the dev blogs correctly, EvE runs on a fork of Python known as Stackless Python, with parts coded in C. I assume Python forms the backbone while C is used for speed-critical sections.

Regardless, everything I've read states that Python sacrifices speed for simplicity. Out of curiosity, I'm wondering what benefits Python brings to development that would outweigh more efficient and equally supported languages like C++. If you knew then what you know now, would you have done something differently?

Anyone with knowledge, feel free to contribute.


P.S. While I'm at it, what does Dust run on?

Occasionally plays sober

mechtech
Ice Liberation Army
#2 - 2011-10-08 16:18:52 UTC
CCP is moving some of their code over to C++ as a part of the CARBON initiative, and they're not just doing it for fun either.

Dust is running on Unreal 3 with the tight hardware restraints of consoles, and will almost certainly not use any python.
Apollo-Moor
Republic Military School
Minmatar Republic
#3 - 2011-10-08 17:36:53 UTC
mechtech wrote:
CCP is moving some of their code over to C++ as a part of the CARBON initiative, and they're not just doing it for fun either.

Dust is running on Unreal 3 with the tight hardware restraints of consoles, and will almost certainly not use any python.


PS3 doesn't have many hardware constraints. It's more the coding on PS3 that hangs developers up. Cuase that's one powerful piece of equipment.
Count Austheim
Redemption Denied
#4 - 2011-10-08 17:52:44 UTC
Coding seems like alot of hard work.

If this ships a´rockin, then im strangling someone....

http://count-austheim.blogspot.com

Tyrnaeg en Varche
#5 - 2011-10-08 18:20:08 UTC
I guess that when the initial decision was made, Python seemed the best choice, it is excellent for agile programming, making prototypes, checking out if an idea would work as intended.

Over the years more and more features were required - as it is very difficult and time consuming to refactor existing code from scratch, each new feature was "patched" on the existing python body. Made sense while EVE was small, now that the specifications are blown up, the bold move to C++ is made.
Barakkus
#6 - 2011-10-08 20:30:12 UTC
They use python because it's easy to make changes to the code on the fly and it's not THAT bad.

I'm not so sure they're moving towards C++ actually, maybe server side, but I haven't seen anything saying they're actually going to migrate off python.

http://youtu.be/yytbDZrw1jc

Renan Ruivo
Forcas armadas
Brave Collective
#7 - 2011-10-08 21:23:56 UTC
Apollo-Moor wrote:
mechtech wrote:
CCP is moving some of their code over to C++ as a part of the CARBON initiative, and they're not just doing it for fun either.

Dust is running on Unreal 3 with the tight hardware restraints of consoles, and will almost certainly not use any python.


PS3 doesn't have many hardware constraints. It's more the coding on PS3 that hangs developers up. Cuase that's one powerful piece of equipment.


The problem isn't that the PS3 is powerfull or not, but rather rendering technologies that we have now that the PS3 is incapable of handling.

The world is a community of idiots doing a series of things until it explodes and we all die.

Obsidian Hawk
RONA Midgard Academy
#8 - 2011-10-08 22:33:13 UTC
Hi obsidian here.

Python is a very interesting language all in it's own and can be quite powerful. A lot of the reasons python is used, is because of its insane ability to simulate stuff well. For instance I have used it to model resevoirs underground. Back at my old uni the physics department used python for several simulations in physics whether is be low speed or high speed phyics. The engines built around python for physics simulations are quite astounding.

Based on what I have learned from there, I believe CCP used python originally because this is a very intensive program on simulations and physics.

Why Can't I have a picture signature.

Also please support graphical immersion, bring back the art that brought people to EvE online originaly.

r0selan
Lostvilla
#9 - 2011-10-08 23:06:30 UTC  |  Edited by: r0selan
As a programmer, I can answer the op. You can do a lot more in Python than in c, and do a LOT less errors. This gives you more time to optimize your code, which gives more yield than low level optimization. Low level optimization is tricky, complex, a humongous time sink, prone to random and untraceable side effect, unstable in time, prone to break at the slightest change elsewhere in code, depends on the hardware/os, and even other programs loaded in memory and/or running, and just a plain pain in the a. (load balancing across threads/cores, synchronous waits, errors management...)

Nobody codes in assembly anymore, at least in the gaming industry. And that's for a good reason. David Braben's frontier is the last game I heard of which was made that way.

Moreover, today's game are huge, arts/graphic take a lot of resources, game mechanics/rules are numerous, and data is huge. These need specific technologies like the unreal dev kit, clustered databases, and so on.

C can bring local performance peaks, but to the cost of high maintainability, and python is quite efficient

tl, dr: they don't code in c or assembly for the same reason they don't do their own hardware and os.
Taedrin
Federal Navy Academy
Gallente Federation
#10 - 2011-10-09 01:26:42 UTC
Because:
1) 99% of optimization is choosing the right algorithm, and 1% code optimization.
2) 80% of your execution time is spent in 20% of your code. Python is designed to allow you to "drag and drop" C-code wherever you need optimizations.
3) What Python allows you to implement in 10 minutes, C/C++ will require an hour or longer to implement.
4) Because developer time is expensive, and CPU time is cheap.
Dirk Magnum
Spearhead Endeavors
#11 - 2011-10-09 01:47:41 UTC
I used to know how to make a table in HTML, can I help?

                      "LIVE FAST DIE." - traditional Minmatar ethos [citation needed]

EnderCapitalG
Caldari Provisions
Caldari State
#12 - 2011-10-09 02:22:41 UTC
Cripes.
Sir Substance
Sebiestor Tribe
Minmatar Republic
#13 - 2011-10-09 02:28:29 UTC
If you asked me to hypothesize why python, I would guess that its because at some point early in the development cycle, more of their devs were good with python then any other language.

The beatings will continue until posting improves. -Magnus Cortex

Official Eve Online changelist: Togglable PvP. - Jordanna Bauer

Barbelo Valentinian
Federal Navy Academy
Gallente Federation
#14 - 2011-10-09 02:48:05 UTC
Isn't part of the reason why we have "showinfo" so ubiquitous because EVE is done in Python?

i.e. perhaps alongside other reasons, one reason was becasue they wanted a situation where any update or change was reflected anywhere whenever it was called up, quickly and efficiently?

Just shooting from the hip, don't know anything about programming, but I'm surmising from the fact that EVE is unlike any other game in this kind of information-richness and complexity.
Rakshasa Taisab
Sane Industries Inc.
#15 - 2011-10-09 03:32:56 UTC
Barbelo Valentinian wrote:
Isn't part of the reason why we have "showinfo" so ubiquitous because EVE is done in Python?

No

Nyan