You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps one of the most basic operations one would wish to conduct after compiling a script is to print to console.log. At present, it appears that (#js*.console.log ...) must be used instead.
More generally, the problem to be solved here could be 'how can we write scripts that evaluate in both racketscript and racket (with respect to print)?'
It's possible that some function (macro?) could be introduced instead that would invoke print or #js*.console.log depending on the platform.
The text was updated successfully, but these errors were encountered:
abhillman
changed the title
Consider Mapping display, print, etc. to console.log
Consider Mapping display, print, etc. to console.log?
Dec 12, 2023
Short of some change to the language or additional code, some basic documentation that shows how to accomplish common JS operations in racketscript could be helpful.
Perhaps one of the most basic operations one would wish to conduct after compiling a script is to print to
console.log
. At present, it appears that(#js*.console.log ...)
must be used instead.More generally, the problem to be solved here could be 'how can we write scripts that evaluate in both
racketscript
andracket
(with respect toprint
)?'It's possible that some function (macro?) could be introduced instead that would invoke
print
or#js*.console.log
depending on the platform.The text was updated successfully, but these errors were encountered: