Re: [julia-users] ls()?

2016-09-14 Thread Tony Kelman
Julia supports Windows, which is not a posix platform. So while Julia uses 
posix-inspired names in some places, that's not universally the case, and 
they're often jargony and confusing if you're not a Unix user.


On Wednesday, September 14, 2016 at 1:30:25 PM UTC-7, Evan Fields wrote:
>
> Which can get gnarly on Windows, depending how you launched Julia. E.g. 
> just launching from the Julia executable:
>
>
> shell> ls
> ERROR: could not spawn `ls`: no such file or directory (ENOENT)
>  in _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, 
> ::RawFD, ::RawFD, ::RawFD) at .\process.jl:321
>  in #414 at .\process.jl:478 [inlined]
>  in setup_stdio(::Base.##414#415{Cmd,Ptr{Void},Base.Process}, 
> ::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:466
>  in #spawn#413(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, 
> ::Tuple{RawFD,RawFD,RawFD}, ::Bool, ::Bool) at .\process.jl:477
>  in run(::Cmd) at .\process.jl:591
>  in repl_cmd(::Cmd, ::Base.Terminals.TTYTerminal) at .\client.jl:91
>
> julia>
>
> (It works fine if launched from Git bash)
>


Re: [julia-users] ls()?

2016-09-14 Thread Evan Fields
Which can get gnarly on Windows, depending how you launched Julia. E.g. 
just launching from the Julia executable:


shell> ls
ERROR: could not spawn `ls`: no such file or directory (ENOENT)
 in _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, 
::RawFD, ::RawFD, ::RawFD) at .\process.jl:321
 in #414 at .\process.jl:478 [inlined]
 in setup_stdio(::Base.##414#415{Cmd,Ptr{Void},Base.Process}, 
::Tuple{RawFD,RawFD,RawFD}) at .\process.jl:466
 in #spawn#413(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, 
::Tuple{RawFD,RawFD,RawFD}, ::Bool, ::Bool) at .\process.jl:477
 in run(::Cmd) at .\process.jl:591
 in repl_cmd(::Cmd, ::Base.Terminals.TTYTerminal) at .\client.jl:91

julia>

(It works fine if launched from Git bash)


Re: [julia-users] ls()?

2016-09-14 Thread Stefan Karpinski
There's already shell mode:

;cd projects
;ls


in the REPL.

On Wed, Sep 14, 2016 at 12:56 PM,  wrote:

> > There are POSIX standards for new programming language function names?
>
> No, but you've implemented functions with POSIX names
>
> > yes, ls() could be a better name
>
> In the REPL, I might
>
> julia> cd("projects")
>
> And want to
>
> julia> ls()
>
> to see what's there
>
> But, I probably wouldn't want to do that in Julia file
>
> rd = readdir(pwd())  # ls() doesn't make sense here
>
> So, maybe alias them?
>
> Aidy
>
> On 9/14/2016 at 5:41 PM, "Stefan Karpinski"  wrote:
> >
> >There are POSIX standards for new programming language function
> >names? But
> >yes, ls() could be a better name.
> >
> >On Wed, Sep 14, 2016 at 12:04 PM, Adrian Lewis
> >
> >wrote:
> >
> >> > You can find a thread/issue where this is discussed. Some
> >group decided
> >> to call it readdir() and like it more. I just got used to it. I
> >think it's
> >> silly, but it's just syntax.
> >>
> >> I thought it might be an idea to stick with POSIX standards.
> >>
> >> On Wednesday, September 14, 2016 at 4:40:03 PM UTC+1, Chris
> >Rackauckas
> >> wrote:
> >>>
> >>>
> >>>
> >>> On Wednesday, September 14, 2016 at 7:36:18 AM UTC-7, Jacob
> >Quinn wrote:
> 
>  readdir()
> 
>  On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis
> >
>  wrote:
> 
> > In the filesystem package, if we have pwd() and cd(), why do
> >we not
> > have ls()?
> >
> > Aidy
> >
> 
> 
>
>


Re: [julia-users] ls()?

2016-09-14 Thread adrian_lewis
> There are POSIX standards for new programming language function names?

No, but you've implemented functions with POSIX names

> yes, ls() could be a better name

In the REPL, I might

julia> cd("projects")

And want to 

julia> ls()

to see what's there

But, I probably wouldn't want to do that in Julia file

rd = readdir(pwd())  # ls() doesn't make sense here

So, maybe alias them?

Aidy

On 9/14/2016 at 5:41 PM, "Stefan Karpinski"  wrote:
>
>There are POSIX standards for new programming language function 
>names? But
>yes, ls() could be a better name.
>
>On Wed, Sep 14, 2016 at 12:04 PM, Adrian Lewis 
>
>wrote:
>
>> > You can find a thread/issue where this is discussed. Some 
>group decided
>> to call it readdir() and like it more. I just got used to it. I 
>think it's
>> silly, but it's just syntax.
>>
>> I thought it might be an idea to stick with POSIX standards.
>>
>> On Wednesday, September 14, 2016 at 4:40:03 PM UTC+1, Chris 
>Rackauckas
>> wrote:
>>>
>>>
>>>
>>> On Wednesday, September 14, 2016 at 7:36:18 AM UTC-7, Jacob 
>Quinn wrote:

 readdir()

 On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis 
>
 wrote:

> In the filesystem package, if we have pwd() and cd(), why do 
>we not
> have ls()?
>
> Aidy
>





