last day (30 days later) » 

fge
10:17 AM
Well, that was fast, let me add some tags
 
Aww, this room requires keeping discussions civil. I'm leaving.
 
fge
room topic changed to Language design debate: Argumented discussions about the design of your favorite language; confront your opinions with others, learn from others. Keep it as civil as possible! [c] [c#] [c++] [haskell] [java] [javascript] [lua] [scala]
Let's get straight to the point as to a debate... I dislike JavaScript
First reason: numeric handling; JS knows about nothing else than IEEE 64bit base2 floating point numbers; all operators presumably only working on natural numbers, such as left/right shift operators etc, are hacks
Second reason: no strict typing; you can declare var foo = 1 or var foo = "bar"; what is foo?
Flaws in Java? There are; and of course, the primary target is arrays
Arrays cannot be made generics; and for a reason: generics and arrays are incompatible
Now I'll let the room sleep
And wait for other discussions
 
I realize when you do JNI , your project becomes isoleted from other OS
 
The system of handling object and state is atrocious. The prototype system already cost many a young developer's soul
 
Learning another language is somewhat painful, basically The first language you have learned seems the bias -_-
 
fge
10:34 AM
@deadlydragon00 it is a necessity
 
barriers
 
fge
Java was designed to be a platform independent language; as such its set of libraries (the JDK) has to be platform independent
And at some point, native code has to be invoked
There is no choice
JNI is the mechanism by which the JVM allows you to interact with native code in both ways: from native to JVM bytecode, and from JVM bytecode to native
And yes, if you write a library which depends on JNI, you have to write code which will interact the same whichever the platform; there is no such thing as a free lunch
 
fge
Libraries which use JNI but only run on a limited set of OSes abound
jpcap, for instance
Even IDEs; for instance IDEA
 
thats my concern on JNI -_- ^
 
fge
10:41 AM
But then how deep do you want to go?
The JVM guys go as deep as they deem it safe to go
 
who are those JVM guyz?
 
fge
They are very skilled people having worked with many kind of OSes over time and struggling to unify some fundamental aspects of OS interactions behind a safe, easy API
And that is no easy job
And even that is only part of the problem, of course
 
Oh wait. I am very curios to arrayCopy , how does JVM boost this method basically you can just create loops and some simple copy code.
it seems that arrayCopy seems faster compares to building my own method
 
fge
You mean System.arrayCopy()?
 
yeah
is it done on deeper native?
 
fge
10:47 AM
Most probably so, yes
There indeed exist CPU instructions on modern CPUs optimizing straight copies of a given linear range of data to another linear range
And the JVM makes use of that
 
does it mean java code scale by the help of jvm?
 
fge
s,java code,byte code,
There are two entities: the Java compiler and the JVM
The Java compiler translates code you write into byte code; the JVM takes byte code as input
And the JVM executes that byte code, of course, but then there is also the JIT which can, at runtime, decide to optimize that bytecode -- down to machine code (ie, raw CPU assembly) when possible
 
Ok now I can see java that is pretty amazing, since C++ you need to do 2x more boilerplate
 
fge
11:24 AM
Depends for what tasks
 
fge
12:21 PM
OK, on to some other strangeness of design language... Why didn't C define from the get go what int and long were? As a result, pseudo types like {u,}int_*t had to be designed... I guess this is due to the language's age :/
 

  last day (30 days later) »