tracef should not emit a newline at the end
There should be some way to emit a string without a newline, and looks like tracef is the answer if it didn't emit the final newline. See https://github.com/aduros/wasm4/pull/611
In Forth it's idiomatic to emit lines like:
: foo ." 1+2=" 1 2 + . cr ;
With the current tracef behaviour it's inconvenient to implement that, since it would require buffering until a cr is performed.
Yeah, i would prefer to have both versions as one without a newline would facilitate printing various stuff in the same line (in my case, cause I like creating toy Langs, so i would have to implement string buffers first if i would like to print stuff that is more complex). But when i asked why it was this way, @aduros said on discord: "Yeah, the intent was to have a drop in replacement for console.log() for debugging, and not fully expose stdout"
So i guess it is intended to not support this :/
Maybe a SYSTEM_FLAG to opt-in as I suggested in https://github.com/aduros/wasm4/pull/611#issuecomment-1440704735
it is possible tho to use ANSI control codes to print on the line above, move the cursor, clear the terminal... https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797
came pretty handy on debugging real time information to me