navi-language / navi

Navi is a high-performance programming language.
https://navi-lang.org
94 stars 1 forks source link

Unicode escape sequence not working #5

Open KieranP opened 1 month ago

KieranP commented 1 month ago

I am trying to clear the console screen using an escape sequence:

      print("\u001b[H\u001b[2J");
      print("\u{001b}[H\u{001b}[2J");
      print("\033[0;0H\033[2J");

The above work in dozens of other languages, but none of them seem to work in Navi yet.

Does Navi have support for this sort of thing? And if not, what are the viable alternatives?

Thanks.

sunli829 commented 1 month ago

\u not yet supported.

KieranP commented 1 month ago

Any suggestions in the meantime? I tried using try! process.exec("clear"); but it throws an error:

thread 'main' has overflowed its stack
fatal runtime error: stack overflow

I can't find a trace flag or anything for navi run that would provide more info about why it is occuring.