Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: gavinmc42 on February 17, 2015, 11:42:52 PM
-
I see Luajit in in the tcz's
Has anyone got Lua going on the Pi?
I want a scripting interpreter that is faster than shell and smaller than python.
Is Lua the only one that fits?
Got some Pi 2 's on the way and I want to try multi threading for robotics/drone stuff.
-
A while ago we tested different languages on RPi. It was a simple test generating prime numbers. Goal was not a generic benchmark but to see arithmetics. The winner was LUAJIT which was a big supprise. It was found that LUAJIT used floating point aritmetics for integer operation where it was faster. C, BACON (the BASIC compiler) and GO were a bit slower but very closed. These four were followd by RUBY, than PERL and PYTHON which were much slower. So LUAJIT seems to be a good choise.
-
OK, so another language to learn:(
Luajit = Lua Just In Time compiler, so compiled not interpreted.
A bit like Java?
450kB compared to 20MB+ for python.
Wonder if it can talk to the GPIO etc?
-
Luajit = Lua Just In Time compiler, so compiled not interpreted.
In between, it is a Just In Time. See
http://stackoverflow.com/questions/95635/what-does-a-just-in-time-jit-compiler-do
http://en.wikipedia.org/wiki/Just-in-time_compilation
-
Got new Pi 2, yippee, so fast.
Been using the Pi 2 running latest Raspbian to test Lua and this library.
https://github.com/vsergeev/lua-periphery
Just got Lua GPIO code to turn LED on.
Yep also works with LuaJIT to.
Now the question is how to get the lua-periphery library ported to piCore?
This is day one of Lua coding for me.
piCore base plus LuaJIT plus app code on Pi A+ all in 25MB?
Can you still get 64MB microSD cards:0
-
Now the question is how to get the lua-periphery library ported to piCore?
It is just a C code. No need to port, just compile and try. If works, create a TCZ.
-
Hi,
I don't suppose you want to make a full development version of piCore to run on the Pi 2?
With Lua, python, C compiler and IDE(Geany?) preinstalled for Pi and Pi 2.
Base, SSH, X and DevX++.
Been meaning to learn how to make tcz's .
TC/PiCore will be what I will be using for all my Pi based embedded devices.
This is now on my list of things to do, but it is a long list:)
-
I don't suppose you want to make a full development version of piCore to run on the Pi 2?
Why?
-
Hi Bela,
Most of my development is done off Net behind the University firewalls.
So it is hard to install tcz's, mostly I have to do it manually, which does not work most of the time.
Imagine trying to manually install GCC:(
That's why I mostly use Busybox ash shell scripting now, but it is too slow for some the stuff I need to do.
But it is reliable with 65 and 35 days uptime on two systems so far:)
LuaJIT is a small tcz and does not need large dependencies/libraries like python, apart from that Lua-periphery one.
Pi 2 with piCore X windows, SSH and Dev tools + SDKs would be fast enough for native development?
Gavin