Re: [julia-users] Access stack frame address?

2016-03-31 Thread Laurent Bartholdi
Thanks a lot! That works perfectly! Closed. On Thu, Mar 31, 2016, 14:08 Yichao Yu wrote: > On Thu, Mar 31, 2016 at 7:52 AM, Yichao Yu wrote: > > On Thu, Mar 31, 2016 at 5:23 AM, Laurent Bartholdi > > wrote: > >> Thanks for the quick reply! Yes, that would be wonderful. > >> > >> I want to int

Re: [julia-users] Defining part of a function outside its module

2016-03-31 Thread Mauro
Maybe like so: julia> module Myfunc export f f(x) = g(x) * g(x) function g end end julia> using Myfunc julia> f(4) ERROR: MethodError: `g` has no method matching g(::Int64) in f at none:3 julia> Myfunc.g(x) = 2x g (generic function with 1 method) julia> f(

[julia-users] Re: raytracing in julia

2016-03-31 Thread Tero Frondelius
See Cxx.jl for C++ wrapping https://github.com/Keno/Cxx.jl/blob/master/README.md

[julia-users] Defining part of a function outside its module

2016-03-31 Thread jock . lawrie
Hi all, This works: f(x) = g(x) * g(x) g(x) = x + 1 f(2)# 9 That is, f(x) isn't fully defined until g is defined. But if f(x) is in a module it doesn't work: module myfunc export f f(x) = g(x) * g(x) end using myfunc g(x) = x + 1 f(2) # ERROR: UndefVarError: g not defined That is,

[julia-users] Finalizer function not called consistently when ending a julia instance

2016-03-31 Thread Lee Bates
Hi, I'm creating a Julia type that conatins a Mmapped Vector. The intention is that the binary file behind the Mmap vector is created when the type is initialised and the file is deleted when the gc knows it's out out of scope. I'm using a finalizer function to achieve the deletion. My code is

[julia-users] Re: New blog post on generalizations to the array API

2016-03-31 Thread Cedric St-Jean
Very interesting, thank you for writing and working on this! On Thursday, March 31, 2016 at 8:40:53 AM UTC-4, Tim Holy wrote: > > Hi all, > > I've posted a new blog post providing background for some current > discussion > about how to extend julia's AbstractArray API. I should note that the bl

Re: [julia-users] git protocol packages

2016-03-31 Thread Rob J. Goedman
Just upgraded 0.5 and now it seems to work using https:// ! Not ideal, but way better! > On Mar 31, 2016, at 08:40, Erik Schnetter wrote: > > I see the same symptoms. > > -erik > > On Thu, Mar 31, 2016 at 11:17 AM, Rob J. Goedman wrote: >> Thanks for the pointers! Having also struggled with

Re: [julia-users] git protocol packages

2016-03-31 Thread Eric Forgy
PS: This also means Travis and Appveyor no longer work for me when the package I'm testing depends on other private repos. I really hope a solution to this problem can be found.

Re: [julia-users] git protocol packages

2016-03-31 Thread Eric Forgy
I have the same issue with private repos and SSH on Windows. It was working fine before the switch.

[julia-users] Re: Julia command line usage: tool versus library

2016-03-31 Thread James Fairbanks
This had been discussed in this thread https://groups.google.com/d/msg/julia-users/ufpi8tV7sk8/-Uv0rtAWTWsJ On Wednesday, March 30, 2016 at 2:37:44 PM UTC-4, Cameron McBride wrote: > > Simple question (I think): Is there an easy or idiomatic way to > differentiate if a julia file is being run d

Re: [julia-users] IJulia kernel dying repeatedly in Jupyter Notebook

2016-03-31 Thread Yichao Yu
On Thu, Mar 31, 2016 at 12:55 PM, Justin Vrooman wrote: > When I open a new Julia 0.4.5 Notebook I get the error message: "The kernel > appears to have died. It will restart automatically." > > To attempt to debug this I went to the terminal and in Julia ran "using > IJulia" and got the following

[julia-users] IJulia kernel dying repeatedly in Jupyter Notebook

2016-03-31 Thread Justin Vrooman
When I open a new Julia 0.4.5 Notebook I get the error message: "The kernel appears to have died. It will restart automatically." To attempt to debug this I went to the terminal and in Julia ran "using IJulia" and got the following results: julia> using IJulia INFO: Precompiling module IJulia..

[julia-users] My julia window goes to close why?

2016-03-31 Thread tannirind
When I open my code with a function call back my julia window turns to close. but while compiling other code its going turn off.Can any body help me to fix this problem ? Best Regards, Tanveer Iqbal.

Re: [julia-users] git protocol packages

2016-03-31 Thread Erik Schnetter
I see the same symptoms. -erik On Thu, Mar 31, 2016 at 11:17 AM, Rob J. Goedman wrote: > Thanks for the pointers! Having also struggled with private packages on 0.5 > for a while now, I tried below steps (a few times). No such luck. > > Also, using https: for a private package on 0.5 on my syste

Re: [julia-users] git protocol packages

2016-03-31 Thread Rob J. Goedman
Thanks for the pointers! Having also struggled with private packages on 0.5 for a while now, I tried below steps (a few times). No such luck. Also, using https: for a private package on 0.5 on my system hangs Pkg.update(). After ^C it states it’s updating TP but that is not the case. Could that

Re: [julia-users] Artigos para ler

2016-03-31 Thread Eduardo Lenz
Sorry Guys !!! I have a student called Julio ... fast typing and emails are not a good combination :0) Is there any way to delete my mistake ?? Sorry again ! On Wednesday, March 30, 2016 at 4:00:55 PM UTC-3, Abel Siqueira wrote: > > Olá, > > você mandou esse e-mail para a lista de Julia. Acho

