[julia-users] Re: Gadfly conflict with JLD

2014-12-03 Thread xiongjieyi
I guess maybe some packages Gadfly used forgot importing base.convert but 
exported it in somewhere.

On Wednesday, December 3, 2014 3:51:54 PM UTC+1, xiong...@gmail.com wrote:
>
> I found that after using Gadfly, the load funciton in JLD can not work, as 
> below:
>
> julia> using Gadfly
>
> julia> using HDF5,JLD
>
> julia> save("tempfile.jld","var",[1,2,3])
>
> julia> load("tempfile.jld","var")
> ERROR: `convert` has no method matching convert(::Type{Int64...}, ::UInt64)
>  in convert at base.jl:44
>  in read at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:330
>  in read at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:313
>  in anonymous at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:972
>  in jldopen at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:234
>  in load at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:971
>
> However, if I run "using HDF5, JLD" before "using Gadfly", everything will 
> be fine.
>
> FYI:
> julia> versioninfo()
> Julia Version 0.4.0-dev+1928
> Commit b1c99af* (2014-12-03 08:58 UTC)
> Platform Info:
>   System: Linux (x86_64-redhat-linux)
>   CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
>   LAPACK: libopenblas
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
>


[julia-users] Re: Gadfly conflict with JLD

2014-12-03 Thread xiongjieyi
I guess maybe Gadfly forgot importing base.convert but exported it in 
somewhere.

On Wednesday, December 3, 2014 3:51:54 PM UTC+1, xiong...@gmail.com wrote:
>
> I found that after using Gadfly, the load funciton in JLD can not work, as 
> below:
>
> julia> using Gadfly
>
> julia> using HDF5,JLD
>
> julia> save("tempfile.jld","var",[1,2,3])
>
> julia> load("tempfile.jld","var")
> ERROR: `convert` has no method matching convert(::Type{Int64...}, ::UInt64)
>  in convert at base.jl:44
>  in read at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:330
>  in read at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:313
>  in anonymous at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:972
>  in jldopen at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:234
>  in load at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:971
>
> However, if I run "using HDF5, JLD" before "using Gadfly", everything will 
> be fine.
>
> FYI:
> julia> versioninfo()
> Julia Version 0.4.0-dev+1928
> Commit b1c99af* (2014-12-03 08:58 UTC)
> Platform Info:
>   System: Linux (x86_64-redhat-linux)
>   CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
>   LAPACK: libopenblas
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
>


[julia-users] Gadfly conflict with JLD

2014-12-03 Thread xiongjieyi
I found that after using Gadfly, the load funciton in JLD can not work, as 
below:

julia> using Gadfly

julia> using HDF5,JLD

julia> save("tempfile.jld","var",[1,2,3])

julia> load("tempfile.jld","var")
ERROR: `convert` has no method matching convert(::Type{Int64...}, ::UInt64)
 in convert at base.jl:44
 in read at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:330
 in read at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:313
 in anonymous at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:972
 in jldopen at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:234
 in load at /home/JXiong/.julia/v0.4/HDF5/src/JLD.jl:971

However, if I run "using HDF5, JLD" before "using Gadfly", everything will 
be fine.

FYI:
julia> versioninfo()
Julia Version 0.4.0-dev+1928
Commit b1c99af* (2014-12-03 08:58 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


[julia-users] Re: Gadfly: Type command before close browser in REPL

2014-11-07 Thread xiongjieyi
I got a solution: Just open a firefox in the background in advance before 
Gadfly drawing. The REPL will return to command-ready state soon after the 
figure is shown.

On Tuesday, November 4, 2014 10:54:22 AM UTC+1, xiong...@gmail.com wrote:
>
> I like use Gadfly in REPL rather IJulia (because I can not Ctrl-C to break 
> running script in IJulia). The browser (firefox) with figure pop-up through 
> X11 on my screen. However, I cannot continue my command in REPL until I 
> close the browser. Is there any way to return command-ready state 
> immediately after the browser pop-up?
>


Re: [julia-users] Re: Can not require a precompiled package

2014-11-07 Thread xiongjieyi
Ah yes, sorry but I am the same person who posted this issue ^ ^b

So far I have a dirty solution: add below code at the beginning of require 
function in load.jl and re-compile it:

if ismatch(r"^\w+$",name) && isdefined(parse(name))
return nothing
end

Everything seems goes fine now... Hope it won't have any serious 
side-effect...
I think as a Julia user, it is more valuable to make package-loading faster 
than make it always updated. The package loading time is a bottle-neck of 
improving user-experience right now. I quite support the precompile 
function.

On Friday, November 7, 2014 5:34:27 PM UTC+1, Ivar Nesje wrote:
>
> https://github.com/lgautier/Rif.jl/issues/40 Seems relevant.
>
> kl. 16:54:10 UTC+1 fredag 7. november 2014 skrev xiong...@gmail.com 
> følgende:
>>
>> Actually it is not what I want, but require function is used in the code 
>> of other packages. I noted this problem when I failed to load Rif package 
>> after I precompiled Gadfly package. The Rif package can not be loaded since 
>> it "requires" DataFrames package, which is alreally precompiled along with 
>> Gadfly package. So, if require function just do nothing about any 
>> precompiled package, everything will be fine.
>>
>> On Friday, November 7, 2014 4:33:22 PM UTC+1, Tim Holy wrote:
>>>
>>> Out of curiosity, why do you want to do this? Once you've got the module 
>>> available, I would think you'd just refer to it by module name? 
>>>
>>> --Tim 
>>>
>>> On Friday, November 07, 2014 06:25:55 AM xiong...@gmail.com wrote: 
>>> > Can you require a pre-compiled package in your Julia? If yes, could 
>>> you 
>>> > please tell me your version? Thanks! 
>>> > 
>>> > On Friday, November 7, 2014 3:10:15 PM UTC+1, xiong...@gmail.com 
>>> wrote: 
>>> > > After I precompiled a package in userimg.jl, require("Package_name") 
>>> is 
>>> > > always blocked without any response. But "using" and "import" the 
>>> package 
>>> > > works fine. That's weired. 
>>> > > 
>>> > > If I interrupt require-ing package by Ctrl-C, the breaking point 
>>> always 
>>> > > be: 
>>> > > 
>>> > > julia> require("DataFrames") 
>>> > > ^CERROR: interrupt 
>>> > > 
>>> > >  in wait at ./task.jl:277 
>>> > >  in wait at ./task.jl:194 
>>> > >  in wait_full at ./multi.jl:602 
>>> > >  in wait_ref at ./multi.jl:755 
>>> > >  in wait_ref_3B_7574 at 
>>> > > 
>>> > > /home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so 
>>> > > 
>>> > >  in call_on_owner at ./multi.jl:749 
>>> > >  in wait at ./multi.jl:756 
>>> > >  in _require at ./loading.jl:62 
>>> > >  in require at ./loading.jl:52 
>>> > >  in require_3B_7273 at 
>>> > > 
>>> > > /home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so 
>>> > > 
>>> > > FYI: 
>>> > > julia> versioninfo() 
>>> > > Julia Version 0.4.0-dev+728 
>>> > > Commit f7172d3* (2014-09-22 12:08 UTC) 
>>> > > 
>>> > > Platform Info: 
>>> > >   System: Linux (x86_64-redhat-linux) 
>>> > >   CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz 
>>> > >   WORD_SIZE: 64 
>>> > >   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM) 
>>> > >   LAPACK: libopenblas 
>>> > >   LIBM: libopenlibm 
>>> > >   LLVM: libLLVM-3.3 
>>>
>>>

Re: [julia-users] Re: Can not require a precompiled package

2014-11-07 Thread xiongjieyi
Actually it is not what I want, but require function is used in the code of 
other packages. I noted this problem when I failed to load Rif package 
after I precompiled Gadfly package. The Rif package can not be loaded since 
it "requires" DataFrames package, which is alreally precompiled along with 
Gadfly package. So, if require function just do nothing about any 
precompiled package, everything will be fine.

On Friday, November 7, 2014 4:33:22 PM UTC+1, Tim Holy wrote:
>
> Out of curiosity, why do you want to do this? Once you've got the module 
> available, I would think you'd just refer to it by module name? 
>
> --Tim 
>
> On Friday, November 07, 2014 06:25:55 AM xiong...@gmail.com  
> wrote: 
> > Can you require a pre-compiled package in your Julia? If yes, could you 
> > please tell me your version? Thanks! 
> > 
> > On Friday, November 7, 2014 3:10:15 PM UTC+1, xiong...@gmail.com wrote: 
> > > After I precompiled a package in userimg.jl, require("Package_name") 
> is 
> > > always blocked without any response. But "using" and "import" the 
> package 
> > > works fine. That's weired. 
> > > 
> > > If I interrupt require-ing package by Ctrl-C, the breaking point 
> always 
> > > be: 
> > > 
> > > julia> require("DataFrames") 
> > > ^CERROR: interrupt 
> > > 
> > >  in wait at ./task.jl:277 
> > >  in wait at ./task.jl:194 
> > >  in wait_full at ./multi.jl:602 
> > >  in wait_ref at ./multi.jl:755 
> > >  in wait_ref_3B_7574 at 
> > > 
> > > /home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so 
> > > 
> > >  in call_on_owner at ./multi.jl:749 
> > >  in wait at ./multi.jl:756 
> > >  in _require at ./loading.jl:62 
> > >  in require at ./loading.jl:52 
> > >  in require_3B_7273 at 
> > > 
> > > /home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so 
> > > 
> > > FYI: 
> > > julia> versioninfo() 
> > > Julia Version 0.4.0-dev+728 
> > > Commit f7172d3* (2014-09-22 12:08 UTC) 
> > > 
> > > Platform Info: 
> > >   System: Linux (x86_64-redhat-linux) 
> > >   CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz 
> > >   WORD_SIZE: 64 
> > >   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM) 
> > >   LAPACK: libopenblas 
> > >   LIBM: libopenlibm 
> > >   LLVM: libLLVM-3.3 
>
>

