Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread 博陈
I rewrote my code and manually loop from 1:n, the pre-allocation problem is solved. I also added some parenthesis as you suggested, that helps, but not very much. 在 2016年3月30日星期三 UTC+8上午1:56:47,Yichao Yu写道: > > > > On Tue, Mar 29, 2016 at 1:50 PM, 博陈 > wrote: > >>

Re: [julia-users] macroexpanding with unicode variables throws error

2016-03-29 Thread Stefan Karpinski
Glad that was helpful. On Tue, Mar 29, 2016 at 7:33 PM, wrote: > oh woops, so it should be macroexpand(:(@m 1)). > and yes, i had set x to something, which explains why it works there too. > that was driving me crazy, thank you! > > Vishesh >

Re: [julia-users] macroexpanding with unicode variables throws error

2016-03-29 Thread vishesh
oh woops, so it should be macroexpand(:(@m 1)). and yes, i had set x to something, which explains why it works there too. that was driving me crazy, thank you! Vishesh

[julia-users] Re: Julia + MKL no Base.LinAlg.SparseBLAS

2016-03-29 Thread Kristoffer Carlsson
I meant https://github.com/JuliaSparse/MKLSparse.jl/pull/7 On Tuesday, March 29, 2016 at 10:22:58 PM UTC+2, Kristoffer Carlsson wrote: > > Look at https://github.com/JuliaSparse/MKLSparse.jl > > It is quite unfinished but it has cscmv! wrapped for example. You might > need

Re: [julia-users] macroexpanding with unicode variables throws error

2016-03-29 Thread Stefan Karpinski
Macroexpand operates on quoted expressions – you're applying it to a macro call, which will be expanded before macroexpand gets to it. I'm not sure how `x` is not causing an error there unless you've defined `x` to refer to something that displays as "x". On Tue, Mar 29, 2016 at 5:26 PM,

[julia-users] Re: Understanding Dataframes

2016-03-29 Thread Christina Castellani
Hi Dr. Bates, Thank you very much for your help. I was able to code the lmm to run across the matrix with your helpful suggestions. All the best, Christina On Friday, March 18, 2016 at 11:49:37 AM UTC-4, Christina Castellani wrote: > > I apologize for the beginner nature of my question but

RE: [julia-users] Announcing JuDE: autocomplete and jump to definition support for Atom

2016-03-29 Thread David Anthoff
+1 I’m also much more interested in a simple install story for an existing Atom installation than a standalone juno bundle. From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Tomas Lycken Sent: Tuesday, March 29, 2016 2:39 PM To: julia-users

Re: [julia-users] Announcing JuDE: autocomplete and jump to definition support for Atom

2016-03-29 Thread Tomas Lycken
It would be nice, though, if it were somewhere documented - or even better, a meta-package with dependencies on all the others - to allow turning an already existing Atom installation into a Julia IDE *too*. I'd be much more interested in improving an editor I'm already using for other thing,

[julia-users] macroexpanding with unicode variables throws error

2016-03-29 Thread vishesh
here's a simple macro *>macro m(x) :((█if, true, 1, 0, $x)) end* *>print(macroexpand(@m 1))* *ERROR: UndefVarError: █if not defined* *>**macro m(x) :((x, true, 1, 0, $x)) end* *>**print(macroexpand(@m 1))* (x, true, 1, 0, 1) I would expect (*█if, true, 1, 0, 1) *in the first case,

Re: [julia-users] Regarding GSoC 2017

2016-03-29 Thread Mike Innes
Most likely the set of possible projects will be very similar next year – at most only a few will be completed by students this year, although there could be some additions as well. What sort of areas are you interested in? Preparing early is a great idea and it'd be good to get you contributing

Re: [julia-users] Regarding GSoC 2017

2016-03-29 Thread Ayush Pandey
Hi Vishesh, It would be best for you to start contributing to one of the many packages that are available in Julia (List ). Make yourself comfortable with the syntax, try to understand the source code and contribute patches if possible. You can always have a look at

Re: [julia-users] Command line arguments

2016-03-29 Thread Stefan Karpinski
The ARGS variable is the basic mechanism by which script arguments are exposed, but you may also want to checkout ArgParse.jl or DocOpt.jl for more systematic ways of handling arguments and options. But often just

[julia-users] Re: Julia + MKL no Base.LinAlg.SparseBLAS

2016-03-29 Thread Kristoffer Carlsson
Look at https://github.com/JuliaSparse/MKLSparse.jl It is quite unfinished but it has cscmv! wrapped for example. You might need https://github.com/JuliaSparse/MKLSparse.jl/issues/8 On Tuesday, March 29, 2016 at 10:11:41 PM UTC+2, Serban Andrei Stan wrote: > > I'm trying to get Julia working

Re: [julia-users] How to pass char* string to julia via jl_call?

