4 ms·
Just tried it out, here's a little program that plots a fractal: https://bit.ly/3a5MfaV https://bit.ly/3a5MfaV (shortened the url since it's quite long containi
by aldanor 7y ago
Just tried it out, here's a little program that plots a fractal: https://bit.ly/3a5MfaV https://bit.ly/3a5MfaV (shortened the url since it's quite long containing all the code)
Few comments:
- It would be nice to have a proper full reference of the language (maybe it exists but I couldn't find it), with all details put together in one document. I had to dig through tons of tutorials just to see how floats are defined.
- How do you add comments in the code?...
- The editor removes empty lines - so if you try to separate logical blocks/paragraphs you can't do it. This coupled with lack of comment support hurts code readability. Maybe it could collapse >1 empty lines to just 1 empty line inside.
- Defining floats: if you have a program that deals with both floats and has int-based for loops, you can't use "floatvars" if I understand correctly. Now, having to add "#" as a suffix for each float variable greatly hurts readability since you now have lines like "z# = x# * x# + y# * y#"
- Editor - tries to be too smart at times which hurts basic editing functionality like undo; if I add a line and type something, the cmd-z doesn't remove that line, it only removes text in the line. Also, if I type something syntactically wrong, the editor first tries to format/transform the code and only then shows an error but doesn't then return the code to what it looked like; this makes it hard to fix errors.
- Re: editor, why just not use a mature engine like CodeMirror? (and add your own syntax highlighting / hints, etc)
- Why all those "." instead of "end" in loops/ifs inside functions? This is not explained anywhere and looks a bit obscure in tutorials
- Color system with 000-999: a lot of boilerplate to deal with it, troublesome to create palettes and it's only 10 bits of color. Might be helpful to have a color function that takes three separate ints (or even floats 0.0-1.0, opengl-style).
But generally, kudos, good job :)
- chkas 7y agoWell done, I'm impressed. You raised some important and also some sore points. @documentation: there is still some work to be done. The tutorial "Code snippets" contains most things. @comments, empty lines: lines beginning with # are comments. Empty lines are not possible, but empty comment lines. @floats and ints: by default variables are integer and floats are marked with #. With floatvars variables are floats and integer are marked with % - as in some BASIC variants. @editor: this is a bit strict, but with beginners the concept works quite well. On enter, the code is parsed down to the current line and returned "correctly" formatted. Unfortunately "undo" does not work well. @end: the dot is quickly typed and also makes the code more clear (a bit like in Python) - since the dot seems strange to many people, I added end as an alternative. @color: these 3 digit numbers are short, and sufficient for most cases and more flexible than color names. There are also built-ins to fine-tune the colors (0.0-1.0) (color_red, ...) https://easylang.online/apps/mandelbrot.html https://easylang.online/apps/mandelbrot.html