Society of Robots - Robot Forum

Software => Software => Topic started by: Gordo4444 on December 07, 2008, 02:51:36 PM

Title: Perl microcontroller?
Post 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.
Title: Re: Perl microcontroller?
Post by: MaltiK on December 07, 2008, 04:20:22 PM
I have never heard of, nor seen one. And a fast google search yielded inconclusive results.
Title: Re: Perl microcontroller?
Post by: pomprocker on December 07, 2008, 07:34:41 PM
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!
Title: Re: Perl microcontroller?
Post by: cosminprund on December 08, 2008, 01:52:04 AM
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.
Title: Re: Perl microcontroller?
Post by: leeguy92 on December 08, 2008, 11:44:18 AM
to quote wikipedia:
Quote
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.
Title: Re: Perl microcontroller?
Post by: dunk on December 08, 2008, 07:27:20 PM
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.
Title: Re: Perl microcontroller?
Post by: leeguy92 on December 09, 2008, 09:18:01 AM
im even more biased from perl, i detest dynamic typing - its wrong, just plain WRONG!!! >:(
Title: Re: Perl microcontroller?
Post by: dunk on December 09, 2008, 09:57:00 AM
Quote
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.
Title: Re: Perl microcontroller?
Post by: bryan922 on December 25, 2008, 08:31:47 PM
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.