[julia-users] Re: Can not require a precompiled package

2014-11-07 Thread xiongjieyi
Can you require a pre-compiled package in your Julia? If yes, could you 
please tell me your version? Thanks!

On Friday, November 7, 2014 3:10:15 PM UTC+1, xiong...@gmail.com wrote:
>
> After I precompiled a package in userimg.jl, require("Package_name") is 
> always blocked without any response. But "using" and "import" the package 
> works fine. That's weired.
>
> If I interrupt require-ing package by Ctrl-C, the breaking point always be:
>
> julia> require("DataFrames")
> ^CERROR: interrupt
>  in wait at ./task.jl:277
>  in wait at ./task.jl:194
>  in wait_full at ./multi.jl:602
>  in wait_ref at ./multi.jl:755
>  in wait_ref_3B_7574 at 
> /home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so
>  in call_on_owner at ./multi.jl:749
>  in wait at ./multi.jl:756
>  in _require at ./loading.jl:62
>  in require at ./loading.jl:52
>  in require_3B_7273 at 
> /home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so
>
> FYI:
> julia> versioninfo()
> Julia Version 0.4.0-dev+728
> Commit f7172d3* (2014-09-22 12:08 UTC)
> Platform Info:
>   System: Linux (x86_64-redhat-linux)
>   CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
>   LAPACK: libopenblas
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
>


[julia-users] Can not require a precompiled package

2014-11-07 Thread xiongjieyi
After I precompiled a package in userimg.jl, require("Package_name") is 
always blocked without any response. But "using" and "import" the package 
works fine. That's weired.

If I interrupt require-ing package by Ctrl-C, the breaking point always be:

julia> require("DataFrames")
^CERROR: interrupt
 in wait at ./task.jl:277
 in wait at ./task.jl:194
 in wait_full at ./multi.jl:602
 in wait_ref at ./multi.jl:755
 in wait_ref_3B_7574 at 
/home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so
 in call_on_owner at ./multi.jl:749
 in wait at ./multi.jl:756
 in _require at ./loading.jl:62
 in require at ./loading.jl:52
 in require_3B_7273 at 
/home/MyDir/programs/julia/usr/bin/../lib/julia/sys.so

FYI:
julia> versioninfo()
Julia Version 0.4.0-dev+728
Commit f7172d3* (2014-09-22 12:08 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


[julia-users] Re: How to assign names of a RArray object in Rif.jl?

2014-11-05 Thread xiongjieyi
Quite good improvements. Thanks! I like getrnames and setrnames!, That's 
much intuitive!

On Thursday, October 30, 2014 10:44:01 PM UTC+1, lgautier wrote:
>
> I'd be happy to follow the naming convention for generics when handling 
> named arrays.
>
> On Monday, October 27, 2014 11:17:47 AM UTC-4, David van Leeuwen wrote:
>>
>> Hi, 
>>
>> There is a package NamedArray that attempts to make it possible to work 
>> with named indices and dimensions in native Julia arrays, just like you are 
>> used to in R.  There is no interface to Rif.jl, though.  Would this be a 
>> useful extension?
>>
>> ---david
>>
>> On Sunday, October 26, 2014 11:01:51 PM UTC+1, lgautier wrote:
>>>
>>> Currently the way to do is to explicitly call the R-level setter:
>>>
>>> x = Rif.R("names<-")(x, Rif.cR("A", "B", "C"))
>>>
>>>
>>> However, as of today commit the C-level is exposed and a way that is 
>>> looking a little more like native Julia.
>>> (I'll do a pull request so this is part of the released package soon).
>>>
>>> The unit-tests are for vectors, and should be explict:
>>> https://github.com/lgautier/Rif.jl/blob/master/test/vectors.jl#L57
>>>
>>> ```julia
>>> # The C API for R has specialized MACRO for names getrnames/setrnames
>>> # exposes it
>>> vi2 = Int32[1,2,3]
>>> rvi2 = Rif.RArray{Int32,1}(vi2)
>>> @test isequal(None, Rif.getrnames(rvi2))
>>> Rif.setrnames!(rvi2, Rif.RArray{ASCIIString,1}(ASCIIString["a", "b", 
>>> "c"]))
>>> @test isequal("a", Rif.getrnames(rvi2)[1])
>>> @test isequal("b", Rif.getrnames(rvi2)[2])
>>> @test isequal("c", Rif.getrnames(rvi2)[3])
>>>
>>> # setAttr/getAttr will be equivalent
>>> vi2 = Int32[1,2,3]
>>> rvi2 = Rif.RArray{Int32,1}(vi2)
>>> @test_throws ErrorException Rif.getAttr(rvi2, "names")
>>> Rif.setAttr!(rvi2, "names",
>>>  Rif.RArray{ASCIIString,1}(ASCIIString["a", "b", "c"]))
>>> @test isequal("a", Rif.getAttr(rvi2, "names")[1])
>>> @test isequal("a", Rif.getrnames(rvi2)[1])
>>> @test isequal("b", Rif.getAttr(rvi2, "names")[2])
>>> @test isequal("b", Rif.getrnames(rvi2)[2])
>>> @test isequal("c", Rif.getAttr(rvi2, "names")[3])
>>> @test isequal("c", Rif.getrnames(rvi2)[3])
>>> ```
>>>
>>> On Saturday, October 25, 2014 12:38:10 PM UTC-4, xiong...@gmail.com 
>>> wrote:

 In R, we can assign names for a variable as:
 > x<-c(1,2,3)
 > names(x)=c("A","B","C")
 > x
 A B C 
 1 2 3

 In Julia, I can create a RArray by
 x=Rif.cR([1,2,3])
 But anyone know how to assign the "names" to this RArray variable in 
 Julia?

>>>

[julia-users] Gadfly: Type command before close browser in REPL

2014-11-04 Thread xiongjieyi
I like use Gadfly in REPL rather IJulia (because I can not Ctrl-C to break 
running script in IJulia). The browser (firefox) with figure pop-up through 
X11 on my screen. However, I cannot continue my command in REPL until I 
close the browser. Is there any way to return command-ready state 
immediately after the browser pop-up?


Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
Maybe a little flaw for the filename auto-completion, that path started 
with ~ ($HOME) can not be completed.


Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
The advantage is you don't need to remove the whole line to check the help 
information. It could also used to check the information of variable while 
typing. What's ever, maybe it is nothing more than a toy. Let me work with 
it for a while first.  :)

The REPL is written by Julia itself, which is really excite me. Maybe 
several years later, Julia REPL is another Emacs! I hope it could become 
more customize. After all, many Julia user are tech-geek.

Thank you for your information, and thank you for the REPL!

On Thursday, October 30, 2014 12:51:43 PM UTC+1, Kevin Squire wrote:
>
> Actually, you could already do that if you typed the "?" first...  Thanks 
> for the enthusiasm, though!
>
> Cheers,
>Kevin
>
> On Thu, Oct 30, 2014 at 3:43 AM, > wrote:
>
>> I see, I should use meta-Backspace instead. And the undocumented shortcut 
>> for function arguments is cool! I didn't find that before!
>> Just for fun, I changed my code a little, to show help by 
>> function_name?\t, like:
>> julia> sin?\t
>> Base.sin(x)
>>
>>Compute sine of "x", where "x" is in radians
>> julia> sin?
>>
>> function CUSTOM_AUTOCOMPLETION_HOOK(txt,pos)
>> if txt[pos]=='?' && pos>1
>> #Show help of function
>> m=match(r"([\w\!]+)$",txt[1:pos-1])
>> if !isa(m,Nothing)
>> S=m.captures[1]
>> if isdefined(parse(S))
>> println("")
>> help(S)
>> end
>> return UTF8String[], 0:-1, true
>> end
>> end
>> m=match(r"(\w+)\[\"([^\"]*)$",txt[1:pos])
>> if !isa(m,Nothing)
>> #For String key
>> if !isdefined(Main,parse(m.captures[1]))
>> return UTF8String[], 0:-1, false
>> end
>> var=eval(parse(m.captures[1]))
>> if !applicable(keys,var)
>> return UTF8String[], 0:-1, false
>> end
>> ky=keys(var)
>> if length(ky)>500
>> println("\nToo many keys to be auto-completed.")
>> return UTF8String[], 0:-1, true
>> end
>> ky=[filter(x->isa(x,String),ky)...]
>> lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.captures
>> [2]),ky)...])
>> if !(length(txt)>=pos+1 && txt[pos+1]=='\"')
>> if length(txt)>=pos+1 && txt[pos+1]==']'
>> lst=map(x->x*"\"",lst)
>> else
>> lst=map(x->x*"\"]",lst)
>> end
>> end
>> return lst, (pos-length(m.captures[2])+1):pos, true
>> else
>> #For symbol key
>> m=match(r"(\w+)\[\:(\w*)$",txt[1:pos])
>> if isa(m,Nothing) || !isdefined(Main,parse(m.captures[1]))
>> return UTF8String[], 0:-1, false
>> end
>> var=eval(parse(m.captures[1]))
>> if !applicable(keys,var)
>> return UTF8String[], 0:-1, false
>> end
>> ky=keys(var)
>> if length(ky)>500
>> println("\nToo many keys to be auto-completed.")
>> return UTF8String[], 0:-1, true
>> end
>> ky=map(string,[filter(x->isa(x,Symbol),ky)...])
>> lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.captures
>> [2]),ky)...])
>> if !(length(txt)>=pos+1 && txt[pos+1]==']')
>> lst=map(x->x*"]",lst)
>> end
>> return lst, (pos-length(m.captures[2])+1):pos, true
>> end
>> end
>>
>>
>>
>>
>> On Thursday, October 30, 2014 10:39:43 AM UTC+1, Ivar Nesje wrote:
>>>
>>> We have different level of experience with key bindings, and we are used 
>>> to different things. You won't get far with "It really make me crazy" that 
>>> Julia doesn't work exactly as Matlab or R, but there are definitely still 
>>> possibilities to change behaviour if you manage to convince the community 
>>> that some other way is better. See also the docs 
>>>  
>>> where 
>>> we attempt to describe the different key bindings, and it seems like you 
>>> are confusing meta-Backspace with ^w.
>>>
>>> We also have a really nice shortcut (that I can't find in the 
>>> documentation) where you can press TAB just after a left parens, and get a 
>>> list of the methods on the function. That is often more directly useful 
>>> than the help, when you need to lookup the order of the arguments.
>>>
>>> julia> sin(\t
>>> sin(a::Complex{Float16}) at float16.jl:141  sin(x::Real) at math.jl:125
>>> sin(z::Complex{T<:Real}) at complex.jl:518  
>>> sin{Tv,Ti}(A::SparseMatrixCSC{Tv,Ti}) 
>>> at sparse/sparsematrix.jl:450
>>> sin(x::Float64) at math.jl:123  
>>> sin{T<:Number}(::AbstractArray{T<:Number,1}) 
>>> at operators.jl:358
>>> sin(x::Float32) at math.jl:124  
>>> sin{T<:Number}(::AbstractArray{T<:Number,2}) 
>>> at operators.jl:359
>>> sin(a::Float16) at float16.jl:140   
>>> sin{T<:Number}(::AbstractArray{T<:Number,N}) 
>>> at operators.jl:361
>>> sin(x::BigFloat) at mpfr.jl:488
>>>
>>>  This tri

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
I see, I should use meta-Backspace instead. And the undocumented shortcut 
for function arguments is cool! I didn't find that before!
Just for fun, I changed my code a little, to show help by function_name?\t, 
like:
julia> sin?\t
Base.sin(x)

   Compute sine of "x", where "x" is in radians
julia> sin?

function CUSTOM_AUTOCOMPLETION_HOOK(txt,pos)
if txt[pos]=='?' && pos>1
#Show help of function
m=match(r"([\w\!]+)$",txt[1:pos-1])
if !isa(m,Nothing)
S=m.captures[1]
if isdefined(parse(S))
println("")
help(S)
end
return UTF8String[], 0:-1, true
end
end
m=match(r"(\w+)\[\"([^\"]*)$",txt[1:pos])
if !isa(m,Nothing)
#For String key
if !isdefined(Main,parse(m.captures[1]))
return UTF8String[], 0:-1, false
end
var=eval(parse(m.captures[1]))
if !applicable(keys,var)
return UTF8String[], 0:-1, false
end
ky=keys(var)
if length(ky)>500
println("\nToo many keys to be auto-completed.")
return UTF8String[], 0:-1, true
end
ky=[filter(x->isa(x,String),ky)...]
lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.captures[2
]),ky)...])
if !(length(txt)>=pos+1 && txt[pos+1]=='\"')
if length(txt)>=pos+1 && txt[pos+1]==']'
lst=map(x->x*"\"",lst)
else
lst=map(x->x*"\"]",lst)
end
end
return lst, (pos-length(m.captures[2])+1):pos, true
else
#For symbol key
m=match(r"(\w+)\[\:(\w*)$",txt[1:pos])
if isa(m,Nothing) || !isdefined(Main,parse(m.captures[1]))
return UTF8String[], 0:-1, false
end
var=eval(parse(m.captures[1]))
if !applicable(keys,var)
return UTF8String[], 0:-1, false
end
ky=keys(var)
if length(ky)>500
println("\nToo many keys to be auto-completed.")
return UTF8String[], 0:-1, true
end
ky=map(string,[filter(x->isa(x,Symbol),ky)...])
lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.captures[2
]),ky)...])
if !(length(txt)>=pos+1 && txt[pos+1]==']')
lst=map(x->x*"]",lst)
end
return lst, (pos-length(m.captures[2])+1):pos, true
end
end




