Topic closed
fanofcena wrote:
I must say , to java is indeed a wrong way java is slow.. hell its even slower then javascript now + java will have to follow the hard syntax, something like javascript will be much better or C ( if you really wanna make it that powerful ), because javascripts syntax is loose like scratches is
java would be hundreds of thousands of times quicker than javascript since java can be written(and quite often is) to be just as fast as c++
I think you're thinking about the java scratch player, which is very slow since it is written mainly in Logo...
Offline
TRocket wrote:
fanofcena wrote:
I must say , to java is indeed a wrong way java is slow.. hell its even slower then javascript now + java will have to follow the hard syntax, something like javascript will be much better or C ( if you really wanna make it that powerful ), because javascripts syntax is loose like scratches is
java would be hundreds of thousands of times quicker than javascript since java can be written(and quite often is) to be just as fast as c++
I think you're thinking about the java scratch player, which is very slow since it is written mainly in Logo...
+1
Offline
TRocket wrote:
fanofcena wrote:
I must say , to java is indeed a wrong way java is slow.. hell its even slower then javascript now + java will have to follow the hard syntax, something like javascript will be much better or C ( if you really wanna make it that powerful ), because javascripts syntax is loose like scratches is
java would be hundreds of thousands of times quicker than javascript since java can be written(and quite often is) to be just as fast as c++
I think you're thinking about the java scratch player, which is very slow since it is written mainly in Logo...
Well i have seen benchmarks of javascript being 103% slower then C++ code and Java being 150% slower then the same ,
Oh and by the way knowing java core i know how fast java can be but when it comes to programming code it gets harder then C++ and JS both (hell a 100 time taskier then jS and probably you are accounting javascripts speed by keeping the old IE and Safari javascript in mind , the time is of Spidermonkey and v8 and they booth squeeze javascript to limits :-)
infact the man behind the V8 is also a worthy past member of the Java development team :-)
Last edited by fanofcena (2012-05-28 23:08:38)
Offline
Java is slow, yes. C++ is much faster.
But who cares! Java means compile once, run anywhere!
Offline
elfin8er wrote:
Assuming it'll be EXACTLY like scratch, but with a real programming language, maybe you can use something like = to mark a command for an example. Would it be something like this?
= When green flag clicked
= Wait 3 seconds
= Move %scratch cat.png% 3 steps
= Rotate 34 right
or would it have to be more complex then that?
= is an assignment operator maybe they should use #
# When ( Green_Flag , ' clicked ' , function(){
wait('3 sec');
Move( ' scratch_cat.png ', ' 3 steps '):
Rotate( '34deg','right');
});
Offline
jji7skyline wrote:
Java is slow, yes. C++ is much faster.
But who cares! Java means compile once, run anywhere!
And JavaScript means compile never run everywhere and anywhere
Offline
fanofcena wrote:
jji7skyline wrote:
Java is slow, yes. C++ is much faster.
But who cares! Java means compile once, run anywhere!And JavaScript means compile never run everywhere and anywhere
Pretty much
Offline
fanofcena wrote:
jji7skyline wrote:
Java is slow, yes. C++ is much faster.
But who cares! Java means compile once, run anywhere!And JavaScript means compile never run everywhere and anywhere
& get way less features than java
Offline
jji7skyline wrote:
Java is slow, yes. C++ is much faster.
All benchmarks I've seen were not fair. I changes the Java program a little and the program got nearly 4x faster than the old version, faster than JavaScript and not optimized C++...)
Look: http://blog.famzah.net/2010/07/01/cpp-v … mment-4080 (the table above)
fanofcena wrote:
Well i have seen benchmarks of javascript being 103% slower then C++ code and Java being 150% slower then the same ,
Oh and by the way knowing java core i know how fast java can be but when it comes to programming code it gets harder then C++ and JS both (hell a 100 time taskier then jS and probably you are accounting javascripts speed by keeping the old IE and Safari javascript in mind , the time is of Spidermonkey and v8 and they booth squeeze javascript to limits :-)
infact the man behind the V8 is also a worthy past member of the Java development team :-)
The benchmark was the one the author changed yesterday? (caue of my optimized Java version). You'll see how faster Java (7) is...
Last edited by ZeroLuck (2012-05-29 04:46:03)
Offline
fanofcena wrote:
elfin8er wrote:
Assuming it'll be EXACTLY like scratch, but with a real programming language, maybe you can use something like = to mark a command for an example. Would it be something like this?
= When green flag clicked
= Wait 3 seconds
= Move %scratch cat.png% 3 steps
= Rotate 34 right
or would it have to be more complex then that?= is an assignment operator maybe they should use #
# When ( Green_Flag , ' clicked ' , function(){
wait('3 sec');
Move( ' scratch_cat.png ', ' 3 steps '):
Rotate( '34deg','right');
});
In a real programming language, for the sprites you would first need to load the image into memory. And in real programming, sprites don't have "costumes".
Offline
nathanprocks wrote:
fanofcena wrote:
elfin8er wrote:
Assuming it'll be EXACTLY like scratch, but with a real programming language, maybe you can use something like = to mark a command for an example. Would it be something like this?
= When green flag clicked
= Wait 3 seconds
= Move %scratch cat.png% 3 steps
= Rotate 34 right
or would it have to be more complex then that?= is an assignment operator maybe they should use #
# When ( Green_Flag , ' clicked ' , function(){
wait('3 sec');
Move( ' scratch_cat.png ', ' 3 steps '):
Rotate( '34deg','right');
});In a real programming language, for the sprites you would first need to load the image into memory. And in real programming, sprites don't have "costumes".
They could have costumes. In my Scratchlike Processing library, Simplicity, there are costumes for sprites.
Offline
ZeroLuck wrote:
jji7skyline wrote:
Java is slow, yes. C++ is much faster.
All benchmarks I've seen were not fair. I changes the Java program a little and the program got nearly 4x faster than the old version, faster than JavaScript and not optimized C++...)
Look: http://blog.famzah.net/2010/07/01/cpp-v … mment-4080 (the table above)fanofcena wrote:
Well i have seen benchmarks of javascript being 103% slower then C++ code and Java being 150% slower then the same ,
Oh and by the way knowing java core i know how fast java can be but when it comes to programming code it gets harder then C++ and JS both (hell a 100 time taskier then jS and probably you are accounting javascripts speed by keeping the old IE and Safari javascript in mind , the time is of Spidermonkey and v8 and they booth squeeze javascript to limits :-)
infact the man behind the V8 is also a worthy past member of the Java development team :-)The benchmark was the one the author changed yesterday? (caue of my optimized Java version). You'll see how faster Java (7) is...
Time to write an updated node.js version aswell then ;-) and by the way you see my point "optimized" java ? it required your existing knowledge and thinking while a very unoptimized JS code beats original java :p , Why i love JS is that its fast , and it allows us to forget about stuff like optimized basic algorithms for some time and by the way Isn't java the language which lacks the basic functionality of closures :-$ sorry !
Last edited by fanofcena (2012-05-29 15:46:27)
Offline
fanofcena wrote:
Time to write an updated node.js version aswell then ;-)
You aren't able to make the node.js code faster without changing the algorithm.
The code is already using arrays and the arrays are accessed directly. (No getter/setter).
fanofcena wrote:
and by the way you see my point "optimized" java ? it required your existing knowledge and thinking while a very unoptimized JS code beats original java :p
This isn't very complicated. I just replaced the "ArrayList<Integer>" with my own class "IntVector"... JavaScript won't be faster than type safe languages like C/C++ and Java.
The big problem is, that an array in JavaScript is always an array of references because there is no type safety in JavaScript. When you access an item of the array you are changing the reference's target and not the number directly.
fanofcena wrote:
and by the way Isn't java the language which lacks the basic functionality of closures
Java has a much bigger API than JavaScript and you can use it for GUIs, Servers, Enterprise software and games while JavaScript was made for webpages. What's the problem? Each language has it's good sides and it's bad sides... Nobody will try to make a 3D game in PHP for example
Offline
ZeroLuck wrote:
fanofcena wrote:
and by the way Isn't java the language which lacks the basic functionality of closures
Java has a much bigger API than JavaScript and you can use it for GUIs, Servers, Enterprise software and games while JavaScript was made for webpages. What's the problem? Each language has it's good sides and it's bad sides... Nobody will try to make a 3D game in PHP for example
Funniest thing about that , i have known a few who tried using the PHP GTK implementation..
And yes perhaps javascript and java both has positive and negetive points in recent years javascript though has came out of the web-browser and now powers mobile applications , servers , even Robotics! [woot?] being made and developed on the web it gains a lot of priviliages and lacks a lot of them aswell [like no low-level interaction]..
Java on the other hand started as a full scale programming language and is widely used and wildely used for the purpose of robust and to the point development ,
It depends purely on the programmer though like you can make anything on java and i can re-do the same thing javascript using node.js :-) simply because of the fact that you love java and i love javascript & c++ ( and i love the fact i can write addons for node.js in C++ and they work ! ) .. Why i was suggesting him to use javascript instead of java was the already done work in javascript would make it easier and faster for him to complete the project in less time , moreover javascript and scratch are very very similar (in fact a few wrappers and something like CoffeeScript would do it for him in a very effiecient and awesome manner without having to worry about implementations) on the other hand doing this on Java will be quite a pain for him because he will have to run a loosely programmed code on the top of a strictly typed langauge.
I agree Java has more API's but since HTML5 and node.js javascript is not left much behind .. I think we two should collaborate on something written in java and javascript , i am sure we two will get to learn a lot from each other :-)
Last edited by fanofcena (2012-05-30 06:35:55)
Offline
fanofcena wrote:
I think we two should collaborate on something written in java and javascript , i am sure we two will get to learn a lot from each other :-)
What about something similar like Scratch?
I am working on a program called JBlocks. (=> Java). You could do the same in JavaScript Canvas
Screenshot of JBlocks: jblocks.png
Last edited by ZeroLuck (2012-05-30 14:15:08)
Offline
ZeroLuck wrote:
fanofcena wrote:
I think we two should collaborate on something written in java and javascript , i am sure we two will get to learn a lot from each other :-)
What about something similar like Scratch?
I am working on a program called JBlocks. (=> Java). You could do the same in JavaScript Canvas
Screenshot of JBlocks: jblocks.png
Canvas is the wrong way ;-) i would choose DOM 4 :-)
Why ??
1. Same performance
2. CSS 3 Transforms are same like scratch
3. Allows to handle stuff as objects
4. Allows better event binding
5. with all this it runs fast :-D even on an iPhone / Android
Offline
ZeroLuck wrote:
fanofcena wrote:
Canvas is the wrong way ;-) i would choose DOM 4 :-)
Okay. You can try it
I will once I am done with my work Projects :-) writing media server in JavaScript ., am pretty much done but still some code needs greasing
Offline
ZeroLuck wrote:
fanofcena wrote:
I think we two should collaborate on something written in java and javascript , i am sure we two will get to learn a lot from each other :-)
What about something similar like Scratch?
I am working on a program called JBlocks. (=> Java). You could do the same in JavaScript Canvas
Screenshot of JBlocks: jblocks.png
That is so awesome! I like how you have BYOB and CYOB.
Offline
Bump.
Offline
Tihs would be really helpful to me, i struggle with GUI scripting, but i am quite fluent when i am requierd to actually type out the script, and lets face it, it is much more fun too! Happy to help out with any scripting needed!
Offline
Topic closed