[julia-users] Re: META: What are the chances of moving this forum?

2015-09-18 Thread Jonathan Malmaud
Hi all, I've set up a Discourse Julia forum at http://julia.malmaud.com/ so that we can evaluate as a community how well we like Discourse. It has most of the old posts from julia-users and julia-dev imported. Would be good if people gave it a whirl and left feedback. On Monday, September 14,

[julia-users] Re: Juno stopped working - error message

2015-09-18 Thread Dongning Guo
My Juno stopped working too. Looks like I'm seeing the same error messages. It didn't help to reinstall the latest bundle or a previous version I had (which worked fine before). Tried a few things but nothing worked. On Friday, September 18, 2015 at 5:38:16 PM UTC-5, Serge Santos wrote: > >

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Tony Kelman
Be aware the mathworks file exchange imposes additional restrictions that code there can only be used with mathworks products. You need to find or request that the author make their code available through some other medium (github, own site, etc)

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread 'Bill Hart' via julia-users
Ok, now I understand. Compute an absolute path at compile time, from source_path(), put it in a const global variable, then access that from __init__ (or whatever other function). That indeed makes sense. Thanks. Bill. On 19 September 2015 at 01:02, Jameson Nash wrote: > You need to run it in

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread Jameson Nash
You need to run it in global scope at compile time, so that the value is constant when later running AFunction: module HiThere const AConstant = compute_anything() function AFunction() ccall((:a_cfunction, AConstant), Void, ()) end end On Fri, Sep 18, 2015 at 5:10 PM 'Bill Hart' via juli

[julia-users] Re: Juno stopped working - error message

2015-09-18 Thread Serge Santos
Thank you, Nils. I tried Pkg.checkout("JuliaParser"), but it didn't work. Very much appreciate if you have another idea. I will try with JunoAtom in the hope to be able to continue working. On Friday, 18 September 2015 20:42:33 UTC+1, Nils Gudat wrote: > > I'd say just switch to JunoAtom, it's

Re: [julia-users] opencv python api in Julia

2015-09-18 Thread Ishrat Badami
@Isaiah Thank you for addressing the issue. Here is what I did. To match with your Julia version I installed julia-0.4 installed PyCall.jl changed the line you mentioned. restart julia and rebuild PyCall.jl (just in case) Following is the output of the @pyimport cv2 ( it is not much) ERROR: Boun

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Daniel Carrera
Thanks for the list. Some people have raised concerns about Atom's speed. Besides that, I think that the other features either exist in Juno (REPL, smart editor) or can be implemented in Atom. I am just starting to read the Atom documentation, so I can't begin to guess whether they are easy or hard

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread 'Bill Hart' via julia-users
Ah, replace is better thanks. You can tell I've been a C programmer for most of my life. Anyway, so are you saying that if I call replace() with constant inputs, it will get called at compile time automatically? Or are you saying I need to use a macro to do that, to force it to be called at compil

[julia-users] Re: Estimating the distribution of posts in the julia-users group

