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

Request: allow semicolon at end of import, using statements #4130

Closed
kmsquire opened this issue Aug 22, 2013 · 2 comments
Closed

Request: allow semicolon at end of import, using statements #4130

kmsquire opened this issue Aug 22, 2013 · 2 comments

Comments

@kmsquire
Copy link
Member

A use of this is for those of us silly daring enough to use julia on the command line to process piped input, and who want to import some package. Right now,

$ cat nums.txt | julia -e 'import Stats; readlines(STDIN, chomp) |> lines->Int[int(x) for x in lines] |> hmean |> println'
ERROR: syntax: invalid syntax: ;
 in process_options at client.jl:214
 in _start at client.jl:349

As a workaround, it is possible to embed a newline in the input. It's just not as convenient.

$ cat nums.txt | julia -e 'using Stats                                                                                   
readlines(STDIN, chomp) |> lines->Int[int(x) for x in lines] |> hmean |> println'
1246.3385144536994
@stevengj
Copy link
Member

+1, I have been annoyed by this for a while

@kmsquire
Copy link
Member Author

Thanks!

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

No branches or pull requests

2 participants