Questions about Java programming
- Anmelden oder Registrieren um Kommentare zu schreiben
I'm a beginner in C/C++ programming, I love these two languages! As a musician, for me, programming it's the closest thing to art :)
I very appreciate the Freedom that I've on Gnu/Linux, especially on Free Distros like Trisquel, and I don't understand how much programmers don't recognize this thing on other Os, (not only on Microsoft and Apple system, but also in non-free distros).
Have the totally freedom to watch the source code of any free program and the possibility to change it, without restrictions, (respecting the points of CopyLeft and Free Software, of course), it's a good conquest for any young programmers, in my opinion.
My questions are these:
- Is there a way to programing in Java without dangers for our freedom on Gnu/Linux, or it is better to choose other languages? (I love C and C++ and I'm fine with emacs and gcc/g++)
- I have read many topics here, but I don't undestand if it is possibile programming in Java only with free software and, in case, what do I need to begin?
Sorry for my ignorance and thank you for any replies.
P.S. = sorry for my terrible english eheh
It is perfectly possible to program in Java using only free software. Sun Microsystem released all basic tools and libraries under the GNU GPL in 2006. Since then, OpenJDK has been the official Java reference implementation. It is in Trisquel's repository: the "default-jdk" package.
The issue with Java is not a free software issue. It is a patent issue. Google (which uses its own implementation of Java in Android) and Oracle (which bought Sun Microsystem) are fighting on it: https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google,_Inc.
Thank for the answers guys!
Now I know what I'll do this summer ehehe
Yes, you can develop full programs in Java without using proprietary software. However, the Android SDK (the combination, not the individual tools) is proprietary, so you will want to use the Replicant SDK instead.
For developing games using Java, take a look at jMonkeyEngine, libgdx and LWJGL.
Thank you Calinou ;)
But there is a nonfree version of Java usually called "Oracle Java" or "Sun Java," so make sure you use OpenJDK (which is in the Trisquel repos)
BTW, gnu
hav gcj
GCJ has tons of issues with most software, better not even consider it. The idea of compiling Java to native CPU code isn't bad, but GCJ lacks development.
Thank you for your advices Legimet and alimiracle ;)
cantor, personally, when in front of several options, I ask myself this question: Which of these technologies have the best freedom-supportive community?
I have to say I try to avoid projects that call themselves open-source, because, in my experience, they always end up sacrificing freedom in some way. For example, they recommend non-free software in their documentation, allow non-free packages in their repositories, etc. You can expect their communities to do the same.
I was learning Ruby when the project was called "free software", but I stopped when they change the definition to open-source. I don't go often to the Python and Java neighborhoods because of their orientation towards open-source too.
Recently, I was also looking for a language to start learning more about programming. I found GNU Guile, which is a Scheme implementation for the GNU project. Being GNU, freedom is first, so I'm learning it. At first, I was concerned about its community (or lack of it), because I've never heard of it (how long took you to hear about GNU?), but then I came across the Guix System Distribution and found that their developers are using Guile Scheme for writing pretty much every component of the system, from daemons to libraries to user interfaces and package definitions. I think this is the right tool for me. Maybe it is for you too?
Cross-platform support, ease of use and library availability is a concern to most people though…
True. But, after one finds a language that has cross-platform support, that is easy to use, and that has lots of libraries, you have to ask the question, how free are these tools and the community around it? That, if you care about freedom. Otherwise, open-source may be enough for you.
I don't know you, but I think free software in general is very lacking at the moment, but if you don't use it and contribute to it, how the heck is it supposed to have cross-(free-)platform support and extensive libraries!
I feel for the people who make a living working on IT and want to use/support free software more and more. The mental battle must be harsh.
For cantor, though, if your income doesn't depend on programming, I suggest you try Guile Scheme.
Anywho...
Ruby, Python, and Java (using OpenJDK) are free software, you're just not using them because the websites say "open source".
The creator of Python, Guido van Rossum, received from the FSF the "Award for the Advancement of Free Software" in 2001: https://www.gnu.org/award/2001/2001.html
The creator of Ruby, Yukihiro Matsumoto (aka Matz), received it as well in 2011: https://www.fsf.org/news/2011-free-software-awards-announced
Legimet, Magic Banana, I know the tools are free software, and they are great tools. I'm just saying that, to me, it is better if the community around the tool has a strong commitment to freedom. What's more important? A tool that is free or a person who respects your freedom? The latter creates the former.
Free software and open source share some views, but they are not the same thing: https://www.gnu.org/philosophy/open-source-misses-the-point.en.html. In my experience, it is easier to find open source projects and communities that don't care if there's some proprietary elements here and there. That is hard to find in a free software project; and if it is found, it's a bug.
Legimet, not "just because" they say "open source", but because of the other stuff that comes with defining the project with that name. Did you know that Pypi allows non-free packages?
https://pypi.python.org/pypi?:action=browse&c=48
I expect the same from Ruby now that it is called open source.
Yes, I already know that. So does rubygems. But Python comes with Trisquel and most other distros by default, and it's nearly impossible to uninstall it, even if I didn't want to use it.
I don't see a particular problem here. It's not typical for people to browse PyPI for new software to install; rather, it's used as a centralized way to handle installing Python packages (usually libraries) in an easy way. Any recommendation for proprietary software would come either from the developer of such a proprietary program, or a program that depends on such a proprietary program.
I'm not sure if pip is capable of browsing PyPI (partly because I don't use it; I'm not aware of a convenient way to use it for both Python 2 and Python 3), but it's not a typical use case.
onpon4, to me the problem with PyPI is equivalent to the problem with non-free packages in the repositories used by a distribution. I fail to see any difference. In Trisquel repository you can find libraries, application, data, etc. While PyPI is more commonly used for libraries, it is also used to distribute applications and data.
Let's say you are an average GNU/Linux user and need a graphical program for doing Z. You search on the web and find one called DOZ In the installation instructions for GNU/Linux users you find:
1. Install python-pip
2. Install DOZ by running the following command:
$ sudo pip install doz
You follow the instructions on Trisquel, and now DOZ is installed, and listed in your applications list. Since everything worked flawlessly, you assume DOZ is fine, because you just installed it using Trisquel. But what if DOZ is one of those non-free packages available in PyPI, which is the default repository used by pip?
Is that different from installing something with apt? In both cases you don't need to browse any repository directly, you just need instructions in a blog telling you how to install the package.
Your example just goes to show the absurdity of comparing PyPI to Trisquel's repo. What you're talking about is a third party, the author of "DOZ" in your hypothetical example, giving instructions for installing a proprietary program. Surely you've seen proprietary programs being distributed with instructions before, without ever having a need to reference pip! I can easily think of several examples off the top of my head, like Google Chrome (which distributes a deb file as one option, and that's much easier to install than something from PyPI; no need to install any new software).
All kinds of reductions to absurdity can result from your argument, but here is the most troubling: if the fact that proprietary software developers can make it super easy to install a proprietary program is a problem, and it's possible for them to do this regardless of whether or not PyPI is there to help them, does it not follow that Trisquel must become a jail which forbids installation and execution of proprietary software?
I don't see any problem with PyPI as such. pip is not recommending proprietary software; it's just offering the same convenient way to install proprietary programs as with libre programs. It might be the case that PyPI could put pressure on proprietary software developers by only allowing libre software on it, but that's a matter of strategy, not ethics.
onpon4, I'm not suggesting that Trisquel or any other free distro "must become a jail which forbids installation and execution of proprietary software". That would be horrible. Also, free distros cannot control what's distributed by third-party websites like PyPI. It seems I'm not making myself clear.
What I say is that PyPI is a source of packages used by pip, in the same way a repository is a source of packages used by apt. In the latter case, free distros don't allow (by default) their package managers to look for software in repositories that contain non-free packages, so they remove such repositories from sources-list or whatever config file is used by package managers for that. However, users are given the right to add any repository they want to the list of sources, even repositories with non-free packages. Shouldn't this be done as well in the case of pip? Really, I fail to see why not. To me, this is a bug in free distros.
Also, no one is saying that Python, Ruby, or Java are bad tools because they are commonly defined as open source. They are perfectly fine free software tools. I'm just pointing out that it is easier to find freedom issues in projects that define themselves as such, so I prefer tools that are started or maintained with freedom in mind.
Note that I'm not trolling here, it's a honest question I have.
Your stated concern was:
> You follow the instructions on Trisquel, and now DOZ is installed, and listed in your applications list. Since everything worked flawlessly, you assume DOZ is fine, because you just installed it using Trisquel.
Which suggests to me you don't understand the purpose of Trisquel's repo policy. It comes from this part of GNU FSDG:
> All the documentation in a free system distribution... must take care not to recommend nonfree software.
Because of the way something like Debian's repository works, it effectively serves as a recommendation to install software in it. It's designed to help you find software you might want. So a distribution like Trisquel needs to have a different repository that only includes libre software (or no repository at all, but that would be terribly inconvenient).
Note that this has absolutely nothing to do with how easy it is to install a proprietary program. There's nothing wrong with including a facility which allows users to install proprietary software easily. Take Wine, for example.
pip works similarly, but it has an important difference you're ignoring: whereas Trisquel's repo is maintained by one person or group of people, PyPI is just a place where anyone can upload Python software. It's more like SourceForge, GitHub, or Savannah in that sense.
pip is also typically used for a completely different purpose: to install Python packages you already know of which aren't available in your system's repositories. I checked, and pip does have a basic search feature, but I would say this is a borderline case at worst. After all, we don't say that pointing users to search engines (like DuckDuckGo), which will happily show you all kinds of proprietary software websites and advertisements, is unacceptable.
> Shouldn't this be done as well in the case of pip?
No. That would be overkill. PyPI includes standard tags indicating licenses, so all you need to do is check those tags and omit programs not listed as under libre licenses from the search results.
But what should be done is completely different: just add a disclaimer to pip saying that there are no guarantees about the integrity of software it installs. Such a warning could be given when the pip install command is used. I'm sure the maintainer of pip would be perfectly happy to accept such a patch.
humano I like your thought and what you've written, and I totally agree with you. Everytime I met something that not respect the Freedom of users I changed way and study something else, because I use Gnu/Linux principally for ethics behind it, but I recognize that is more powerful, from the technical point of view. For now I like very much C and C++ and I want to continue my studies with this two languages, (for concentrate better my study only on these two languages: often I'm dispersive in my studies eheh). Maybe in the future I'll study Java or alternative, but I think that is very important to study everything to distinguish what is good and what is wrong.
About Java I don't know nothing, and it's the principal reason for studying it, (or choose an alternative as you and other people on forum suggest).
With this method I discover Free Software Distros, and I learned in this forum more than in other places :)
In my country, (Italy), many people think that Free Software and opensource are the same... and I hate this situation eheh this is very hard discover and study this wonderful things, but I like challenges :)
I'm a beginner in programming, you are more expert than me, and you're probably right: I'm sure that you discover all of this studying this things.
One thing for me is very strange: when I started programming I undestood immediately that Free Software it provides much more freedom than other closed-system: how it is possibile that an expert programmer don't recognize this things? Often I speak with professors, and I try to explain this thing, something with good results, something not...
I don't want to work with proprietary software, I have studied them, (and I think that it is important to stay up to date), but on my computers I've only Free Distros.
I'm a musician and, for me, using proprietary software is something like "you have 7 musical notes: you can use only 2 because 5 are closed... you can't share with your friends, you can't create new songs, you can't play a registered song, modify and redistribute... I say: no thanks!". I think that a good musician, like good programmer, needs Freedom for control his work, and have the possibility to share with a community.
It is for these reasons that for me is very strange speak with expert programmer that says that proprietary software is better... I know little or nothing about programming but, using Free Software for me the benefits are evident.
Thank you guys it was a beautiful conversation :)
P.S. = sorry for my terrible english eheh
Isn't it a problem, that Oracle, the company which owns Java is a commercial non-freedom respecting entity? It's not just about patents.
I don't know really if the software Oracle distribute for Java is free or not right now.
Even if right now they provide free software Java runtime and development tools, that could always change in the future. And most users and developers wouldn't care and will keep on using the non-free tools, even there are free forks. I haven't read or know much about the Java trap, but as I understand what it is, it seems it can easily happen again.
And I'm sure that Oracle even now is using Java as leverage to advertise and push non-free software "solutions" to people who like Java.
People should be aware of software controlled by entities such as Oracle, even it's free software. They should support other software, if possible.
Say what you will about Python and it's community, but it's owned by a non-profit organization and when you go to the official Python site, they aren't selling you any non-free software as far as I can see, unlike Oracle. The official Python tools are free software. Python is much more freedom friendly.
And I'm sure GNU Guile is event better, although I haven't used it.
And C/C++, they aren't really owned by anyone, just some very conservative committees. The communities around C/C++ seem pretty independent, wide and diverse. We should probably help build more beginner friendly free software communities around C/C++.
The OpenJDK implementation is free, under the GPL. The version advertised by Oracle is nonfree and has a few minor differences.
I don't like Oracle either, but if OpenJDK ever becomes nonfree, I'm sure someone will fork it.
I know about OpenJDK. But I bet Oracle is the one who standardizes new features, such as new standard libraries. Those new features are made available in the non-free implementation first and OpenJDK is left to catch-up with the official implementation of Java. In the mean time, people are tempted to use the non-free version, not the "inferior" OpenJDK.
Isn't that so?
In fact, wasn't that exactly what happed some years ago with the Java Trap? It's the same as Adobe Flash Player - the free Flash players always having to play catch-up. And while for now OpenJDK is apparently able to catch-up, that might not always be true.
I'm arguing that we shouldn't play this game. We should use for languages which are designed with freedom in mind.
And there are many perfectly good languages too. Use C, C++, Python, Scheme (Guile) or others.
What you are describing was true with OpenJDK 6. However, since 7 the differences are very minor, and OpenJDK is considered the *official reference implementation* of the Java language. The differences have to do with Oracle JDK using nonfree libraries and OpenJDK using free equivalents, but they are compatible, and it is nothing like the situation with Flash and Gnash (or Shumway).
Mampir, as I pointed out to Legimet as well, be careful with Python: https://pypi.python.org/pypi?:action=browse&c=48.
I don't think the fact that some software in PyPI is proprietary is a danger of Python, specifically. Proprietary libraries exist for C, too. No matter what language you use, as a developer, you have to check the licenses of all libraries you use, not only to protect yourself, but also to protect your users.
Yes, I forgot that this package repository is hosted on python.org, and it really is a problem. I thought it was hosted by someone else.
> I don't think the fact that some software in PyPI is proprietary is a danger of Python, specifically. Proprietary libraries exist for C, too.
The problem isn't that non-free Python libraries exist, like with C, but that they are hosted and maintained on python.org. People who like Python may also think it's a good idea to install those non-free libraries. It's similar to the Debian problem - although Python doesn't install non-free software by default, they are still distributing it and in a way recommending it developers.
Maybe I should look more into GNU Guile soon. :)
C comes from a system that was entirely proprietary (UNIX). What's your point?
How is PyPI's policy of allowing any software any worse than any other software hosting website, like SourceForge or GitHub? If anything, all of the others are much worse than PyPI, because they have things like proprietary JavaScript requirements.
I think I made my point clear. Be more specific with your questions, if you want answers. You should calm down first too.
I don't think you did. Unless all you're saying is, "Python's developers are open source proponents, so we shouldn't use Python". In that case, you're propagating a destructive and senseless attitude. Destructive because it causes rejection of perfectly good, libre programs like Python, and this can result in wasted effort.
Mampir, I agree with you. I'm tired of that catch-up game. The free software community needs to make stronger the tools that are designed, implemented, and maintained from the start with freedom in mind.
Java is considered an enterprise programming language. If you want to be a programmer who goes in to work every day in a suit and tie, its for you.
I love Python for the elegance of the language. The issue of performance is not that big of an issue if you convert to C via Cython or use the PyPy runtime. Both are free software.
I created a programmers war with this topic XD, (it wasn't my intention).
Anyway thank you to all, guys ;)
P.S. = I hate suit and tie eheh
- Anmelden oder Registrieren um Kommentare zu schreiben