2015-09-18 Thread Patrick Kofod Mogensen
Well, at least we have learned that people are looking for a good IDE for Julia :) On Friday, September 18, 2015 at 3:45:41 PM UTC-4, Daniel Carrera wrote: > > Hello, > > Just for fun, does anyone want to help me model the distribution of posts > per thread in the julia-users list? > > The attac

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Seth
Might be nice to be able to bind a single ^D (EOF) to workspace() so that we can reset easily. On Friday, September 18, 2015 at 1:43:51 PM UTC-7, Scott Jones wrote: > > workspace() should give a new REPL environment in Julia. > > On Friday, September 18, 2015 at 4:34:41 PM UTC-4, Christof Stocker

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Scott Jones
workspace() should give a new REPL environment in Julia. On Friday, September 18, 2015 at 4:34:41 PM UTC-4, Christof Stocker wrote: > > To me (and I realize that is biased) the things I like most about RStudio > / Spider are > >- they feel very fast and responsive (then again I do love Intell

[julia-users] Re: Juno + Julia 0.4

2015-09-18 Thread Johan Sigfrids
Provide some project wide action like search and find/replace, and also store the project specific settings that vary from project to project, like indentation. On Friday, September 18, 2015 at 9:31:42 PM UTC+3, Daniel Carrera wrote: > > I have always been curious about why so many IDEs support

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Christof Stocker
To me (and I realize that is biased) the things I like most about RStudio / Spider are * they feel very fast and responsive (then again I do love Intellij IDEA which can be very slow). * an integrated REPL that is at least as good as the standard one (i.e. auto-completion and such) * a

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread Jameson Nash
That seems like an odd way to write replace(somdir, "\\", ""), but no, those functions aren't const. You need to actually call them at compile time and store the result in a global const variable. On Fri, Sep 18, 2015 at 2:59 PM 'Bill Hart' via julia-users < julia-users@googlegroups.com> wrote

Re: [julia-users] Help reading structured binary data files

2015-09-18 Thread Tom Breloff
I never intended it to be a standalone package, mainly because, for it to be useful, I'd have to generalize a lot of stuff and add a lot of features. If someone else wanted to though... On Fri, Sep 18, 2015 at 4:05 PM, Patrick O'Leary wrote: > On Thursday, September 17, 2015 at 8:23:01 PM UTC-5

Re: [julia-users] Help reading structured binary data files

2015-09-18 Thread Patrick O'Leary
On Thursday, September 17, 2015 at 8:23:01 PM UTC-5, Tom Breloff wrote: > > I have an alternative to StrPack.jl here: > https://github.com/tbreloff/CTechCommon.jl/blob/master/src/macros.jl. If > you have a type that mimics a c-struct, you can create like: > > @packedStruct immutable MyStruct >

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Daniel Carrera
I have never used RStudio (or R, or IDEs). What features does it have that you would like to see in a Julia IDE? Cheers, Daniel. On 18 September 2015 at 10:08, Christof Stocker wrote: > I would be a huge fan of an RStudio like Julia IDE > > On 2015-09-18 10:05, Uwe Fechner wrote: > > I like QT

[julia-users] Re: Juno stopped working - error message

2015-09-18 Thread Nils Gudat
I'd say just switch to JunoAtom, it's much nicer :) But in all seriousness, these "utf8sizeof" related bugs can often be solved by doing Pkg.checkout("JuliaParser")

[julia-users] Hadley Wickham talk on periscope (7pm today)

2015-09-18 Thread Jeffrey Sarnoff
The presentation uses R. The approach is generally relevant. presentation details: http://www.meetup.com/nyhackr/events/224749681/ "We will tweet the link from the @nyhackr account when it is setup so stay tuned. We will be broadcasting using a smartphone so we can't make promises about the

Re: [julia-users] Emacs, ESS and julia-mode

2015-09-18 Thread Mauro
> ob-julia works for me, with Julia 0.3.11. I haven't tried 0.4 yet. I was using 0.4, and I think that did indeed cause some problems.

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread 'Bill Hart' via julia-users
Thanks, but this appears to be undocumented: http://julia.readthedocs.org/en/latest/stdlib/file/ Or am I looking in the wrong place in the documentation? I guess I also need to ask a stupid question now. So is it possible to compute a constant directory path (i.e. a constant string) made from a

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread Jameson Nash
You should be able to work out everything relative to source_path() at compile time (this is what `include` does to find files relative to the current file being included). On Fri, Sep 18, 2015 at 2:47 PM 'Bill Hart' via julia-users < julia-users@googlegroups.com> wrote: > Sorry, I didn't explain

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread 'Bill Hart' via julia-users
Sorry, I didn't explain that well. It is the location of deps/deps.jl that is not at a constant location _relative_ to the current working directory, which could be anything. I can't hard code it to an absolute path since that will just break on someone else's machine. The whole point of the deps

[julia-users] Re: Juno + Julia 0.4

2015-09-18 Thread Daniel Carrera
I have always been curious about why so many IDEs support "projects". I would be interested to know why many people seem to find them useful. I do a lot of coding every day, but I have never found a use for the projects feature. What should a good "projects" feature do? Cheers, Daniel. On Tue

Re: [julia-users] Where do they come from: jl_uv_writecb() ERROR: bad file descriptor EBADF

2015-09-18 Thread Jameson Nash
BinDeps tries to help with this by ensuring that all packages are getting their dependencies from the same place, whether that is the system, building from scratch, or a walled garden like Homebrew.jl. There isn't a particularly good way to prevent the issue, although https://github.com/JuliaLang/j

Re: [julia-users] Re: cglobal library name issue

2015-09-18 Thread Jameson Nash
> * putting const library name strings in deps/deps.jl is problematic because the working directory may be different depending on whether you are running the module test suite or just using the module from the Julia console. presumably running the code in the code from the test suite and running i

Re: [julia-users] alignement in memory when allocating arrays

2015-09-18 Thread Jameson Nash
Most malloc implementations that I'm aware of provide, at best, 16-byte allignment. However, newer SIMD instructions (like avx) require more alignment. Additionally, atomic operations may need to operate on an entire cacheline (64 bytes https://www.google.com/search?q=x64+cacheline+size&ie=utf-8&oe

[julia-users] Re: Juno stopped working - error message

2015-09-18 Thread Serge Santos
I also tried on my iMac (currently on Windows) and it does not work either. Both installations are independent. The error message is: WARNING: LightTable.jl: type cannot be constructed in utf8sizeof at C:\Users\Serge\.julia\v0.3\JuliaParser\src\lexer.jl:322 in skip_to_eol at C:\Users\Serge\.jul

Re: [julia-users] Re: Juno + Julia 0.4

2015-09-18 Thread David Higgins
If you're lucky you might find that the Meta key works (try the Windows key if you have one). On my Mac the Alt key is not being correctly captured by Atom, so none of the related shortcuts are working. I'm using Atom now and I have to say that when it works it works beautifully, but the devs s

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Tim Holy
As I read it, the objection is about using the "official" ("behind-the-scenes") julia inference engine---not the idea of using AST analysis to determine return type. So someone needs to code up a standalone ReturnType.jl package that performs inference using an independent implementation that ca