On Thursday, October 30, 2014 10:39:43 AM UTC+1, Ivar Nesje wrote:
>
> We have different level of experience with key bindings, and we are used 
> to different things. You won't get far with "It really make me crazy" that 
> Julia doesn't work exactly as Matlab or R, but there are definitely still 
> possibilities to change behaviour if you manage to convince the community 
> that some other way is better. See also the docs 
>  
> where 
> we attempt to describe the different key bindings, and it seems like you 
> are confusing meta-Backspace with ^w.
>
> We also have a really nice shortcut (that I can't find in the 
> documentation) where you can press TAB just after a left parens, and get a 
> list of the methods on the function. That is often more directly useful 
> than the help, when you need to lookup the order of the arguments.
>
> julia> sin(\t
> sin(a::Complex{Float16}) at float16.jl:141  sin(x::Real) at math.jl:125
> sin(z::Complex{T<:Real}) at complex.jl:518 
>  sin{Tv,Ti}(A::SparseMatrixCSC{Tv,Ti}) at sparse/sparsematrix.jl:450
> sin(x::Float64) at math.jl:123 
>  sin{T<:Number}(::AbstractArray{T<:Number,1}) at operators.jl:358
> sin(x::Float32) at math.jl:124 
>  sin{T<:Number}(::AbstractArray{T<:Number,2}) at operators.jl:359
> sin(a::Float16) at float16.jl:140   
> sin{T<:Number}(::AbstractArray{T<:Number,N}) at operators.jl:361
> sin(x::BigFloat) at mpfr.jl:488
>
>  This trick also works when you have started typing some of the arguments, 
> if you ensure that the cursor is right after the parens.
>
> Ivar
>
> kl. 10:07:37 UTC+1 torsdag 30. oktober 2014 skrev xiong...@gmail.com 
> følgende:
>>
>> It will be prefect if the Tab can also auto-complete the argument names 
>> of a function, like what R did.
>>
>> Actually I have other complaints about REPL:
>> 1. Ctrl+w delected all the line rather than only the last word. It really 
>> make me crazy
>> 2. If I push F1 in the REPL in termnal window (it is running in the 
>> server), the whole system clashed:
>> julia> ERROR: key not found: '\0'
>>  in match_input at LineEdit.jl:734 (repeats 3 times)
>>  in match_input at LineEdit.jl:731
>>  in anonymous at LineEdit.jl:833
>>  in prompt! at ./LineEdit.jl:1349
>>  in run_interface at ./LineEdit.jl:1324
>>  in run_interface_3B_9747 at 
>> /home/JXiong/programs/julia_0.3/julia/usr/bin/../lib/julia/sys.so
>>  in run_frontend at ./REPL.jl:819
>>  in run_repl at ./REPL.jl:170
>>  in _start at ./client.jl:399
>>  in _start_3B_9614 at 
>>

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
It will be prefect if the Tab can also auto-complete the argument names of 
a function, like what R did.

Actually I have other complaints about REPL:
1. Ctrl+w delected all the line rather than only the last word. It really 
make me crazy
2. If I push F1 in the REPL in termnal window (it is running in the 
server), the whole system clashed:
julia> ERROR: key not found: '\0'
 in match_input at LineEdit.jl:734 (repeats 3 times)
 in match_input at LineEdit.jl:731
 in anonymous at LineEdit.jl:833
 in prompt! at ./LineEdit.jl:1349
 in run_interface at ./LineEdit.jl:1324
 in run_interface_3B_9747 at 
/home/JXiong/programs/julia_0.3/julia/usr/bin/../lib/julia/sys.so
 in run_frontend at ./REPL.jl:819
 in run_repl at ./REPL.jl:170
 in _start at ./client.jl:399
 in _start_3B_9614 at 
/home/JXiong/programs/julia_0.3/julia/usr/bin/../lib/julia/sys.so

I really like that in MATLAB, I can see the help of the function I am 
typing just by push F1. I think REPL could also support some hot-keys, like 
showing help, showing current directory, showing data tip, showing function 
argument hint, showing command history, and run a custom function during 
typing the command. In many time, I cannot remember the function argument 
order when I type command, I have to delete the whole line, check help, and 
retype it again. How do you think about it?

On Wednesday, October 29, 2014 11:02:54 PM UTC+1, Max Suster wrote:
>
> +1
>
> On Wednesday, October 29, 2014 9:56:33 PM UTC+1, Elliot Saba wrote:
>>
>> I really like the concept; I can't tell you how many times I've tried to 
>> tab-complete dict keys.
>> -E
>>
>> On Wed, Oct 29, 2014 at 1:36 PM, Ivar Nesje  wrote:
>>
>>> Nice. What do people think about adding this functionality to Base?
>>>
>>> If anyone likes to read code in a gist, rather than in an email, I made 
>>> a link 
>>>
>>> Regards Ivar
>>>
>>> kl. 21:07:45 UTC+1 onsdag 29. oktober 2014 skrev xiong...@gmail.com 
>>> følgende:
>>>
 I get it work ^ ^ Haha!!
 Thank you for your information!

 First, insert below code in the beginning of "completions" function in 
 /base/REPLCompletions.jl 
 
 :
 try
 if isdefined(Main, :CUSTOM_AUTOCOMPLETION_HOOK)
 t=Main.CUSTOM_AUTOCOMPLETION_HOOK(string, pos)
 if t[3]
 return t
 end
 end
 catch err
 println("Error in CUSTOM_AUTOCOMPLETION_HOOK:")
 println(err)
 end
 And recompile Julia. Now I have a hook for the custom-autocompletion.

 Second, I define such function:
 function CUSTOM_AUTOCOMPLETION_HOOK(txt,pos)
 m=match(r"(\w+)\[\"([^\"]*)$",txt[1:pos])
 if !isa(m,Nothing)
 #For String key
 if !isdefined(Main,parse(m.captures[1]))
 return UTF8String[], 0:-1, false
 end
 var=eval(parse(m.captures[1]))
 if !applicable(keys,var)
 return UTF8String[], 0:-1, false
 end
 ky=keys(var)
 if length(ky)>500
 return UTF8String[], 0:-1, false
 end
 ky=[filter(x->isa(x,String),ky)...]
 lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.
 captures[2]),ky)...])
 if !(length(txt)>=pos+1 && txt[pos+1]=='\"')
 if length(txt)>=pos+1 && txt[pos+1]==']'
 lst=map(x->x*"\"",lst)
 else
 lst=map(x->x*"\"]",lst)
 end
 end
 return lst, (pos-length(m.captures[2])+1):pos, true
 else
 #For symbol key
 m=match(r"(\w+)\[\:(\w*)$",txt[1:pos])
 if isa(m,Nothing) || !isdefined(Main,parse(m.captures[1]))
 return UTF8String[], 0:-1, false
 end
 var=eval(parse(m.captures[1]))
 if !applicable(keys,var)
 return UTF8String[], 0:-1, false
 end
 ky=keys(var)
 if length(ky)>500
 return UTF8String[], 0:-1, false
 end
 ky=map(string,[filter(x->isa(x,Symbol),ky)...])
 lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.
 captures[2]),ky)...])
 if !(length(txt)>=pos+1 && txt[pos+1]==']')
 lst=map(x->x*"]",lst)
 end
 return lst, (pos-length(m.captures[2])+1):pos, true
 end
 end

 Now it is work on string and symbol key, really cool!
 It can also auto-complete the method of python object ^ ^v

 On Wednesday, October 29, 2014 11:47:32 AM UTC+1, Ivar Nesje wrote:
