Top is a pretty crude tool. But when you watch a program running for an hour or so and you see that top reports the memory consumption going up every few seconds, eventually going through 10%, 20% , 40%, 80% of your available 8GB RAM, you know there is a problem and there is only one outcome. The program and/or system it's running on will die from lack of memory.I don't know if using 'top' is the correct way to check for leaks;
Agree 100%. The only RPI-specific library supplied with BBC BASIC is gpiolib.bbc, everything else is totally cross-platform including 2D and 3D graphics, sound, music, shader programming, socket access (TCP and UDP), fonts, dialog boxes etc, making it possible to write programs that will run virtually anywhere without modification.
A more appropriate course would be to extend the "./extensions" directory to have "./extensions/generic", "./extensions/pi", "./extensions/windows", "./extensions/linux" etc. Though you might choose to have the platform specific division higher up in the directory structure.
Why? The mkdist.sh script works on Arm/x86/x64 Linux, and on macOS.
Best option in my opinion as well.Or better yet, create a file called "notunix.txt" in the folder for the extension you do not want built.
If it wasn't for the -D option, I would be lost. I would like the -v option to show scriba's full path. I've run the wrong scriba more than once.(as you've (John) experienced more times than I care to count)
This is the latest update of the 16th June version; uses sb-dev git branch, has the named constants issue fixed and includes raising errors. My test program is included below.
Code: Select all
PRINT "Started\n" IMPORT gpio.bas PRINT "Imported\n" PRINT gpio::version(), "\n" IF gpio::runningWithSudo() <> 0 THEN PRINT "Running with sudo\n" ELSE PRINT "Running without sudo\n" END IF result = gpio::enter() IF result <> 0 THEN PRINT "Initialised : ", result, " - FAILED\n" ELSE PRINT "Initialised : ", result, " - Okay\n" PRINT "GPIO Address : ", + gpio::getGpioPtr(), "\n" FOR pin = 0 TO 27 IF gpio::getAllow(pin) = 1 THEN PRINT pin, " = ", gpio::getAlt(pin), " ", gpio::getAltName(pin), "\n" ELSE PRINT pin, " ! ", gpio::getAlt(pin), " ", gpio::getAltName(pin), "\n" END IF NEXT pin = 0 PRINT "Pulsing GPIO", pin, "\n" gpio::setAllow(pin) gpio::setPin(pin, 0) gpio::setAlt(pin, gpio::ALT_OUTPUT) FOR count = 1 TO 10 gpio::setPin(pin, 1) gpio::setPin(pin, 0) NEXT gpio::leave() END IF PRINT "Finished\n"
No; that's a ScriptBasic bug so "not my problem to solve", but I'm not sure whose problem it is to solve.
That is very commendable but it it not what one reads here: http://scriptbasic.com/ScriptBasic is an embeddable sculpting engine API by design.
ScriptBasic is written in C. Is it not?Scriba uses C as its host.
What is "SBT"?SBT embeds ScriptBasic into itself.
Apart from using the MIT licence how is it based on anything from MIT?ScriptBasic is a MIT based Open Source project.
I'm not sure about that. If I write code and publish it and it has bugs then that is my fault. No one else is responsible but me.That is how true open source projects work. Everyone is responsible and no one is to blame.
Let's start with the meaningless error messages and the memory leaks...ScriptBasic would be great IF .. Let me know if I can help you resolve your SB IF.