Announcement

Collapse
No announcement yet.

PlayOnLinux 5 To Switch From Being Written In Python To Using Java

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by qparis View Post
    Are we talking about Python 2, Python 3?
    (Just for my personal curisiosity, can you send me the link of these projects?)
    Python Libraries are written in C, they need to be recompiled for every system and it can sometimes, not work. An example of such a dependency we are using is GPG. python-gnupg requires a gpg executable.
    Doesn't matter if it's python 2 or 3, they're both roughly equal in terms of portability, though 2 is probably a little better.
    In my experience, python libraries have always been properly compiled. I've had one issue with a libusb error on an ARMv7 platform, which was caused by the lsusb linux binary being improperly compiled. Also, not all libraries are compiled - many of them are nothing more than .py and .egg files, effectively making them portable on any platform with an interpreter.
    Unfortunately no, I can't link to the projects because most are specific to a business or a hardware platform. Of the ones that aren't restricted, they're somewhat broken due to my lack of interest in maintaining them (they were just free-time projects).

    In what langage do you think Jython is written? As long as you have a Java runtime, Jython will work, so nope, it won't be less portable. Also, heard about jar dependencies?
    You're still missing the point - the fact is, you need to install an interpreter. That is a pre-compiled binary dependency, which lessens the portability of the software. If your software uses any pre-compiled binaries, there's a good chance jython can't use it. That makes it less portable. Once you involve jar dependencies, you're not really getting any more portable than just sticking with python and it's libraries. Under the right circumstances, jython isn't less portable than python, but it isn't more portable either, whether you have Java installed or not.

    Not consulting the community would have be not writing any kind of news and not risking to post something on Phoronix. This is different. I think that we are quite transparent.

    In that case, you would be suprised to learn that we have currently more people interested to contribute to the project than ever.
    As I stated before, if the community disagrees with you and you know you're right, it's up to you to prove it. Prove that Java is more portable and you will get the success and get to rub it in my face all you want. The fact of the matter is, Java is a business language, and is developed to the needs of businesses, not desktop PC apps. Java is great for corporations with in-house software and situations where you need heavy processing power that you can't get from interpreted languages but with some portability that you can't get from C++. Android is a great example of how to properly use Java.
    Anyway, I'm not implying that python is a better language than Java and I'm not saying python is the best choice for POL. But, for linux, python is significantly more portable and obviously proven worthy considering POL has been using it for all this time.

    Give precise example please.
    Look through these forums and you'll find people who don't have java installed. I've worked on plenty of OEM PCs that never shipped with it either. Google Chrome intends to drop support for it, which will dramatically lower the need for it in web-based applications.
    Java can be modestly memory efficient if the developer pays close enough attention. But it is notorious for memory leaks. It has a lot of useful tools for memory management but only if used properly. Meanwhile, languages like C++ are too picky about memory management to easily cause leaks, and most interpreted languages seem to do a pretty good job at collecting garbage on their own. The average program run by an interpreted language might use up to 35MB, and a lot of that memory is shared. I've also had Java updates that exceed 160MB, meanwhile, updating python or perl with every library I have might be less than 60MB.
    I've used plenty of Java applications that would be completely dysfunctional because of a java update. A good example of this is LogicalDoc, which breaks on almost a monthly basis. I've used Java card game organizers that also failed after java updates. It's hard to think of more examples, since I so rarely encounter PC-based java applications these days.


    Again - I'm not hating on Java, I think it's a useful language. But ever since Oracle took control, it's probably the least dependable portable language you can get for desktop systems. Great for servers and workstations, not so great for PCs. I would also say that if this were Windows software, Java would be a fine choice, since Windows is much more Java friendly than it is python friendly.
    Last edited by schmidtbag; 04 June 2015, 08:41 PM.

    Comment


    • #22
      I'm taking the time to respond to this one, then I'm going to sleep.


      Originally posted by schmidtbag View Post
      You're still missing the point - the fact is, you need to install an interpreter. That is a pre-compiled binary dependency, which lessens the portability of the software.
      Java is not compiled, java is interpreted. The .class files (of Jython) "compiled" (a.k.a transformed into bytecode) on Linux can run on whatever system you want (except Dalvik-like VMs of course because they are not real Java VMs). This is also true for Jython. As long as you have the .class in your classpath, Jython will be there with the main set of libraries (file IO, urllib, threading, etc...)

      Originally posted by schmidtbag View Post
      If your software uses any pre-compiled binaries, there's a good chance jython can't use it.
      You're right, and we precisely want to avoid depending on pre-compiled binaries

      Originally posted by schmidtbag View Post
      That makes it less portable. Once you involve jar dependencies, you're not really getting any more portable than just sticking with python and it's libraries. Under the right circumstances, jython isn't less portable than python, but it isn't more portable either, whether you have Java installed or not.
      I think you've missed what we are trying to do. We do not want to use Jython to replace python and to say "cool, we have a more portable version of python". We want to write the main core in Java, to try to avoid using binaries (For example, I've started to implement a Java version of cabextract tool that may be useful for other projects, so in a way, we are contributing beyond PlayOnLinux's perimeter)
      We are just interested in Python syntax for the scripter community. We don't want to impose them Java as a language.

      Originally posted by schmidtbag View Post
      As I stated before, if the community disagrees with you and you know you're right, it's up to you to prove it. Prove that Java is more portable and you will get the success and get to rub it in my face all you want.
      Also, you should be aware that portability is only one very small aspect of the reasons that make us chose Java. I'd say that if portability was the only advantage, we would probably not have chosen Java.

      Originally posted by schmidtbag View Post
      The fact of the matter is, Java is a business language, and is developed to the needs of businesses, not desktop PC apps.
      And they are constantly developing new technology. I mean, why would it stay like this? Once we have said that, how can we change things? We need someones to take a little risk to make the experiment right?
      If we are wrong? What will happen? Nothing that really matters in reality. We are lucid enough to make a U-turn if we realize that we are mistaken, and why not, re-redevelop a PlayOnLinux 6 from scratch. I mean, we are a motivated team and we are really ready to make efforts so that people are happy. The only thing that can discourage me (personnaly) is when some (a minority so far, but far more noisy) people just bash our decisions without trying to understand or argumentating. But don't be too much biased by this noise, I have truly received a lot more encouragement than I have ever received. Otherwise, I would not persit, I'm obstinate, but not fool.

      However, if it happens that it is a succes? In reality, it will be an improvement for the whole community because it would mean that it is possible to make great desktop application with this technology.

      Originally posted by schmidtbag View Post
      Java is great for corporations with in-house software and situations where you need heavy processing power that you can't get from interpreted languages but with some portability that you can't get from C++. Android is a great example of how to properly use Java.
      Again, it's not only a matter of performance but also a matter of maintenability, code quality, code audit, continous integration, etc... Such process are really harder to put in place with dynamic languages. We need a statically typed langage and Python does not fit this requirement. I really like Python though. But I find it harder to maintain in some situation.

      Originally posted by schmidtbag View Post
      Anyway, I'm not implying that python is a better language than Java and I'm not saying python is the best choice for POL. But, for linux, python is significantly more portable and obviously proven worthy considering POL has been using it for all this time.
      Have you had a chance to look at PlayOnLinux 4 source tree?

      Originally posted by schmidtbag View Post
      Look through these forums and you'll find people who don't have java installed. I've worked on plenty of OEM PCs that never shipped with it either.
      Yeah, but on Windows I agree. Java bundle is a c**p asking you to install stuff that you do not need. On POSIX system, this is fairly different.

      Originally posted by schmidtbag View Post
      Google Chrome intends to drop support for it, which will dramatically lower the need for it in web-based applications.
      That make sense, HTML5/Javascript are more adapted for web applications. I do not see any kind of contradiction here.

      Originally posted by schmidtbag View Post
      Java can be modestly memory efficient if the developer pays close enough attention. But it is notorious for memory leaks. It has a lot of useful tools for memory management but only if used properly.
      If there is a memory leak in POLv5, consider it a bug and report it. Also, Java tends to save CPU by running less frequently the GC when you give too much memory to the VM. If you give to your VM up to 1Go, you can be sure that your app will take 1Go at some point. Start the VM with the right arguments will limitate this risk

      Originally posted by schmidtbag View Post
      Meanwhile, languages like C++ are too picky about memory management to easily cause leaks, and most interpreted languages seem to do a pretty good job at collecting garbage on their own.
      True, but I'm not really in the mood of managing POL's memory manually.

      Originally posted by schmidtbag View Post
      The average program run by an interpreted language might use up to 35MB, and a lot of that memory is shared. I've also had Java updates that exceed 160MB, meanwhile, updating python or perl with every library I have might be less than 60MB.
      Without taking into account external binaries. If you look at POLv4 process, you'll see that it consumes very little memory. If you look at all the stuff run in background (bash processes, wget, gnupg, etc...), it is a different story. Transparency.

      Originally posted by schmidtbag View Post
      I've used plenty of Java applications that would be completely dysfunctional because of a java update. A good example of this is LogicalDoc, which breaks on almost a monthly basis. I've used Java card game organizers that also failed after java updates. It's hard to think of more examples, since I so rarely encounter PC-based java applications these days.
      The good thing with Java is that we can monitor this really easily. See http://www.playonlinux.org:8080. For the moment, I could not find any case where POLv5 would not compile on one binary and not another one. So I guess it depends on the way your program is coded, because large company cannot affort rewriting all their code base everymonth.

      Originally posted by schmidtbag View Post
      Again - I'm not hating on Java, I think it's a useful language. But ever since Oracle took control, it's probably the least dependable portable language you can get for desktop systems.
      OpenJDK is GPL. So if the community does not agree with Oracle, it can be forked.
      And if there were more free software system using it, maybe the community would find more interest right?

      Originally posted by schmidtbag View Post
      Great for servers and workstations, not so great for PCs. I would also say that if this were Windows software, Java would be a fine choice, since Windows is much more Java friendly than it is python friendly.
      Things are made to be changed. JavaFX is a good starting point.

      And to be honest, I'm still not closed about another idea. If you want me a team of about ~5-10 people that are ready to help to develop a version (with all the constraints we have), then I will surely reconsider this idea. We've tried to rewrite a Python version twice, got few contributor and the code base became quickly unmaintenable. I mean, the current 168 java classes we have are not here for nothing. PlayOnLinux is more technical that the majority of user imagine, especially this setup window stuff that involves synchronisation mechanisms.
      Last edited by qparis; 04 June 2015, 09:26 PM.

      Comment


      • #23
        I tend to cringe at Java since it usually results in clunky, slow applications that people don't know how to optimize in order to get the application in a seemingly normal working order (See: Minecraft for like 5 years... the Minecraft Server is still absolute garbage). Compare Python implementations of the Minecraft server to the official Java implementation, and results aren't even in the same league. Python by *zero* means can be considered to have the faster implementation relative to most interpreted or JITed languages. Yet unofficial implementations rock the socks off of the official implementation which is backed by a multi-million dollar company that has an entire team of developers working on it full-time. There are also not many decent examples of well implemented Java software that is commonly used.

        There are a few poor examples of Java though... I know of some proprietary server software that I cringe at whenever I have to stare at it (which is thankfully never now adays). Runescape is written in Java and known to perform poorly on the best systems, also not even working out of the box on Mac and Linux. Same went for Minecraft (the game client) for years when they refused to update the LWJGL libraries for Linux which fixed the issues with various drivers.

        Eclipse and NetBeans are probably the two most prominent examples of where Java can fit in. It's also where not a lot of portability is required (widgets for most of it). That said, they're also known for being slow and occasionally hard to work with due to differing implementations on different platforms.

        Well, I went off on a tangent and can't remember if I'm still on-topic even. All in all, just saying that Java doesn't have a good track record which is why Java is generally despised.

        EDIT: Forgot to mention that I'm not actually against the decision. Java is easy to write in and easy to contribute too. It has a lot of community support and that might be good for something like PoL.
        Last edited by computerquip; 04 June 2015, 09:25 PM.

        Comment


        • #24
          I've already got enough crap on my system. Java is one of the things that is blacklisted on my system. Something like this isn't going to convince me otherwise. I'm sure I'm not alone in this.

          Comment


          • #25
            So much hate.

            Nobody here is being forced to install, use, or contribute to PlayOnLinux, or Java.

            Wine runs very well without PlayOnLinux, and by configuring your wine prefixes carefully, you can accomplish the same functionality.

            Perhaps all this hateful sentiment should be sent to Oracle, who really deserves it.

            Comment


            • #26
              I agree that having Python pre-installed by default in the majority of GNU/Linux and Mac OSX operating systems is a great thing and therefore adding Java as an extra dependency doesn't make sense for this "portability" you keep bringing up. When you talk about Java, are you talking about the free software OpenJDK or are you going to force people to use the non-free and proprietary Oracle version of Java? If you are forcing the non-free version of Java, you may as well not waste your time as you will piss off a lot of people considering that Python is free software.

              Oh and one other thing about Python not being as portable as you say. There are projects like Portable PyPy at https://github.com/squeaky-pl/portable-pypy that let you use PyPy anywhere you want. As for package management, you can ship an installer of pip from https://bootstrap.pypa.io/get-pip.py and easily install/upgrade/uninstall packages on your system Python or the Portable PyPy package I mentioned above. There are also Wheels, which are nice as well for shipping platform specific extensions.

              Comment


              • #27
                I support this move. Java rocks!

                Comment


                • #28
                  Originally posted by tegs View Post
                  When you talk about Java, are you talking about the free software OpenJDK or are you going to force people to use the non-free and proprietary Oracle version of Java? If you are forcing the non-free version of Java, you may as well not waste your time as you will piss off a lot of people considering that Python is free software.
                  If you read the article, the link to the news posting answers your question.

                  I don't want to install Oracle JDK or any closed program on my computer

                  We are going to guarantee you that PlayOnLinux v5 is compatible with OpenJDK JRE 8 (GPLv2)


                  Comment


                  • #29
                    Originally posted by tegs View Post
                    I agree that having Python pre-installed by default in the majority of GNU/Linux and Mac OSX operating systems is a great thing and therefore adding Java as an extra dependency doesn't make sense for this "portability" you keep bringing up.
                    You have read the whole thread, right? Think about how many programs have dependencies (as in, things that are needed, that may or may not be installed by default). So, if something is not installed by default, it is not portable, even though it may be very easily installed through the distro's default repository? There are almost always dependencies for packages. It just seems that some folks have a grudge with Java (again, many don't articulate exactly why...).

                    Comment


                    • #30
                      Originally posted by qparis View Post
                      OpenJDK is GPL. So if the community does not agree with Oracle, it can be forked.
                      Maybe. Given the positions Oracles lawyers are currently taking against Google, i wouldn't be quite so sure.

                      That said, I completely understand why you want to go with some kind of statically typed language instead of python. It makes perfect sense.

                      Commenters who aren't contributers to major projects never understand the full benefit of going with something that has a large pool of developers and widespread usage, because for their needs it often isn't that big a deal.

                      Comment

                      Working...
                      X