-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #417 #611
base: main
Are you sure you want to change the base?
Fix #417 #611
Conversation
Also see #599 |
That one is simpler, but doesn't allow formatting (%08d). Also, it seems to emit a newline at the end, that's bad. |
It behaves in both of those ways to be identical to the web runtime. |
In that case, the web runtime is seriously broken. There must be some way to emit a single character to the console without a newline. |
I personally don't see this is a big issue since you are quite literally able to format the string and shouldn't need multiple calls to it. What is the use-case here that you feel this strongly about? More technically, web browsers can't print single characters to the log, so you'd have to buffer it. If doing it that way, aside from breaking all current games using |
The use case I feel strongly about this, is that when experimenting with creating toy Langs, it puts some unecessary difficulty/annoyance on debugging stuff, as you would have to implement an string buffer first to have an clearer debug experience. But this is not a common thing to need, so i know it's not that important :p |
It's important to me because that's exactly my use case, a toy language. How about having a SYSTEM_STANDARD_TRACING to opt-in for this behaviour in the wasm3 runtime? |
This is my attempt to fix
tracef
for the wasm3 runtime. Looks convoluted, and it is, but it's just that implementing this portably is a PITA.