Re: [julia-users] Question on array behaviour

2014-11-14 Thread Mauro
On Fri, 2014-11-14 at 04:56, Amuthan A. Ramabathiran apar...@gmail.com wrote: Hello, I ran into this problem recently: julia a = Array{Int,1}[] 0-element Array{Array{Int64,1},1} julia b = zeros(Int,2) 2-element Array{Int64,1}: 0 0 julia b[1] = 1 1 julia push!(a,b) 1-element

Re: [julia-users] Question on array behaviour

2014-11-14 Thread Amuthan
Ah right. Thanks! On Fri, Nov 14, 2014 at 12:54 AM, Mauro mauro...@runbox.com wrote: On Fri, 2014-11-14 at 04:56, Amuthan A. Ramabathiran apar...@gmail.com wrote: Hello, I ran into this problem recently: julia a = Array{Int,1}[] 0-element Array{Array{Int64,1},1} julia b =

Re: [julia-users] Re: JuliaBox

2014-11-14 Thread Stefan Karpinski
Using GitHub for auth actually makes a lot of sense and would allow us to use GitHub for persistence unconditionally instead of as an option, which might be simpler. Of course then there will always be someone who objects to having a GitHub account ;-) On Nov 14, 2014, at 6:24 AM, SVAKSHA

Re: [julia-users] Re: Shape preserving Interpolation

2014-11-14 Thread Nils Gudat
Hi Tamas, Thanks for your input! Indeed it appears that shape preserving interpolation in higher dimensions is a somewhat tricky problem. Most of the literature I've found is in applied maths journals and not a lot seems to have been transferred to economics, although there's a paper by Cai

Re: [julia-users] Re: Difference in constructing immutable types between 0.3 and 0.4?

2014-11-14 Thread Stefan Karpinski
I'm not sure but it's quite possible that this was fixed independently of this email. Jeff has been doing most of the work on call overloading and he doesn't (afaik) read julia-users very often. Sorry that you wasted time on that and thanks for looking into this. On Fri, Nov 14, 2014 at 8:57 AM,

Re: [julia-users] Difference in constructing immutable types between 0.3 and 0.4?

2014-11-14 Thread João Felipe Santos
Hello all, I actually fixed the problem by adding type specifications to all function calls and immutable types involved. Maybe this was also fixed in Julia 0.4 in the time being, but I was not able to follow as I follow the recommendation of developing all my package code in 0.3 and just

Re: [julia-users] Re: JuliaBox

2014-11-14 Thread Daniel Carrera
On Friday, 14 November 2014 12:45:54 UTC+1, Stefan Karpinski wrote: Using GitHub for auth actually makes a lot of sense and would allow us to use GitHub for persistence unconditionally instead of as an option, which might be simpler. Of course then there will always be someone who objects

Re: [julia-users] Re: JuliaBox

2014-11-14 Thread Erik Schnetter
On Thu, Nov 13, 2014 at 11:25 PM, Viral Shah vi...@mayin.org wrote: Basically, JuliaBox gives you hosted IJulia and a persistent filesystem. So, you are not restricted to your local device. There is also a shell and ability to sync Google Drive and Github repos, or simply upload your files,

Re: [julia-users] Re: JuliaBox

2014-11-14 Thread Shashi Gowda
No you won't have sudo access since that may lead to a broken container. You can however compile programs in your home directory which will persist across sessions. If you require some package that might be generally useful to others as well do open an issue at github.com/JuliaLang/JuliaBox

[julia-users] Re: Manual color selection from a PyPlot ColorMap

