Re: [julia-users] Numerical precision of simple mathematical operations

2015-02-13 Thread jung . felix
Thanks for all the replies. I considered working with BigFloats and other data types. However, after reading this article by John Cook http://www.codeproject.com/Articles/29637/Five-Tips-for-Floating-Point-Programming, I got the idea that the main problem I'm having is the subtraction when

Re: [julia-users] Elegant way of dealing with evaluating on branch cuts of sqrt(z-1).*sqrt(z+1) ?

2015-02-13 Thread Simon Byrne
On Friday, 13 February 2015 04:34:43 UTC, Sheehan Olver wrote: For completeness, here is the definition I ended up using (probably using map is bad performance wise but I don’t actually use that yet): You can use @vectorize_1arg macro for this: @vectorize_1arg sqrtx2 Number

[julia-users] Suppress printed output from PyPlot

2015-02-13 Thread gdmsl
Hi, I need to run a script which generates a large number of plots using the PyPlot module but the output of the script is filled with messages from PyPlot. How can i suppress this output? Here is an example: julia using PyPlot INFO: Loading help data... julia pygui(false) false julia

[julia-users] Re: Nested parametric types

2015-02-13 Thread Matt Bauman
I don't know many of the details on type inference, but I do know that there is a bounded limit to the number of times inference is iteratively run. I remember seeing the number 4 in this context, too, but I don't know if it's the same 4. My naive assumption is that without this bound, Julia

[julia-users] HttpServer seg fault

2015-02-13 Thread Joel Nelson
I'm using RHEL 6.5 and running into an issue using the very basic example for HttpServer. When using the example for HttpServer, I see that it listens on port 8000. using HttpServer http = HttpHandler() do req::Request, res::Response Response( ismatch(r^/hello/,req.resource) ? string(Hello

[julia-users] Convert Uint32 array for use in imwrite()

2015-02-13 Thread Christopher Lee
I have a Uint32 array, ARGB formatted. How do I convert that back to an Image so that I can call imwrite? (The alpha component is unimportant, but it would be nice to save it if the file format supports it) imagearray = reinterpret(RGB24,imagearray) image = Image(imagearray) imagearray =

Re: [julia-users] Re: Nested parametric types

2015-02-13 Thread Jiahao Chen
I'm guessing that you have run into const MAX_TYPE_DEPTH = 4 in inference.jl. You can try increasing this number and rebuilding the base library. As I understand it, the decidability of Julia's type system remains an open research question. Thanks, Jiahao Chen Staff Research Scientist MIT

[julia-users] Re: Problems using Winston in fresh OSX install

2015-02-13 Thread José S .
I posted at 5:20PM EST yesterday, so I'm bumping this thread. Any thoughts on how to fix this or what could be causing this? On Thursday, February 12, 2015 at 5:20:10 PM UTC-5, José S. wrote: Hi, everyone. I'm new to Julia, but so far I love what I've seen. Whenever I try to use Winston, I

[julia-users] Re: Problems using Winston in fresh OSX install

2015-02-13 Thread Andreas Lobinger
Hello colleague, first of all it's not a bad idea to raise this as issue on Winston.jl itself: https://github.com/nolta/Winston.jl/issues and btw this here looks similar: https://github.com/nolta/Winston.jl/issues/204 afaik getgc methods are usually located in the drawing libraries (like

[julia-users] Re: Problems using Winston in fresh OSX install

2015-02-13 Thread José S .
Thank you for your response, Andreas. I searched on Google for other threads describing the same issue, but found none. It's good to know that others have run into this problem and that a fix is in the works. I manually made the changes mentioned in the pull request

Re: [julia-users] why does findn for sparse matrices check for nzval != 0?

2015-02-13 Thread Zouhair Mahboubi
Thanks for the clarficiation Mauro, although it seems like right now Julia is somewhere in between the two approaches according to that thread. I guess I'll just have to write my own version of findn which assumes that zeros have been purged, and if they haven't it's not that big of a deal in my

