Python3 instead of Java?

Discussion in 'Bukkit Discussion' started by gearsgod, Sep 30, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Sagacious_Zed Bukkit Docs

    Plugins that are written by professionals exists as a very small subset of all plugins.
     
  2. Offline

    Sushi

  3. Offline

    Jnorr44

    Correct, actually Java is the third fastest programming language right behind C++. Python is second slowest only beaten by Perl. The reason Java seems so slow and had a reputation for being slow is that most of the time, Java is used dynamically (video games, timing, and moving objects). Dynamic use is a million times slower than static use. If you are storing data, you are dynamically using something.
     
  4. Offline

    Coelho

    Java is an very fast programming language, but it is too easy for the programmer to put all that speed down the drain and forget all about optimization in his code. That's why most applications resulting from Java have extreme performance issues, however a select few have absolutely perfect performance that can be compared with C or C++ applications. Entirely depends on the developer really.
     
    Jnorr44 and Jacek like this.
  5. Offline

    gearsgod

    Why dose java require memory to be set? why can't it just use whats on the system?
     
  6. Offline

    kroltan

    It runs on a Virtual Machine...
     
  7. Offline

    lukegb

    Comparing programming languages in terms of speed is flawed. Compare compilers and interpreters, not the language itself.
     
    kroltan likes this.
  8. Offline

    Cirno

    You forgot the indent near "You".
     
    gomeow and kroltan like this.
  9. Offline

    croxis

    Don't forget about pypy!
     
  10. Offline

    MyPictures

    Isn't the vanilla server backed or fronted (not sure anymor ) coded in C and Java? Long time ago (I think it was on MC 1.8.1) I saw a tweet were Jeb said that he finished the server, like: Fronted finished in C and backed in java! (not sure about this tweet anymore... cant find it..).

    Or does this only count for Minecraft_Server.exe?
     
  11. Offline

    kroltan

    I think only for .exe, since it has a GUI.
     
  12. Offline

    Cirno

    Why do you think the .exe requires the C redistributable?
     
  13. Offline

    MyPictures

    It doesn't require it but you can make it in C if you want. I have no idea what this tweet was about... I wish I could find it now :(
     
  14. Offline

    Amaranth

    The Minecraft_Server.exe is just a wrapper around the minecraft_server.jar that makes it use java to launch the internal jar. You can actually rename the file Minecraft_Server.jar and use it just like the normal jar download, even. No part of minecraft is written in C on either the client or server.

    CraftBukkit needs the Visual C++ 2008 Redistributable for our improved (command line) console but we didn't write any C or C++ code there either, a library we use did.
     
    MyPictures and kroltan like this.
  15. Offline

    MyPictures

    I found his tweet:
    http://twitter.com/jeb_/status/113346643180519424
     
  16. Offline

    kroltan

  17. Offline

    MyPictures

    I have no idea...
     
  18. Offline

    kroltan

    I'm on my school on a really old browser (FF 3.0), where Twitter desn't work properly, try to find the conversation history of that tweet. Maybe you'll get a clue of the subject.
    Anyways, they didn't code the GUI in C#.
     
  19. Offline

    dark_hunter

    It says this:
     
  20. Offline

    Amaranth

    There is more than one game jeb is involved with. He is likely talking about Cobalt.
     
    MyPictures likes this.
  21. Offline

    kroltan

    Yeah, seems like it.
     
  22. Offline

    Sushi

    One of the aspects of the JVM (and the CLR too, but slightly less so) that makes it undesirable for programming video games and other performance-emphasized applications and programs is that the Garbage Collector likes to butt in at random times and free memory, when it's often more efficient for the developer to do it manually.

    Java is a poor language. It's verbose and has a mediocre implementation of OOP, but the JVM really shines.

    PyPy is still ridiculously slow compared to compiled languages. You can't speed up a an interpreted langauge to the speed of a compiled language (implementations on the JVM and CLR get pretty close, but they're still slower than Java/C# and implementations of scripting languages on the CLR like IronPython run poorly on non-Windows OSes)

    IronPython is an excellent and constantly updated implementation of Python, but Jython is less so. I wouldn't use Jython.

    An example of the slowdown when using an interpreted language over a compiled language, even if it is a bytecode/JIT interpreter, is JRuby over Java. JRuby is an implementation of the Ruby interpreter (MRI/YARV) on the JVM. Even though it is on the JVM, JRuby is actually not that much faster than MRI (the interpreter used in Ruby1.8+), and it's on par with YARV (the interpreter used in Ruby1.9+). JRuby is still 19.5% slower than Java running on the JVM, and 16.9% slower than Scala running on the JVM.

    As a matter of fact, one of the alternative implementations of Ruby is called Rubinius. Rubinius has a virtual machine written in C++, but most of the code in Rubinius is actually written in Ruby itself. Rubinius actually performs better than JRuby.

    Java isn't a "3rd fastest" programming language. There are numerous programming languages faster than Java, I can list a few. C, C++, D, Fortran, C# (on windows), Ada, Assembly.

    Go with the gcc backend is probably faster than Java, but there aren't any specific benchmarks out.

    Your signature says "Bukkit Donator". Donator isn't a word.
     
  23. Offline

    lukegb

    It is.

    pypy is actually just about fast enough to implement real-time video processing in pure Python, which is quite cool.

    I'd hope that Go would be faster than Java, but the GC is still somewhat leaky, at least on 32-bit systems (which do still exist). The Go GC is nowhere near as good as Java, but is sufficient for most real-world cases (apart from the ones in which you'd just write your code in C anyway).

    In the shootout, however, Go's is about 6.02x slower than baseline - Fortran - and 3.42x slower than Java 7. There have been discussions of this on the golang mailing list, mostly pointing out that the code which Go is compiling for the shootout is unoptimised and unloved.

    We're also getting seriously off-topic here.
     
  24. Offline

    gearsgod

    Well just so you all know, I got it to the point I could login, load up a flatland world of just stone, anything else caused a crash because I hadn't implemented it.
    I am just going to give up and throw this away, this was massive task and I am sure I am doing just everything wrong >.<
     
  25. Offline

    Sushi

    Python is too slow anyway. I would consider writing it in a low level language or language that has servers in mind, like C or Go.
     
  26. Offline

    kroltan

    Python would be better used as a plugin's plugin language.
     
    tanveergt5 likes this.
  27. Offline

    gearsgod

    indeed
     
  28. Na, Leave it at Java so a shit ton of dev's don't have to update all of their plugins... In a new language.....
     
  29. Offline

    chaseoes

    You're very misinformed...
     
  30. Offline

    Sushi

    You can do so already using Jython.
     
Thread Status:
Not open for further replies.

Share This Page