HP Forums
WYSIWYG editor in a computer algebra language - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: WYSIWYG editor in a computer algebra language (/thread-19460.html)



WYSIWYG editor in a computer algebra language - compsystems - 01-23-2023 12:10 AM

Hello

I leave you a link to a series of videos that show the execution of the source code of the fractals ported from BASIC to SMathStudio language
by Dr. Urroz Gilberto E.

Initial video in Spanish:
https://youtu.be/z6ehLEEb714?list=PLxR0Y29LbtbyyW2PdbW2Prq4acH4pt8Qg

Initial video in English:




What innovation does the SMathStudio programming language have? Since it does not require keywords to close the cyclic structures and so on, since it uses the tabulation with vertical lines to navigate a structure as shown in the following image

[Image: ?file=738367&type=image]

This idea should be replicated in modern calculator languages.


RE: WYSIWYG editor in a computer algebra language - EugeneNine - 01-23-2023 12:49 AM

There are some similar
https://julialang.org/
https://octave.org/
https://www.scilab.org/
https://www.jirka.org/genius.html
https://maxima.sourceforge.io/


RE: WYSIWYG editor in a computer algebra language - carey - 01-23-2023 03:31 AM

(01-23-2023 12:10 AM)compsystems Wrote:  Hello

I leave you a link to a series of videos that show the execution of the source code of the fractals ported from BASIC to SMathStudio language
by Dr. Urroz Gilberto E.

What innovation does the SMathStudio programming language have? Since it does not require keywords to close the cyclic structures and so on, since it uses the tabulation with vertical lines to navigate a structure as shown in the following image

[Image: ?file=738367&type=image]

This idea should be replicated in modern calculator languages.

Yes, Smath provides a WYSIWYG Mathcad-like environment that nicely blends code and plots, but note that unlike the example in your post, the Tree2 and Sierpinski programs in the video use multiple levels of indentation (e.g., three increasingly shifted levels of vertical lines) that would be a challenging (and inefficient) use of calculator display real estate.

Another observation is that, while the translation from BASIC code to Smath was facilitated by BASIC's universal pseudo-code appearance, a glance at the Tree2 and Sierpinski programs in the video make it clear that translation from Smath into other programming languages would neither be trivial nor fun.

Thanks for the interesting video!


RE: WYSIWYG editor in a computer algebra language - toml_12953 - 01-24-2023 11:28 AM

(01-23-2023 12:10 AM)compsystems Wrote:  What innovation does the SMathStudio programming language have? Since it does not require keywords to close the cyclic structures and so on, since it uses the tabulation with vertical lines to navigate a structure as shown in the following image

This idea should be replicated in modern calculator languages.

This reminds me of the way Python does things. That's why I'm not a big fan of Python. It's easy to lose track of indents. Putting a statement in the wrong column can change the whole meaning of a program. In BASIC,

Code:
If x>7 THEN
y=2
b=3
END IF

means the same thing as

Code:
IF x>7 THEN
  y=2
b=3
END IF

Whereas

Code:
if x==7:
  y=2
  b=3

is different than

Code:
if x==7:
  y=2
b=3

In fact posting BASIC code here by simply cutting and pasting the text into a message would work fine. Trying that with Python without code brackets would ruin the program since leading spaces are removed.