>
> That would be cool!
>
> Currently

[julia-users] Re: Customize REPL autocomplete

2014-10-29 Thread xiongjieyi
I get it work ^ ^ Haha!!
Thank you for your information!

First, insert below code in the beginning of "completions" function in 
/base/REPLCompletions.jl 

:
try
if isdefined(Main, :CUSTOM_AUTOCOMPLETION_HOOK)
t=Main.CUSTOM_AUTOCOMPLETION_HOOK(string, pos)
if t[3]
return t
end
end
catch err
println("Error in CUSTOM_AUTOCOMPLETION_HOOK:")
println(err)
end
And recompile Julia. Now I have a hook for the custom-autocompletion.

Second, I define such function:
function CUSTOM_AUTOCOMPLETION_HOOK(txt,pos)
m=match(r"(\w+)\[\"([^\"]*)$",txt[1:pos])
if !isa(m,Nothing)
#For String key
if !isdefined(Main,parse(m.captures[1]))
return UTF8String[], 0:-1, false
end
var=eval(parse(m.captures[1]))
if !applicable(keys,var)
return UTF8String[], 0:-1, false
end
ky=keys(var)
if length(ky)>500
return UTF8String[], 0:-1, false
end
ky=[filter(x->isa(x,String),ky)...]

lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.captures[2]),ky)...])
if !(length(txt)>=pos+1 && txt[pos+1]=='\"')
if length(txt)>=pos+1 && txt[pos+1]==']'
lst=map(x->x*"\"",lst)
else
lst=map(x->x*"\"]",lst)
end
end
return lst, (pos-length(m.captures[2])+1):pos, true
else
#For symbol key
m=match(r"(\w+)\[\:(\w*)$",txt[1:pos])
if isa(m,Nothing) || !isdefined(Main,parse(m.captures[1]))
return UTF8String[], 0:-1, false
end
var=eval(parse(m.captures[1]))
if !applicable(keys,var)
return UTF8String[], 0:-1, false
end
ky=keys(var)
if length(ky)>500
return UTF8String[], 0:-1, false
end
ky=map(string,[filter(x->isa(x,Symbol),ky)...])

lst=convert(Vector{UTF8String},[filter(x->beginswith(x,m.captures[2]),ky)...])
if !(length(txt)>=pos+1 && txt[pos+1]==']')
lst=map(x->x*"]",lst)
end
return lst, (pos-length(m.captures[2])+1):pos, true
end
end

Now it is work on string and symbol key, really cool!
It can also auto-complete the method of python object ^ ^v

On Wednesday, October 29, 2014 11:47:32 AM UTC+1, Ivar Nesje wrote:
>
> That would be cool!
>
> Currently there isn't any hooks you can use for that purpose (I believe), 
> but as most of Julia is written in Julia, it should be a reasonable project 
> to include the required functionality in /base/REPLCompletions.jl 
>  
> and 
> submit a pull request on Github. This would likely be nice for other 
> associative structures (PyCall anyone?) also.
>
> You will have to look for unclosed `[` that is either empty or continue 
> with a `:` indicating a symbol or `"` indicating a string index. 
>
> Ivar
>
> kl. 10:06:19 UTC+1 onsdag 29. oktober 2014 skrev xiong...@gmail.com 
> følgende:
>>
>> Is there any way to add an customal autocomplete list to Julia REPL? For 
>> example, I really hope the Dict can be as convenient as MATLAB structure 
>> that the keys can be autpcompleted in command line.
>>
>

[julia-users] Re: How to assign names of a RArray object in Rif.jl?

2014-10-29 Thread xiongjieyi
I'm afraid the Rif.R("names<-") is not working.

julia> Rif.initr()
Using R_HOME=/home/Mine/programs/Rstat/R-3.1.1
0

julia> Rif.R("names<-")
ERROR: R is not initialized
 in parseR at /home/JXiong/.julia/v0.4/Rif/src/Rif.jl:251
 in R at /home/JXiong/.julia/v0.4/Rif/src/Rif.jl:277