Re: [julia-users] ls()?

2016-09-14 Thread Keno Fischer
readdir is POSIX: http://man7.org/linux/man-pages/man3/readdir.3.html

On Wed, Sep 14, 2016 at 12:45 PM, Chris Rackauckas 
wrote:

> Here it is: https://github.com/JuliaLang/julia/issues/3376. Would
> changing to ls be back on the table?
>
> On Wednesday, September 14, 2016 at 9:41:55 AM UTC-7, Stefan Karpinski
> wrote:
>>
>> There are POSIX standards for new programming language function names?
>> But yes, ls() could be a better name.
>>
>> On Wed, Sep 14, 2016 at 12:04 PM, Adrian Lewis 
>> wrote:
>>
>>> > You can find a thread/issue where this is discussed. Some group
>>> decided to call it readdir() and like it more. I just got used to it. I
>>> think it's silly, but it's just syntax.
>>>
>>> I thought it might be an idea to stick with POSIX standards.
>>>
>>> On Wednesday, September 14, 2016 at 4:40:03 PM UTC+1, Chris Rackauckas
>>> wrote:



 On Wednesday, September 14, 2016 at 7:36:18 AM UTC-7, Jacob Quinn wrote:
>
> readdir()
>
> On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis 
> wrote:
>
>> In the filesystem package, if we have pwd() and cd(), why do we not
>> have ls()?
>>
>> Aidy
>>
>
>
>>


Re: [julia-users] ls()?

2016-09-14 Thread Chris Rackauckas
Here it is: https://github.com/JuliaLang/julia/issues/3376. Would changing 
to ls be back on the table?

On Wednesday, September 14, 2016 at 9:41:55 AM UTC-7, Stefan Karpinski 
wrote:
>
> There are POSIX standards for new programming language function names? But 
> yes, ls() could be a better name.
>
> On Wed, Sep 14, 2016 at 12:04 PM, Adrian Lewis  > wrote:
>
>> > You can find a thread/issue where this is discussed. Some group decided 
>> to call it readdir() and like it more. I just got used to it. I think it's 
>> silly, but it's just syntax.
>>
>> I thought it might be an idea to stick with POSIX standards. 
>>
>> On Wednesday, September 14, 2016 at 4:40:03 PM UTC+1, Chris Rackauckas 
>> wrote:
>>>
>>>
>>>
>>> On Wednesday, September 14, 2016 at 7:36:18 AM UTC-7, Jacob Quinn wrote:

 readdir()

 On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis  
 wrote:

> In the filesystem package, if we have pwd() and cd(), why do we not 
> have ls()?
>
> Aidy
>


>

Re: [julia-users] ls()?

2016-09-14 Thread Stefan Karpinski
There are POSIX standards for new programming language function names? But
yes, ls() could be a better name.

On Wed, Sep 14, 2016 at 12:04 PM, Adrian Lewis 
wrote:

> > You can find a thread/issue where this is discussed. Some group decided
> to call it readdir() and like it more. I just got used to it. I think it's
> silly, but it's just syntax.
>
> I thought it might be an idea to stick with POSIX standards.
>
> On Wednesday, September 14, 2016 at 4:40:03 PM UTC+1, Chris Rackauckas
> wrote:
>>
>>
>>
>> On Wednesday, September 14, 2016 at 7:36:18 AM UTC-7, Jacob Quinn wrote:
>>>
>>> readdir()
>>>
>>> On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis 
>>> wrote:
>>>
 In the filesystem package, if we have pwd() and cd(), why do we not
 have ls()?

 Aidy

>>>
>>>


Re: [julia-users] ls()?

2016-09-14 Thread Adrian Lewis
> You can find a thread/issue where this is discussed. Some group decided 
to call it readdir() and like it more. I just got used to it. I think it's 
silly, but it's just syntax.

I thought it might be an idea to stick with POSIX standards. 

On Wednesday, September 14, 2016 at 4:40:03 PM UTC+1, Chris Rackauckas 
wrote:
>
>
>
> On Wednesday, September 14, 2016 at 7:36:18 AM UTC-7, Jacob Quinn wrote:
>>
>> readdir()
>>
>> On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis  
>> wrote:
>>
>>> In the filesystem package, if we have pwd() and cd(), why do we not have 
>>> ls()?
>>>
>>> Aidy
>>>
>>
>>

Re: [julia-users] ls()?

2016-09-14 Thread Chris Rackauckas
You can find a thread/issue where this is discussed. Some group decided to 
call it readdir() and like it more. I just got used to it. I think it's 
silly, but it's just syntax.

On Wednesday, September 14, 2016 at 7:36:18 AM UTC-7, Jacob Quinn wrote:
>
> readdir()
>
> On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis  > wrote:
>
>> In the filesystem package, if we have pwd() and cd(), why do we not have 
>> ls()?
>>
>> Aidy
>>
>
>

Re: [julia-users] ls()?

2016-09-14 Thread Jacob Quinn
readdir()

On Wed, Sep 14, 2016 at 8:34 AM, Adrian Lewis 
wrote:

> In the filesystem package, if we have pwd() and cd(), why do we not have
> ls()?
>
> Aidy
>


[julia-users] ls()?

2016-09-14 Thread Adrian Lewis
In the filesystem package, if we have pwd() and cd(), why do we not have 
ls()?

Aidy