[rescue] Mozilla Firefox

Charles Shannon Hendrix shannon at widomaker.com
Mon Apr 26 21:31:58 CDT 2004


Mon, 26 Apr 2004 @ 14:29 -0400, Dave McGuire said:

> >I've always found Java to be interesting, but nothing new.  It's like
> >an OO version of C.
> 
> Exactly.  It's what C++ should have been.  I believe the world would 
> be a much better place if:
> 
>   - C++ would completely disappear

Yeah, but that's pretty much wishful thinking for the time being.

>   - Java would be renamed to C++

How about call it JC, along the lines of Objective C (OC)?

>   - the "virtual machine" aspect of Java would be completely removed

Lot's of opposition to that.  You can have a compiler without removing
this can't you?  Or do you feel that library issues or GC behavior will
change so much with a compiler than maintaining the JVM will be too
hard?

>   - all Java implementations would compile to native binaries

The above pretty well dictates that.

> >I pretty well agree with Jamie Zawinski's assessment of Java.  So much
> >promise, so many mistakes.
> 
>   Isn't that his assessment of everything? ;)

Damn... you're right...

> >Sun has tried to create Java by fiat, and I don't believe you can do
> >that with a computer language, especially one like Java.  They tried
> >to make Java do everything, with the result being that it does
> >nothing very well.
> 
>   Well...  *shakes head*  It seems pointless to argue with you until 
> you've used it for a few real projects.

I think you are misreading me, and maybe that's my fault.

What I mean is that Java comes bundled with a JVM and a huge set of
class libraries to tackle just about everything, even job which Java
isn't really good for.  Sun pushed this out in a relatively short period
of time.  

Yes, I know you can think of Java, JVM, and classes seperately, but that
is not how Sun promotes it nor is it how the majority of Java shops
think of it.

By contrast most other languages evolved over a long period of time and
the majority of libraries are third party code.

I think you assumed something far more complex than what I mean.

>   Well I can't agree with you here.  My experience is with the 1.3 and 
> 1.4 VM distributions.  Windows is the only outlier here...the threading 
> in Windows is so fucked up that you need to detect if you're running in 
> Windows and re-jigger all your thread priorities to make things work.  

It wasn't very good in Linux until recently either, and 2.6 is still
not completely there yet.  No VM that I know of makes use of the new
threading yet either.

> Aside from that, in a large complex application, performance was 
> consistent, accurate, and stable on:
> 
>   - RS/6000 running AIX
>   - PeeCee running Linux
>   - PeeCee running Windows (with the exception above)
>   - UltraSPARC running Solaris9
>   - PPC G4 running MacOS X
> 
>   Now yes, these are the machines that you mentioned...but, for a 
> commercial product, what else would you really want to run it on??

Right now, primarily NetBSD-sparc, though I can think of others.

Besides, my only point was that WORA is mythology, and it is. Unless the
JVM is nearly everywhere and of high quality, that's just a fact.

Maybe this is yet another good reason to just move Java to be a real
compiler.

Java was created at a time when writing portable code was (I think) much
harder than it is now, especially GUI code.  I think the reasons for
having a JVM especially are largley gone now, even though I do feel like
compiler and language design needs work.

So that leaves Java's merits as a language on its own, and I think that
is the best place for it to focus.

>   Well it's a commercial product, so I can't give it to you. ;) But   
> this is not theory, this is where I used to work, and that software   
> is running in quite a few classrooms today.                           

Nuts... I'd like to see it, or any large Java program that doesn't kill
my system, or whose code doesn't look like line noise.

Of course, I have a lot of line-noise in my Perl code... but there it is
a feature... :)

> Saying you don't believe me won't automatically make that software
> start running slowly. ;)

Sometimes I think English is the worst form of communication ever...

I don't mean to say I don't believe you, literally, just that I have
tried probably over 50 different Java applications in the last 5
years, and none of them has impressed me.

I just don't like the whole Java hairball.  Java as a language with
a native compiler and leaner classes might make a totally different
impression on me.

I have a Linux machine with a 700MHz K7, 256MB of RAM, and decent SCSI
subsystem.

Outside of unavoidably CPU hungry applications, that should be more than
enough machine for just about application.

Of course, we were just talking about Gnome, written in mostly C, and it
kills my machine sometimes too.

> >I have certainly had usable Java programs, but no fast ones.
> 
>   Well that all depends on how you write your code. ;)

I'd like to think I'd do a better job than what I've seen.

I tried Java programming for awhile, but that was back in the days of
the earlier releases, and I didn't have a well supported platform to use
(Linux and BSD).

> >There is a certain amount of unavoidable overhead in Java, and in
> >non-trivial programs, it is quite high.
>
>   Of course there is overhead.  I never said "Java is as fast as C".

OK.  It was starting to sound like that.

I think for me memory use is the biggest problem.  I can't run but one
Java app at a time most times.

>   There is nothing about the Java (the programming language) that 
> technically ties it to the use of a virtual machine.  

Heh... there is passionate debate on both sides of this one.

I think the opposing side mostly feels that somehow Java will be ruined
if it becomes "just another compiler".

It doesn't mean the JVM goes away though, so it seems that Java is
everything it is now, plus a native compiler.

> That is the main thing that makes it slower than everything else.
> Compiling to native binary would still be slower than something
> like C, purely because of the fact that (regardless of what college
> professors like to say) C is an extremely low-level language, and Java
> is an extremely high-level language.

I could easily like Java if that happened.

Quite a few languages are slower than C, so that alone isn't a problem.

>   The application I'm talking about is about 45K lines of Java, and a 
> HUGE GUI, back-ended with an SQL database, real-time communications and 
> byte-level protocol processing.  The target machine is a 500+MHz/256MB 
> G4 running MacOS X or a 1.2+GHz/128MB PeeCee running Linux.  It runs 
> fine on both platforms.

How much memory does your app use?  Do you do any JVM tuning?  I've not
had much luck doing that to try and reduce memory consumption.  I had
a bit of luck with initial startup by reducing initial dynamic heap
allocation, but some apps crashed.

That's why I say that I'll believe it when I see it.  It's not a comment
about you, just that so far all big Java programs I've tried to use were
too piggy to put up with.

Granted, I don't have a screaming fast machine, but my God, it isn't
*that* bad.



-- 
shannon "AT" widomaker.com -- ["People should have access to the data which
you have about them.  There should be a process for them to challenge any
inaccuracies." -- Arthur Miller]



More information about the rescue mailing list