Hmm - I wonder how you'd break out of while (1); in node? Ctrl-C doesn't work (i'd assumed it did!).
Imagine you typed while(1); in Espruino and you then wanted to stop execution, what would you actually press that you'd expect would break out? For me it'd be Ctrl+C.
If you're looking at how other CLIs work: if you're using Bash/sh/etc and you run a program, maybe cat, and you want to exit it you press Ctrl+C, which sends SIGINT. If you do a loop and want to break out in Python, you press Ctrl+C. It's the obvious way to break out of what's running.
Perhaps what's needed is actually to make Ctrl-C clear the line, but if Espruino hasn't returned to the console and handled it within ~200ms, it properly breaks out of what it's doing?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hmm - I wonder how you'd break out of
while (1);
in node? Ctrl-C doesn't work (i'd assumed it did!).Imagine you typed
while(1);
in Espruino and you then wanted to stop execution, what would you actually press that you'd expect would break out? For me it'd be Ctrl+C.If you're looking at how other CLIs work: if you're using Bash/sh/etc and you run a program, maybe
cat
, and you want to exit it you pressCtrl+C
, which sends SIGINT. If you do a loop and want to break out in Python, you pressCtrl+C
. It's the obvious way to break out of what's running.Perhaps what's needed is actually to make
Ctrl-C
clear the line, but if Espruino hasn't returned to the console and handled it within ~200ms, it properly breaks out of what it's doing?