Two Takes on the Java Dilemma 562
Joe Barr writes "NewsForge is running a pair of excellent commentaries on the plight of Java and the Java development community following the recent "settlement" between longtime rivals Sun and Microsoft. One is by Rick Ross, the articulate leader of JavaLobby, entitled "Where is Java in the settlement?" The second is "Free but shackled: The Java trap" by Richard Stallman. Good reading. Both commentators put their finger on the heart of the problem, albeit from different perspectives." Yes, Newsforge and Slashdot are both owned by OSDN.
Sun will sell Java to the highest bidder (Score:5, Interesting)
open-source Java. Even if it is losing money, it's still a valuable asset. Sun owns the trademark, many Java-related
patents and is the only company with the authority to prevent Java from being forked.
Sun's threat is to sell Java to Microsoft. Not sure whether MS wants to buy it (they would certainly be
willing to spend a lot of money to destroy it, but it would also annoy many people and renew the antitrust trouble). Losing Java would be so bad for IBM that they would be willing to spent a few billions to save
it. Possibly together with other companies in the Java trap, like SAP.
"Freedom isn't free" (Score:5, Interesting)
In order for there to be a language that's solid in all environments, there's got to be a gatekeeper at the door.
I can't see how sun will ever make Java OS (Score:1, Interesting)
The Algol, the (Score:3, Interesting)
While we could probably debate for days the benefits and pitfalls of a language like LISP, the only good thing we can say about Algol-like languages is that they are pervasive. There are so many alternative languages that new language designers can base their syntaces on that it only shows the lack of creativity and knowledge of language history when language creators use Algol as the base of their languages.
Java is doomed, doomed I say! (Score:5, Interesting)
So: Sun will slow down and finally stop development of Java. IBM will either try to roll-out its own compatible platform or propose a migration to something else.
And RMS will be muttering: "those fools, those fools, if only they understood what the GPL was about". And he would be entirely right.
OTOH, perhaps I'm just being paranoid and Microsoft will allow Sun (which is now a neutered zombie company selling its own living organs for booze money) to continue supporting one of the main obstacles to its domination of the platform business.
Re:Sun will sell Java to the highest bidder (Score:5, Interesting)
Yes, Intel x86 can handle many of the tasks that only Unix machines used to be able to handle. I'd just tend to debate whether they're capable of doing these tasks as cost effectively, as reliably, and as efficiently.
Re:Sun will sell Java to the highest bidder (Score:2, Interesting)
No, Sun has (in my paranoid opinion) agreed to kill Java and probably StarOffice as well.
I'm quite curious to see how IBM will react.
The Sun/Microsoft deal makes sense (Score:0, Interesting)
More seriously though, Java has lost to C#, dotNet and whatever Microsoft vaporware-du-jour. Plain and simple. The only reason Java has been around for so long is because Microsoft was slow to really set its target on it in the past.
Re:Java is doomed, doomed I say! (Score:1, Interesting)
Re:Java is doomed, doomed I say! (Score:4, Interesting)
Look at it this way: Sun and Microsoft officially get together to put Java on the
I believe after the settlement, Sun and Microsoft will like each other a lot more - Sun because it has become weak and not terribly competitive, and Microsoft is happy that Sun is finally off its back, and given the state of software industry today, Sun is not in a good position as a software vendor, and though I don't know the numbers, but I don't think Java is making Sun much money (If it was, then they would not have had that much money trouble). I believe Sun is refusing to open up Java because they still want to milk more money from it, and one of the ways is to make a deal with Microsoft.
But Microsoft has C#, right? Yes...but C# is not Java, and there are plenty of people loyal to Java who are not willing to switch to C#. But if an official Java version is available on the Windows platform and is blessed by Sun, then developers would be much more willing to use it.
I understand the mantra of Java is write once run anywhere, but if you could at the same time, run on 90% of desktops really well (as a good Microsoft implementation would), then it's that much better.
All that remains is for Sun to sell Java to Microsoft.
Re:"Freedom isn't free" (Score:5, Interesting)
That's not what he said.
What he said was that freedom gives loss of control, which means that your worst enemy will use your work against you.
It's the main reason for the virual/sticky/perpetual nature of the GPL.
benevolent my r**s (Score:5, Interesting)
(the same argument applies to nearly every library under the GPL, does it not?)
Re:Sun will sell Java to the highest bidder (Score:4, Interesting)
By firing the SO developers, by not packaging SO any more, and by abandoning OOo.
OTOH, Novel and IBM have a vested interest in keeping OOo alive and kicking, so it wouldn't surprise me if/when Sun pulls the plug that 100 or so IBM/Novel employees take up the slack
Re:Sun will sell Java to the highest bidder (Score:5, Interesting)
Actually I'd be interested how many billions of Sun's yearly losses are related to Java, and how many billions are caused by creating and maintaining their own CPU architecture. I wouldnt be surprised if the last bit of 'cost-effectiveness' of the SPARC architecture would disappear immediately if Sun would charges enough to cover their real costs.
After cancelling the UltraSPARC V and having only a few 'mystery' CPU projects left, I expect Sun to make x64-64 the primary architecture for the low-end and medium range. Maybe not with this x86-64 generation, but when the next one appears.
Re:Until it is set free (Score:1, Interesting)
Do you have the same array of libraries and APIs in Phython?
Me don't think so.
JavaMail? JTSA? JNDI?
You could JPhython of course
So Phython in itself is simply not a viable
programming language.
Just go to big companies and try to sell them
something written Phython.
Re:The Sun/Microsoft deal makes sense (Score:5, Interesting)
COBOL is still around in big installations, although Y2K probably reduced that number to some extent, but certainly did not kill it off.
Java, believe it or not, via J2EE / EJB is the COBOL of our time. Business logic gets done today in Java -> EJB -> relational database, instead of COBOL -> VSAM.
Which will be more readable? COBOL today or EJB code 30 years from now? At least COBOL was inherently single-threaded!
Java won't be 'dead' until all of this generation's buisness logic gets reimplemented. But at least the data is (should be) housed in something more language-neutral than VSAM.
Re:Give me a free java! (Score:5, Interesting)
Not entirely. I don't expect a free version of Java to come from Sun. I expect free Java to come from the open source community. There are already a significant number of people (including RMS) who are working towards this goal without Sun.
The more people with the itch, the more scratching that will get done.
As I pointed out, even those of us who want to work on these projects have a hard time because it is difficult to get the environment recommened by RMS set up. Bundling gjc, some free jre, and the classpath libraries into an install package would be a boon. Sun does this with their non-free Java and I have no problems installing their stuff.
Sun only features? (Score:5, Interesting)
Does anyone have a clue what he's talking about? The "com.sun.*" libraries? How could you use those without noticing?
Doesn't sound like this guy has ever programmed in Java.
Is this right? (Score:5, Interesting)
Ross's comments (Score:4, Interesting)
I hope you will join me in watching how things progress before we draw conclusions about this settlement (or was it a purchase?)
The body of the article was well-written and I agree completely with his fundamental question -- where is Java in this settlement? I was shocked to hear pretty much squat about Java in the wake of the settlement, and I think his point that we must just wait and see is unfortunately correct.
But this little jab right at the end wasn't in keeping with the rest of the article. I wish he had instead expanded upon the idea of "What sorts of things might there be in the settlement, both good and bad for Java and/or Sun?". It almost feels as though it was inserted by someone else, it trips up the reader (well, me anyway) so badly.
- Leo
Java Trap (Score:5, Interesting)
Java is an open specification. The libs are open specifications. Just because the FSF hasn't been able to finish an implementation doesn't mean it can't be done.
Stallman's argument about libraries being required to conform to the specs if they're publicly available is also a load of crap. Basically it only applies if YOU CLAIM TO IMPLEMENT THE API. In other words, don't claim to be J2EE compliant until you actually are. There is nothing stopping anyone from starting a project and saying "Out goal is to build a system fully compliant with API x." and developing it. The only restriction is you can't claim to be API x compliant until you are. That's a real hardship, being required to actually support the feature set you claim to.
I'm sorry, I develop in Java (in addition to C, C++, Perl, and PHP) and I like to know that if something says it complies with specification X that it actually does.
Also, as a side note, Java is not going anywhere. SAP, Oracle, and IBM have too much of an investment to let Java die. Sun could declare bankruptcy tomorrow and IBM would buy the technology tomorrow, guaranteed.
Re:The Algol, the (Score:4, Interesting)
Excuse me, but sometimes I wonder whether LISP or functional language advocates just fell off the back of a truck.. or maybe they were just born insane. It's like the old Beta vs. VHS, Mac vs. PC vs. Amiga, etc debate. The reason Algol decendents are more popular is simply because they work better given the context in which they operate... the same reason VHS won out over Beta. and PC won out... It's not a huge mystery, nor is it some kind of ignorance of basic facts amongst the users of these languages.
If anything, its the functional advocates who are missing the basic facts. Programming languages are aids to *human* comprehension. All of the functional languages I've ever seen suck dick as general purpose programming languages. The syntax is barely readable, and the semantics are *not* immediately clear to the average programmer who is not necessarily interested in diving into abstract semantics of proving programming languages. Some of the loops you have to jump through to solve simple nonrecursive problems are obscene. Nevermind having to force your recursion to fit within certain parameters so your code performance doesn't suck...
The "spreadsheet" argument for easy of use I see nowadays is bogus, since spreadsheets are not abstract, but concrete. To give an example of the disconnect I'm talking about, take the canonical representations of each type of programming and see which one is easier for a human to understand as we scale upwards in complexity.
a) a recipe
b) a mathematical proof
I think the answer, and the conclusion wrt to functional and imperative languages as they exist now is self evident. Note that basic techniques, such as modularization, apply to both. The typical response is that (b) is easier to "verify", since, well, it's already in the required form. However, noone seems to define "verify" WRT to real complex systems with GUIs, DBs, flakey machines and flakey network connections..
and furthermore, we stopped trying to cater to the machine when we stopping flipping switches on the front of the box.. we should *not* be going backwards and catering to it by reorganizing logic so it's easier for the *machine* to process.
Re:The Sun/Microsoft deal makes sense (Score:3, Interesting)
Developers are counted by the millions.
Where is
And how long has Java been around, compared to
You've never used .NET (Score:5, Interesting)
You clearly have never used
We develop web applications using Visual Studio
We've found this setup to be extremely powerful, allowing very rapid development. Sure, it's homogeneous, but so what? It's working great for us, and our customers.
Since we are hosting the actual sites, we get to control the backend platforms. And we've chosen Windows. So, there's no issue about "platform independence." We've chosen a platform that enables us to deliver the best results to the customers, on a very rapid schedule.
Re:Sun will sell Java to the highest bidder (Score:3, Interesting)
The question whether Sun has transferred their rights to Microsoft. I don't think so. They just licensed the patents to Microsoft, so they can use them in
Re:Sun will sell Java to the highest bidder (Score:5, Interesting)
>I'm quite curious to see how IBM will react.
I don't think IBM will much care.
They have pushed for Sun to open source Java, why? Because they have changes/enhancements they want to incorporate into Java. This means they have already rewritten some/all of the Java libraries and would do more if it was open. If Sun killed Java, IBM would probably just release their own Java. Legaly something new, but technically the same.
-Tellurion
Sun never cared about their developers. (Score:4, Interesting)
The problem was too many of Sun's people were pissed off that Microsoft's first JVM was blowing the doors of Sun's and every publication said so. People at Sun were too worried that Java would become too closely associated with Microsoft, and Sun would be forgotten as the creator of Java. You had people running around basking in the glow of their favorable Java press, more worried about losing it, than about how they were going to make money.
Microsoft went so far as to offer to show Sun how they had optimised Java in exchange for permission to continue their work. Sun thought in unacceptable that Microsoft be known as doing Java better than they did, so they pulled the plug on their largest potential market out of pure spite over being outdone.
I'm glad they did, because C# rocks. Sun never gave a damn about their developer community, they only cared about making sure no one else got any credit at all.
Re:You've never used .NET (Score:2, Interesting)
That's all I was trying to say... I am not discounting that .NET has its usefulness, but you'll notice I mentioned that it's only benefit will be to Microsoft applications. You reaffirmed by point by mentioning how you've applied it to Visual Studio .NET, SQL Server, Windows 2000, IE... No where did you mention products from non-Microsoft companies beside the open source Mozilla and variant Netscape.
That's my point, .NET primarily benefits Microsoft and no one else... Microsoft has had the opportunity to change that, and they won't.
Wrong (Score:5, Interesting)
When I see a screenful of java, even a brief glance shows me what's going on. I can recognise a for-loop, a while with an Iterator, a method definition, a method call, an assignment. I can see the try and catch blocks. Before I mentally parse any of the words.
Lisp isn't code. Lisp is assembler for the Lisp VM, that somebody forgot to write a code parser on top of.
Re:"Freedom isn't free" (Score:3, Interesting)
Re:Sun will sell Java to the highest bidder (Score:5, Interesting)
I would disagree. And I'll tell you why:
1. It takes fewer Unix boxes to accomplish the same job as the ever multiplying rabbits^W x86 machines. This consolidation makes for lower overall costs in equipment and maintenance. Unfortunately, x86 looks cheaper up front. No one considers concepts like capacity planning. Just add another box. They're cheap!
2. Dell (and their competitors) charge a mint for "server hardware". So much that Sun hardware often comes in cheaper. Again, managers thing x86 == cheap and Sun == Expensive.
3. Unix machines allow you much more flexibility in remote maintenance, system configuration (just try to tweak the size of write buffers on Windows), and live upgrades. Linux theoretically offers many of the same benefits, but RedHat deployments have a tendency to self destruct. I've seen admins actually afraid to touch their RedHat boxes for fear that something will go wrong.
4. Performance isn't everything. Reliability, uptime, maintainability, etc. are all worth paying extra for. The short sightedness of the industry results in these factors often being ignored. As a result, big money is spent on all three areas *after the fact*. (A company I worked for once had a Dell RAID controller go. The entire production database was corrupted on ALL drives. That hurt.)
Long term, Unix machines still win the day. This is very much due to the fact that the entire machine is engineered instead of cobbled together. It's just too bad that the entire industry is only looking at the short term.
Re:Sun will sell Java to the highest bidder (Score:3, Interesting)
Seems to me (Score:3, Interesting)
GCJ/Classhpath sounds great, but wait (Score:3, Interesting)
We are using Sun's JVM and compilers to build the agents and the testers. I was think about using gcj/classpath to build that programs, but that would be really 'reliable' ?
How my project would be intepreted in scientific congress when people see it is not developed under Sun's JVM but on GNU's one ?
I have always fought for freedom and I totally agree with almost all Stalman's words but to say us to use a free replacement for Sun's JVM that isn't even completely done doesn't sound very pleasant for the programmers. In my case, I don't know what would be the academic's or even my advisor's reaction to a sentence like: "This Java program, compiled under GNU's JVM, solves that and that problem this way
Before trying to "push" (don't take me as non-free person) a environment it is better to finish it don't you think ?
* that's how it is called the first project the student have in the academic environment in Brazil
The best tool for WHAT job? (Score:5, Interesting)
I've programmed Java J2EE for years. I am expert at the "best practices", performance tweaks, and real production-quality code, yet Java's utility is almost nonexistent beyond "it's what I [was] paid to write." Here is MY short list of things Java is useful for:
1) HUGE web sites. J2EE is a good solution: strong typing in the language, a security model that is complete from the database backend up to the Struts frontend, and clustering/failover with EJB 2.0.
COROLLARY: Small-medium sites should use LAMP and rely on redundant hardware to handle failover.
2) Applets. Since they run on "most" Unixes + Windows browsers, and despite the load time an applet is much friendlier to users than Flash. But you have to use Java 1.1 to ensure compatibility.
COROLLARY: Cross-platforms GUIs should use Python, Qt, wxWindows, Tcl/Tk, etc.
3) Unusual database applications for which only an ODBC or JDBC driver exists. JDBC is a rather mature standard (should be since it ripped off ODBC) that works pretty well. It's faster to write a few quick Statements and PreparedStatements and run them against a database than to use native tools that "have" 'different' ''ways'' of quoting strings.
COROLLARY: Prefer Perl or PHP if the database is supported.
4) Any application for which speed is not an issue. Yeah, Java can do everything any other language can do, and if this is the one easiest for someone to "think in" then they should use it.
COROLLARY: NEVER use Java to create or manipulate graphics from the command line. No JDK, EVER, has managed to do this despite five years of pleading from the professional programmers. Without a GUI Java goes belly-up on the first "new java.awt.Frame()". (And for you 1.4+ folks who think HeadlessException was a fine solution, it wasn't.)
Java was a great idea in 1995, but since then Java has been pushed as the Second Coming and it just hasn't measured up. The other languages have surpassed Java in every one of its primary marketing points: platform independence, performance, object-orientedness, ease of use.
So what jobs are you doing that make Java the best solution?
Not trying to flame, but genuinely curious.
FYI Blackdown, IBM et al CAN'T fork the Sun JDK unless Sun frees the code. And, as apparently thousands of Slashdotters are unaware, every other JDK except Kaffe+GNU is an independently licensed derivative of Sun's JDK.
Re:Sun will sell Java to the highest bidder (Score:5, Interesting)
Allow me clarify. When I say "Unix Machines", I am referring to Sun, SGI, HP, and IBM Unix based hardware. While these machines can run other OSes, they are designed and engineered to run a variant of the Unix operating system. Thus "Unix machines". I was not referring to the operating system in specific.
And yes, RedHat does self-destruct at the slightest provocation. It's actually rather enjoyable (in a morbid way) to grab a bag of popcorn and watch as GDM suddenly disables itself, or the Apache "service" suddenly fails to start, or watch admins struggle with XInetD, only to have all their other "services" go haywire, or (my personal favorite) watch the admins struggle with some insanely masochistic script that no longer works because of some minor system change. Not to mention all the other scripts that were dependent on that script, which are now quite broken. I'm not even *going* to mention RPM hell.
Oh yeah, RedHat boxes are lots of fun.
Java is not the issue, our viewpoint is..... (Score:3, Interesting)
The real problem here is that the community in general has forgotten what a business is all about. Even my business. To make money. And when the squeeze comes on the primary lines of income (as it always does), the "charity" gets "changed" in ways the community does not approve of.
It is the same reason I will not produce serious applications in .net. I have used it, it is neat, but it is locked up and problematic. If MS wants to make a change that breaks my code, my clients are in trouble. If you think they will not, go back to VB, VC++ et al. MS always makes changes that breaks things, and then they do force the change on you.
Sun is yet another company that has tried to be a gallant knight in shining armor (all in the name of profit). If Sun kills Java for a few billion, what can we say? They own it. If Sun decides to let it go free, what can MS say? No payment?
If we as a community really want to keep Sun's Java alive (not our Java), then we need to make it worth Sun's while to do so. Sun needs to turn a profit. Without that profit, they can not pay the people who write Java to write. Without a profit, there is no gatekeeper.
If we all really want to keep Java, we need to reach into our pockets and pull out some money. If everyone contributed $100.00US to a fund (say the OSDN) earmarked to purchase Java and set it free (or to pay sun to keep it going), you might get what you need. You need to get 10,000,000 people to each pay their $100.00US to the fund (1 billion dollars US). Now, that is only half what the MS people are paying for whatever it is they are paying for, so we all might need to pay more than $200.00 each.
Of course, you could always try to get a few thousand serious developers to start contributing to the development of Java in the wild.
InnerWeb
Re:Sun will sell Java to the highest bidder (Score:3, Interesting)
Sun Solaris (UltraSpace)
HPUX
AIX
WinTel
LinTel (pretty much only RedHat comes in OEM form)
The later two represent the "low-end" x86 platform, while the former three represent the "high-end" Unix/RISC platform.
Most of things are not free (Score:1, Interesting)
For commercial application, it could have problem with GNU, because that would limit them the ability to change their app without showing up some of their interlectual properly, that's some high price to pay. It also may limit them to use some other's pattern with GNU software.
Whan talking like an extremist and anarchy like RSM, it's to the extreme that everything you runs must be free for your app to be free.
BUT WHO CARES?
Until recently, most app are not opened, and people still lives, computer stills show up, and businesses still thrive. So things does not have to be totally free like the extremist said.
Then, the hardware also have to be free to RSM. Does that mean I have to be able to fabricate my CPU and what not to run my app? Silly to call it a must. (it's nice though).
So nothing will be completely free.
This is why we need democratic. It allows company to thrive, create application that runs and sell them, and then there are customers who find them benefitial, and finding the company's behavior's about supporting customer and the rapport build up, then they buy their product, although it does have to be free.
As a Java developer myself, I am happy with Sun's so far all these years for what they doing, knowing not all stuffs provided by Sun are free.
You can preach all you can, but you can also get a life.
Re:The best tool for WHAT job? (Score:5, Interesting)
In particular:
NEVER use Java to create or manipulate graphics from the command line. No JDK, EVER, has managed to do this despite five years of pleading from the professional programmers. Without a GUI Java goes belly-up on the first "new java.awt.Frame()". (And for you 1.4+ folks who think HeadlessException was a fine solution, it wasn't.)
I've been doing headless java graphics manipulation since 1.1.6 as part of my photo album and other tools. It got a bit easier in 1.4, but it's always been possible. For example: my house temperature diagram [spy.net] takes the collected data and renders to PNG or GIF depending on what your client claims to accept.
Making a better society is hard work. (Score:3, Interesting)
Perhaps you should become more familiar with what RMS says and realize that the major underlying justification of the free software movement is its ethical basis; the main questions for a social movement (such as the free software movement) address what kind of world we want to live in and how we should treat each other. I can think of no way to answer that question that forgoes an examination of one's ethics.
This is not "blather" as you so discourteously put it, nor is your response insightful (as some moderators have apparently chosen to say). Questions of ethics are some of the most important questions in society. I think your objection to the matter says more about you than about RMS or his way of conveying the importance of software freedom.
Re:The Algol, the (Score:3, Interesting)
Re:Insightful?! (Score:3, Interesting)
I'm not sure I agree with that. To give the most obvious example, I currently work on a project that ships on probably 15 different platforms myself, including several popular flavours of UNIX, a couple of flavours of MS Windows, a couple of flavours of Mac, and a few more esoteric extras. (The project is basically a library, BTW.)
We write in C++. Why? Because everyone can bind to C++ (or at least to the C interface we also provide), and because there's a C++ compiler available for all of those platforms. Neither is true of Java.
The fact that Java aims to be WORA doesn't mean that it is, nor does it invalidate the use of standardised languages with compilers on many platforms (of which there are quite a few) as alternatives for cross-platform development.
Re:The Algol, the (Score:5, Interesting)
Algol descendants aren't exactly "horrible abominations," but they're not inherently better than functional languages either. If you believe they are, you probably haven't spent enough time with functional languages.
You claim that the syntax is barely readable. I'll admit, Lisp is hard to get used to at first. However, I suspect that's because most people focus on the parentheses. If you actually get into using Lisp, and get a good editor that matches parentheses and indents for you, it becomes much easier. How is:
if(condition) {
stmt1;
} else {
stmt2;
}
so much different than:
(if condition
stmt1
stmt2)
? Also, if you don't like all the parentheses, have you looked at Haskell for example? There's more to functional languages than Lisp.
Also, how are the semantics of functional languages any more unclear than any other language? Sure, I don't expect someone to know what callcc does just by looking at it, but how would someone know what *foo does just by looking at it? Go up to a random novice with no pre-existing C knowledge and ask them what atoi does. The semantics of C-like languages are only "more clear" because you've been learning them for years, and you've never bothered to really learn functional languages.
As for non-recursive problems, you can program in a procedural fashion in Lisp. There are macros for loops so you don't have to write tail recursion yourself. Your argument there holds no water.
As a final note, I'd like to point out that as far as "catering to the machine," C is closer to that than modern functional languages. C is a couple steps above assembly; everything executes one line after another; you have variables that map to memory addresses; you have functions that are like blocks of code with labels (and some other magic). Haskell, on the other hand lets you write code like this:
f x = y * y
where y = z + sin z
where z = x * x
Which actually has to be executed in reverse order (more or less). That's not exactly catering to the machine.
Re:Did you read the article? (Score:2, Interesting)
I.e., while it certainly mostly runs on non-free platforms, he has not locked himself into them by any reasonable interpetation of that.
Not to mention, I have no idea what you mean by 'non-free'. It's prefectly legal to design your own version of most processors out there, witness AMD, and the specifications are open.
RMS isn't complaining about free software running on non-free machines, he's complaining about free software that only runs on non-free machines, and cannot run on anything else.
Interestingly enough, there is non-free hardware planned, namely, the stuff that impliments DRM, and RMS is fairly close to punching the designers out in the street, ideology-wise.
Re:Give me a free java! (Score:3, Interesting)
I use java a lot, but I find the opposite to be true. Many things I do commonly in other languages turn out to be a burdeon in java. For example (OCaml):
let dirs = List.filter Fileutils.isdir dirent_list
Java work-alike of that (assuming a Collection of File objects):
ArrayList dirs=new ArrayList(dirent_list);
for(Iterator i=dirs.iterator(); i.hasNext(); ) {
File f=(File)i.next();
if(!f.isDirectory()) {
i.remove();
}
}
Similarly:
let dirs,files = List.partition Fileutils.isdir dirent_list
Java version:
ArrayList dirs=new ArrayList();
ArrayList files=new ArrayList();
for(Iterator i=dirent_list.iterator(); i.hasNext(); ) {
File f=(File)i.next();
if(f.isDirectory()) {
dirs.add(f);
} else {
files.add(f);
}
}
Another language I use a lot is scheme, which does not have partition. However, it's easy to write:
(define (partition f lin)
(letrec ((loop (lambda (l y n)
(if (null? l)
(list (reverse y) (reverse n))
(if (f (car l))
(loop (cdr l) (cons (car l) y) n)
(loop (cdr l) y (cons (car l) n)))))))
(loop lin '() '())))
Imagine how to do a similar thing in java. Hint: there's no lambda, so there'd have to be an interface defining a method that takes an object and returns a boolean and you'd end up using (at least) anonymous inner classes instead of lambda functions when you invoke it.
One thing I've done to make my java coding easier, though, is to build a framework for writing struts actions in jython. I can turn your average 20 line struts action into a two line jython script.
Re:RMS, Slavery, and Corporate Slime (RIAA Example (Score:2, Interesting)
> control over us the RIAA has, we need to draw a
> line in the sand. But most of us don't give a
> damn.
Sun isn't the RIAA.
You seem to be aligning the 'Free' Software movement with the movement against Corporate control of our lives. Is this really valid?
If you want to align this debate with another - then maybe a more appropriate on is debate about unborn children. Most people are not completely pro-choice or pro-life, they recognise there is a middle ground balance between the rights of the child and the rights of the parents. The FSF reminds me of the rabid pro-lifers. The line in the sand you're trying to draw it not realistic or ethical.
I think there is a emerging concensus that the most 'ethical' software license tries to find a balance between protecting the rights of the producers of software to protect and gain the benefits of their work (without being ripped off) and the rights of the consumer to use software in as many ways as possible (including using it in proprietary systems).
The balance of power has shifted too far towards the producers of software but that doesn't mean the other extreme is the best route to follow.
> We're like the drowning person who flails at his
> rescuer. And until someone else steps up to
> carry the torch, RMS is our rescuer. RMS is the
> King.
It's this sort of ideological cult-of-personality stuff just puts people off the FSF.
Re:The best tool for WHAT job? (Score:3, Interesting)
Personally I hate applets. As for limited cross-platform usage of Flash, I beg to differ. It handles MS Windows, Mac, Linux... The toolkits you mentioned are (a) not all installed in most systems and (b) not web-based which is what you were comparing applets to.
Okay, you really lost me on this one. You just said that JDBC did a great job of database abstraction. And your conclusion: don't use it?
Like Batik for server-side SVG to raster (PNG/JPEG) conversion? Yeah. Totally useless. What was I thinking?
Ummm... GCJ?
Please also note that if Sun halted all development on Java, it would (a) alienate every customer they've had for the last eight to ten years and (b) create a genuine interest in funding an alternative (think: IBM funding and assisting gcj/kaffe/gnu classpath).
Won't happen? What about EJB? Certified licensees only. Wups! Who are those JBoss folks? LGPLed EJB-compatible project? Well we won't certify it. Hey! People are using it in droves anyway! Ummm... Okay... Maybe we'll look into certifying it. (This of course mattered very little as people were apparently using it with or without Sun's endorsement.)
Re: Future of Sparc (and other things...) (Score:1, Interesting)
It took about a year before Howard Sachs and his people were either laid off or assimilated into other Sun projects (the buzz was that it was mostly the former), Sun and Microsoft had re-affirmed their mutual hatred, and any whiff of a prospect of Windows running on a Sun-designed processor was eradicated. Intergraph in the meantime jumped into bed with Redmond (and almist perished) as one of the earliest adoptors of WinTel for technical applications, but at the same time sat on its remaining design patents and nailed Intel for infringement some years later.
Re:Non sequiter (Score:1, Interesting)
RMS has never said it is unethical to want to get paid for your work. But if it is OK to want to get paid for your work, it does not follow that it is OK to impose restrictions on what people can do with software that you write. I think it's pretty obvious that the one does not follow from the other.
What is the free software movement if not precisely a movement of people who do not want restrictions imposed on how they use their computers or the software on them? The free software movement is a movement of people who want to use software only if that software does not put restrictions on how they use it. These people want to "live [compute] in freedom", to quote RMS from the article. They believe that the restrictions you find in non-free software that are unethical!
RMS's "dogma" does not taint the free software movement, it is the basis of that movement. (That doesn't mean it is the basis of the Open Source Movement, or that everyone who uses Linux agrees with everything RMS says, or many other things. It means the pursuit of free software is essential to the free software movement, so that to remove that would be to eliminate the movement.)
To the extent that you don't care whether the software you use is free of restrictions, you are not a supporter of the free software movement. To the extent that you want software you provide to others to be non-free, you are an enemy of the free software movement.
The ideals of the free software movement and getting paid to write software are entirely compatible, just not necessarily in the way that you might think.
Re:Stallman's article (Score:3, Interesting)
Yes, GCC varies from the C standard implemented by other C compilers. But whenever that happens, they point it out in the documentation! When Sun's manual describes a Java feature not implemented by alternatives, they naturally don't mention this fact.
It's possible you link to a proprietary library without noticing.
Only if the proprietary library is on your computer. If you actually care about that issue, then it's very easy to prevent. There are several Linux distributions that scrupulously install only "Free" software.
you very rarely (if ever) need to resort to using proprietary libraries (Sun or not).
Wrong! Tell me what open-source alternatives there are for Swing. It's nearly impossible to convince a programmer writing with Sun's Java to build to any other GUI library.
Re:The Sun/Microsoft deal makes sense (Score:3, Interesting)
It's not surprising that
Re:Read the gnu manifesto (Score:3, Interesting)
If you read the article Stallman claims runing Java on GNU/Linux as running a non-free software on a Free system. Thus claiming that GPL is a free license. His description of free software in the begining of the article, conviniently fails to mention the copyleft philosophy.
So Stallman describes free software and gives an example of a product under a copyleft license and masquerades it as free software. If you read the FSF website they clearly make a distinction between copyleft software, non-copyleft free software and free software.
http://www.fsf.org/philosophy/categories.html#F
"Free software is software that comes with permission for anyone to use, copy, and distribute, either verbatim or with modifications, either gratis or for a fee. In particular, this means that source code must be available. "
http://www.fsf.org/philosophy/categories.html#N
"Non-copylefted free software comes from the author with permission to redistribute and modify, and also to add additional restrictions to it."
http://www.fsf.org/philosophy/categories.html#C
" Copylefted software is free software whose distribution terms do not let redistributors add any additional restrictions when they redistribute or modify the software. This means that every copy of the software, even if it has been modified, must be free software."
Clearly, the FSF makes a distintion between different degrees of freedom. But Stallman in the Article mixes and matches the two differnet
philsophies to create and illusion of a so called java trap. When free software in conjuntion with a system protected by a copyleft license, like the GPL (GNU/Linux), will also work in his example of the trap.
Basically he is claiming that a piece of software is entraped because it is less free than the one it is dependant on.
In the begining of the article he only mentions what the FSF clearly defines as "Free Software".
"Roughly speaking, they are: the freedom to run the program, the freedom to study and change the source, the freedom to redistribute the source and binaries, and the freedom to publish improved versions. (See http://www.gnu.org/philosophy/free-sw.html.) Whether any given program is free software depends solely on the meaning of its license."
Notice the term license. By definition of the GPL it is a copyleft license not free software. This again is FSF's own definiton page.
"In the GNU project, we use ``copyleft'' to protect these freedoms legally for everyone. But non-copylefted free software also exists. We believe there are important reasons why it is better to use copyleft, but if your program is non-copylefted free software, we can still use it."
Here he seems to suggest that copyleft is the way to go. One thing is certainly clear Stallman and the FSF spin the word "free" to mean many things.
Free software is free (no restrictions). copyleft (freedom with restrictions) is also free software? So why isn't Sun's jvm which is free (to mredistribute and monetarily)
but incompatible with the GPL non free, becuase of frame of reference. The GPL is also then not free when placed in context with a license more free.
This is confusing to anyone who isn't well versed with the FSF lingo. Thus my request to Stallman.