LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by [-hh] » Fri Feb 16, 2018 8:03 am

LiveCode 651 and 704 work fine on the new Raspbian Stretch with desktop (2017-11-29).
And they work (nearly) "out of the box" on Raspi 3.

All you have to do is
  • Adjust the launcher for 6.5.1
    Go to /home/pi/.local/share/applications, right-click "LiveCode Community 6.5.1", open it with TextEditor and replace the Exec line with
    Exec="/home/pi/.runrev/components/livecodecommunity-6.5.1/LiveCode Community.arm"
  • If you wish to use windowshape, follow
    http://forums.livecode.com/viewtopic.ph ... 92#p137292
    Step [1] can be omitted because xcompmgr is already installed.
I also enlarged the GPU to 112 MB (via the menu preferences/configuration at topleft) and tested successfully several stacks from the Raspi collection.

Stretch boots very fast here (in a few seconds). Everything needed for the first startup (WLAN, ssh, localization) is done in 5 minutes. Great stuff.

Also the Chromium browser runs without problems, so that there will be hopefully a browser widget available (if ever a LC 8/9 version for Raspi appears).
shiftLock happens

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by bogs » Fri Feb 16, 2018 2:13 pm

Nice.

I don't have a RasPi yet, so I can't test it myself, but am curious about a couple of things. You mention Lc651 and 704, do the versions after those also install? Or, alternately, if you install those, can you update them to a higher version?
Image

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by sphere » Fri Feb 16, 2018 3:14 pm

I don't thinks so, because it has to be build for the ARM processor.

I've ordered a Raspberry and steppermotordriver and a steppermotor.
It's not for myself, but to build a test setup on my job.

So let's see what we can achieve. Hopefully it will arrive next Monday or Tuesday.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by bogs » Fri Feb 16, 2018 3:54 pm

sphere wrote:
Fri Feb 16, 2018 3:14 pm
I don't thinks so, because it has to be build for the ARM processor.
This is what makes me wonder, but unfortunately my familiarity with how the update process works still is fogging my ability to guess what would happen. At this point, I think one of two things -
...if there is no update to the engine, an update should go through, i.e. only the stacks change.
...or, if there is an engine update, but no engine for pi to fulfill it, you just won't see an update available.

Time is just preventing me from figuring it out, so I really look forward to hearing about it, living vicariously through your experiment :D
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by FourthWorld » Fri Feb 16, 2018 5:54 pm

bogs wrote:
Fri Feb 16, 2018 3:54 pm
sphere wrote:
Fri Feb 16, 2018 3:14 pm
I don't thinks so, because it has to be build for the ARM processor.
This is what makes me wonder, but unfortunately my familiarity with how the update process works still is fogging my ability to guess what would happen. At this point, I think one of two things -
...if there is no update to the engine, an update should go through, i.e. only the stacks change.
...or, if there is an engine update, but no engine for pi to fulfill it, you just won't see an update available.
The latter is what happens. The IDE stacks and the engine they're built for are made in tandem, in many cases dependent on specific engine features. So it would not be practical for them to create an update mechanism which attempted to deploy updates to just the IDE stacks without also updating the engine.

FWIW, as I've noted elsewhere, LC Ltd. has decided to undertake the effort of including RPi support into their process. But this is a non-trivial task, and is slated for some time after v9.0 goes final. Whether the strategic business advantage of including RPi is a high enough priority relative to other pressing needs to include it in v10 is not currently known, but the aim is to do it as soon as practical.

Since the source code is available, anyone wishing to update the Linux ARM engine for a clean compile for RPi is welcome to do so. I can provide introductions with the team member(s) who can help with that.

In the meantime, HH's guidance here is very helpful and much appreciated.

While being able to install the IDE itself directly on the RPi is of course essential for EDU use cases where the goal is to use the RPi for development, for IoT projects I've found it more productive to run the IDE on my desktop computer, and copy the standalone built there to the RPi for running.

And FWIW Ubuntu fans may find it encouraging that LC's Linux ARM build has run well here in my tests under Ubuntu Core for RPi. Being faceless, Ubuntu Core is not only a leaner option for IoT (akin in many respects to Raspian Lite with Snappy and other Ubuntu goodies included), but also avoids the graphics issue which have sometimes been troublesome with some versions of LC on some distro versions.

Instructions for installing Ubuntu Core on RPi (and similar devices) are here:
https://developer.ubuntu.com/core/get-started

I would be interested to know if any of you have found any differences running LC or LC-made apps on ARM devices other than Raspberry Pi. In theory it should work well, but of course the devil is in the details and I have no other ARM devices here to try it on myself.

And it would be especially helpful to learn if you've run into any issues running LC apps on a Raspberry Pi Zero W. While RAM is lower there it should be good for some GUIs and more than sufficient for running LC facelessly. But I haven't yet gotten an RPi ZW so I have no hands-on experience yet. Any input on that would be quite helpful.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by bogs » Fri Feb 16, 2018 8:12 pm

FourthWorld wrote:
Fri Feb 16, 2018 5:54 pm
bogs wrote:
Fri Feb 16, 2018 3:54 pm
sphere wrote:
Fri Feb 16, 2018 3:14 pm
I don't thinks so, because it has to be build for the ARM processor.
This is what makes me wonder, but unfortunately my familiarity with how the update process works still is fogging my ability to guess what would happen. At this point, I think one of two things -
...if there is no update to the engine, an update should go through, i.e. only the stacks change.
...or, if there is an engine update, but no engine for pi to fulfill it, you just won't see an update available.
The latter is what happens. The IDE stacks and the engine they're built for are made in tandem, in many cases dependent on specific engine features.
Thank you, now I at least understand what goes on in that process.
So it would not be practical for them to create an update mechanism which attempted to deploy updates to just the IDE stacks without also updating the engine.
I can see one practical reason, bug fixes that don't require an engine update, of which there have been, and probably still are many. I'm sure it takes a lot less time to just update the stack than to wait until you push out a new engine. Just my take on it.
Image

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by SparkOut » Sat Feb 17, 2018 3:37 am

@FourthWorld - I have a RPi ZW and it is running Raspbian Noob with LC 7.0.4 ok. I haven't had chance to do anything with it yet apart from install and run a couple of test stacks but no problems so far. Let me know if you have any questions you need answered that I can try out.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by FourthWorld » Sat Feb 17, 2018 8:58 am

Super, SparkOut. Here's something to try if you have a moment - run this with LiveCode Server:

<?lc put "Hello world" ?>

...using this in the command line:
/usr/bin/time -v ./livecode-community-server <scriptname>
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by SparkOut » Sat Feb 17, 2018 7:27 pm

@Richard, here are the results
RPiZW wrote:/usr/bin/time -v ./livecode-community-server "LCPiZWtest.lc"
Hello World Command being timed: "./livecode-community-server LCPiZWtest.lc"
User time (seconds): 0.18
System time (seconds): 0.10
Percent of CPU this job got: 44%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.62
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 11424
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 41
Minor (reclaiming a frame) page faults: 828
Voluntary context switches: 56
Involuntary context switches: 91
Swaps: 0
File system inputs: 12168
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by FourthWorld » Sat Feb 17, 2018 7:55 pm

Supercool - thanks!

With LCS using less than 12 MB RAM on a 512 MB device, we can comfortably run multiple instances. Takes a toll on the CPU (44%), but for certain tasks could be quite nice.

In fact, since the test script doesn't actually do anything other than echo a string, nearly all the CPU time is engine initialization. For IoT tasks we could switch that from using LC Server as a CGI under Apache to having an LC standalone working as its own HTTP or other socket server, so init time only hits once at device boot and from then on out CPU load is only needed for script execution.

Thanks again for posting that. Now if I can just come up with a practical need for an RPiZW I'll add one to my collection.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by SparkOut » Sat Feb 17, 2018 7:58 pm

Come on! You don't need a practical reason, it's just what you have to have!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by FourthWorld » Sat Feb 17, 2018 10:29 pm

SparkOut wrote:
Sat Feb 17, 2018 7:58 pm
Come on! You don't need a practical reason, it's just what you have to have!
That's what I told myself about the first two RPi's I got. :) And a BeeBox nettop. And a netbook. And too many other gadgets.

As luck would have it, the one non-essential computer I wound up using every day is an old Lenovo Q100 nettop from about 10 years ago. First-gen Atom processor, 1 GB RAM (since upgraded three years ago to 2 GB). Turned out that being low-powered made it useful for stress-testing GUIs under Lubuntu, then I added a server to it for testing LC Server stuff, then I added Nextcloud for versioned backup and sync, then I added an automated RSS aggregator to feed LiveNet, and added some tools for monitoring VPSes, and now it's like a faithful assistant that does dozens of tasks all day long and consumes very little power doing them. I think about replacing it, but it's doing so well there's no practical reason to do anything other leave it alone and let it keep working.

But alas, I have yet to put any of the other non-essential computers to work as rewardingly. :)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by sphere » Tue Feb 20, 2018 12:18 pm

OK Received yesterday :)
IMG_20180220_115727.jpg
Complete Rpi set with steppermotor and driver

Raspbian Stretch is already installed:
IMG_20180220_115634.jpg
Let's Play! eeerh...Develop! :twisted:

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by bogs » Tue Feb 20, 2018 2:40 pm

Nice :D

Btw, I know some like to develop on systems that mimic the deployment target (or just want a really light system). If you go to Raspberry Pi's website, you can download a version that will run in virtual machine, or on x86 (desktop) systems.

I tested it out in Virtualbox as a live cd, it runs pretty smooth on my rig.
Image

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: LiveCode 651/704 on Raspi 3 running Raspbian Stretch

Post by sphere » Tue Feb 20, 2018 8:13 pm

Thanks Bogs!

Been playing a bit with a few led's first.
I can switch them on and off and let them flicker fast.
So that's good cause i need pulses.
IMG_20180220_151353.jpg
This has been easy so far, so i have good hopes for the motor.
The library works ok.
When i'm a bit further i can post some scripts here, but it's really easy to do.

Post Reply

Return to “Raspberry Pi”