2016-03-29 Thread Yichao Yu
On Mar 29, 2016 4:11 PM, "Devin Butterfield" wrote: > > Hi Folks, > > I am working on an application that must call Julia from C code. I have everything working except the part where I need to pass a C-string to a julia function. I was hoping to do something like

[julia-users] Julia + MKL no Base.LinAlg.SparseBLAS

2016-03-29 Thread Serban Andrei Stan
I'm trying to get Julia working with the MKL library for fast sparse matrix multiplications. I managed to compile a version of Julia-0.4.3 on an Ubuntu 15.10 64 bit machine with MKL (Base.blas_vendor() gives :mkl, and Base.libblas_name gives libmkl_rt). However, I can't seem to find the

Re: [julia-users] Command line arguments

2016-03-29 Thread Yichao Yu
On Mar 29, 2016 4:11 PM, wrote: > > Hi all, > > > I'm wanting to write a short program in Julia to analyze some data from a series of long files. I'm coming from a shell scripting background and am new to Julia but would like to switch to Julia for these types of

[julia-users] Command line arguments

2016-03-29 Thread ameliafitzsimmons1
Hi all, I'm wanting to write a short program in Julia to analyze some data from a series of long files. I'm coming from a shell scripting background and am new to Julia but would like to switch to Julia for these types of tasks. I like to write the scripts to be pretty generic and to take

[julia-users] Regarding GSoC 2017

2016-03-29 Thread mistry . 1
Hello, I am a first year student pursuing computer science at IIT Jodhpur and I am really looking forward to apply in GSoC 2017. For this, I would appreciate if any mentor could inform me about the projects that I should expect the next year so that I can start preparing for them from now.

[julia-users] How to pass char* string to julia via jl_call?

2016-03-29 Thread Devin Butterfield
Hi Folks, I am working on an application that must call Julia from C code. I have everything working except the part where I need to pass a C-string to a julia function. I was hoping to do something like this: jl_value_t * mod = (jl_value_t*)jl_eval_string("mymodule"); jl_value_t *arg =

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread Tim Holy
I haven't look at this myself, but have you tried Stefan's suggestion to look at `@code_warntype`? This might not be a preallocation issue, it might be a type-stability issue. --Tim On Tuesday, March 29, 2016 01:56:21 PM Yichao Yu wrote: > On Tue, Mar 29, 2016 at 1:50 PM, 博陈

[julia-users] Re: ANN: JuMP 0.12 released

2016-03-29 Thread Miles Lubin
Are you suggesting a clarification in the documentation or new functionality? The docs clearly explain when ForwardDiff is used and what the performance drawbacks are. If you know of a package in Julia which we could use to perform reverse mode AD on user-defined functions, we'll gladly accept

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread Yichao Yu
On Tue, Mar 29, 2016 at 1:50 PM, 博陈 wrote: > Additionally, the allocation problem is not solved. I guess this > http://julia-programming-language.2336112.n4.nabble.com/How-to-avoid-temporary-arrays-being-created-in-a-function-td14492.html > might > be helpful, but I

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread Yichao Yu
On Tue, Mar 29, 2016 at 1:45 PM, 博陈 wrote: > Thank you very much for your help. > > But I don't understand what the difference is between `a * b * c * d` and > `(a * b) * (c * d)`. Do you mean that the latter is slower? > The latter is faster since the compiler

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread 博陈
Additionally, the allocation problem is not solved. I guess this http://julia-programming-language.2336112.n4.nabble.com/How-to-avoid-temporary-arrays-being-created-in-a-function-td14492.html might be helpful, but I just don't know how to change my code. 在 2016年3月30日星期三 UTC+8上午1:15:07,Yichao

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread 博陈
Thank you very much for your help. But I don't understand what the difference is between `a * b * c * d` and `(a * b) * (c * d)`. Do you mean that the latter is slower? Before I wrote this function, I just wrote a much simple one, which only calculate array a (physically, the dipole

Re: [julia-users] Is there a performance penalty for defining functions inside functions?

2016-03-29 Thread Mauro
In 0.4 it is slower but this is fixed in 0.5. So I think this style is fine unless you need fast on 0.4 now. On Tue, 2016-03-29 at 18:31, Evan Fields wrote: > To keep namespaces clear and to help with code readability, I might like to > do this: > > function

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread Yichao Yu
On Tue, Mar 29, 2016 at 12:43 PM, 博陈 wrote: > I tried the built-in profiler, and find that the problem lies in lines I > end with **, the result is shown below: > that proved my guess, how can I pre-allocate these arrays? If I don't want > to divide this code into

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread 博陈
sorry, but I give the lines in the citing area below the table. 在 2016年3月30日星期三 UTC+8上午12:50:30,Milan Bouchet-Valat写道: > > Le mardi 29 mars 2016 à 09:43 -0700, 博陈 a écrit : > > I tried the built-in profiler, and find that the problem lies in > > lines I end with **, the result is shown

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread Milan Bouchet-Valat
Le mardi 29 mars 2016 à 09:43 -0700, 博陈 a écrit : > I tried the built-in profiler, and find that the problem lies in > lines I end  with **, the result is shown below: > that proved my guess, how can I pre-allocate these arrays? If I don't > want to divide this code into several parts that