2014-11-14 Thread Steven G. Johnson
On Thursday, November 13, 2014 9:34:49 PM UTC-5, Chris Binz wrote: Is there a way of getting an individual color value via an index of a ColorMap object in PyPlot? This (Python) code snippet (from here http://stackoverflow.com/a/12858391/2175008) hopefully explains what I'm after:

[julia-users] Re: Manual color selection from a PyPlot ColorMap

2014-11-14 Thread Chris Binz
Thank you. I literally just figured out this workaround about 5 minutes ago, and was about to reply with it when I saw your message. On Friday, November 14, 2014 12:41:35 PM UTC-5, Steven G. Johnson wrote: On Thursday, November 13, 2014 9:34:49 PM UTC-5, Chris Binz wrote: Is there a way of

[julia-users] @inbounds only applies to RHS?

2014-11-14 Thread Neal Becker
I tried @inbounds out[(i-1)*f.interp+1:i*f.interp] = shift_compute1 (f, u, i, i) and got ERROR: wrong number of arguments So can @inbounds only apply on RHS? -- -- Those who don't understand recursion are doomed to repeat it

[julia-users] Re: @inbounds only applies to RHS?

2014-11-14 Thread Michael Hatherly
Looks like that should work. Have you tried removing the space in shift_compute1 (f, u, i, i) between the method name and argument list? I get the same error with a space there. — Mike ​

Re: [julia-users] why it happens

2014-11-14 Thread Andreas Noack
Relative to the construction of a Symmetric matrix (which is almost a noop) it is expensive to symmetrize it, but maybe it is negligible compared to the operations you'll run on the matrix afterwards. 2014-11-13 11:25 GMT-05:00 Steven G. Johnson stevenj@gmail.com: On Thursday, November

[julia-users] Re: @inbounds only applies to RHS?

2014-11-14 Thread Michael Hatherly
To follow up on that here's the output from quoting that problematic line: ``` julia :(@inbounds out[(i-1)*f.interp+1:i*f.interp] = shift_compute1 (f, u, i, i)).args 3-element Array{Any,1}: symbol(@inbounds) :(out[(i - 1) * f.interp + 1:i * f.interp] =

[julia-users] Re: @inbounds only applies to RHS?

2014-11-14 Thread Michael Hatherly
And here's the issue I was referring to https://github.com/JuliaLang/julia/issues/7232.

Re: [julia-users] why it happens

2014-11-14 Thread Alan Edelman
realm and imagem might be the wrong name as realm should be a matrix with the same eigenvectors of A but the real part of the eigenvalues etc On Friday, November 14, 2014 2:10:43 PM UTC-5, Andreas Noack wrote: Relative to the construction of a Symmetric matrix (which is almost a noop) it

[julia-users] Hashing question

2014-11-14 Thread Simon Danisch
Hi, I hardly have any experience with hashing, so I thought I better ask here, before I do something silly. First, how do you make sets use a custom hashing functions for your own types? This doesn't seem to work: *immutable Test* *x::ASCIIString* *end* *Base.hash(h::Test) = hash(h.x)*

[julia-users] Re: Hashing question

2014-11-14 Thread Ivar Nesje
I'd suggest you start with the documentation for hash http://docs.julialang.org/en/latest/stdlib/base/#Base.hash and isequal http://docs.julialang.org/en/latest/stdlib/base/#Base.isequal, and look at some implementation of hash to understand the two argument version. As far as I understand,

[julia-users] creating sequentially numbered variables

2014-11-14 Thread will ship
Is there a way to create by concatenation or otherwise a list of sequentially numbered variables e.g.: text1 = @Entry(editable = false) text2 = @Entry(editable = false) text3 = @Entry(editable = false) text4 = @Entry(editable = false) i.e. want to append a number to the end of a variable

[julia-users] example for ccall use and fortran

2014-11-14 Thread Andre Bieler
tried calling a simple fortran function from julia but did not succeed: this is the fortran code: !fileName = simplemodule.f95 module simpleModule contains function foo(x) integer :: foo, x foo = x * 2 end function foo end module simplemodule which is then compiled with: *gfortran

Re: [julia-users] example for ccall use and fortran

2014-11-14 Thread Mike Nolta
On Fri, Nov 14, 2014 at 4:08 PM, Andre Bieler andre.biele...@gmail.com wrote: tried calling a simple fortran function from julia but did not succeed: this is the fortran code: !fileName = simplemodule.f95 module simpleModule contains function foo(x) integer :: foo, x foo = x * 2 end

[julia-users] Re: creating sequentially numbered variables

2014-11-14 Thread Ivar Nesje
I don't think the answer to your question is the best solution to your problem, I'll first ask why you don't append the entries to an array instead? The answer to this question depends on whether you want to create function scope variables or global scope variables. You have to use some sort

Re: [julia-users] example for ccall use and fortran

2014-11-14 Thread Luthaf
The first way to compile is the good one, but gfortran is slightly changing the names of the function. You can see it by running the `nm` command : ``` $ nm simplemodule.so 0f98 T ___simplemodule_MOD_foo ``` So you have to call `__simplemodule_MOD_foo` from Julia side (yes, with

Re: [julia-users] example for ccall use and fortran

2014-11-14 Thread Mauro
Maybe this can help too: http://maurow.bitbucket.org/notes/calling_fortran_from_misc.html By using bind(c) or iso_c_binding name mangling is turned off. On Fri, 2014-11-14 at 22:15, Luthaf lut...@luthaf.fr wrote: The first way to compile is the good one, but gfortran is slightly changing the

Re: [julia-users] example for ccall use and fortran

2014-11-14 Thread Andre Bieler
Thanks guys that worked!! On Friday, November 14, 2014 4:22:44 PM UTC-5, Luthaf wrote: The first way to compile is the good one, but gfortran is slightly changing the names of the function. You can see it by running the `nm` command : ``` $ nm simplemodule.so 0f98 T

[julia-users] Viewing package code

2014-11-14 Thread Frank Davidson
Hi, Anyone know of how you can easily look at package code while in Julia? It would be great if there were a way to do that... I ended up going into the .julia directory and somehow screwed up Git so I couldn't Pkg.update() anymore... Frank

[julia-users] Re: Viewing package code

2014-11-14 Thread Iain Dunning
You could look at the code on Github? It sounds like you edited the file, so Pkg.update() can't update the code as it doesn't want to overwrite any changes you have made. The most simple way to fix this would be to remove the folders for any packages you've dirtied and then run Pkg.update() to

[julia-users] Re: Viewing package code

2014-11-14 Thread David P. Sanders
El viernes, 14 de noviembre de 2014 15:59:17 UTC-6, Frank Davidson escribió: Hi, Anyone know of how you can easily look at package code while in Julia? It would be great if there were a way to do that... I ended up going into the .julia directory and somehow screwed up Git so I couldn't

Re: [julia-users] Re: Viewing package code

2014-11-14 Thread Frank Davidson
Yes, I did that, but I was thinking that it might be nice to just be able to pull up the code for a type or function to see the exact implementation directly in Julia... So you haven't heard of anything like that, I guess? Thanks for the help! On Fri, Nov 14, 2014 at 5:30 PM Iain Dunning

[julia-users] Re: Viewing package code

2014-11-14 Thread David P. Sanders
El viernes, 14 de noviembre de 2014 15:59:17 UTC-6, Frank Davidson escribió: Hi, Anyone know of how you can easily look at package code while in Julia? It would be great if there were a way to do that... I ended up going into the .julia directory and somehow screwed up Git so I couldn't

Re: [julia-users] Re: Viewing package code

2014-11-14 Thread Ivar Nesje
We have macros @less and @edit that might do what you want

[julia-users] Arrayfire and Julia

2014-11-14 Thread Zahirul ALAM
Arrayfire has a large library for GPU computing. They have decided to make their codes open source. I am hoping that someone much more able than me will write some sort of wrapper to use the Arrayfire library in Julia. Here is the github link: https://github.com/arrayfire/arrayfire

Re: [julia-users] Viewing package code

2014-11-14 Thread Isaiah Norton
somehow screwed up Git so I couldn't Pkg.update() anymore... Use `Pkg.status()` to figure out which are dirty. Then you can do: julia Pkg.cd(PkgName) shell git stash # safer, will save changes to a hash outside the main history. or shell git reset HEAD --hard # unsafe - will destroy any

[julia-users] Re: creating sequentially numbered variables

2014-11-14 Thread will ship
Thanks Ivar: I have got it working using an array as you suggested (not sure why I hadn't thought of this already) using following code: using Gtk.ShortNames G11=@Grid() array1=Array(Any,i) array2=[1:1:10] for i in 1:10 array1[i]= @Entry() a=array1[i] b=array2[i] G11[1,i]=a

[julia-users] Re: creating sequentially numbered variables

2014-11-14 Thread will ship
Thanks Simon I tried this Dict way but ended up with no method exceptions when trying to setproperty! which was the next step.. I will have an explore of how to do this in Dictionarys and if successful will report back. Cheers Will On Friday, November 14, 2014 9:27:47 PM UTC, Simon Danisch

[julia-users] Re: Arrayfire and Julia

2014-11-14 Thread Tony Kelman
I had the same response, great that they open-sourced the library, and wrapping it in a Julia package would be interesting and not that hard to do. It just needs someone to put a little bit of time into it. How long have you been using Julia? Try compiling the arrayfire library and writing a

[julia-users] Re: Arrayfire and Julia

2014-11-14 Thread Zahirul ALAM
thanks. I have been using Julia for five months or so. I have not used the ccall function ever. I will try it out as soon as I am done my current project. On Friday, 14 November 2014 18:29:09 UTC-5, Tony Kelman wrote: I had the same response, great that they open-sourced the library, and

Re: [julia-users] Understanding memory usage

2014-11-14 Thread Test This
Thank you for the response Tim. sizeof(Person) is 48. Now, I know you said that it is not as straightforward as looking just sizeof(Person). But when sizeof(Person) is 48 and I have 1728000 bytes allocated to Line 56, then is this more or less a certain sign that something is wrong. Or, is

Re: [julia-users] Understanding memory usage

2014-11-14 Thread Tim Holy
It accumulates across your entire session. You can reset with `clear_malloc_data`. The 48 bytes only include a _pointer_ to the Dict. You'd need to also include the space used by the Dict itself. One easy way to get an approximate number is @allocated [H = xHutil, L = 100 - xHutil] (It's