News for hackers. Stuff that matters.
Re:Girls Need Math by Tichy on Saturday September 01, 2012 @03:12PM (#4464755)
If as a 14 year old your plan is to write an operating system, learning C might make some sense. It just seems like a very unlikely scenario to me.

Also I think a lot of tools for example in Linux are written in other languages.

Most likely scenario for using C as a 14 year old might be doing electronics projects, but I think Arduino is most commonly programmed in Java.

Re:Girls Need Math by wollw on Saturday September 01, 2012 @07:40PM (#4465528)
Arduino is C/C++. It's mostly a C++ abstraction built on top of the avr-libc library. The Arduino IDE is written in Java though.
Re:Girls Need Math by Tichy on Sunday September 02, 2012 @06:19AM (#4466698)
I think you can program the Arduino in C/C++ (like every other Microcontroller), but I was under the impression that it actually has a Java Runtime and the usual way is to code Arduino programs in Java.
Re:Girls Need Math by wollw on Sunday September 02, 2012 @04:52PM (#4468066)
The Arduino is based around Atmel's 8 bit AVR architecture which really doesn't have what it takes to run a JVM. The ATmega328P which the Arduino Uno board uses has 32KB of code space and 2KB of SRAM which isn't really enough for something like Java. The normal way Arduino projects are built is by defining a "setup" function and a "loop" function which, when compiled, are actually just called by a hidden C++ file with a main function that essentially does this:

    int main(void) {
        setup();
        for (;;)
            loop();
    }
The actual file does a bit more and can be found in their git repository here: https://github.com/arduino/Arduino/blob/master/hardware/ardu...