Re: [julia-users] Possible to chain iterators efficiently?

2016-03-31 Thread jw3126
I tried it on 0.4 and there the speed of zip seems fine. On Thursday, March 31, 2016 at 1:51:45 PM UTC+2, Tim Holy wrote: > > Try zip. If you see a performance hit there too, it would be worth > reporting > (as long as you're testing julia-0.5). > > --Tim > > On Thursday, March 31, 2016 01:44:

Re: [julia-users] Cleaner way of using Val types?

2016-03-31 Thread Chris
Thanks Yichao, Mauro, and especially Tim for the explanations -- I'm glad I ended up asking this question. I think I will end up just using a branch as suggested. On Thursday, March 31, 2016 at 7:49:00 AM UTC-4, Tim Holy wrote: > > Yichao is right, because doing so won't help performance in any

[julia-users] New blog post on generalizations to the array API

2016-03-31 Thread Tim Holy
Hi all, I've posted a new blog post providing background for some current discussion about how to extend julia's AbstractArray API. I should note that the blog post does not present solutions, only problems, but for those of you interested in how things work internally---or in being involved in

Re: [julia-users] Access stack frame address?

2016-03-31 Thread Yichao Yu
On Thu, Mar 31, 2016 at 7:52 AM, Yichao Yu wrote: > On Thu, Mar 31, 2016 at 5:23 AM, Laurent Bartholdi > wrote: >> Thanks for the quick reply! Yes, that would be wonderful. >> >> I want to interface to a library that has its own garbage collection; that >> library walks the stack to find potentia

Re: [julia-users] Cleaner way of using Val types?

2016-03-31 Thread Tim Holy
(Nice on the type assert, but worth pointing out that the 2-argument outer constructor is not type-inferrable.) --Tim On Thursday, March 31, 2016 01:10:15 PM Mauro wrote: > I think this is fine and idiomatic > > julia> type A{B} >x::Float64 >function A(x) >

Re: [julia-users] Access stack frame address?

2016-03-31 Thread Yichao Yu
On Thu, Mar 31, 2016 at 5:23 AM, Laurent Bartholdi wrote: > Thanks for the quick reply! Yes, that would be wonderful. > > I want to interface to a library that has its own garbage collection; that > library walks the stack to find potential objects that must be kept alive. > Therefore, all calls t

Re: [julia-users] Possible to chain iterators efficiently?

2016-03-31 Thread Tim Holy
Try zip. If you see a performance hit there too, it would be worth reporting (as long as you're testing julia-0.5). --Tim On Thursday, March 31, 2016 01:44:17 AM jw3126 wrote: > Is it possible to chain iterators in julia efficiently? By chaining I mean > the following. I have a tuple of iterator

Re: [julia-users] Cleaner way of using Val types?

2016-03-31 Thread Tim Holy
Yichao is right, because doing so won't help performance in any way (indeed, it will hurt it massively compared to an `if a.b...` runtime branch in your code). You get the performance benefit from multiple dispatch only when the compiler knows the "value" ahead of time (e.g., when it's compiling

Re: [julia-users] Re: compact syntax for mapping vector to tuple

2016-03-31 Thread Tamas Papp
For the sake of example, suppose that the function has no vectorizing version. But I found that ([x^2 for x in [1,2,9]]...) is probably the most compact for my purposes --- thanks! Cf https://github.com/JuliaLang/julia/pull/15516 , which would be really, really neat. Best, Tamas On Thu, Mar 3

[julia-users] Re: compact syntax for mapping vector to tuple

2016-03-31 Thread Gunnar Farnebäck
This is at least shorter. julia> (v.^2...) (1,4,81) Den torsdag 31 mars 2016 kl. 10:28:09 UTC+2 skrev Tamas Papp: > > Hi, > > Is there a preferred syntax for mapping a vector to a tuple? Eg an > alternative for (contrived example) > > v = [1,2,9] > ntuple(i -> v[i]^2, length(v)) > tuple([e^2

Re: [julia-users] Cleaner way of using Val types?

2016-03-31 Thread Mauro
I think this is fine and idiomatic julia> type A{B} x::Float64 function A(x) B::Bool # asserts that B is indeed a Bool new(x) end end julia> A(x, b::Bool) = A{b}(x) A{B} julia> A(5, true) A{true}(5.0) julia> function dothing(

Re: [julia-users] Access stack frame address?

2016-03-31 Thread Laurent Bartholdi
Thanks for the quick reply! Yes, that would be wonderful. I want to interface to a library that has its own garbage collection; that library walks the stack to find potential objects that must be kept alive. Therefore, all calls to that library must be done in the form library_global_StackBott

[julia-users] Possible to chain iterators efficiently?

2016-03-31 Thread jw3126
Is it possible to chain iterators in julia efficiently? By chaining I mean the following. I have a tuple of iterators and I would like to have a function "chain" such that for itr in iters, i in itr ... end is equivalent to for i in chain(iters) ... end I found such a function in the

[julia-users] compact syntax for mapping vector to tuple

2016-03-31 Thread Tamas Papp
Hi, Is there a preferred syntax for mapping a vector to a tuple? Eg an alternative for (contrived example) v = [1,2,9] ntuple(i -> v[i]^2, length(v)) tuple([e^2 for e in v]...) Best, Tamas

Re: [julia-users] Re: regression from 0.43 to 0.5dev, and back to 0.43 on fedora23

2016-03-31 Thread Milan Bouchet-Valat
Le mercredi 30 mars 2016 à 15:16 -0700, Johannes Wagner a écrit : > > > > Le mercredi 30 mars 2016 à 04:43 -0700, Johannes Wagner a écrit :  > > > Sorry for not having expressed myself clearly, I meant the latest  > > > version of fedora to work fine (24 development). I always used the  > > > lat