Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
kmsquire opened this Issue · 2 comments

2 participants

@kmsquire
Collaborator

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
Collaborator

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

@kmsquire
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.