[julia-users] ... as good at gluing programs together as the shell?

2016-01-08 Thread samoconnor
*"We want [Julia to be] **as good at gluing programs together as the shell."* -- http://julialang.org/blog/2012/02/why-we-created-julia I've been using the bash shell (or tcsh, sh etc) every day since before the time that my 2400-baud modem was a big upgrade. I was thinking... What would it ta

Re: [julia-users] Need help to understand method dispatch with modules

2015-01-02 Thread samoconnor
I've been trying to learn a bit about Julia's internals in the hopes of understanding enough to be able to make some sensible suggestions on module semantics. So far I've been buried in libuv land as a learning exercise... https://github.com/JuliaLang/julia/pull/9450. It occurs to me is that it

Re: [julia-users] Need help to understand method dispatch with modules

2014-12-11 Thread samoconnor
On Friday, December 12, 2014 9:58:57 AM UTC+11, ele...@gmail.com wrote: > > See open Issues https://github.com/JuliaLang/julia/issues/2327 and > https://github.com/JuliaLang/julia/issues/4345 > Ok, I take it that the short answer, from #4345 is that the intended behaviour is not well thought out

Re: [julia-users] Re: Need help to understand method dispatch with modules

2014-12-11 Thread samoconnor
Int: 7 > ASCIIString: Foo > UTF8String: ∀ x ∃ y > Float64: 12.0 > Complex{Float64}: 2.0 + 3.0im > > > > On Dec 11, 2014, at 3:53 PM, samoconnor > > wrote: > > Hi Rob, > > I don't use the REPL. I have "#!/[...]bin/julia" on the first line

Re: [julia-users] Re: Need help to understand method dispatch with modules

2014-12-11 Thread samoconnor
c.com > > > > > > On Dec 11, 2014, at 3:19 PM, samoconnor > > wrote: > > If I change the example to use "import" instead of "using"... > > import m1: f > import m2: f > > ... then I get: > > Warning: ignoring conflicting im

[julia-users] Re: Need help to understand method dispatch with modules

2014-12-11 Thread samoconnor
If I change the example to use "import" instead of "using"... import m1: f import m2: f ... then I get: Warning: ignoring conflicting import of m2.f into Main ?: 7 String: Foo Now Julia spots the problem, but resolves it the opposite way (i.e. the first definition wins).

Re: [julia-users] Need help to understand method dispatch with modules

2014-12-11 Thread samoconnor
> > module m2 > > import m1.f > export f > > f(x::Int)= println("Int: " * string(x)) > end > > using m1 > using m2 > > f(7) > f("Foo") > f("\u2200 x \u2203 y") > f(12.0) > f(2.0+3.0im) > > > >

[julia-users] Need help to understand method dispatch with modules

2014-12-11 Thread samoconnor
The example below has two modules that define methods of function f for different parameter types. Both modules are imported. It seems like that "using" the second module causes the first one to disappear. Is that the intended behaviour? !/Applications/Julia-0.3.0-rc4.app/Contents/Resources/jul

[julia-users] Return value of "try error() end"

2014-08-14 Thread samoconnor
I have a question about the return value of "try expr end". julia> try 1 == 1 end true julia> try 1 == 0 end false julia> try error() end false I like that "try expr end" returns false if expr throws an error. Is this a documented feature of "try"? For exception handling, it's great being able