-->
Page 1 of 1

Bugs & Things - ESP Basic 3.0 Alpha 12 with Snazzy Editor

PostPosted: Sat Jul 16, 2016 4:59 pm
by raintime
Bugs: snazzy editor, etc.

A great start.

1. Long lines don't wrap.

2. Can't indent using spaces. Tabs don't always work.

3. Cant control formatting of 2 nested if statements in new snazzy editor. I end up "fighting the editor" and cannot get program looking the way I want.

Would really like a magic .gz file option that would be smaller, faster and would just
give line numbers (& possibly, colors if overhead is low), but no formatting.

4. Long lines wider than the screen window, if they are comments, can sometimes come back into the editor from the File Manager wrapped to fit the screen, but the second wrapped line is no longer commented out and generates an error.

5. Get “comparison between string and number” error but it doesn’t say on which line the error was found.

6. Get "Error Failed to reach end of input expression, likely malformed input" – Needs Line Number of error

7. When trying to SAVE, sometimes get Exception 29 and system reboots.
Exception (29):
epc1=0x4000c118 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont
sp: 3fff2b10 end: 3fff2f50 offset: 01a0

(If useful, when these exceptions occur, entire stack/dump could be attached.)

8. When the system tries to re-write the browser screen , sometimes get Exception 28:
Exception (28):
epc1=0x4000bf0e epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont
sp: 3fff27b0 end: 3fff2f50 offset: 01a0

9. Got Error, “Could not look up value for variable” – Needs Line Number of error line

10. Using a meter as in the demo, but in a larger program, it works sporadically. Even though the winsock connects (as shown by debug info from serial port 1), and the value increments, most of the time (in my program) the meter does not show the value.

(I now keep my Termite terminal plugged into the USB port of my nodemcu, 9600 baud, which displays valuable debugging and status information generated automatically by BASIC.)

My biggest problem by far is that wprint / html do not work most of the time, so I can't insert html into the program. It would be great if, along with the ability to insert CSS files and JS files, I also had the ability to insert HTML files (instead of using a bunch of concatenated wprint statements). This would allow a great deal of wonderful and simple customization of my BASIC program!

Also, since I seem to see many "comparison between string and number" errors, and it seems that the automatic typing is not always correct, or at least confusing, why not follow traditional BASIC and simply say that any variable ending in '$' is a STRING? This would make it easier for the programmer to identify variable types just by looking at the names.

Documentation bug: The documentation says that spaces are optional, but at the moment, they are not optional and must be considered carefully in all statements.

Is there a way for us in the peanut gallery to contribute to the documentation?

Re: Bugs & Things - ESP Basic 3.0 Alpha 12 with Snazzy Edito

PostPosted: Sun Jul 17, 2016 3:36 am
by forlotto
Indeed you are correct.

However you will find that returngui seems to allow html and such to load correctly.

Just do not use return gui when preforming an execution as it will cause the action to be triggered 3 times I believe.

You could also host a multituide of webpages using msgbranch which I find very interesting! However you must build them accordingly in your code.

I hear you I kind of miss html working right off the bat like it used to in 2.24 however the interesting thing is if you right click on the page and view source you will see the web page should be displaying correctly in your browser as the code is all there. Food for thought...

Play with returngui after all your web page code is inserted be sure to execute this and let me know how it goes!

snazzy editor is a neat concept as far as word wraps not exactly that important to me personally

' this is how I solve word wrapping problem
' I start another line and continue my comment

It is good practice not to have word wraps actually!

if blah = 0 then
gosub [blaha] else
gosub [wrong]
end if

is easier to follow for me than
if blah = 0 gosub [blaha] else gosub [wrong]

Once you get a lot of code you will see why however to each their own this is how I deal with it.

Some of the other issues are interesting.

Yes absolutely you can contribute to the documentation this is encouraged!

Use any format you like copy the documentation and edit in the parts you would like!

Share the link with everyone to see this would be lovely! I really would like to see your documentation!

Please do pitch in and document stuff raintime this would be a big help.
Call it Raintime ESP BASIC documentation and share it via whatever method you deem worthy!

There was another guy that wanted to do this and was given an invite to wiki to do so but he never followed through with it he started and petered out as soon as he started. He mentioned a website that was good for documenting stuff like this cannot remember the name...

Anyhow you are far from peanut gallery you are a member of this great basic community so build something like great documentation or share a project etc... We are all hoping members get involved like this I believe at least I am.

-forlotto

Re: Bugs & Things - ESP Basic 3.0 Alpha 12 with Snazzy Edito

PostPosted: Wed Jul 20, 2016 7:06 pm
by raintime
Thank-you Forlotto for your thoughful reply to my post.

I have tried and failed with 'returngui' in the past but I will try some more this weekend and post the results. But really, a 'wprint' statement in a BASIC language should not require to be followed by a puzzling command who's meaning is hard to understand! I'll also look into using 'msbranch' to build multiple web pages.

But in Basic it should be easy to put in links to allow the user to go to another web page stored on the chip, or to allow the user to press a button to bring up another web page. So far I have not been able to make either of these methods work. I have not been able to make the 'load' command work. I want to have many small web pages so they can each repaint quickly when real-time changes are made by the user.

I also miss html working right off the bat like it used to in 2.24. You said "however the interesting thing is if you right click on the page and view source you will see the web page should be displaying correctly in your browser as the code is all there. Food for thought..." Another command which might help would be a "repaint" command, which would force the browser to re-paint the screen.

You said

"if blah = 0 then
gosub [blaha] else
gosub [wrong]
end if

is easier to follow for me than
if blah = 0 gosub [blaha] else gosub [wrong]"

My preference here is:

if blah = 0 then
gosub [blaha] 'do blaha 5 times in a row
else
gosub [wrong] 'bring up an error statement
end if

Right now, with the snazzy editor, it is impossible to have code that looks this way. I may sound harsh, so of course I want to make it clear that I absolutely LOVE MMISCOOL's Basic Interpreter. I'm just a perfectionist and want everything to be perfect!

But really, I am worried that while more and more features are being added, for example, we might see MODBUS soon, the problem that I feel is that the fundamental working of the system is getting more fragile and that it is very important to make the fundamentals rock solid before pushing forward too fast... A house should be built on top of a strong foundation.

I've been thinking a lot about your suggestion about how I could contribute to the documentation. (Do you know where the concept of "peanut gallery" originated?) Anyway, I need to keep thinking about that, since it would be very much work, and the language is still changing quite fast...

-raintime

Re: Bugs & Things - ESP Basic 3.0 Alpha 12 with Snazzy Edito

PostPosted: Wed Jul 20, 2016 7:18 pm
by raintime
Correction - The leading spaces did not show in my indented code example in the previous post. Below, imagine each underscore replaced by a space character (ASCII 0x20 or HTML  ), allowing different lines of Basic code to be indented by different amounts:

____if blah = 0 then
_______gosub[/u] [blaha] 'do blaha 5 times in a row
____else
_______gosub [wrong] 'bring up an error statement
____end if

-raintime