[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5

2015-09-18 Thread Tommy Foley
Any updates on this? I still can not seem to fix it. I have checked multiple git conversations and they seem to have closed the issue, but I have the master branch and am still getting the same error. On Thursday, September 10, 2015 at 12:06:30 PM UTC-4, Uwe Fechner wrote: > > Hello, > > I have

Re: [julia-users] Re: Juno + Julia 0.4

2015-09-18 Thread Sisyphuss
However, Atom also has heavy use of "ctrl". For instance, "ctrl + P" to move forward, as indicated in the documentation, has other effect on my computer. Furthermore, most "Alt" key bindings are mapped to menu operation on my computer. On Friday, September 18, 2015 at 6:49:41 PM UTC+2, Spenc

Re: [julia-users] Help reading structured binary data files

2015-09-18 Thread ggggg
This slightly different from your topic, but related. Numpy has a very nice interface for reading structured data that I've liked using. I felt like I would learn something if I tried to do similar things in Julia. For example import numpy as np # generate file to read dt = [("i",np.int64,1),("

Re: [julia-users] Re: Juno + Julia 0.4

2015-09-18 Thread Spencer Russell
Most keyboard shortcuts that use “cmd” on OSX are replaced by “ctrl” on Linux. -s > On Sep 18, 2015, at 12:46 PM, Sisyphuss wrote: > > I have just read the documentation of Atom. I wonder how could you use it in > a Linux keyboard, where there is no "cmd" key. >

[julia-users] Re: Juno + Julia 0.4

2015-09-18 Thread Sisyphuss
I have just read the documentation of Atom. I wonder how could you use it in a Linux keyboard, where there is no "cmd" key.

Re: [julia-users] Emacs, ESS and julia-mode

2015-09-18 Thread Ista Zahn
ob-julia works for me, with Julia 0.3.11. I haven't tried 0.4 yet.

[julia-users] Juno stopped working - error message

2015-09-18 Thread Serge Santos
Hi, Juno was working fine, but I had to restart Juno and now it keeps churning after successfully connecting with Julia but I cannot use the shell to work (nothing happen). There are no reasons why it should not work anymore. All the Julia packages are updated and up-to-date and I even reinstal

Re: [julia-users] opencv python api in Julia

2015-09-18 Thread Isaiah Norton
Hi Ishrat, Welcome to Julia. About the original question of loading OpenCV via PyCall, there was a discussion that mentioned using it, successfully, in this thread: https://github.com/timholy/Images.jl/issues/96#issuecomment-44529823 I also just tested it myself, and cv2 imported successfully on

Re: [julia-users] alignement in memory when allocating arrays

2015-09-18 Thread Stefan Karpinski
I don't think most CPUs require more than 16-byte alignment. 64-byte alignment seems extreme. On Fri, Sep 18, 2015 at 5:32 AM, Tim Holy wrote: > Your best bet is to check src/gc.jl. I'm pretty sure they're already > aligned > to 16 bytes, but I don't know about 64 and haven't looked myself. > >

Re: [julia-users] Arrayfire and Julia

2015-09-18 Thread tony
I skimmed some of their c api and it looked pretty usable. On Fri, Sep 18, 2015 at 9:02 AM -0700, "Keno Fischer" wrote: Arrayfire is written in C++, so the C++ is by far the simplest way to interface with it. This work was mostly exploratory, to see if it was useful at all. If somebody wanted

Re: [julia-users] Arrayfire and Julia

2015-09-18 Thread Keno Fischer
Arrayfire is written in C++, so the C++ is by far the simplest way to interface with it. This work was mostly exploratory, to see if it was useful at all. If somebody wanted to seriously use it now, I could see wanting to rewrite it using the C interface, but that would be a simple task once the AP

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Tomas Lycken
OK, so if Base.return_types is frowned upon, what is the recommended solution to the problem of "here's a function and a list of types; give me a container that can hold the results of applying this function to arguments of the type in the list" ? For this specific case, I don't think it's so

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Tom Breloff
Hi Michael... have you had a chance to look at OnlineStats yet? https://github.com/joshday/OnlineStats.jl On Fri, Sep 18, 2015 at 11:31 AM, Michael Francis wrote: > Hmm - looking at that thread I struggle to agree with the outcome. > > Using this function was how I stumbled on the 20% speed iss

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Michael Francis
Hmm - looking at that thread I struggle to agree with the outcome. Using this function was how I stumbled on the 20% speed issue with cov in stats base (due to type instability of the named arg). cov as it currently stands will return 'Any' whereas for an input set of two vectors of Float64. T

[julia-users] Re: how to submit a new function?

2015-09-18 Thread Seth
We'd also love to see it in LightGraphs if you want to make a PR there: https://github.com/JuliaGraphs/LightGraphs.jl. On Friday, September 18, 2015 at 12:56:07 AM UTC-7, Michela Di Lullo wrote: > > Hello everyone, > > I wrote a new julia function that calculates (a) cycle basis of a > connected

Re: [julia-users] planned array changes

2015-09-18 Thread Seth
Are there similar plans to revamp sparse matrices? (I'd like to start getting informed as early as possible). On Friday, September 18, 2015 at 2:14:53 AM UTC-7, Tim Holy wrote: > > On Thursday, September 17, 2015 11:55:56 PM harven wrote: > > I see that there are many changes scheduled for array

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Mauro
MIT is very permissive: you can do anything you like with it as long as you give credits to the original authors. So no worries there. On Fri, 2015-09-18 at 16:51, Christof Stocker wrote: > Actually, now that I think of it, thats not completely true. I did look at > a MIT licensed code that is

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Pontus Stenetorp
On 18 September 2015 at 15:51, Christof Stocker wrote: > > Actually, now that I think of it, thats not completely true. I did look at a > MIT licensed code that is very related. Although my code is not in any way > based on it. But I guess it's fair to say that it influenced me by looking > at it.

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Christof Stocker
Actually, now that I think of it, thats not completely true. I did look at a MIT licensed code that is very related. Although my code is not in any way based on it. But I guess it's fair to say that it influenced me by looking at it. What's the proper way to deal with this situation? Sorry for

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Christof Stocker
Thank god, almost got a heart attack there. I am just looking at the papers in my efforts On 2015-09-18 16:32, Mauro wrote: Just the implementation. But by looking at the code you look at the implementation. So, it's ok to look at pseudo-code in a paper (even if that paper is under strict cop

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Mauro
> Wait, so how does this work. Doesn't the license just cover the > implementation? or is the underlying abstract algorithm covered by it? Just the implementation. But by looking at the code you look at the implementation. So, it's ok to look at pseudo-code in a paper (even if that paper is und

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Christof Stocker
Wait, so how does this work. Doesn't the license just cover the implementation? or is the underlying abstract algorithm covered by it? On 2015-09-18 16:00, Tim Holy wrote: not implemented, care to try? You can find several implementations online; watch the license, though---if you read code tha

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread badami
Thank you both. @ Tim, I can sure try implementing those functions in Julia (whenever I get spare time). Since I am in a time crunch for next two months, I was looking for an easy option :) @ Tom, I am hearing for quite some time that OpenCV is soon going to drop c api support (or they dropped

[julia-users] Re: cglobal library name issue

2015-09-18 Thread Bill Hart
I managed to get it to work. The problem was obscure. * the patch someone had come up with for putting the -rpath in libpari was faulty * I thought libgmp.so.16 was resolving (when I did ldd) because part of the procedure to put the -rpath in the library was to put the library path in LD_LIBRAR

[julia-users] Re: Is there a function in Base or Base.LinAlg that behaves like A_mul_B! with multipliers α and β?

2015-09-18 Thread Mathew
Sparse matrices have the signature A_mul_B!(α::Number, A::SparseMatrixCSC, B ::StridedVecOrMat, β::Number, C::StridedVecOrMat) On Monday, September 14, 2015 at 2:28:07 PM UTC-4, Douglas Bates wrote: > > I want to perform an operation like the BLAS.gemm! operation with > multipliers α and β but fo

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Tim Holy
It's considered a no-no to call Base.return_types from code: https://github.com/JuliaLang/julia/pull/12292#issuecomment-124322950 However, my PR expunging it (https://github.com/JuliaLang/julia/pull/12409) has not gotten any interest from those who objected, so I'm certain how serious they are ;

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Tim Holy
On Friday, September 18, 2015 06:00:51 AM badami wrote: > Hi Tim > > I have not checked all the functions I will need in future. I want edge > detection filters available > and Hough transform not implemented, care to try? You can find several implementations online; watch the license, though-

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Tim Holy
On Friday, September 18, 2015 09:32:38 AM Tom Breloff wrote: > I don't have experience with OpenCV, but from the webpage it looks like > there is a C api... can you call into that directly? (or better yet, try > to figure out if there are Julia packages that do what you need already!) Previous po

Re: [julia-users] Re: Question about parallel computing

2015-09-18 Thread Tom Breloff
I'm assuming you've already read this: http://julia.readthedocs.org/en/latest/manual/parallel-computing/. There's a lot of good info there, so if there's something specific you want help with, please post a more complete problem (vague questions can only get vague answers). On Fri, Sep 18, 2015 at

Re: [julia-users] Re: opencv python api in Julia

2015-09-18 Thread Tom Breloff
I don't have experience with OpenCV, but from the webpage it looks like there is a C api... can you call into that directly? (or better yet, try to figure out if there are Julia packages that do what you need already!) On Fri, Sep 18, 2015 at 9:00 AM, badami wrote: > Hi Tim > > I have not check

Re: [julia-users] Equivalent of DL_LOAD_PATH in v0.4

2015-09-18 Thread Isaiah Norton
It still exists, but is now namespaced as Libdl.DL_LOAD_PATH. On Sep 18, 2015 8:21 AM, "Michael Francis" wrote: > Is there one ?

[julia-users] Re: cglobal library name issue

2015-09-18 Thread Bill Hart
Below is the reason why calling pari_init needs to go inside the __init__ function when precompiling. Clearly you can't precompile a call to initialise an external library. You have to that kind of initialisation at module initialisation time. Thus I am fairly certain it does need to go inside

[julia-users] Re: cglobal library name issue

2015-09-18 Thread Bill Hart
This improved things a bit, though there are some further issues: * both __init__ and our test code need to load this file, but the current directory is different in each case, so I can't give a relative path for deps/deps.jl itself, which puts us back right where we were. (I've resolved this

[julia-users] Re: opencv python api in Julia

2015-09-18 Thread badami
Hi Tim I have not checked all the functions I will need in future. I want edge detection filters and Hough transform, histogram equalization for now. I recently moved from Matlab to Julia and trying to convert some of my Matlab code to Julia. Thanks On Friday, September 18, 2015 at 1:50:10 P

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Michael Francis
I should probably submit a PR to add - the extra info On Friday, September 18, 2015 at 8:50:35 AM UTC-4, Tomas Lycken wrote: > > In this specific use case I don't need to handle anonymous functions, so > `Base.return_types` will probably do just fine. > > It's not documented, though, so searchin

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Tomas Lycken
In this specific use case I don't need to handle anonymous functions, so `Base.return_types` will probably do just fine. It's not documented, though, so searching in the docs didn't turn anything up (and even though I guess it must have been used on this list, my search terms apparently weren't

[julia-users] Re: IDE for Julia

2015-09-18 Thread LarryD
Just out of curiosity, I tabulated the first 30 items in this forum (I did it last night, so I'm already a bit out of date): The average nr of posts per item is 11, with a standard deviation of 23. The average number of views is 227, with a standard deviation of 472. This IDE topic had 129 po

Re: [julia-users] speed comparison with Mathematica

2015-09-18 Thread Frank Kampas
I had assumed the function would be recompiled only if it had been changed, but that is not correct. This has been very useful, thanks to everybody to replied. On Thursday, September 17, 2015 at 10:39:13 PM UTC-4, Duane Wilson wrote: > > > > On Thursday, September 17, 2015 at 5:25:40 PM UTC-3,

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Michael Francis
Yes in the sense it hands anon functions On Friday, September 18, 2015 at 8:41:16 AM UTC-4, Mauro wrote: > > Is that better than Base.return_types ? > > On Fri, 2015-09-18 at 14:36, Michael Francis > wrote: > > function returns(f, types) > > rt = [] > > if( !isdefined(f, :code) ) > >

Re: [julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Mauro
Is that better than Base.return_types ? On Fri, 2015-09-18 at 14:36, Michael Francis wrote: > function returns(f, types) > rt = [] > if( !isdefined(f, :code) ) > for x in Base._methods(f,types,-1) > linfo = x[3].func.code > (tree, ty) = typeinf(linfo, x[1], x[2]) >

[julia-users] Re: Get the inferred type of a function call given input argument types only

2015-09-18 Thread Michael Francis
function returns(f, types) rt = [] if( !isdefined(f, :code) ) for x in Base._methods(f,types,-1) linfo = x[3].func.code (tree, ty) = typeinf(linfo, x[1], x[2]) push!(rt, ty) end else # It is a lambda, not a function, we also need the types of the bound

[julia-users] Get the inferred type of a function call given input argument types only

2015-09-18 Thread Tomas Lycken
Given a function `foo(x,y)` and two *types* `TX` and `TY`, is there a way I can get the inferred return type from calling `foo(x::TX, y::TY)`? I want to do this in the compile part of a generated function, so I don't have access to any values to actually call the function with. I have already v

[julia-users] Equivalent of DL_LOAD_PATH in v0.4

2015-09-18 Thread Michael Francis
Is there one ?

Re: [julia-users] opencv python api in Julia

2015-09-18 Thread Tim Holy
Out of curiosity: is Images.jl missing a lot of what you need, or only a little? Best, --Tim On Friday, September 18, 2015 04:34:57 AM Ishrat Badami wrote: > Hi everyone, > > For quite some time I am trying to use opencv with julia. > Initially I tried installing Cxx.jl + OpenCV.jl with julia

[julia-users] Re: Question about parallel computing

2015-09-18 Thread Nils Gudat
Your question seems to be a bit generic - there's lot of different ways in Julia to do parallelized computing, depending on your problem and the hardware setup you're trying to use. If you just search this forum for "parallel", you'll find lots of threads, many of them containing code snippets o

[julia-users] Re: cglobal library name issue

2015-09-18 Thread Steven G. Johnson
The typical thing is to determine your library path at Pkg.build time, in a script in YourPkg/deps/build.jl, and write to a const mylibrary="..." in YourPkg/deps/deps.jl which is included by your package.

[julia-users] Re: Vector of Matrices - a good or bad idea?

2015-09-18 Thread Steven G. Johnson
On Thursday, September 17, 2015 at 11:38:29 PM UTC-4, Patrick Kofod Mogensen wrote: > > Yes, I did indeed just notice I had made a mistake with the ;. > > My state spaces typically have more than two values, so they're more > likely hundreds-by-hundreds instead of 2-by-2. > > What does the "rig

[julia-users] opencv python api in Julia

2015-09-18 Thread Ishrat Badami
Hi everyone, For quite some time I am trying to use opencv with julia. Initially I tried installing Cxx.jl + OpenCV.jl with julia 4.0 following the instructions given here: https://github.com/Keno/Cxx.jl I encountered compiling errors while building Cxx package in julia . https://github.com/

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Daniel Carrera
I didn't think of gedit. I hadn't realized that it is cross-platform. Gedit is based on GtkSourceView, which means that it does not natively support code folding. Someone made a plugin, but I cannot find a clear answer on whether the plugin actually works or not. My understanding is that gedit is

[julia-users] Question about parallel computing

2015-09-18 Thread antony schutz
Hi Everybody, from some weeks I am trying to do Big data calculus using all the parallel tools. Is somebody have examples of code ? The documentation of Julia is not enough complete for me. I found some tutorials, and also for me it is not enough clear. How to do efficient parallel computing

[julia-users] Re: cglobal library name issue

2015-09-18 Thread 'Bill Hart' via julia-users
Sorry, it's complaining about the ccall,not the cglobal. I has this code inside of init. ccall((:pari_init, "$pkgdir/local/lib/libpari"), Void, (Int, Int), 30, 1) It looks like it is complaining about the string interpolation. I guess it needs to know the exact string at compile time

Re: [julia-users] Arrayfire and Julia

2015-09-18 Thread Viral Shah
I believe the C interface is not as well supported as the C++ one, but I could be wrong. That is probably why Keno chose the C++ interface. He could perhaps say more. -viral > On 18-Sep-2015, at 3:37 pm, Tim Holy wrote: > > I don't know anything about ArrayFire, but this seems potentially i

[julia-users] Re: (Why?) Has the behaviour of similar() changed in 0.4.0-rc1?

2015-09-18 Thread Nils Gudat
Ah, sorry, indeed! As the issue mentions, I wanted to highlight the fact that similar now returns an Array, not a SharedArray. I guess this makes sense, I had just never used SharedArrays for anything other than results collection (i.e. I do all other calculations on sdata(SharedArray)), so I n

[julia-users] cglobal library name issue

2015-09-18 Thread 'Bill Hart' via julia-users
Hi, I'm actually trying to precompile our library. This seems to necessitate putting some of the initialisation code we had in an __init__ function. But I'm having problems with the cglobal syntax. According to the documentation, it takes a tuple with exactly the same format as ccall. But this

[julia-users] Re: (Why?) Has the behaviour of similar() changed in 0.4.0-rc1?

2015-09-18 Thread Kristoffer Carlsson
I think you copy pasted the same thing. Anyway: https://github.com/JuliaLang/julia/pull/12964 On Friday, September 18, 2015 at 1:05:57 PM UTC+2, Nils Gudat wrote: > > When working with multiple SharedArrays, I used to be able to do: > > julia> x = SharedArray(Float64,1) > 1-element SharedArray{

[julia-users] (Why?) Has the behaviour of similar() changed in 0.4.0-rc1?

2015-09-18 Thread Nils Gudat
When working with multiple SharedArrays, I used to be able to do: julia> x = SharedArray(Float64,1) 1-element SharedArray{Float64,1}: 0.0 julia> similar(x) 1-element SharedArray{Float64,1}: 0.0 When I got to the office this morning, I was close to a heart attack, as all my model outputs that we

Re: [julia-users] Re: Arrayfire and Julia

2015-09-18 Thread Tim Holy
I don't know anything about ArrayFire, but this seems potentially interesting. Checking the code, it seems like you used the Cpp interface rather than what appears to be an available C interface. Any particular reason? (As in, "don't use the C interface, it doesn't work"?) --Tim On Friday, Sep

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Tim Holy
Aside from my general concerns about performance, I'm on board with the idea of Atom (never having tried it myself). But with regards to being too down on a Gtk-based IDE, did you consider gedit? It seems to have Windows and OSX packages available. Disclaimer: I have no practical experience wit

Re: [julia-users] alignement in memory when allocating arrays

2015-09-18 Thread Tim Holy
Your best bet is to check src/gc.jl. I'm pretty sure they're already aligned to 16 bytes, but I don't know about 64 and haven't looked myself. --Tim On Friday, September 18, 2015 12:14:19 AM pev...@gmail.com wrote: > Hi all, > I would like to ask if it is possible to enforce memory alignment for

Re: [julia-users] Weird type instability that shouldn't be there (0.4-rc1)

2015-09-18 Thread Tim Holy
I don't see any actual type-instability there. There are a few expressions annotated with a meaningless `Any` that @code_warntype fails to expunge from its output. In general when I see `((foo::Float64)::Any)` I just ignore it. It's more reliable to ask whether any of your variables are type-uns

[julia-users] Re: Weird type instability that shouldn't be there (0.4-rc1)

2015-09-18 Thread Tomas Lycken
I wrote an answer with a link to the pull request where all this code resides (https://github.com/tlycken/Interpolations.jl/pull/47) but it seems that it was (automatically?) deleted (marked as spam?). Anyway, I have a getindex method that's type unstable (see the linked gist) which relies on c

[julia-users] Re: Weird type instability that shouldn't be there (0.4-rc1)

2015-09-18 Thread Kristoffer Carlsson
The function in your example has no type instability? It returns the concrete Float64? I see from your gist that getindex has a type instability but I don't think it is from coordlookup. On Friday, September 18, 2015 at 10:31:53 AM UTC+2, Tomas Lycken wrote: > > I’m getting an odd type instabili

[julia-users] Re: Weird type instability that shouldn't be there (0.4-rc1)

2015-09-18 Thread Kristoffer Carlsson
The function you linked has no type instability? It returns Float64. On Friday, September 18, 2015 at 10:31:53 AM UTC+2, Tomas Lycken wrote: > > I’m getting an odd type instability that I don’t understand the cause of, > as illustrated in this gist >

Re: [julia-users] planned array changes

2015-09-18 Thread Tim Holy
On Thursday, September 17, 2015 11:55:56 PM harven wrote: > I see that there are many changes scheduled for arrays in the next release. > Can someone summarize what is planned? https://github.com/JuliaLang/julia/issues/13157 > I understand that [,] will become non concatenating. What will be the

Re: [julia-users] planned array changes

2015-09-18 Thread Mauro
> Is there some syntactic sugar planned for Any arrays, in the spirit of > {}? Not as far as I know, but Any[] is pretty short.

Re: [julia-users] Emacs, ESS and julia-mode

2015-09-18 Thread Mauro
There is this julia-org-babel repo: https://github.com/gjkerns/ob-julia/blob/master/ob-julia-doc.org But it didn't quite work for me. But maybe that was because of my poor ESS setup. But I would certainly be interested in that functionality. On Fri, 2015-09-18 at 09:09, Tamas Papp wrote: > Hi,

[julia-users] Re: how to submit a new function?

2015-09-18 Thread Tomas Lycken
The default way of doing that would be to create a pull request to the Graphs.jl repository on Github. That way the package maintainers can give you feedback on your implementation, and include it i

Re: [julia-users] Re: ANN: ApproxFun v0.0.8 with (experimental) nonlinear ODE solver

2015-09-18 Thread Tomas Lycken
No, I actually ended up using MATLAB for some preprocessing (basically a script given to me by my supervisor, to massage the input data into our self-designed XML format), then C++ for the actual simulation and Julia for the postprocessing and analysis. Most of the time, it turned out, was spent

[julia-users] Weird type instability that shouldn't be there (0.4-rc1)

2015-09-18 Thread Tomas Lycken
I’m getting an odd type instability that I don’t understand the cause of, as illustrated in this gist . It seems that the type instability comes from the coordlookup function, but I don't understand why that wouldn't be type stable. Perhap

  1   2   >