3 ms·
The first thing which comes to my mind is how the Javascript interpreter works, using a regex to replace the deepest s-expressions by their evaluations (both s
by junke 10y ago
The first thing which comes to my mind is how the Javascript interpreter works, using a regex to replace the deepest s-expressions by their evaluations (both scary and brilliant)[0]
I found the console[1] and started using it. I was trying to expand a list of things into LI elements; at some point I wrote this:
{def lis| {lambda {:x} {li :x}}}
The bar represents the cursor just before I hit backspace. After I hit backspace, I entered an infinite recursive evaluation which eventually stopped with stack overflow.
Maybe evaluating the code after each keypress is not ideal. Or maybe you could add a timeout, a custom depth limit or something else ;-)
Also, being accustomized to syntax coloring, completion, indentation, warnings, etc., I find the environment particularly dry, especially when you consider your target audience. On the one hand, beginners who want to learn will be able to explore and find their way through trial and errors anyway, but on the other hand, a little bit of feedback can help when they are blocked. For example, when forms are badly formed the output is "ooops": this is better than nothing, obviously, but still a little terse.
I looked at the teaching[2] section and this is a good introduction, and I am not telling you to be more like Scratch either, but there might some way to bring a little bit more interactive help.
Overall, this is a nice project and it brings a lot of different things together (maths, svg, javascript). I could be useful as a richer Markdown and I find it more readable than the typical Wiki syntax.
[0] http://epsilonwiki.free.fr/alphawiki_2/meca/JS.js http://epsilonwiki.free.fr/alphawiki_2/meca/JS.js
[1] http://epsilonwiki.free.fr/lambdaway/meca/ http://epsilonwiki.free.fr/lambdaway/meca/
[2] http://epsilonwiki.free.fr/lambdaway/?view=teaching http://epsilonwiki.free.fr/lambdaway/?view=teaching
- martyalain 10y agoThank you for your interest in this project and your relevant remarks. About {def lis| {lambda {:x} {li :x}}}, I wrote this expression in http://epsilonwiki.free.fr/lambdaway/?view=sandbox http://epsilonwiki.free.fr/lambdaway/?view=sandbox and I didn't see any infinite loop. Click on the top-left "+" in the frameview and then on edit to inspect the code. OK, the error messages are terse, there is no syntax colorization in the textarea. There is a timeout for each keypress but it has to be improved. It's a work in progres, I'm alone and I need help.
- junke 10y agoI can't reproduce it anymore. I had a bulleted list near the function definition and somehow as soon as I pressed backspace it went unresponsive until the browser's window crashed. I'll keep trying, but there must have been something else happening. I understand this is hard work. I hope you find time and maybe someone to help you develop this project.