On Sunday, October 26, 2014 11:01:51 PM UTC+1, lgautier wrote:
>
> Currently the way to do is to explicitly call the R-level setter:
>
> x = Rif.R("names<-")(x, Rif.cR("A", "B", "C"))
>
>
> However, as of today commit the C-level is exposed and a way that is 
> looking a little more like native Julia.
> (I'll do a pull request so this is part of the released package soon).
>
> The unit-tests are for vectors, and should be explict:
> https://github.com/lgautier/Rif.jl/blob/master/test/vectors.jl#L57
>
> ```julia
> # The C API for R has specialized MACRO for names getrnames/setrnames
> # exposes it
> vi2 = Int32[1,2,3]
> rvi2 = Rif.RArray{Int32,1}(vi2)
> @test isequal(None, Rif.getrnames(rvi2))
> Rif.setrnames!(rvi2, Rif.RArray{ASCIIString,1}(ASCIIString["a", "b", "c"]))
> @test isequal("a", Rif.getrnames(rvi2)[1])
> @test isequal("b", Rif.getrnames(rvi2)[2])
> @test isequal("c", Rif.getrnames(rvi2)[3])
>
> # setAttr/getAttr will be equivalent
> vi2 = Int32[1,2,3]
> rvi2 = Rif.RArray{Int32,1}(vi2)
> @test_throws ErrorException Rif.getAttr(rvi2, "names")
> Rif.setAttr!(rvi2, "names",
>  Rif.RArray{ASCIIString,1}(ASCIIString["a", "b", "c"]))
> @test isequal("a", Rif.getAttr(rvi2, "names")[1])
> @test isequal("a", Rif.getrnames(rvi2)[1])
> @test isequal("b", Rif.getAttr(rvi2, "names")[2])
> @test isequal("b", Rif.getrnames(rvi2)[2])
> @test isequal("c", Rif.getAttr(rvi2, "names")[3])
> @test isequal("c", Rif.getrnames(rvi2)[3])
> ```
>
> On Saturday, October 25, 2014 12:38:10 PM UTC-4, xiong...@gmail.com wrote:
>>
>> In R, we can assign names for a variable as:
>> > x<-c(1,2,3)
>> > names(x)=c("A","B","C")
>> > x
>> A B C 
>> 1 2 3
>>
>> In Julia, I can create a RArray by
>> x=Rif.cR([1,2,3])
>> But anyone know how to assign the "names" to this RArray variable in 
>> Julia?
>>
>

[julia-users] Customize REPL autocomplete

2014-10-29 Thread xiongjieyi
Is there any way to add an customal autocomplete list to Julia REPL? For 
example, I really hope the Dict can be as convenient as MATLAB structure 
that the keys can be autpcompleted in command line.


[julia-users] How to assign names of a RArray object in Rif.jl?

2014-10-25 Thread xiongjieyi
In R, we can assign names for a variable as:
> x<-c(1,2,3)
> names(x)=c("A","B","C")
> x
A B C 
1 2 3

In Julia, I can create a RArray by
x=Rif.cR([1,2,3])
But anyone know how to assign the "names" to this RArray variable in Julia?


[julia-users] Re: Any function could detect if enviroment is REPL, IJulia or functional?

2014-10-22 Thread xiongjieyi
It works, thank you!
Is there any method to distinglish REPL or IJulia enviroment?

On Wednesday, October 22, 2014 3:11:14 PM UTC+2, Patrick O'Leary wrote:
>
> On Wednesday, October 22, 2014 8:06:07 AM UTC-5, xiong...@gmail.com wrote:
>>
>> Is there any function could be used to detect if the current enviroment 
>> is REPL, IJulia or runing in a function? 
>>
>
> The isinteractive() function comes close. 
>


[julia-users] Any function could detect if enviroment is REPL, IJulia or functional?

2014-10-22 Thread xiongjieyi
Is there any function could be used to detect if the current enviroment is 
REPL, IJulia or runing in a function? 


[julia-users] How to convert RArray to Julia Array?

2014-10-15 Thread xiongjieyi
When I use Rif to call a R function, I always get a RArray as output. How 
to convert the RArray to julia Array, and how to get its size?

julia> using Rif
julia> initr()
julia> A=R("cbind(c(1,2,3),c(4,5,6))")
RArray{Float64,2}(Ptr{Void} @0x0d0baf68)
julia> size(A)
ERROR: `size` has no method matching size(::RArray{Float64,2})


[julia-users] Re: Rif error on librinterface

2014-10-14 Thread xiongjieyi
I put the path of libR.so into LD_LIBRARY_PATH and the problem solved.

On Tuesday, October 14, 2014 4:27:22 PM UTC+2, xiong...@gmail.com wrote:
>
> My julia version is 0.4.0-dev+728 and my R version is 3.1.1, compiled with 
> --enable-R-shlib. I always have below problem to use Rif. Anyone has the 
> same problem?
>
> julia> using Rif
> ERROR: could not load module 
> /home/MyName/.julia/v0.4/Rif/deps/librinterface: 
> /home/MyName/.julia/v0.4/Rif/deps/librinterface: cannot open shared object 
> file: No such file or directory
>  in dlopen at c.jl:28
>  in include at ./boot.jl:246
>  in include_from_node1 at ./loading.jl:128
>  in include at ./boot.jl:246
>  in include_from_node1 at ./loading.jl:128
>  in reload_path at loading.jl:152
>  in _require at loading.jl:67
>  in require at loading.jl:51
> while loading /home/MyName/.julia/v0.4/Rif/src/embeddedr.jl, in expression 
> starting on line 19
> while loading /home/MyName/.julia/v0.4/Rif/src/Rif.jl, in expression 
> starting on line 76
>
>

[julia-users] Rif error on librinterface

2014-10-14 Thread xiongjieyi
My julia version is 0.4.0-dev+728 and my R version is 3.1.1, compiled with 
--enable-R-shlib. I always have below problem to use Rif. Anyone has the 
same problem?

julia> using Rif
ERROR: could not load module 
/home/MyName/.julia/v0.4/Rif/deps/librinterface: 
/home/MyName/.julia/v0.4/Rif/deps/librinterface: cannot open shared object 
file: No such file or directory
 in dlopen at c.jl:28
 in include at ./boot.jl:246
 in include_from_node1 at ./loading.jl:128
 in include at ./boot.jl:246
 in include_from_node1 at ./loading.jl:128
 in reload_path at loading.jl:152
 in _require at loading.jl:67
 in require at loading.jl:51
while loading /home/MyName/.julia/v0.4/Rif/src/embeddedr.jl, in expression 
starting on line 19
while loading /home/MyName/.julia/v0.4/Rif/src/Rif.jl, in expression 
starting on line 76



[julia-users] How to get the p-value in GLM?

2014-10-14 Thread xiongjieyi


In below example of GLM, I want to get the Pr(>|t|) value 3.4e-7. How can I get 
it?
Also, how this p-value be calculated? By F test or by Chisq test? I can choose 
the test type in R but I can not choose in Julia.

julia> using GLM, RDatasets
julia> form = dataset("datasets","Formaldehyde")6x2 
DataFrame|---|--||| Row # | Carb | OptDen || 1 | 0.1  | 
0.086  || 2 | 0.3  | 0.269  || 3 | 0.5  | 0.446  || 4 | 0.6  | 
0.538  || 5 | 0.7  | 0.626  || 6 | 0.9  | 0.782  |
julia> lm1 = fit(LinearModel, OptDen ~ Carb, form)Formula: OptDen ~ Carb
Coefficients:
   Estimate  Std.Error  t value Pr(>|t|)(Intercept)  0.00508571 
0.00783368 0.649211   0.5516Carb   0.876286  0.0135345  64.7444   3.4e-7



[julia-users] 'Invalid DISPLAY variable' when draw figure in IJulia using PyCall

2014-10-03 Thread xiongjieyi
I found I can not draw figure using PyCall in IJulia, but draw in Julia 
console is OK. The PyPlot is also work. In my work I have to use many 
python package to draw figures, and I hope the figure could be shown in 
IJulia. Is there any way to solve this error?

I put the error message below:

julia> @pyimport matplotlib.pyplot as pplot
julia> pplot.plot(1:4,1:4)

PyError (PyObject_Call) 
RuntimeError('Invalid DISPLAY variable',)
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py",
 
line 2980, in plot
ax = gca()
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py",
 
line 803, in gca
ax =  gcf().gca(**kwargs)
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py",
 
line 423, in figure
**kwargs)
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
 
line 31, in new_figure_manager
return new_figure_manager_given_figure(num, thisFig)
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
 
line 38, in new_figure_manager_given_figure
canvas = FigureCanvasQTAgg(figure)
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
 
line 70, in __init__
FigureCanvasQT.__init__( self, figure )
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
 
line 207, in __init__
_create_qApp()
  File 
"/home/UserDir/programs/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
 
line 62, in _create_qApp
raise RuntimeError('Invalid DISPLAY variable')

while loading In[25], in expression starting on line 1

 in pyerr_check at /home/UserDir/.julia/v0.4/PyCall/src/exception.jl:58
 in pycall at /home/UserDir/.julia/v0.4/PyCall/src/PyCall.jl:85
 in fn at /home/UserDir/.julia/v0.4/PyCall/src/conversions.jl:181



[julia-users] IJulia is much slower than Julia just in terminal

2014-09-28 Thread xiongjieyi
I found IJulia is much slower than Julia just in terminal, is that normal?
Also, the interrupt key just restart Julia kernel rather than Ctrl-C it. Is 
it normal?
Or, do the IPython or IJulia in my server have some problem?


[julia-users] IJulia Interrupt key restart kernel

2014-09-26 Thread xiongjieyi
In IJulia, when I press the Interrupt button to Ctrl-C the running script, 
it always pop up a window with:
"The kernel appears to have died. It will restart automatically."
and the kernel is rebooted totally. How to just send a Ctrl-C in IJulia 
rather than reboot the kernel?



[julia-users] Re: @grisu_ccall not defined when using Gadfly

2014-09-25 Thread xiongjieyi
In Gadfly website, it also said the building was failed in Julia 0.4.0
http://pkg.julialang.org/?pkg=Gadfly&ver=nightly

I finially fixed this problem by brutally copy the @grisu_ccall macro from 
Julia 0.3 to the Gadfly file format.jl.


On Wednesday, September 24, 2014 9:58:43 AM UTC+2, xiong...@gmail.com wrote:
>
> I've uploaded julia to the newest development version yesterday.
>
> Julia Version 0.4.0-dev+728
> Commit f7172d3* (2014-09-22 12:08 UTC)
> Platform Info:
>   System: Linux (x86_64-redhat-linux)
>   CPU: Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
>   LAPACK: libopenblas
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
>
> However, when I using Gadfly then, a error is showed:
>
>
> using Gadfly
>
> @grisu_ccall not defined
> while loading /home/JXiong/.julia/v0.4/Gadfly/src/format.jl, in expression 
> starting on line 56
> while loading /home/JXiong/.julia/v0.4/Gadfly/src/Gadfly.jl, in expression 
> starting on line 50
> while loading In[1], in expression starting on line 1
>
>  in include at ./boot.jl:246
>  in include_from_node1 at ./loading.jl:128
>  in include at ./boot.jl:246
>  in include_from_node1 at ./loading.jl:128
>  in reload_path at loading.jl:152
>  in _require at loading.jl:67
>  in require at loading.jl:51
>
>
> I tried Pkd.update(), but the problem is the same. The Gadfly works file 
> in the first version of Julia 0.4.0 released last month. Is the 
> @grisu_ccall removed in this updating?
>


Re: [julia-users] @grisu_ccall not defined when using Gadfly

2014-09-24 Thread xiongjieyi
However,

julia> Pkg.free("Gadfly")
ERROR: Gadfly cannot be freed – repo is dirty
 in free at pkg/entry.jl:204
 in anonymous at pkg/dir.jl:28
 in cd at ./file.jl:20
 in __cd#230__ at ./pkg/dir.jl:28
 in free at pkg.jl:37

julia> Pkg.free("Showoff")
ERROR: Showoff is not a git repo
 in free at pkg/entry.jl:200
 in anonymous at pkg/dir.jl:28
 in cd at ./file.jl:20
 in __cd#230__ at ./pkg/dir.jl:28
 in free at pkg.jl:37


On Wednesday, September 24, 2014 11:56:53 AM UTC+2, Charles Santana wrote:
>
> Please take a look at this link:
>
> https://github.com/dcjones/Gadfly.jl/issues/409#issuecomment-56643684
>
> I was facing the same problem and everything was solved after doing this:
>  
>
> Pkg.free("Gadfly")
> Pkg.free("Showoff")
>
> Pkg.checkout("Gadfly")
>
> Pkg.chekcout("Showoff")
>
>
> I hope it helps!
>
> Charles
>
>
> On Wed, Sep 24, 2014 at 9:58 AM, > wrote:
>
>> I've uploaded julia to the newest development version yesterday.
>>
>> Julia Version 0.4.0-dev+728
>> Commit f7172d3* (2014-09-22 12:08 UTC)
>> Platform Info:
>>   System: Linux (x86_64-redhat-linux)
>>   CPU: Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
>>   LAPACK: libopenblas
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.3
>>
>> However, when I using Gadfly then, a error is showed:
>>
>>
>> using Gadfly
>>
>> @grisu_ccall not defined
>> while loading /home/JXiong/.julia/v0.4/Gadfly/src/format.jl, in expression 
>> starting on line 56
>> while loading /home/JXiong/.julia/v0.4/Gadfly/src/Gadfly.jl, in expression 
>> starting on line 50
>> while loading In[1], in expression starting on line 1
>>
>>  in include at ./boot.jl:246
>>  in include_from_node1 at ./loading.jl:128
>>  in include at ./boot.jl:246
>>  in include_from_node1 at ./loading.jl:128
>>  in reload_path at loading.jl:152
>>  in _require at loading.jl:67
>>  in require at loading.jl:51
>>
>>
>> I tried Pkd.update(), but the problem is the same. The Gadfly works file 
>> in the first version of Julia 0.4.0 released last month. Is the 
>> @grisu_ccall removed in this updating?
>>
>
>
>
> -- 
> Um axé! :)
>
> --
> Charles Novaes de Santana, PhD
> http://www.imedea.uib-csic.es/~charles
>  


