[julia-users] Re: Improvements to GPU integration with Julia

2016-04-27 Thread Valentin Churavy
Hey, I am one of the maintainers of OpenCL.jl and I would recommend you to look at https://github.com/JuliaGPU/OpenCL.jl, https://github.com/JuliaGPU/CLFFT.jl, and https://github.com/JuliaGPU/CLBLAS.jl. We welcome any improvements and help. I can only speak for myself in that most of the improv

[julia-users] Re: PyCall and callbacks (paho-mqtt)

2016-04-27 Thread Steven G. Johnson
On Wednesday, April 27, 2016 at 8:29:02 PM UTC-4, Cedric St-Jean wrote: > > Maybe this will work? > > client.on_connect = PyCall.jlfun2pyfun(on_connect) > client.on_message = PyCall.jlfun2pyfun(on_message) > > jlfun2pyfun simply inserts an extra level of indirection through a native > Python lam

Re: [julia-users] Re: Manual deallocation

2016-04-27 Thread Yichao Yu
On Wed, Apr 27, 2016 at 9:00 PM, Stefan Karpinski wrote: > Performance. If you want to be as fast as C, reference counting doesn't cut > it. With slightly more detail: RC has relatively low latency but also has a low throughput. The issue is that RC adds a lot of overhead to common operations lik

Re: [julia-users] Re: Manual deallocation

2016-04-27 Thread Stefan Karpinski
Performance. If you want to be as fast as C, reference counting doesn't cut it. On Wed, Apr 27, 2016 at 5:36 PM, Jorge Fernández de Cossío Díaz < j.cossio.d...@gmail.com> wrote: > Why Julia is not reference counted? > Probably someone has written something explanation about this that I can > read

Re: [julia-users] Re: Manual deallocation

2016-04-27 Thread Jorge Fernández de Cossío Díaz
Why Julia is not reference counted? Probably someone has written something explanation about this that I can read, so if anyone can point me in the right direction, that would be great. On Tuesday, July 8, 2014 at 12:18:37 PM UTC-4, Stefan Karpinski wrote: > > Writing `A = nothing` in Julia will

[julia-users] Re: PyCall and callbacks (paho-mqtt)

2016-04-27 Thread Cedric St-Jean
Maybe this will work? client.on_connect = PyCall.jlfun2pyfun(on_connect) client.on_message = PyCall.jlfun2pyfun(on_message) jlfun2pyfun simply inserts an extra level of indirection through a native Python lambda, which does have a func_code. On Wednesday, April 27, 2016 at 7:51:06 PM UTC-4,

[julia-users] Re: PyCall and callbacks (paho-mqtt)

2016-04-27 Thread Steven G. Johnson
On Wednesday, April 27, 2016 at 7:06:46 PM UTC-4, Kaj Wiik wrote: > > > OK, I see, thanks. I found this from the module source (client.py): > if sys.version_info[0] < 3: > argcount = self.on_connect.func_code.co_argcount > else: > argcount =

[julia-users] Re: PyCall and callbacks (paho-mqtt)

2016-04-27 Thread Kaj Wiik
On Thursday, April 28, 2016 at 1:11:03 AM UTC+3, Steven G. Johnson wrote: > > ERROR: LoadError: PyError (:PyObject_Call) > 'exceptions.AttributeError'> >> AttributeError("'PyCall.jl_Function' object has no attribute 'func_code'" >> ,) >> >> > The foo.func_code attribute of a Python function foo r

Re: [julia-users] Pyplot and type definitions

2016-04-27 Thread Steven G. Johnson
IJulia doesn't support the workspace() command (https://github.com/JuliaLang/IJulia.jl/issues/226); just restart the kernel (in the "Kernel" menu) instead. As for the warnings, you get them if you just do "using BinDeps; workspace(); using BinDeps", so the warnings themselves aren't specific to

[julia-users] Re: PyCall and callbacks (paho-mqtt)

2016-04-27 Thread Steven G. Johnson
> > ERROR: LoadError: PyError (:PyObject_Call) 'exceptions.AttributeError'> > AttributeError("'PyCall.jl_Function' object has no attribute 'func_code'" > ,) > > The foo.func_code attribute of a Python function foo returns a code object

