Society of Robots - Robot Forum
Software => Software => Topic started by: Gordo4444 on December 07, 2008, 02:51:36 PM
-
Is there a perl-based microcontroller out there? I just started using perl for home projects and stuff and I was wondering if it could be used in programming microcontrollers.
-
I have never heard of, nor seen one. And a fast google search yielded inconclusive results.
-
Perl is not compiled, it is interpreted, therefore you would need to do something like Java robots do. They have a really small JVM that they have to stuff on the MCU. So if you can find a small interpreter you can upload!
-
I don't think such a thing as a "Perl Virtual Machine" exists! Java has been designed from the ground up to use a VM, this makes it possible for a java virtual machine to exist. Java code is compiled for the JVM just as .NET code is compiled for the Net Framework. On the other hand we're allways running perl files as... perl files!
One of those powerfull Atmel MCU's that can support an Linux Kernel should be able to handle perl.
-
to quote wikipedia:
Many earlier computer languages, such as Fortran and C, were designed to make efficient use of expensive computer hardware. In contrast, Perl is designed to make efficient use of expensive computer programmers.
Perl has many features that ease the programmer's task at the expense of greater CPU and memory requirements.
doesn't sound good for inexpensive MCUs.
-
hey Gordo,
ok, i'm biased: i avoid using perl at work if at all possible. (python is my preference if you need a scripting language...)
while it has a large following with oldschool sysadmins perl is not suited to microcontroller programming.
as a result you will not find one using it.
take the plunge and try C. it's far better suited to microcontroller programming.
if you can program in perl you can learn C and you will have a huge range of platforms to choose from.
dunk.
-
im even more biased from perl, i detest dynamic typing - its wrong, just plain WRONG!!! >:(
-
im even more biased from perl, i detest dynamic typing - its wrong, just plain WRONG!!! Angry
heh. i presumed we were talking about this perl:
http://perl.com/ (http://perl.com/)
not this perl:
http://eu.blackberry.com/eng/devices/blackberrypearl/?navId=H0,C101 (http://eu.blackberry.com/eng/devices/blackberrypearl/?navId=H0,C101)
but i could be wrong...
dunk.
-
If you're any good at Perl, then you can learn C. If you aren't any good at Perl, then you might as well learn C.
Putting a Perl program in a microcontroller would be like putting a manufacturing plant on a robot, just to have it handy to make parts for the robot. But the robot would be a bit bloated and inefficient.
Putting a C program in a microcontroller is like custom designing high performance parts in a lab and them mounting the parts in the robot.
Either way, you've got to make the parts.