[julia-users] @grisu_ccall not defined when using Gadfly

2014-09-24 Thread xiongjieyi
I've uploaded julia to the newest development version yesterday.

Julia Version 0.4.0-dev+728
Commit f7172d3* (2014-09-22 12:08 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

However, when I using Gadfly then, a error is showed:


using Gadfly

@grisu_ccall not defined
while loading /home/JXiong/.julia/v0.4/Gadfly/src/format.jl, in expression 
starting on line 56
while loading /home/JXiong/.julia/v0.4/Gadfly/src/Gadfly.jl, in expression 
starting on line 50
while loading In[1], in expression starting on line 1

 in include at ./boot.jl:246
 in include_from_node1 at ./loading.jl:128
 in include at ./boot.jl:246
 in include_from_node1 at ./loading.jl:128
 in reload_path at loading.jl:152
 in _require at loading.jl:67
 in require at loading.jl:51


I tried Pkd.update(), but the problem is the same. The Gadfly works file in 
the first version of Julia 0.4.0 released last month. Is the @grisu_ccall 
removed in this updating?


[julia-users] Re: Send variable to parallel workers for pmap

2014-09-16 Thread xiongjieyi
I see. Thank you!
It's a pity that there is no explict way to just send a variable to other 
process before starting the task, as what @parallel did. Sometimes I need 
to read a large file and then do the calculation parallelly, like the Monte 
Carlo method. Using pmap is the most explicit way, but the large file have 
to be read many times using @everywhere, or the data have to be repeated 
many times in the main process for the argument of pmap (The memory may not 
sufficient to do it). The global method have some side-effect. Using 
remote_call and fetch could be a good solusion, but the code is not so 
elegent. It could be convient to have a function to "send" variable, or 
pmap could support transfering a copy of the whole variable to every 
processes as argument rather than "slice" it.

On Monday, September 15, 2014 6:41:39 PM UTC+2, John Drummond wrote:
>
> r = remote_call(2, rand)
> fetch(r)
> fetch(@spawnat 2 1+fetch(r)+myid())
>
> shows transferring data to another process and then running a query on it 
> (iterate through the processes as per Strickland to do this everywhere)
>
> I didn't find a way to do this with pmap - you can transfer the data each 
> time though
> pmap(x->myid()+x[1]+x[2], map(x->(x,a),1:3))
>
> On Monday, September 15, 2014 5:09:18 PM UTC+1, John Drummond wrote:
>>
>> @spawnat(2,whos()) is useful to know what's defined in other processes 
>> (e.g. for process 2 in this case)
>>
>> if you want to gather the return values, use a reducer function
>> e.g.
>> let a = rand()
>>   @parallel hcat for x in 1:3
>> foo(a,x)
>>   end
>> end
>>
>> trying to remember the other approach which I thought I got working 
>> rather than copying it over each run.
>>
>> One other thing is that requiring a file after adding the processes 
>> should load it on all processes which is another approach to setting up the 
>> environment for each process
>>
>>
>>
>>
>> On Monday, September 15, 2014 3:51:43 PM UTC+1, John Drummond wrote:
>>>
>>> with parallel 
>>>
>>> addprocs(2)
>>> println("Number of processors", nprocs())
>>> @everywhere function foo(x,y)
>>> println(myid()," ", x, " ", y)
>>> return x + y
>>> end
>>> let a = rand()
>>>   @sync @parallel for x in 1:3
>>> foo(a,x)
>>>   end
>>> end
>>>
>>> On Monday, September 15, 2014 3:14:50 PM UTC+1, xiong...@gmail.com 
>>> wrote:

 "you could precreate A and then define it everywhere"
 Could you please show me some code how to do it?

 On Monday, September 15, 2014 2:51:08 PM UTC+2, John Drummond wrote:
>
> Chris Strickland 
> 
>  
> lists one approach for the general problem
>
> you could precreate A and then define it everywhere, or send a copy 
> over as a parameter to whatever function you use in pmap, similar but not 
> the same as above
>
> Another approach which was useful to me was the @parallel for loops
> "Any variables used inside the parallel loop will be copied and 
> broadcast to each process." 
> 
>
> and shared arrays 
> 
>  
> if using linux could be useful (I've not tried them).
>
>
>
> On Monday, September 15, 2014 10:52:33 AM UTC+1, xiong...@gmail.com 
> wrote:
>>
>> I want to transfer a variable to all parallel workers. However, if I 
>> do:
>>
>> A=rand()
>> pmap(x->A+x,1:3)
>>
>> Return error:
>> exception on 2: ERROR: A not defined
>>  in anonymous at none:1
>>  in anonymous at multi.jl:855
>>  in run_work_thunk at multi.jl:621
>>  in anonymous at task.jl:855
>> exception on 3: ERROR: A not defined
>>  in anonymous at none:1
>>  in anonymous at multi.jl:855
>>  in run_work_thunk at multi.jl:621
>>  in anonymous at task.jl:855
>> 2-element Array{Any,1}:
>>  UndefVarError(:A)
>>  UndefVarError(:A)
>>
>> The result of
>> @everywhere A=rand()
>> pmap(x->A+x,1:3)
>> is not what I want, since I hope A in all mashines are the same. 
>>
>> I know that pmap((x,y)->x+y,1:3,fill(A,3)) will be work, but I don't 
>> think it is smart since A is expand in memery unnessarily. Is there any 
>> simple way to just send a copy of A, or the reference of A, to all 
>> parallel 
>> mashines?
>>
>

[julia-users] Re: Send variable to parallel workers for pmap

2014-09-15 Thread xiongjieyi
"you could precreate A and then define it everywhere"
Could you please show me some code how to do it?

On Monday, September 15, 2014 2:51:08 PM UTC+2, John Drummond wrote:
>
> Chris Strickland 
>  
> lists one approach for the general problem
>
> you could precreate A and then define it everywhere, or send a copy over 
> as a parameter to whatever function you use in pmap, similar but not the 
> same as above
>
> Another approach which was useful to me was the @parallel for loops
> "Any variables used inside the parallel loop will be copied and broadcast 
> to each process." 
> 
>
> and shared arrays 
> 
>  
> if using linux could be useful (I've not tried them).
>
>
>
> On Monday, September 15, 2014 10:52:33 AM UTC+1, xiong...@gmail.com wrote:
>>
>> I want to transfer a variable to all parallel workers. However, if I do:
>>
>> A=rand()
>> pmap(x->A+x,1:3)
>>
>> Return error:
>> exception on 2: ERROR: A not defined
>>  in anonymous at none:1
>>  in anonymous at multi.jl:855
>>  in run_work_thunk at multi.jl:621
>>  in anonymous at task.jl:855
>> exception on 3: ERROR: A not defined
>>  in anonymous at none:1
>>  in anonymous at multi.jl:855
>>  in run_work_thunk at multi.jl:621
>>  in anonymous at task.jl:855
>> 2-element Array{Any,1}:
>>  UndefVarError(:A)
>>  UndefVarError(:A)
>>
>> The result of
>> @everywhere A=rand()
>> pmap(x->A+x,1:3)
>> is not what I want, since I hope A in all mashines are the same. 
>>
>> I know that pmap((x,y)->x+y,1:3,fill(A,3)) will be work, but I don't 
>> think it is smart since A is expand in memery unnessarily. Is there any 
>> simple way to just send a copy of A, or the reference of A, to all parallel 
>> mashines?
>>
>

[julia-users] Send variable to parallel workers for pmap

2014-09-15 Thread xiongjieyi
I want to transfer a variable to all parallel workers. However, if I do:

A=rand()
pmap(x->A+x,1:3)

Return error:
exception on 2: ERROR: A not defined
 in anonymous at none:1
 in anonymous at multi.jl:855
 in run_work_thunk at multi.jl:621
 in anonymous at task.jl:855
exception on 3: ERROR: A not defined
 in anonymous at none:1
 in anonymous at multi.jl:855
 in run_work_thunk at multi.jl:621
 in anonymous at task.jl:855
2-element Array{Any,1}:
 UndefVarError(:A)
 UndefVarError(:A)

The result of
@everywhere A=rand()
pmap(x->A+x,1:3)
is not what I want, since I hope A in all mashines are the same. 

I know that pmap((x,y)->x+y,1:3,fill(A,3)) will be work, but I don't think 
it is smart since A is expand in memery unnessarily. Is there any simple 
way to just send a copy of A, or the reference of A, to all parallel 
mashines?


[julia-users] Pkg.update() error

2014-09-02 Thread xiongjieyi
When I run Pkg.update() in verson 0.3-release have such problem:

julia> versioninfo()
Julia Version 0.3.1-pre+41
Commit 77c15f9* (2014-08-31 17:39 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
ERROR: Rmath's requirements can't be satisfied because of the following 
fixed packages: julia
 in error at error.jl:22
 in resolve at ./pkg/entry.jl:372
 in update at ./pkg/entry.jl:278
 in anonymous at pkg/dir.jl:28
 in cd at ./file.jl:20
 in __cd#227__ at ./pkg/dir.jl:28
 in update at ./pkg.jl:41
 in update_3B_1867 at 
/home/JXiong/programs/julia/julia-0.3.0-release/usr/bin/../lib/julia/sys.so


Re: [julia-users] A bug?

2014-09-02 Thread xiongjieyi
I don't think it is the problem of (+). Since

julia> map((x...)->x,(1,2),(3,4),(5,6))
ERROR: BoundsError()
 in heads at tuple.jl:56
 in map at tuple.jl:59 (repeats 3 times)

has the same problem. I think the expected result should be 
((1,3,5),(2,4,6)).

also, 
julia> map((x...)->x,[1,2],[3,4],[5,6])
2-element Array{(Int64,Int64,Int64),1}:
 (1,3,5)
 (2,4,6)

On Tuesday, September 2, 2014 3:24:39 PM UTC+2, Elliot Saba wrote:
>
> Addition doesn't seem to be defined for tuples:
>
> julia> (1,2,3) + (4,5,6)
> ERROR: `+` has no method matching +(::(Int64,Int64,Int64), 
> ::(Int64,Int64,Int64))
>
>
> The BoundsError is quite misleading however. Not sure what it's really 
> doing in there.  Tuples are pretty separated from arrays in Julia however, 
> in other languages such as Python I see tuples and lists used 
> interchangeably quite a bit, however in Julia the most common usage of 
> tuples I've found are in metaprogramming (collecting function arguments and 
> the like).  If you want to perform algebraic operations you should be using 
> Arrays that contain well defined types.  This is, after all, one reason 
> Julia is able to achieve high speeds; if Julia knows that every element in 
> your array is an Int64, or a Float32 or whatever you like, then an 
> operation such as you have above can be performed very quickly without 
> performing type-checking on each individual element in your array.
> -E
>
>
> On Tue, Sep 2, 2014 at 8:49 AM, > wrote:
>
>> julia> versioninfo()
>> Julia Version 0.4.0-dev+323
>> Commit ecd039c* (2014-08-24 16:57 UTC)
>> Platform Info:
>>   System: Linux (x86_64-redhat-linux)
>>   CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
>>   LAPACK: libopenblas
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.3
>>
>> julia> map((x,y,z)->x+y+z,[1,2,3],[2,3,4],[3,4,5])
>> 3-element Array{Int64,1}:
>>   6
>>   9
>>  12
>>
>> julia> map((x,y,z)->x+y+z,(1,2,3),(2,3,4),(3,4,5))
>> ERROR: BoundsError()
>>  in heads at tuple.jl:56
>>  in map at tuple.jl:59 (repeats 4 times)
>>
>>
>>
>>
>

[julia-users] Could it be a bug of function map(fun,tuple1,tuple2,tuple3)?

2014-09-02 Thread xiongjieyi
julia> versioninfo()
Julia Version 0.4.0-dev+323
Commit ecd039c* (2014-08-24 16:57 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

julia> map((x,y,z)->x+y+z,[1,2,3],[2,3,4],[3,4,5])
3-element Array{Int64,1}:
  6
  9
 12

julia> map((x,y,z)->x+y+z,(1,2,3),(2,3,4),(3,4,5))
ERROR: BoundsError()
 in heads at tuple.jl:56
 in map at tuple.jl:59 (repeats 4 times)


[julia-users] A bug?

2014-09-02 Thread xiongjieyi
julia> versioninfo()
Julia Version 0.4.0-dev+323
Commit ecd039c* (2014-08-24 16:57 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E7- 4830  @ 2.13GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

julia> map((x,y,z)->x+y+z,[1,2,3],[2,3,4],[3,4,5])
3-element Array{Int64,1}:
  6
  9
 12

julia> map((x,y,z)->x+y+z,(1,2,3),(2,3,4),(3,4,5))
ERROR: BoundsError()
 in heads at tuple.jl:56
 in map at tuple.jl:59 (repeats 4 times)





[julia-users] How to redefine the screen output of a variable?

2014-06-10 Thread xiongjieyi
I just hope to change the screen output style of Dict variable. When I just 
type the variable name and push Enter in console, I hope it only shows the 
name of the keys and the size of values, as the Matlab did. Which function 
shall I override? I tried to redefine the Base.show(D::Dict) and 
Base.display(D::Dict) but it seems not work.


Re: [julia-users] Re: Do you have binary Julia compiled on Red Hat ?

2014-02-18 Thread xiongjieyi
My system is Red Hat Enterprise Linux Server release 6.3 (Santiago)
My gcc version is gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Is there any other information you may interested?


On Wednesday, February 19, 2014 12:24:43 PM UTC+8, Stefan Karpinski wrote:
>
> Filed an issue: https://github.com/JuliaLang/julia/issues/5854. If you 
> could supply any more details, that would be very helpful.
>
>
> On Tue, Feb 18, 2014 at 10:36 PM, >wrote:
>
>> I finally get it done by removing the 261 line of src/support/utf8.c !!!
>>
>>
>> On Tuesday, February 18, 2014 6:52:22 PM UTC+8, xiong...@gmail.com wrote:
>>>
>>> It passed after I replaced the gcc. However, here comes another problem:
>>>
>>> $make
>>> CC src/support/utf8.o
>>> utf8.c:261: error: conflicting types for ‘wcwidth’
>>> /usr/include/wchar.h:437: note: previous declaration of ‘wcwidth’ was 
>>> here
>>> make[3]: *** [utf8.o] Error 1
>>> make[2]: *** [support/libsupport.a] Error 2
>>> make[1]: *** [julia-release] Error 2
>>> make: *** [release] Error 2
>>>
>>>
>>> On Tuesday, February 18, 2014 6:07:23 PM UTC+8, Tim Holy wrote:

 Great that you made it work. 

 --Tim 

 On Monday, February 17, 2014 08:22:40 PM Tony Kelman wrote: 
 > I just got Julia compiled successfully on RHEL 5.5 after following 
 this 
 > note https://github.com/JuliaLang/julia#centos-5 
 > 
 > I was expecting this to be much more difficult than it ended up 
 being, so 
 > my compliments to the team that set up the build system. This doesn't 
 rule 
 > out future more subtle problems as Tim Holy warned in the other post, 
 but 
 > it's a start! 

>>>
>

Re: [julia-users] Re: Do you have binary Julia compiled on Red Hat ?

2014-02-18 Thread xiongjieyi
I finally get it done by removing the 261 line of src/support/utf8.c !!!

On Tuesday, February 18, 2014 6:52:22 PM UTC+8, xiong...@gmail.com wrote:
>
> It passed after I replaced the gcc. However, here comes another problem:
>
> $make
> CC src/support/utf8.o
> utf8.c:261: error: conflicting types for ‘wcwidth’
> /usr/include/wchar.h:437: note: previous declaration of ‘wcwidth’ was here
> make[3]: *** [utf8.o] Error 1
> make[2]: *** [support/libsupport.a] Error 2
> make[1]: *** [julia-release] Error 2
> make: *** [release] Error 2
>
>
> On Tuesday, February 18, 2014 6:07:23 PM UTC+8, Tim Holy wrote:
>>
>> Great that you made it work. 
>>
>> --Tim 
>>
>> On Monday, February 17, 2014 08:22:40 PM Tony Kelman wrote: 
>> > I just got Julia compiled successfully on RHEL 5.5 after following this 
>> > note https://github.com/JuliaLang/julia#centos-5 
>> > 
>> > I was expecting this to be much more difficult than it ended up being, 
>> so 
>> > my compliments to the team that set up the build system. This doesn't 
>> rule 
>> > out future more subtle problems as Tim Holy warned in the other post, 
>> but 
>> > it's a start! 
>>
>

Re: [julia-users] Ask for a compiled Julia for RedHat

2014-02-18 Thread xiongjieyi
I finally get it done by removing the 261 line of src/support/utf8.c !!!

On Tuesday, February 18, 2014 5:33:17 PM UTC+8, xiong...@gmail.com wrote:
>
> Finally, I made this problem passed by changing my gcc, haha!!
> Err... But here comes another problem:
>
> $make
> CC src/support/utf8.o
> utf8.c:261: error: conflicting types for ‘wcwidth’
> /usr/include/wchar.h:437: note: previous declaration of ‘wcwidth’ was here
> make[3]: *** [utf8.o] Error 1
> make[2]: *** [support/libsupport.a] Error 2
> make[1]: *** [julia-release] Error 2
> make: *** [release] Error 2
>
>
> On Monday, February 17, 2014 7:23:54 PM UTC+8, Tim Holy wrote:
>>
>> I'll caution you that even if you get it working on that machine, you may 
>> encounter further problems once you start trying it out. Even the 
>> packages 
>> shipped with CentOS 6.4---similar to RH 6.4, which is two years newer 
>> than 
>> 5.6---are on the verge of being too old to be useful. (The version of git 
>> shipped with 6.4, for example, has already caused some trouble; there's 
>> no 
>> Gtk3 on 6.4, and the version of Gtk2 shipped with 6.4 doesn't currently 
>> work 
>> with the Gtk package for reasons I haven't yet tracked down, etc.) I can 
>> imagine that a lot of the C libraries that are wrapped in Julia's 
>> packages 
>> simply won't work on your machine. 
>>
>> This is mostly a RH/CentOS problem, as the packages shipped with Ubuntu 
>> 12.04 
>> (approximately contemporaneous with RH 6.4) are fine. 
>>
>> I suspect you'll be a lot less frustrated if you just give up now and 
>> find a 
>> different machine to run Julia on. Julia is a new language, and running 
>> new 
>> (and fast-moving) software on old platforms rarely works to your 
>> satisfaction. 
>>
>> --Tim 
>>
>> On Sunday, February 16, 2014 08:03:16 PM xiong...@gmail.com wrote: 
>> > It's really, really frustrate for me to compile Julia in our RedHat 
>> server. 
>> > Anyone who can share me a binary Julia compiled in Red Hat system? Many 
>> > thanks! 
>> > My server is Red Hat Enterprise Linux Server release 5.6 (Tikanga). 
>>
>

Re: [julia-users] Re: Do you have binary Julia compiled on Red Hat ?

2014-02-18 Thread xiongjieyi
It passed after I replaced the gcc. However, here comes another problem:

$make
CC src/support/utf8.o
utf8.c:261: error: conflicting types for ‘wcwidth’
/usr/include/wchar.h:437: note: previous declaration of ‘wcwidth’ was here
make[3]: *** [utf8.o] Error 1
make[2]: *** [support/libsupport.a] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2


On Tuesday, February 18, 2014 6:07:23 PM UTC+8, Tim Holy wrote:
>
> Great that you made it work. 
>
> --Tim 
>
> On Monday, February 17, 2014 08:22:40 PM Tony Kelman wrote: 
> > I just got Julia compiled successfully on RHEL 5.5 after following this 
> > note https://github.com/JuliaLang/julia#centos-5 
> > 
> > I was expecting this to be much more difficult than it ended up being, 
> so 
> > my compliments to the team that set up the build system. This doesn't 
> rule 
> > out future more subtle problems as Tim Holy warned in the other post, 
> but 
> > it's a start! 
>


Re: [julia-users] Ask for a compiled Julia for RedHat

2014-02-18 Thread xiongjieyi
Finally, I made this problem passed by changing my gcc, haha!!
Err... But here comes another problem:

$make
CC src/support/utf8.o
utf8.c:261: error: conflicting types for ‘wcwidth’
/usr/include/wchar.h:437: note: previous declaration of ‘wcwidth’ was here
make[3]: *** [utf8.o] Error 1
make[2]: *** [support/libsupport.a] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2


On Monday, February 17, 2014 7:23:54 PM UTC+8, Tim Holy wrote:
>
> I'll caution you that even if you get it working on that machine, you may 
> encounter further problems once you start trying it out. Even the packages 
> shipped with CentOS 6.4---similar to RH 6.4, which is two years newer than 
> 5.6---are on the verge of being too old to be useful. (The version of git 
> shipped with 6.4, for example, has already caused some trouble; there's no 
> Gtk3 on 6.4, and the version of Gtk2 shipped with 6.4 doesn't currently 
> work 
> with the Gtk package for reasons I haven't yet tracked down, etc.) I can 
> imagine that a lot of the C libraries that are wrapped in Julia's packages 
> simply won't work on your machine. 
>
> This is mostly a RH/CentOS problem, as the packages shipped with Ubuntu 
> 12.04 
> (approximately contemporaneous with RH 6.4) are fine. 
>
> I suspect you'll be a lot less frustrated if you just give up now and find 
> a 
> different machine to run Julia on. Julia is a new language, and running 
> new 
> (and fast-moving) software on old platforms rarely works to your 
> satisfaction. 
>
> --Tim 
>
> On Sunday, February 16, 2014 08:03:16 PM xiong...@gmail.com 
> wrote: 
> > It's really, really frustrate for me to compile Julia in our RedHat 
> server. 
> > Anyone who can share me a binary Julia compiled in Red Hat system? Many 
> > thanks! 
> > My server is Red Hat Enterprise Linux Server release 5.6 (Tikanga). 
>


Re: [julia-users] Ask for a compiled Julia for RedHat

2014-02-17 Thread xiongjieyi
I actually also tried to compile it on Red Hat Enterprise Linux Server 
release 6.3 (Santiago), but the error message is the same as below. Do you 
have any idea?

$make

 /bin/sh ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
  CC src/libuv_la-fs-poll.lo
In file included from ./include/uv.h:64,
 from src/fs-poll.c:22:
./include/uv-unix.h:132: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'uv_rwlock_t'
./include/uv-unix.h:149: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'uv_barrier_t'
In file included from src/fs-poll.c:22:
./include/uv.h:1954: error: expected ')' before '*' token
./include/uv.h:1955: error: expected ')' before '*' token
./include/uv.h:1956: error: expected ')' before '*' token
./include/uv.h:1957: error: expected ')' before '*' token
./include/uv.h:1958: error: expected ')' before '*' token
./include/uv.h:1959: error: expected ')' before '*' token
./include/uv.h:1960: error: expected ')' before '*' token
./include/uv.h:1961: error: expected ')' before '*' token
./include/uv.h:1997: error: expected ')' before '*' token
./include/uv.h:1998: error: expected ')' before '*' token
./include/uv.h:1999: error: expected ')' before '*' token
make[4]: *** [src/libuv_la-fs-poll.lo] Error 1
make[3]: *** [all] Error 2
make[2]: *** [libuv/.libs/libuv.a] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

On Monday, February 17, 2014 7:23:54 PM UTC+8, Tim Holy wrote:
>
> I'll caution you that even if you get it working on that machine, you may 
> encounter further problems once you start trying it out. Even the packages 
> shipped with CentOS 6.4---similar to RH 6.4, which is two years newer than 
> 5.6---are on the verge of being too old to be useful. (The version of git 
> shipped with 6.4, for example, has already caused some trouble; there's no 
> Gtk3 on 6.4, and the version of Gtk2 shipped with 6.4 doesn't currently 
> work 
> with the Gtk package for reasons I haven't yet tracked down, etc.) I can 
> imagine that a lot of the C libraries that are wrapped in Julia's packages 
> simply won't work on your machine. 
>
> This is mostly a RH/CentOS problem, as the packages shipped with Ubuntu 
> 12.04 
> (approximately contemporaneous with RH 6.4) are fine. 
>
> I suspect you'll be a lot less frustrated if you just give up now and find 
> a 
> different machine to run Julia on. Julia is a new language, and running 
> new 
> (and fast-moving) software on old platforms rarely works to your 
> satisfaction. 
>
> --Tim 
>
> On Sunday, February 16, 2014 08:03:16 PM xiong...@gmail.com 
> wrote: 
> > It's really, really frustrate for me to compile Julia in our RedHat 
> server. 
> > Anyone who can share me a binary Julia compiled in Red Hat system? Many 
> > thanks! 
> > My server is Red Hat Enterprise Linux Server release 5.6 (Tikanga). 
>


Re: [julia-users] Do you have binary Julia compiled on Red Hat ?

2014-02-17 Thread xiongjieyi
I didn't find the binary executable julia file when I decompress the 
package. I don't have root authority so that I cannot formally install the 
rpm package but can only decompress it. Is this file only exist after 
"install" the rpm package formally?
We have two type of servers, one is Red Hat Enterprise Linux Server release 
5.6 (Tikanga) and another is Red Hat Enterprise Linux Server release 6.3 
(Santiago).

On Saturday, February 15, 2014 6:29:52 AM UTC+8, Milan Bouchet-Valat wrote:
>
> Le vendredi 14 février 2014 à 13:20 -0800, Elliot Saba a écrit : 
> > @nalimilan on Github had some RPM's he was building, I'm not sure for 
> > which distribution exactly. 
> That's for Fedora 19 and 20, you can find them here (not up to date...): 
> http://nalimilan.perso.neuf.fr/transfert/ 
>
> But that may not work as your RHEL release (you didn't state which one) 
> probably has much older libraries. Maybe still worth a try. 
>
>
> Regards 
>
>

Re: [julia-users] Do you have binary Julia compiled on Red Hat ?

2014-02-16 Thread xiongjieyi
Many thanks! I'm trying.

The error message is:
 /bin/sh ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
  CC src/libuv_la-fs-poll.lo
In file included from ./include/uv.h:64,
 from src/fs-poll.c:22:
./include/uv-unix.h:132: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'uv_rwlock_t'
./include/uv-unix.h:149: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'uv_barrier_t'
In file included from src/fs-poll.c:22:
./include/uv.h:1954: error: expected ')' before '*' token
./include/uv.h:1955: error: expected ')' before '*' token
./include/uv.h:1956: error: expected ')' before '*' token
./include/uv.h:1957: error: expected ')' before '*' token
./include/uv.h:1958: error: expected ')' before '*' token
./include/uv.h:1959: error: expected ')' before '*' token
./include/uv.h:1960: error: expected ')' before '*' token
./include/uv.h:1961: error: expected ')' before '*' token
./include/uv.h:1997: error: expected ')' before '*' token
./include/uv.h:1998: error: expected ')' before '*' token
./include/uv.h:1999: error: expected ')' before '*' token
make[4]: *** [src/libuv_la-fs-poll.lo] Error 1
make[3]: *** [all] Error 2
make[2]: *** [libuv/.libs/libuv.a] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

On Saturday, February 15, 2014 5:20:30 AM UTC+8, Elliot Saba wrote:
>
> @nalimilan on Github had some RPM's he was building, I'm not sure for 
> which distribution exactly.
>
> What are your errors when compiling?
>
>
> On Fri, Feb 14, 2014 at 1:22 AM, > wrote:
>
>> I'm really, really frustrated to compile Julia on our server. Anyone who 
>> can share me a binary Julia compiled on Red Hat Enterprise Linux Server 
>> platform? Many thanks!
>>
>
>

[julia-users] Ask for a compiled Julia for RedHat

2014-02-16 Thread xiongjieyi
It's really, really frustrate for me to compile Julia in our RedHat server. 
Anyone who can share me a binary Julia compiled in Red Hat system? Many 
thanks!
My server is Red Hat Enterprise Linux Server release 5.6 (Tikanga).


[julia-users] Do you have binary Julia compiled on Red Hat ?

2014-02-14 Thread xiongjieyi
I'm really, really frustrated to compile Julia on our server. Anyone who 
can share me a binary Julia compiled on Red Hat Enterprise Linux Server 
platform? Many thanks!