-
Notifications
You must be signed in to change notification settings - Fork 221
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: the math functions can not be use
d
#381
FIX: the math functions can not be use
d
#381
Conversation
This commit mitigates the following error ```bash > use maths/math_functions.nu Error: nu::parser::expected_keyword (link) × Expected keyword. ╭─[maths/math_functions.nu:38:1] 38 │ ## constants 39 │ let pi = 3.1415926535897932 · ─┬─ · ╰── expected def or export keyword 40 │ let e = 2.7182818284590452 ╰──── ``` One can use the new `math pi` and `math e` instead.
This commit mitigates the following error ```bash > use maths/math_functions.nu Error: nu::parser::unexpected_keyword (link) × Statement used in pipeline. ╭─[maths/math_functions.nu:154:1] 154 │ 155 │ for $i in 0..($n_cols - 1) { · ─┬─ · ╰── not allowed in pipeline 156 │ ($x | column2 $i) | scale-minmax $a $b | wrap ($name_cols | get $i) ╰──── help: 'for' keyword is not allowed in pipeline. Use 'for' by itself, outside of a pipeline. ```
additional information
|
you could/should probably change the |
mm not sure it's possible on the latest when i revert the first commit of this PR, i get > use maths/math_functions.nu *
Error: nu::parser::expected_keyword (link)
× Expected keyword.
╭─[maths/math_functions.nu:38:1]
38 │ ## constants
39 │ let pi = 3.1415926535897932
· ─┬─
· ╰── expected def or export keyword
40 │ let e = 2.7182818284590452
╰──── so let's try adding an >_ use maths/math_functions.nu *
Error: nu::parser::parse_mismatch (link)
× Parse mismatch during operation.
╭─[maths/math_functions.nu:38:1]
38 │ ## constants
39 │ export let pi = 3.1415926535897932
· ─┬─
· ╰── expected def, def-env, alias, use, or env keyword
40 │ export let e = 2.7182818284590452
╰──── and we get the exact same two errors when replacing you tell me 😋 |
@kubouch What are we missing here? I thought you could use loose
This is what I get here
Maybe all consts have to be inside of defs? |
But @amtoine, we also don't need these |
i'm confused 😆 i've removed do i miss something? 😕 |
so i'd say i've said that yeah 😋 |
Neither |
ok, i think we're good here. we have those constants as math commands.
Thanks for the clarification |
coool 😋 |
before that commit, one could get two errors when
use
ing the scriptand
this PR fixes them by
pi
ande
definitions withlet
for
to aneach