Skip to content
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

add a print_line rhai script helper #169

Merged
merged 1 commit into from
May 22, 2023

Conversation

karthik2804
Copy link
Contributor

No description provided.

Copy link
Contributor

@itowlson itowlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two minor "think out loud" things (well, one minor, one that goes beyond minor and well into utterly insignificant), but no worries with it as stands

@@ -6,12 +6,19 @@ pub fn custom_rhai_engine_init() -> Engine {
let mut rhai_engine = Engine::new();

rhai_engine.register_fn("current_date", current_date);
rhai_engine.register_fn("print_line", print_line);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the usage I wonder if some wording involving log / debug / console might clarify that this goes to the console rather than to the page itself. My first thought was log_debug but that might be too prescriptive - log_console or console_println maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the console_println name. I'll update the PR.

@karthik2804 karthik2804 force-pushed the rhai_helper/print_line branch from 6e17ca3 to 5e3462d Compare May 22, 2023 02:39
@karthik2804 karthik2804 force-pushed the rhai_helper/print_line branch from 5e3462d to d7ff7f6 Compare May 22, 2023 02:40
@karthik2804 karthik2804 merged commit 321267a into fermyon:main May 22, 2023
@karthik2804 karthik2804 deleted the rhai_helper/print_line branch May 22, 2023 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants