User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 4:29 am

What version of the Raspberry Pi are you using?

My examples are running on Raspian full NOOBS with a RPi 3 B.

Can someone else verify what scruss is seeing?

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 4:43 am

For grins, would you mind trying the apt DEB install? Use scriba instead of sb.

User avatar
Gavinmc42
Posts: 3753
Joined: Wed Aug 28, 2013 3:31 am

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 4:57 am

However you have a bit of a hard sell there. We have not been looking for "glue" languages. We have had dozens of them for decades: Awk, Perl, Python, PHP, Javascript, BASH, others I have no doubt forgotten.
Er, I'm looking for "glue".
Working on my own OS in Ultibo, after reading lots about OS's I came to conclusion I'm really looking for is "glue".
Ultibo gives me all the low level pieces and there is some shell stuff and I have done some simple extensions.
But what I think I am looking for is a Bash shell script thingy to join the pieces together.
Pretty much had my fill of OS books, need some Shell books?

Anyway ScriptBasic will get a try on my Linux/Pi boxes on the weekend, Win10 Geany permissions just stopped me :(
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

jahboater
Posts: 4691
Joined: Wed Feb 04, 2015 6:38 pm

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 6:53 am

ScriptBasic wrote:
Fri Apr 05, 2019 4:43 am
For grins, would you mind trying the apt DEB install? Use scriba instead of sb.
What is the package called?
"sudo apt install scriba" fails.

Heater
Posts: 13380
Joined: Tue Jul 17, 2012 3:02 pm

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 7:26 am

Clearly scriba is not in the Debian/Raspbian repos.

I guess it's something like:

dpkg --install scriba-v2.0b1-1_i386.deb

As per the instructions I found here: http://scriptbasic.com/texi/ug/ug_3.2.html

I have no idea where it comes from or if there is a Raspi/ARM version.
Memory in C++ is a leaky abstraction .

User avatar
scruss
Posts: 2492
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 11:19 am

ScriptBasic wrote:
Fri Apr 05, 2019 4:29 am
What version of the Raspberry Pi are you using?
Raspberry Pi Zero. I suspect you need to change your build options so you're not creating binaries that will only run on a Raspberry Pi 3.

You either need to:
  • support all Raspberry Pis running current Raspbian; or
  • make it abundantly clear that this will only run on some Raspberry Pis.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

jahboater
Posts: 4691
Joined: Wed Feb 04, 2015 6:38 pm

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 1:38 pm

It usually says "Illegal instruction" if you try to run a Pi3 binary on a Pi Zero.
Segfault is just a plain bug!

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 2:34 pm

sudo apt install ./scriptbasic-2.1-linux-armhf.deb

Please read the post on the ScriptBasic forum where you downloaded the install file.

This will also installed the dependencies.

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 2:41 pm

jahboater wrote:
Fri Apr 05, 2019 1:38 pm
It usually says "Illegal instruction" if you try to run a Pi3 binary on a Pi Zero.
Segfault is just a plain bug!
Good to know that not all RPi's are code compatible.

jahboater
Posts: 4691
Joined: Wed Feb 04, 2015 6:38 pm

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 3:05 pm

ScriptBasic wrote:
Fri Apr 05, 2019 2:41 pm
jahboater wrote:
Fri Apr 05, 2019 1:38 pm
It usually says "Illegal instruction" if you try to run a Pi3 binary on a Pi Zero.
Segfault is just a plain bug!
Good to know that not all RPi's are code compatible.
The Pi Zero is ARMv6, whereas the Pi3 models are ARMv8.

User avatar
rpdom
Posts: 15232
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 3:10 pm

ScriptBasic wrote:
Fri Apr 05, 2019 2:41 pm
jahboater wrote:
Fri Apr 05, 2019 1:38 pm
It usually says "Illegal instruction" if you try to run a Pi3 binary on a Pi Zero.
Segfault is just a plain bug!
Good to know that not all RPi's are code compatible.
Code compiled to run under Raspbian on a Pi Zero (or Pi 1) will run on any Pi released so far.

User avatar
PeterO
Posts: 5028
Joined: Sun Jul 22, 2012 4:14 pm

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 3:16 pm

ScriptBasic wrote:
Fri Apr 05, 2019 2:41 pm
jahboater wrote:
Fri Apr 05, 2019 1:38 pm
It usually says "Illegal instruction" if you try to run a Pi3 binary on a Pi Zero.
Segfault is just a plain bug!
Good to know that not all RPi's are code compatible.
It's not a good sign that you are only learning about this now !
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 3:30 pm

I just ported ScriptBasic to the RPi less than a month ago when I bought my first RPi. I'm still learning about the limitations of the ecosystem.

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 4:13 pm

I ported ScriptBasic to Android (Samsung Galaxy Tab 2 10.1) years ago. I can't remember what version of the ARM chip was used back then.

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 5:15 pm

If someone with a RPI Zero would be willing to recompile the ScriptBasic source on that platform it would be much appreciated.

Use the cleanup branch in the SB-DEV sandbox repo.

There are scripts to create the AppImage and DEB. Please send me a zip of the resulting bin directory to [email protected] for testing on my RPI 3 B.

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Fri Apr 05, 2019 6:07 pm

ScriptBasic Build Notes:

Use the setup script in the root source directory to build the binaries for language and extension modules. First time you will be asked to associate a Perl directory with the build system. Use sudo for the command shown.

The SciptBasic build system creates its headers and documentation from scratch using the C source code. The compiled results are put in a newly created bin directory.

I don't know of any toy BASIC languages that goes to this extent.

FYI: ScriptBasic only has one source tree for all platforms. (Windows, Linux, IOS, RPi, Android Linux and a bunch of embedded OSs)

ejolson
Posts: 3587
Joined: Tue Mar 18, 2014 11:47 am

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 3:06 am

ScriptBasic wrote:
Fri Apr 05, 2019 5:15 pm
Use the cleanup branch in the SB-DEV sandbox repo.
Where is the cleanup branch? Where is the DEV sandbox repository? I can't compile anything if I can't find the code.

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 3:24 am

GOTO ScriptBasic.org/forum and click on the sandbox graphic in the upper right corner. The cleanup branch is under master.

Heater
Posts: 13380
Joined: Tue Jul 17, 2012 3:02 pm

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 3:25 am

Dev version of scriptbasic is here: https://sandbox.allbasic.info:8181/scriptbasic/sb-dev
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 3:39 am

Thanks for posting the direct link as well.

ejolson
Posts: 3587
Joined: Tue Mar 18, 2014 11:47 am

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 4:12 am

ScriptBasic wrote:
Sat Apr 06, 2019 3:39 am
Thanks for posting the direct link as well.
I tried both master and cleanup. With master there is a missing syntax.h file but with cleanup all the headers are missing. It would appear the headers are supposed to be generated by the perl setup.pl script. However, running that script results in

Code: Select all

This is unix cwd=/home/username/sb-dev-cleanup/
The jamal module esd.pm is not installed.
You have to install it before running any
kind of ScriptBasic source compilation.
The module is needed to compile source
documentation. This is a MUST.

To install esd.pm become root on UNIX,
or just have write privilege for the
directories where the Perl modules are
(this is the 'source' directory of ScriptBasic)
and run

perl jamal.pl -i

interactively answering the program questions.
and I'm not prepared to scribble all over the root filesystem on the current system. I might start over with a fresh (throwaway) install and try again, but that's all for now.

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 4:30 am

I assume you installed the dev dependencies referred to in the README.MD? (see bottom of the file listing)

sudo perl jamal.pl -i

Then select the Perl path by selecting the number next to it. This is a one time deal.

Then run ./setup again. and everything should compile and the binaries resulting in the bin directory.

I normally delete the bin directory before starting a new build.

User avatar
scruss
Posts: 2492
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 12:41 pm

Modifying the system Perl installation outside a perl* module on Debian/Raspbian is a strict no-no. You can very easily render the system unusable. Debian uses Perl for many of its package admin functions, and if the Perl subsystem left in a state that's outside Debian's control, the dpkg system can fail.

jamal isn't on CPAN, so I'm not feeling confident that it's had too many eyes on it. The Perl install scripts for scriptbasic are … interesting. Peppered with backticks (so executing arguments, in some cases even passed strings, as root when in install mode) and installing in a mix of /usr/bin and /usr/local, I'm not sure I'd want to run these on anything but a sandbox system. I'm also not wild about having yet another dotfolder (~/.scriba) in my home directory: this is what ~/.config or ~/.local is for.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
John_Spikowski
Posts: 1396
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 3:33 pm

This build system has worked flawlessly for 20 years. Commercial use for as long. I have never heard of ScriptBasic screwing up anyone's system.

Thanks for giving SB a try.

@All

I'm still looking for someone with a RPi Zero to send me their bin directory for me to test on my RPi 3 B.

ejolson
Posts: 3587
Joined: Tue Mar 18, 2014 11:47 am

Re: Why Avoid BASIC on RPi?

Sat Apr 06, 2019 4:12 pm

scruss wrote:
Sat Apr 06, 2019 12:41 pm
Modifying the system Perl installation outside a perl* module on Debian/Raspbian is a strict no-no. You can very easily render the system unusable. Debian uses Perl for many of its package admin functions, and if the Perl subsystem left in a state that's outside Debian's control, the dpkg system can fail.

Peppered with backticks (so executing arguments, in some cases even passed strings, as root when in install mode) and installing in a mix of /usr/bin and /usr/local, I'm not sure I'd want to run these on anything but a sandbox system. I'm also not wild about having yet another dotfolder (~/.scriba) in my home directory: this is what ~/.config or ~/.local is for.
I'm in favour of hidden configuration folders and files in the home directory. The other extreme are programs that automatically create non-hidden subdirectories called Desktop, Downloads, Documents, Pictures, Public, Templates and Videos.

I've now download the latest Raspbian image. Hopefully those ScriptBasic setup and installation back ticks won't bite and aren't carrying Lyme's disease if they do.

Return to “Off topic discussion”