[julia-users] Re: ANN: JuMP 0.12 released

2016-03-29 Thread feza
I suggest clarification in the documents regarding which mode of automatic differentiation since this can have a large impact on computation time. It seems like this 'ForwardDiff is only used for used-defined functions with the autodiff=true option. ReverseDiffSparse is used for all other

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread 博陈
I tried the built-in profiler, and find that the problem lies in lines I end with **, the result is shown below: that proved my guess, how can I pre-allocate these arrays? If I don't want to divide this code into several parts that calculate these arrays separately. | lines | backtrace |

[julia-users] Is there a performance penalty for defining functions inside functions?

2016-03-29 Thread Evan Fields
To keep namespaces clear and to help with code readability, I might like to do this: function mainFunc() function helper() do stuff return something end call helper() and do stuff return something end That way the helper function is only visible to the function

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread Yichao Yu
On Tue, Mar 29, 2016 at 10:00 AM, 博陈 wrote: > Actually, I know the arrays allocated in every loop, my problem is that I > don't know the strategy to pre-allocate such arrays. > In short, this is the pre-allocating problem of arrays like array a > described below: > > > n

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread 博陈
Actually, I know the arrays allocated in every loop, my problem is that I don't know the strategy to pre-allocate such arrays. In short, this is the pre-allocating problem of arrays like array a described below: n = 1024; nt = 1000; dt = 0.1 a = Array(Float64, n, n) for i in 1:nt t = i*dt

[julia-users] Re: hdf5 not installing on linux cluster node

2016-03-29 Thread 博陈
I have experienced by the same problem last two months, and finally figured out the solution. When you log in not as a root user, you can't install libraries like hdf5 or c-blosc with apt-get or yum. To install these libs, you should download them from

Re: [julia-users] Why does the warning go away? (Or: my first Julia WAT)

2016-03-29 Thread Mauro
> # WAT: A warning about using collect()? > > julia> a = [1:3] > WARNING: [a] concatenation is deprecated; use collect(a) instead > in depwarn at deprecated.jl:73 > in oldstyle_vcat_warning at > /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib > in vect at

Re: [julia-users] Why does the warning go away? (Or: my first Julia WAT)

2016-03-29 Thread Tamas Papp
Even though experimenting with the command line is an important part of learning a about language, you can usually figure out conceptual features better from reading the documentation. In particular, release notes inform about deprecations. [...] was used frequently to convert to a vector, but it

Re: [julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread Stefan Karpinski
Have you tried: (a) calling @code_typewarn on your function (b) using the built-in profiler? On Tue, Mar 29, 2016 at 9:23 AM, 博陈 wrote: > First of all, have a look at the result. > > >

[julia-users] Why does the warning go away? (Or: my first Julia WAT)

2016-03-29 Thread Manor Askenazi
# So, ranges are a thing: julia> 1:3 1:3 # Not an obvious type, but OK: julia> typeof(1:3) UnitRange{Int64} # And they can be assigned to variable, good. julia> a = 1:3 1:3 # WAT: A warning about using collect()? julia> a = [1:3] WARNING: [a] concatenation is deprecated; use collect(a)

[julia-users] The Arrays are hard to pre-allocate for me, are they possible to be pre-allocated?

2016-03-29 Thread 博陈
First of all, have a look at the result. My code calculates the evolution of 1-d 2-electron system in the electric field,

[julia-users] How solve this issue when I run Pkg.add("xx") is broken?

2016-03-29 Thread Qi Wei
How solve this issue when I run Pkg.add("xx") is broken? Like Conda, I use the command"conda clean --lock", these unfinished files are clean. I want to know that how to use to clean cache files using Julia?

[julia-users] Re: Error: Kernel dead in Jupyter

2016-03-29 Thread Tony Kelman
This should be resolved upstream by https://build.opensuse.org/package/rdiff/windows:mingw:win64/mingw64-runtime?linkrev=base=40 In a fee hours when everything is finished rebuilding this should start working again with just a WinRPM.update() and maybe also WinRPM.install("zeromq")

[julia-users] Re: raytracing in julia

2016-03-29 Thread Simon Danisch
Oh, contrary to FireRender, FireRay seems to only have a C++ API... There's also https://github.com/JuliaGeometry/GeometricalPredicates.jl and https://github.com/JuliaGeometry/TriangleIntersect.jl, though! Am Freitag, 25. März 2016 14:54:01 UTC+1 schrieb jw3126: > > I need to do things like

[julia-users] Re: raytracing in julia

2016-03-29 Thread jw3126
Thanks very much for the suggestion and the help offer! FireRays indeed looks like it could do what I need. Though I find it a bit intimidating as it involves lots of stuff I have no experience with. I will toy a bit around with FireRays and come back to you. Btw have you some estimate how hard