[julia-users] PyCall and callbacks (paho-mqtt)

2016-04-27 Thread Kaj Wiik
I am trying to call the paho-mqtt library (https://pypi.python.org/pypi/paho-mqtt), here's the Python example code: import paho.mqtt.client as mqtt # The callback for when the client receives a CONNACK response from the server. def on_connect(client, userdata, flags, rc): print("Connected w

[julia-users] Re: Good practices for constrained constructors

2016-04-27 Thread CrocoDuck O'Ducks
Thanks Jeffrey, that seems to work. Seems to me that to prevent Lint to complain you need a new() statement outside the if. I like the structure "if OK then new() else error" tho, it looks clearer. Your script seems to have just the same functionality anyway. Thanks Stefan. Yeah, what you say m

Re: [julia-users] Converting hex ints

2016-04-27 Thread Achu
Both of those work perfectly. I can see myself using both for this project. Thanks a bunch! On Wednesday, 27 April 2016 12:45:08 UTC-5, Shashi Gowda wrote: > > Oh yes, I was just going to say that's a better way. > > On Wed, Apr 27, 2016 at 11:12 PM, Stefan Karpinski > wrote: > >> read(io, UInt3

Re: [julia-users] Pyplot and type definitions

2016-04-27 Thread samuel . huberman
Thanks, posted an issue on github: https://github.com/stevengj/PyPlot.jl/issues/210. On Wednesday, April 27, 2016 at 10:08:31 AM UTC-4, Tom Breloff wrote: > > Ok you're right... I see those warnings if I first call "using IJulia". > > On Wed, Apr 27, 2016 at 9:59 AM, Cedric St-Jean > wrote: > >>

Re: [julia-users] Converting hex ints

2016-04-27 Thread Shashi Gowda
Oh yes, I was just going to say that's a better way. On Wed, Apr 27, 2016 at 11:12 PM, Stefan Karpinski wrote: > read(io, UInt32). Depending on the endianness of the data stream, you may > or may not need to call ntoh on that. > > On Wed, Apr 27, 2016 at 1:35 PM, Achu wrote: > >> Hi >> >> I'm t

Re: [julia-users] Converting hex ints

2016-04-27 Thread Stefan Karpinski
read(io, UInt32). Depending on the endianness of the data stream, you may or may not need to call ntoh on that. On Wed, Apr 27, 2016 at 1:35 PM, Achu wrote: > Hi > > I'm trying to read a data stream off a server for our motion capture > system. The protocol >

Re: [julia-users] Converting hex ints

2016-04-27 Thread Shashi Gowda
You can use reinterpret. It's fast! julia> a = [UInt8(i) for i=1:4] 4-element Array{UInt8,1}: 0x01 0x02 0x03 0x04 julia> reinterpret(UInt32, a) 1-element Array{UInt32,1}: 0x04030201 On Wed, Apr 27, 2016 at 11:05 PM, Achu wrote: > Hi > > I'm trying to read a data stream off a server for o

[julia-users] Converting hex ints

2016-04-27 Thread Achu
Hi I'm trying to read a data stream off a server for our motion capture system. The protocol says that the first four bytes represent the size of the whole packet and I can read that using readbytes(). To convert four UInt8s into on

Re: [julia-users] Strange Behavior Whereby Shared Arrays Requires Indexing

2016-04-27 Thread Michele Zaffalon
Can you update Julia to the current 0.4.5? Your version is year old. (I keep asking the same question over and over.) On Wed, Apr 27, 2016 at 6:56 PM, Michael Wojnowicz wrote: > > Here's some behavior using Julia's parallel processing that really > surprised me. I'm not sure if this behavior is

[julia-users] Strange Behavior Whereby Shared Arrays Requires Indexing

2016-04-27 Thread Michael Wojnowicz
Here's some behavior using Julia's parallel processing that really surprised me. I'm not sure if this behavior is a bug (in which case I should report it), or if I'm just missing something. Really stupid but minimal example: This code fails: @everywhere function doit(vec::Array{Int64,1}) Ac

Re: [julia-users] (Large memory) computations and disk swapping

2016-04-27 Thread Richard Tsai
Just forming a large complex valued matrix and inverting it by GMRES from IterativeSolvers On Wednesday, April 27, 2016 at 5:30:51 PM UTC+2, Yichao Yu wrote: > > > On Apr 27, 2016 11:00 AM, "Richard Tsai" > > wrote: > > > > I have been running some codes that used about 12GB memory for each run.

Re: [julia-users] (Large memory) computations and disk swapping

2016-04-27 Thread Yichao Yu
On Apr 27, 2016 11:00 AM, "Richard Tsai" wrote: > > I have been running some codes that used about 12GB memory for each run. > I had enough RAM on my computer. > However, in a single julia session, if I run the same code several times, I would get warning that I am short on disk space. > I got the

[julia-users] (Large memory) computations and disk swapping

2016-04-27 Thread Richard Tsai
I have been running some codes that used about 12GB memory for each run. I had enough RAM on my computer. However, in a single julia session, if I run the same code several times, I would get warning that I am short on disk space. I got the same behavior on Mac or Linux machines. Does anybody kno

Re: [julia-users] Re: changing the package name

2016-04-27 Thread Tony Kelman
hub might also be to blame here? Though I'm pretty sure we have other hub users around who might've noticed this earlier On Wednesday, April 27, 2016 at 6:39:53 AM UTC-7, Chang Kwon wrote: > > That’s pretty interesting. I’m actually surprised to find out what LFS is… > No, I didn’t enable anyth

Re: [julia-users] Pyplot and type definitions

2016-04-27 Thread Tom Breloff
Ok you're right... I see those warnings if I first call "using IJulia". On Wed, Apr 27, 2016 at 9:59 AM, Cedric St-Jean wrote: > I was testing it in IJulia, that's where I got all the warnings. At the > REPL I don't get them unless I write: > > using IJulia > workspace() > using PyPlot > > on OS

Re: [julia-users] Pyplot and type definitions

2016-04-27 Thread Cedric St-Jean
I was testing it in IJulia, that's where I got all the warnings. At the REPL I don't get them unless I write: using IJulia workspace() using PyPlot on OSX, Julia 0.4.5 On Wednesday, April 27, 2016 at 9:46:31 AM UTC-4, Tom Breloff wrote: > > This doesn't happen to me: >> >> >>_

Re: [julia-users] Re: changing the package name

2016-04-27 Thread Stefan Karpinski
You can try moving the .git/hooks directory aside to disable all git hooks, including the LFS ones. On Wed, Apr 27, 2016 at 9:39 AM, Changhyun Kwon wrote: > That’s pretty interesting. I’m actually surprised to find out what LFS is… > No, I didn’t enable anything… I believe… > > My github account

Re: [julia-users] Pyplot and type definitions

2016-04-27 Thread Tom Breloff
This doesn't happen to me: > > >_ >_ _ _(_)_ | A fresh approach to technical computing > (_) | (_) (_)| Documentation: http://docs.julialang.org >_ _ _| |_ __ _ | Type "?help" for help. > | | | | | | |/ _` | | > | | |_| | | | (_| | | Versio

Re: [julia-users] @edit could not determine location of method definition

2016-04-27 Thread Isaiah Norton
What version of Julia? Possibly this issue: https://github.com/JuliaLang/julia/issues/14346 If your code is publicly available, please add the example (and link to code) as a comment there, plus output of `versioninfo()`. On Wed, Apr 27, 2016 at 6:01 AM, wrote: > Most of time, when I call @whic

Re: [julia-users] Re: changing the package name

2016-04-27 Thread Changhyun Kwon
That’s pretty interesting. I’m actually surprised to find out what LFS is… No, I didn’t enable anything… I believe… My github account is “Micro”, individual. I have once installed `hub` from github, but nothing else. I want to blame homebrew-cask’s Julia, but not even sure with that… > On

Re: [julia-users] Pyplot and type definitions

2016-04-27 Thread Cedric St-Jean
I can reproduce. Even just workspace() using PyPlot yields most of the above warnings. It's probably a problem in Base, but I would file an issue with PyPlot. On Wednesday, April 27, 2016 at 4:42:46 AM UTC-4, Lutfullah Tomak wrote: > > I cannot make sense of these warnings but you need to eithe

Re: [julia-users] Re: [ANN] CmplxRoots.jl: Fast Complex Polynomial Root Finder

2016-04-27 Thread Mosè Giordano
Hi Kristoffer, 2016-04-27 14:32 GMT+02:00 Kristoffer Carlsson : > This looks interesting. Thank you! > It is in my opinion a bit unfortunate that you chose > to use the GPL license for this since it means that it will not be usable by > most packages in Julia which are under MIT license. Actual

Re: [julia-users] Why don't NaNs raise an error?

2016-04-27 Thread Tamas Papp
Also, checking for NaNs at certain critical points (instead of everywhere) is rather cheap. Then one can throw a DomainError() or similar. On Wed, Apr 27 2016, Stefan Karpinski wrote: > If you petition Intel to improve support for signaling NaNs, I will gladly > sign that petition. Maybe change.o

Re: [julia-users] Why don't NaNs raise an error?

2016-04-27 Thread Stefan Karpinski
If you petition Intel to improve support for signaling NaNs, I will gladly sign that petition. Maybe change.org ? But seriously, this is not a Julia thing. It's the result of a bunch of horse trading between hardware manufacturers and spec designers in the late 70s. You ma

[julia-users] Re: [ANN] CmplxRoots.jl: Fast Complex Polynomial Root Finder

2016-04-27 Thread Kristoffer Carlsson
This looks interesting. It is in my opinion a bit unfortunate that you chose to use the GPL license for this since it means that it will not be usable by most packages in Julia which are under MIT license. On Wednesday, April 27, 2016 at 1:15:35 PM UTC+2, Mosè Giordano wrote: > > Dear all, > > I

[julia-users] Jiahao nb color of chemistry gives me only one error...

2016-04-27 Thread Henri Girard
#Creates a plot layer for each color transfer function (ctf) ctf_layer(i)=layer(Geom.line, x=360:830, y=Colors.cie1931_cmf_table[:,i], color=fill(string('x'+i-1, '̄'), 471), #Generate name of ctf ) [ctf_layer(i) for i=1:3] #Plot the X, Y and Z ctfs plot(Guide.XLabel("λ (nm)"), Guide.YLabel("S

[julia-users] [ANN] CmplxRoots.jl: Fast Complex Polynomial Root Finder

2016-04-27 Thread Mosè Giordano
Dear all, I am happy to announce the first version of CmplxRoots.jl , a fast root finder of real and complex polynomials. This is a Julia implementation of the algorithm described in - J. Skowron & A. Gould, 2012, "General Complex Polynomial Root

[julia-users] @edit could not determine location of method definition

2016-04-27 Thread chobbes158
Most of time, when I call @which, I'm usually returned with a dispatch/method and its location information, like this: @which Domain(-1.1,5.2) call{T<:Number}(::Type{BasicDecomposition.Domain{T}}, a::T<:Number, b::T<: Number) at /home/calvin/Documents/git/DomainDecomposition.jl/src/wedge.jl:61

[julia-users] Need help

2016-04-27 Thread Henri Girard
Hi, I have done this RLC with sage and I am trying to get it working on ijulia, I am beginning and lost in graphic module... Could a good soul do it for me ? var("w omega"); R=10;L=1E-2;C=2.2E-6;Omega=w;w=1/sqrt(L*C); plot(abs(1/(1+i*omega*R*C-omega*omega*L*C)), omega,0,2*w,figsize=4,frame=True,

Re: [julia-users] Pyplot and type definitions

2016-04-27 Thread Lutfullah Tomak
I cannot make sense of these warnings but you need to either import + from Base or explicitly use Base.(:+) when overloading. On Tuesday, April 26, 2016 at 11:35:02 PM UTC+3, samuel@gmail.com wrote: > > In my jupyter notebook, sequentially, I define types: > > workspace() # needed for redefi