Re: [julia-users] Re: Nested parametric types

2015-02-13 Thread Stefan Karpinski
On Fri, Feb 13, 2015 at 11:58 AM, Jiahao Chen jia...@mit.edu wrote: As I understand it, the decidability of Julia's type system remains an open research question. Type checking Julia is definitely undecidable. Subtyping in Julia is probably decidable but it hasn't been proved to be.

Re: [julia-users] Convert Uint32 array for use in imwrite()

2015-02-13 Thread Tim Holy
Your last one should have worked, and does on master. I guess I need to tag a new version. This is the most direct, though: B = reinterpret(BGRA{Ufixed8}, A) # assuming little-endian imwrite(B, file.png) It does seem Color could use some more functions for converting to and from ARGB32.

[julia-users] Re: why does findn for sparse matrices check for nzval != 0?

2015-02-13 Thread Douglas Bates
On Thursday, February 12, 2015 at 10:03:04 PM UTC-6, Zouhair Mahboubi wrote: I'm trying to find the column indices of non-zero elements of a given row in a sparse matrix A I figured using findn would be a fast way to do that, but I was curious to see how the implementation was done since

Re: [julia-users] Re: Nested parametric types

2015-02-13 Thread David Maxwell
Thanks everyone for the replies. Jiahao: Thanks especially for the pointer to MAX_TYPE_DEPTH. This is exactly what I hit, and now I'm trying to learn what its consequences are. I appreciate the need for constraints to keep type inference efficient, but I'm not sure why what I am doing is

[julia-users] Re: Suppress printed output from PyPlot

2015-02-13 Thread Steven G. Johnson
On Friday, February 13, 2015 at 4:58:44 AM UTC-5, gdmsl wrote: julia plot(rand(10),rand(10)); Figure(PyObject matplotlib.figure.Figure object at 0x7f7979d24dd8) Figure(PyObject matplotlib.figure.Figure object at 0x7f7979d24dd8) I really need to suppress output like Figure(PyObject

Re: [julia-users] Convert Uint32 array for use in imwrite()

2015-02-13 Thread Christopher Lee
That works. I don't know why, but it is what I needed. Thanks.

Re: [julia-users] Convert Uint32 array for use in imwrite()

2015-02-13 Thread Tim Holy
On Friday, February 13, 2015 01:38:41 PM Christopher Lee wrote: That works. I don't know why, but it is what I needed. Thanks. BGRA is stored in the same byte-order as UInt32. But now if you do Pkg.update() you should be able to say imwrite(reinterpret(ARGB32,imagearray), filename) Best,

Re: [julia-users] ccall from gc finalizer (task switch)

2015-02-13 Thread Kirill Ignatiev
So is there some resolution for this question? I also ran into the problem of not being able to call a C function inside a finalizer (cudaEventDestroy), so I have exactly the same question. On Monday, 9 February 2015 11:14:40 UTC-5, Jameson wrote: I believe there is some sort of

[julia-users] Cool debugging finding

2015-02-13 Thread J Luis
Hi, I just found this very interesting thing for debugging. For Julia codes that 'talk' to C DLLs we can step in the the DLLs using Visual Studio by simply doing: - In VS go to TOOLS - Attach to Process... and select the julia.exe process - Set the breakpoints in the C code and launch your

Re: [julia-users] Re: Community Support for Julia on Travis CI

2015-02-13 Thread Jiahao Chen
bump So what is the currently recommended Travis CI script that generates coverage data? A bunch of packages have been switched over to the new scripts with language: julia and now have 0 coverage. See, for example: https://github.com/JuliaLang/Color.jl/issues/79 On Friday, December 12, 2014

Re: [julia-users] Cool debugging finding

2015-02-13 Thread Jameson Nash
You're really going to like when we switch to a newer version of llvm then. LLVM is able to expose much of that same native info to the debugger for the code that it JITs, so you may soon be able to use that same debugger to inspect and walk through Julia code. (there's also a minimal amount of