Java Virtual Machine
Moderator: MaxCoderz Staff
Java Virtual Machine
Is it possible to write a Java Virtual Machine for a calculator like the TI83+?
I don't like asm and Basic is so slow...
BTW: Someone wrote one for the Robotic Command Explorer:
http://lejos.sourceforge.net/
I don't like asm and Basic is so slow...
BTW: Someone wrote one for the Robotic Command Explorer:
http://lejos.sourceforge.net/
-
- Calc Master
- Posts: 1089
- Joined: Fri 17 Dec, 2004 9:53 am
lol
Basic is surely slow (except if ur name is Kevin or dysfunction), and ASM is hard and not everyone likes it, and its not oncalc either, so MLC is the solution! Much faster than Basic, oncalc and easily portable!
- kv83
- Maxcoderz Staff
- Posts: 2735
- Joined: Wed 15 Dec, 2004 7:26 pm
- Location: The Hague, Netherlands
- Contact:
Re: lol
but still not avaible on 83 or 83+... which is a downsidethe_unknown_one wrote:Basic is surely slow (except if ur name is Kevin or dysfunction), and ASM is hard and not everyone likes it, and its not oncalc either, so MLC is the solution! Much faster than Basic, oncalc and easily portable!
-
- Calc Master
- Posts: 1089
- Joined: Fri 17 Dec, 2004 9:53 am
lol
Yea, but it'll be soon
-
- MCF Legend
- Posts: 1601
- Joined: Mon 20 Dec, 2004 8:45 am
- Location: Budapest, Absurdistan
- Contact:
Objects? Seriously, anyone who starts programming with an OO language will face unsurmountable troubles later, especially if that language tries to evade the notion of 'pointer'. You can only have a good understanding of any language if you actually know what its constructs are transformed into by the compiler on machine level, e. g. subroutine calls use the stack to store the return address, loop constructs turn into conditional jumps, instance variables of objects need to be allocated in the heap etc. This is only trivial with asm. Unless you know what conceptual steps the machine makes when you write down something, your understanding is mere illusion.
Well, let me tell you something. The first programming language I learned was Java back when I was about 14 years old. I think the advantage of it is that you approach OOP as something entirely new and not as an extension of something else. Really OOP is all about thinking in terms of objects not in code. Actually you're not even interested in the code. That's what's meant with software architecture these days. You "draw" the software before building it.Objects? Seriously, anyone who starts programming with an OO language will face unsurmountable troubles later, especially if that language tries to evade the notion of 'pointer'.
I don't think this is necessarily the case when programming in such a high level language as Java or any OO language for that matter (Eiffel,...). In that case you're only interested in the service your objects provide to other objects. In Eiffel you'd set up a contract describing what each object does and how it relates to other objects. When you've done this you're 80% there without writing a single line of code. The actual implementation of these objects usually boils down to finding a good algorithm. And only when you've found a good algorithm you're interested in an efficient implementation of it, which might involve fiddling with low level stuff, but after all the previous things this is really the least of your worries even if there are some significant speed gains. Getting things to work properly (without bugs) takes far more effort and is far more important and you don't need to know what a while loop is translated into to get that far. All you need to know is that the thing loops on a given condition.You can only have a good understanding of any language if you actually know what its constructs are transformed into by the compiler on machine level.
Of course things are entirely different when you're programming routines for numerical mathematics or something where you even want to control what goes in and out the processor cache to increase the speed, but then of course you don't use an OO language for this.
I do agree with you on the fact that knowing assembly even for a simple chip as the z80 greatly improves your understanding of how a computer works, but in large software projects this knowledge is pretty insignificant if you ask me.