Hi cicciocb,
as i already made pgms with > 100.000 characters, and nearly half of them are comments, i think it would be useful to have some sort of instance to generate "programname.min.bas" to get rid of the comments in the final program. I know, the time for processing the comments is neglible, but they can fill up the flash. Of course this means a lot of storage discipline, but i think it would be very useful.
By the way, have you thought about the command RESTORE [label].
And last but not least, do you have plans to include dsp functions like fft/fir.. , the librarys already exist, but how to implement,
Many thanks for your great work, cicciocb, now your project is really ready to use. Are there any plans for a commercial version, this means licensing
ANNEX32 WI-FI RDS for commercial projects?
thx a lof for your attention
files without comments
-
- Posts: 13
- Joined: Wed Mar 10, 2021 5:45 am
- Has thanked: 4 times
- Been thanked: 4 times
- cicciocb
- Site Admin
- Posts: 1964
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 422 times
- Been thanked: 1310 times
- Contact:
Re: files without comments
HI
all the comments are already removed when the program is loaded in memory.
In fact the comments are only present on the "disk" but, as soon as the program is loaded the following logic is applied :
- The white spaces at the beginning and at the end of the lines are removed
- All the comments are removed (starting from the character ' )
- Lines that contains only white spaces or comments become empty and jumped during the execution
This means that only the required program space is used in memory.
About the DSP, what kind of application have you in mind?
How the DSP function could be exposed in basic commands / functions ?
About the commercial license, I'll let you know.
Hi PPANTHER256,[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sun Jul 10, 2022 10:07 am Hi cicciocb,
as i already made pgms with > 100.000 characters, and nearly half of them are comments, i think it would be useful to have some sort of instance to generate "programname.min.bas" to get rid of the comments in the final program. I know, the time for processing the comments is neglible, but they can fill up the flash. Of course this means a lot of storage discipline, but i think it would be very useful.
By the way, have you thought about the command RESTORE [label].
And last but not least, do you have plans to include dsp functions like fft/fir.. , the librarys already exist, but how to implement,
Many thanks for your great work, cicciocb, now your project is really ready to use. Are there any plans for a commercial version, this means licensing
ANNEX32 WI-FI RDS for commercial projects?
thx a lof for your attention
all the comments are already removed when the program is loaded in memory.
In fact the comments are only present on the "disk" but, as soon as the program is loaded the following logic is applied :
- The white spaces at the beginning and at the end of the lines are removed
- All the comments are removed (starting from the character ' )
- Lines that contains only white spaces or comments become empty and jumped during the execution
This means that only the required program space is used in memory.
About the DSP, what kind of application have you in mind?
How the DSP function could be exposed in basic commands / functions ?
About the commercial license, I'll let you know.
-
- Posts: 13
- Joined: Wed Mar 10, 2021 5:45 am
- Has thanked: 4 times
- Been thanked: 4 times
Re: files without comments
hmm, ive another problem, if the programs are loaded dynamically in the ram, from sd-card or flash, how and when, who gets rid of the comments?
i think nobody there can say, that its comment!
but never mind, im just thinking, gg
i think nobody there can say, that its comment!
but never mind, im just thinking, gg
- cicciocb
- Site Admin
- Posts: 1964
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 422 times
- Been thanked: 1310 times
- Contact:
Re: files without comments
This operation is done automatically by the program loader inside Annex.[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Mon Jul 11, 2022 10:14 am hmm, ive another problem, if the programs are loaded dynamically in the ram, from sd-card or flash, how and when, who gets rid of the comments?
i think nobody there can say, that its comment!
but never mind, im just thinking, gg
There is a simple parser that identify the comments and white spaces removing them before being copied in the memory.
- Electroguard
- Posts: 846
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 272 times
- Been thanked: 320 times
Re: files without comments
PPANTHER256,
The script loaded in the Editor is loaded from the ESP file system, so only you can change how much comment you choose to save into your script files.
But you can also easily create your own script de-commenting tool using a simple little Annex script to read in a specified commented file and parse it line by line to save only non-comment text back to a de-commented stripped version of the original script.
Make your Tool script do what the Annex interpreter must do when it parses in a script, check for any single quote comment char (or Rem) that is not wrapped by double quotes or vertical bar quotes. That should be easy peasy. If not found, write out the entire line to the stripped file, or if comment is found then just write out the preceding characters up to the comment character. That is also easy peasy.
If you have doubts about whether comments unnecessarily take up memory, you can easily prove it to yourself, assuming that you are able to de-comment your script (even if just manually).
Simply check how much RAMFREE after loading up a commented file, then similarly check how much RAMFREE after loading up the 'de-commented' file.
I would have thought you would want to be familiar and competent with such things before attempting to distribute Annex 'products'', especially if with the hoped-for commercial approval... cos anything less than competence would obviously expose Annex's valuable reputation to incompetence.
The script loaded in the Editor is loaded from the ESP file system, so only you can change how much comment you choose to save into your script files.
But you can also easily create your own script de-commenting tool using a simple little Annex script to read in a specified commented file and parse it line by line to save only non-comment text back to a de-commented stripped version of the original script.
Make your Tool script do what the Annex interpreter must do when it parses in a script, check for any single quote comment char (or Rem) that is not wrapped by double quotes or vertical bar quotes. That should be easy peasy. If not found, write out the entire line to the stripped file, or if comment is found then just write out the preceding characters up to the comment character. That is also easy peasy.
If you have doubts about whether comments unnecessarily take up memory, you can easily prove it to yourself, assuming that you are able to de-comment your script (even if just manually).
Simply check how much RAMFREE after loading up a commented file, then similarly check how much RAMFREE after loading up the 'de-commented' file.
I would have thought you would want to be familiar and competent with such things before attempting to distribute Annex 'products'', especially if with the hoped-for commercial approval... cos anything less than competence would obviously expose Annex's valuable reputation to incompetence.
-
- Posts: 13
- Joined: Wed Mar 10, 2021 5:45 am
- Has thanked: 4 times
- Been thanked: 4 times
Re: files without comments
Hi Cicciocb
Your question of my DSP kind for my apps ist to make FFTs, Filters, and so on....
As a ESP32 is fast enough for processing up to 4096 points of double pecision this should not be a problem.
The theory of DSP can be downloaded at AnalogDevices:
https://www.analog.com/en/education/edu ... plications
with running examples in Basic!!
Existing librarys are at https://github.com/espressif/esp-dsp
The implementation could be some sort of:
ESPDSP (type, datatype, array_inr(), array_outr() [,array_inc()] [, array_outc[] )
type could then be fft, fir, iir, win ...
datatype is int32, float..
I think it would be a large step in usability for annex, and open a large window for apps.
Your question of my DSP kind for my apps ist to make FFTs, Filters, and so on....
As a ESP32 is fast enough for processing up to 4096 points of double pecision this should not be a problem.
The theory of DSP can be downloaded at AnalogDevices:
https://www.analog.com/en/education/edu ... plications
with running examples in Basic!!
Existing librarys are at https://github.com/espressif/esp-dsp
The implementation could be some sort of:
ESPDSP (type, datatype, array_inr(), array_outr() [,array_inc()] [, array_outc[] )
type could then be fft, fir, iir, win ...
datatype is int32, float..
I think it would be a large step in usability for annex, and open a large window for apps.
- cicciocb
- Site Admin
- Posts: 1964
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 422 times
- Been thanked: 1310 times
- Contact:
Re: files without comments
Hi,
my question was more focused on the application than the DSP functions themselves.
In fact the DSP works generally with real time living data such as microphones, ADC inputs, etc.
I'm not really sure that this is the domain for Annex ....
my question was more focused on the application than the DSP functions themselves.
In fact the DSP works generally with real time living data such as microphones, ADC inputs, etc.
I'm not really sure that this is the domain for Annex ....
-
- Posts: 13
- Joined: Wed Mar 10, 2021 5:45 am
- Has thanked: 4 times
- Been thanked: 4 times
Re: files without comments
Hi, cicciob,
i know that its the aim of Annex to have something what can be used "out of the box", but even if you design a signal chain, which consists of a mic as an input, then adc, some filters and finally a fft to have a output for lets say a spectrum analyzer, you will always need to implement the dsp-functions! So, why not make the single raw routines available to the users?
A DSP that works in real time living data like tv-streams (with a lot of filtering/data decompressing ...) cannot be a pgm, the engineers use FPGAs.
On the other side for instance Oscilloscopes take a set of datas, do something with it and produce an output. This would be exactly what is needed for programming and using soft-DSP.
But never mind, its just an idea...
i know that its the aim of Annex to have something what can be used "out of the box", but even if you design a signal chain, which consists of a mic as an input, then adc, some filters and finally a fft to have a output for lets say a spectrum analyzer, you will always need to implement the dsp-functions! So, why not make the single raw routines available to the users?
A DSP that works in real time living data like tv-streams (with a lot of filtering/data decompressing ...) cannot be a pgm, the engineers use FPGAs.
On the other side for instance Oscilloscopes take a set of datas, do something with it and produce an output. This would be exactly what is needed for programming and using soft-DSP.
But never mind, its just an idea...
- cicciocb
- Site Admin
- Posts: 1964
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 422 times
- Been thanked: 1310 times
- Contact:
Re: files without comments
It is not a problem to include other functions (such as the FFT) into Annex but how you think to use them?[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Jul 15, 2022 8:10 am Hi, cicciob,
i know that its the aim of Annex to have something what can be used "out of the box", but even if you design a signal chain, which consists of a mic as an input, then adc, some filters and finally a fft to have a output for lets say a spectrum analyzer, you will always need to implement the dsp-functions! So, why not make the single raw routines available to the users?
A DSP that works in real time living data like tv-streams (with a lot of filtering/data decompressing ...) cannot be a pgm, the engineers use FPGAs.
On the other side for instance Oscilloscopes take a set of datas, do something with it and produce an output. This would be exactly what is needed for programming and using soft-DSP.
But never mind, its just an idea...
What kind of data you would supply and coming from what source?