Hi,
Your ff-shell.tcl shell file works great, but the one feature it really needs, is a way to include Forth files from your main Forth source file.
Something like the following at the beginning of your file:
\includesomefile.fs
\includeanother.fs
Forth would not see the lines, as as far as it is concered, they are comments.
But the ff-shell.tcl script could parse them, and load them in the order they are listed.
I have a current FF project that depends on 6 other forth modules, it's a real pain having to load
them individually each time I change the kernel ... ( not so important for development, but for a commercial product, painful in production ..) My 2c
Maybe as part of the feature implementation, would be to skip other comment lines from being sent, thus speeding up the compile.
Last edit: Bernard Mentink 2023-10-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are other forth shells and upload scripts that support that kind of feature. But I have never used them. https://sites.google.com/view/myffshell/start is one.
Zeptoforth site has a javascript terminal program that works in chrome, but I could not find out how to give chromium access to the serial ports. https://github.com/tabemann/zeptoforth
I have hardly written any TCL ever. The TCL shell was written by Peter Jacobs.
But inspired by your question I am adding the command "#sendm file1 file2 .. fileN" to the python shell. That makes it easier to load multiple files. I have actually missed that feature for a long time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had another go at getting ff-shell3.py going. It seems I had two versions off pip pn my mac, one from homebrew and one from macos. I installed pyserial again for macos, and now it picks up the port ok. No more missing "serial" module.
However I know get the following error, any idea's?
That was strange. No such problems in Linux. Wrong indentation could cause it. But it looks OK to me. There are no TABs in the file, only spaces. Can there be a problem with newline characters ??
Try putting some print statements before every access to 'e' to see where in the code the problem might be.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Your ff-shell.tcl shell file works great, but the one feature it really needs, is a way to include Forth files from your main Forth source file.
Something like the following at the beginning of your file:
Forth would not see the lines, as as far as it is concered, they are comments.
But the ff-shell.tcl script could parse them, and load them in the order they are listed.
I have a current FF project that depends on 6 other forth modules, it's a real pain having to load
them individually each time I change the kernel ... ( not so important for development, but for a commercial product, painful in production ..) My 2c
Maybe as part of the feature implementation, would be to skip other comment lines from being sent, thus speeding up the compile.
Last edit: Bernard Mentink 2023-10-27
There are other forth shells and upload scripts that support that kind of feature. But I have never used them.
https://sites.google.com/view/myffshell/start is one.
Zeptoforth site has a javascript terminal program that works in chrome, but I could not find out how to give chromium access to the serial ports.
https://github.com/tabemann/zeptoforth
I have hardly written any TCL ever. The TCL shell was written by Peter Jacobs.
But inspired by your question I am adding the command "#sendm file1 file2 .. fileN" to the python shell. That makes it easier to load multiple files. I have actually missed that feature for a long time.
Cobbled together a TCL script for sending multiple files to FF. It is based on routines copy pasted from ff-shell.tcl so I hope it works on OSX too.
Here is an example from linux of how to use it.
or
Brilliant, will try it out
EDIT: @oh2aun I can confirm the 'ff-send.tcl' script works on macos .. many thanks, that really helps.
Last edit: Bernard Mentink 2023-10-31
I had another go at getting ff-shell3.py going. It seems I had two versions off pip pn my mac, one from homebrew and one from macos. I installed pyserial again for macos, and now it picks up the port ok. No more missing "serial" module.
However I know get the following error, any idea's?
I presume it can't find the 'e' variable for the exception in the serial_open
I did pull your latest code.
Last edit: Bernard Mentink 2023-10-31
That was strange. No such problems in Linux. Wrong indentation could cause it. But it looks OK to me. There are no TABs in the file, only spaces. Can there be a problem with newline characters ??
Try putting some print statements before every access to 'e' to see where in the code the problem might be.