Re: [julia-users] Re: Julia as a matlab mex function (and the struggle for independence from cygwin)

2014-12-03 Thread J Luis
Ok, this is to report my failure as well. I managed to build the MEX with VS. For that I had to create an import lib from libjulia.dll, which I did both with MinGW and VS (2013) but Matlab fails with mexjulia Invalid MEX-file 'C:\SVN\mironeWC64\mexjulia.mexw64': A dynamic link library (DLL)

Re: [julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread Mike Innes
To also clarify on why @sprintf behaves this way, the reason is that it compiles down to specialised code for printing e.g. a float, followed by a double, etc., whatever you specify. If you use a variable like `fmt` the actual value is only available long after the code has already been compiled.

Re: [julia-users] processor vector instructions?

2014-12-03 Thread Tim Holy
Some of your questions may be answered by https://software.intel.com/en-us/articles/vectorization-in-julia --Tim On Tuesday, December 02, 2014 11:20:12 PM ivo welch wrote: dear julia experts: my question is not important, but I am curious: there seem to be a bewildering array of float vector

[julia-users] Re: Plot3D with Julia + PyPlot

2014-12-03 Thread Giacomo Kresak
Dear Steven, Thanks for your help. Definitively Plot3D works on: fig = plt.figure() ax = gca(projection=3d) X = linspace(-5, 5, 300) Y = linspace(-5, 5, 300) R = linspace(-2pi, 2pi, 300) X, Y = (X, Y) R = sqrt(X.^2 + Y.^2) Z = sin(R) surf = plot_surface(X, Y, Z, rstride=1, cstride=1,

Re: [julia-users] Resize image to specific size

2014-12-03 Thread Phelipe Wesley
Ok, thank you! I will try to use again . 2014-12-02 13:08 GMT-03:00 Andrei faithlessfri...@gmail.com: @Phelipe: yes, but as Tim noticed earlier, you need to get latest dev version and use qualified name to import it: julia Pkg.checkout(Images) ... julia using Images julia

[julia-users] How to achieve this?

2014-12-03 Thread Staro Pickle
Hi, I am asking a simple question because I can't find the answer in the document. I want to have this: q[ ] is an array whose elements are vectors. For example, q[1] = [1,2,3]; q[2] = [2,3,4] Thank you.

[julia-users] Re: How to achieve this?

2014-12-03 Thread Simon Danisch
You mean like this? q = Array(Array{Int}, 2) # 2 - space for two arrays... otherwise use 0 and push!(q, [1,2,3]) q[1] = [1,2,3];q[2]=[2,3,4] this works as well: Array{Int}[[1,2,3], [2,3,4]] Am Mittwoch, 3. Dezember 2014 14:32:39 UTC+1 schrieb Staro Pickle: Hi, I am asking a simple question

Re: [julia-users] Re: How to achieve this?

2014-12-03 Thread Mike Innes
Or p = Vector{Int}[[1,2,3],[4,5,6]] On 3 December 2014 at 13:41, Simon Danisch sdani...@gmail.com wrote: You mean like this? q = Array(Array{Int}, 2) # 2 - space for two arrays... otherwise use 0 and push!(q, [1,2,3]) q[1] = [1,2,3];q[2]=[2,3,4] this works as well: Array{Int}[[1,2,3],

Re: [julia-users] Re: [ANN - SolveDSGE] A Julia package to solve DSGE models

2014-12-03 Thread sebast...@debian.org
Hi Richard (and other participants to this thread), Concerning Dynare: it is indeed written in MATLAB/Octave (with some parts in C++, like the preprocessor and some optimized portions of code). Dynare currently covers a very large range of features, and replicating all of them in Julia would

[julia-users] Julia 0.3.3 fails Base.runtests()

2014-12-03 Thread Jeremy Cavanagh
Hi, I've just run brew update brew upgrade on my MacBook Air with OS X 10.9.5, which resulted in julia 0.3.3 being installed. Running the recommended test brew test -v julia results in SUCCESS for the core, but as I have had many problems trying to get julia installed on linux (now

Re: [julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread Tony Fong
Just to add to John's comment on Formatting.jl: yes use it. There's this NumFormat.jl (of yours truly) but I've since proposed to merge its entire code into Formatting.j, subject to @lindahua's blessing. So we should have a wealth of options to format numbers by runtime arguments. Tony On

Re: [julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread Stefan Karpinski
I gave this answer http://stackoverflow.com/a/19784718/659248 on StackOverflow, which I think explains it decently. However, this has caused enough people to be confused or frustrated that it should probably be revisited. I'm not sure what the right solution is. Note that we can't just call C's

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Jameson Nash
this stack overflow question indicates that there are two options ( http://stackoverflow.com/questions/153559/what-are-some-good-profilers-for-native-c-on-windows ) https://software.intel.com/sites/default/files/managed/cd/92/Intel-VTune-AmplifierXE-2015-Product-Brief-072914.pdf ($900)

[julia-users] QRPackedQ not properly transposed

2014-12-03 Thread Daniel Høegh
It has been discussed in:https://github.com/JuliaLang/julia/pull/9170

[julia-users] Re: Plot3D with Julia + PyPlot

2014-12-03 Thread Steven G. Johnson
The following reproduces the surface plot example from mplot3d: fig = figure() X = linspace(-5, 5, 100)' Y = linspace(-5, 5, 100) R = sqrt(X.^2 .+ Y.^2) Z = sin(R) surf = plot_surface(X, Y, Z, rstride=1, cstride=1, linewidth=0, antialiased=false, cmap=coolwarm) zlim(-1.01,1.01) ax = gca()

[julia-users] Quick method to give a random lattice vector that on average points in a particular direction?

2014-12-03 Thread DumpsterDoofus
Hello everyone, I'm trying to make a function (let's call it `return_direction`) which takes in a Float between 0 and 2*pi, and randomly returns one of the following lattice vectors {(0,0), (1,0), (0,1), (1,1)}, weighted in such a way that the expectation value of `return_direction(theta)` is

Re: [julia-users] Julia 0.3.3 fails Base.runtests()

2014-12-03 Thread Tim Holy
Hi Jeremy, Thanks for reporting the problem. Julia's bug reports can be filed here: https://github.com/JuliaLang/julia/issues I've added an issue suggesting that the URL be specified in that message, but it would be best to open a separate issue for your test failure. Best, --Tim On

[julia-users] Re: Plot3D with Julia + PyPlot

2014-12-03 Thread Steven G. Johnson
(It would be great if someone were to undertake a translation of code examples from Matplotlib to PyPlot. Ideally, create one or more IJulia notebooks with all of the examples, and we can put them in the PyPlot github repository and link to the nbviewer pages from the README. I'd be happy

[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

[julia-users] Re: Plot3D with Julia + PyPlot

2014-12-03 Thread Steven G. Johnson
The code can be simplified a bit further to: X = linspace(-5, 5, 100)' Y = linspace(-5, 5, 100) R = sqrt(X.^2 .+ Y.^2) Z = sin(R) surf = plot_surface(X, Y, Z, rstride=1, cstride=1, linewidth=0, antialiased=false, cmap=coolwarm) zlim(-1.01,1.01) ax = gca()

Re: [julia-users] Gadfly conflict with JLD

2014-12-03 Thread Isaiah Norton
See https://github.com/timholy/HDF5.jl/issues/160 On Wed, Dec 3, 2014 at 9:51 AM, xiongji...@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

[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

[julia-users] Re: Plot3D with Julia + PyPlot

2014-12-03 Thread Steven G. Johnson
And actually this produces almost the same plot: X = linspace(-5, 5, 100)' Y = linspace(-5, 5, 100) R = sqrt(X.^2 .+ Y.^2) Z = sin(R) surf = plot_surface(X, Y, Z, rstride=1, cstride=1, linewidth=0, antialiased=false, cmap=coolwarm) colorbar(surf, shrink=0.5, aspect=5) I don't know why the

[julia-users] Re: Quick method to give a random lattice vector that on average points in a particular direction?

2014-12-03 Thread DumpsterDoofus
Oh, apologies, I forgot to convert the `sign` to Int64. Changing the line in question to return (int(sign(x))*(rand() abs(x)), int(sign(y))*(rand() abs(y))) speeds up things to 300 nanoseconds per call. In any case, the original question still stands: could this be improved? On

[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

[julia-users] Re: Quick method to give a random lattice vector that on average points in a particular direction?

2014-12-03 Thread DumpsterDoofus
Oh, apologies, I forgot to convert the `sign` to Int64. Changing the line in question to return (int(sign(x))*(rand() abs(x)), int(sign(y))*(rand() abs(y))) In any case, the original question still stands: could this be improved?

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Tim Holy
Some potentially-interesting links (of which I understand very little): http://stackoverflow.com/questions/860602/recommended-open-source-profilers#comment2363112_1137133 http://stackoverflow.com/questions/8406175/optimizing-stack-walking-performance I can tell from this comment:

Re: [julia-users] Gadfly conflict with JLD

2014-12-03 Thread João Felipe Santos
As in the issue posted by Isaiah, this is a problem with the Color package (or interaction between Color and another package). In my case, updating Color did not work, so I pinned it to v0.3.9. João On Dec 3, 2014, at 9:57 AM, xiongji...@gmail.com wrote: I guess maybe some packages Gadfly

Re: [julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread Jeff Waller
I think this could be done by instead of expanding into specific (optimized) code dedicated to each argument, it instead would expand into a tree of if statements connected to a bunch of Expr(:call,:typeof,more args) and ? : (whatever the parse tree is for that). Essentially a function call

[julia-users] Re: Text editor for coding Julia: Atom vs Light Table vs Bracket

2014-12-03 Thread Jutho
I remember reading somewhere that Codebox might support Julia in the near future. Does anybody have any comments or information about this? Op vrijdag 28 november 2014 17:39:43 UTC+1 schreef Daniel Carrera: Hi everyone, Can anyone here comment or share opinions on the newer text editors --

Re: [julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread Stefan Karpinski
I don't see how inlining solves this problem though – if format strings are run-time, you can't inline anything since you don't know what to inline until it runs, at which point it's too late. On Wed, Dec 3, 2014 at 10:20 AM, Stefan Karpinski ste...@karpinski.org wrote: If Julia didn't do

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Tim Holy
That's a pretty serious bummer. I can't believe anybody puts up with this. Should we change the default initialization https://github.com/JuliaLang/julia/blob/b1c99af9bdeef22e0999b28388597757541e2cc7/base/profile.jl#L44 so that, on Windows, it fires every 100ms or so? And add a note to the

[julia-users] Re: Plot3D with Julia + PyPlot

2014-12-03 Thread Daniel Høegh
I have found a good notebook in https://gist.github.com/gizmaa/7214002

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Jameson Nash
Yes, probably (I thought we already had). Someone would need to do some comparison work though first. On Wed, Dec 3, 2014 at 10:57 AM Tim Holy tim.h...@gmail.com wrote: That's a pretty serious bummer. I can't believe anybody puts up with this. Should we change the default initialization

Re: [julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread Jeff Waller
Unfortunately the number of types or arguments one can encounter is unbounded. Are you talking about the format specifiers or the arguments? Yea, the format specifiers, poor choice of words, my bad.

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Tim Holy
Can somebody on a Windows system report back with the output of `Profile.init()`? --Tim On Wednesday, December 03, 2014 04:38:01 PM Jameson Nash wrote: Yes, probably (I thought we already had). Someone would need to do some comparison work though first. On Wed, Dec 3, 2014 at 10:57 AM Tim

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Daniel Høegh
_ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type help() for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.3.3 (2014-11-23 20:19 UTC) _/

[julia-users] Re: Text editor for coding Julia: Atom vs Light Table vs Bracket

2014-12-03 Thread cdm
over at https://www.codebox.io, it says that accounts have sudo access in terminals on virtual machines, so technically this can be accomplished; similar has been done at koding.com ... currently, codebox.io is not advertising an off the shelf Julia stack, so it is not obvious what might be

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Isaiah Norton
The accuracy of windows timers is somewhat questionable. I don't know if 5% is good enough for this purpose, but: one of our collaborators uses (a lightly modified version of) the code below in a real-time imaging application:

[julia-users] Re: Plot3D with Julia + PyPlot

2014-12-03 Thread Steven G. Johnson
Thanks, I've posted an issue to discuss this: https://github.com/gizmaa/Julia_Examples/issues/1 On Wednesday, December 3, 2014 11:37:20 AM UTC-5, Daniel Høegh wrote: I have found a good notebook in https://gist.github.com/gizmaa/7214002

Re: [julia-users] Re: Simple Finite Difference Methods

2014-12-03 Thread Tim Holy
Thanks. Looks like that needs to be changed. --Tim On Wednesday, December 03, 2014 08:53:50 AM Daniel Høegh wrote: _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ |

Re: [julia-users] Julia 0.3.3 fails Base.runtests()

2014-12-03 Thread Elliot Saba
Hey Jeremy, I'm the guy you should be talking to. Can you `brew remove openblas-julia` and then `brew install openblas-julia` and try again? -E On Wed, Dec 3, 2014 at 6:42 AM, Tim Holy tim.h...@gmail.com wrote: Hi Jeremy, Thanks for reporting the problem. Julia's bug reports can be filed

[julia-users] pyplot doesn't display anything, how do I choose the right backend

2014-12-03 Thread thr
Hi, I try to use pyplot.jl, nothing works, I need help :) In python, I can use matplotlib with both the gtk3 and wx backends. But Julia tells me WARNING: No working GUI backend found for matplotlib. when I try using PyPlot. Calls to pygui(:gtk) and pygui(:wx) tell me that I don't have

[julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread Mike Innes
#9423 https://github.com/JuliaLang/julia/pull/9243 should help with the repetition of format strings issue. It occurs to me now that you can always just write a function wrapper for `@sprintf` to solve that issue but this might still be useful. On Wednesday, 3 December 2014 01:40:56 UTC,

[julia-users] Re: pyplot doesn't display anything, how do I choose the right backend

2014-12-03 Thread thr
Sorry, I forgot to mention the versions: Julia 0.3, python 3.3.5, matplotlib 1.3 on gentoo.

Re: [julia-users] Re: pyplot doesn't display anything, how do I choose the right backend

2014-12-03 Thread Isaiah Norton
Might be a paths issue - check the contents of 'sys.path' when running python directly vs. PyCall. On Wed, Dec 3, 2014 at 2:08 PM, thr johannes.thr...@gmail.com wrote: Sorry, I forgot to mention the versions: Julia 0.3, python 3.3.5, matplotlib 1.3 on gentoo.

[julia-users] Re: Julia 0.3.3 doesn't start on Mac 10.9.5

2014-12-03 Thread david . w . watson
I don't think there is a problem with my .bashrc; but I use csh instead. I don't have a problem with 0.3.2, just 0.3.3. Your suggestion for running ~/Desktop/Julia-0.3.3.app/Contents/Resources/julia/bin/julia works. That's good enough for now. Thanks. On Tuesday, December 2, 2014 10:49:35 AM

Re: [julia-users] Re: pyplot doesn't display anything, how do I choose the right backend

2014-12-03 Thread Steven G. Johnson
Yeah, probably you are running a different version of Python (or a different Python path) in Julia than you are when you run Python separately. (You can use the PYTHON environment variable to specify the path of the python executable that you want Julia to use.)

[julia-users] Re: pyplot doesn't display anything, how do I choose the right backend

2014-12-03 Thread Steven G. Johnson
On Wednesday, December 3, 2014 2:08:50 PM UTC-5, thr wrote: Sorry, I forgot to mention the versions: Julia 0.3, python 3.3.5, matplotlib 1.3 on gentoo. I'm guessing that you also have python2 installed, and Julia is picking up that instead because python==python2 in your PATH. Try

[julia-users] Re: Julia as a matlab mex function (and the struggle for independence from cygwin)

2014-12-03 Thread Tracy Wadleigh
I did some more poking around with gdb, and was able to isolate one issue. When run outside of cygwin, `uv_guess_handle` returns `UV_UNKNOWN_HANDLE` such that `init_stdio_handle` errors out. When run inside of cygwin, `uv_guess_handle` returns `UV_NAMED_PIPE` to no ill effect. How can this be?

[julia-users] Are there julia versions of dynamic time warping and peak finding in noisy data?

2014-12-03 Thread ggggg
Hello, I'm interested in using dynamic time warping and an algorithm for peak finding in noisy data (like scipy.signal.find_peaks_cwt). I'm just wondering if there are any Julia implementations around, otherwise I'll probably just use PyCall for now to use existing python code.

[julia-users] Re: Why doesn't @sprintf evaluate its format string?

2014-12-03 Thread elextr
As Stefan said above, the problem with traditional (s)printf functions is type safety. On Thursday, December 4, 2014 4:53:17 AM UTC+10, Mike Innes wrote: #9423 https://github.com/JuliaLang/julia/pull/9243 should help with the repetition of format strings issue. It occurs to me now that you

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-12-03 Thread David van Leeuwen
Hi, On Tuesday, December 2, 2014 6:50:33 PM UTC+1, Ivar Nesje wrote: It's not the obvious choice to me either, but it is in the docs http://docs.julialang.org/en/latest/stdlib/base/#associative-collections, and has been since I read it the first time 1.5 years ago. I don't think is says

Re: [julia-users] Re: what's the best way to do R table() in julia? (why does StatsBase.count(x,k) need k?)

2014-12-03 Thread David van Leeuwen
Hello Milan, I just uploaded a new version of NamedArrays to github. I've reimplemented the getindex() mess---the never ending chain of ambiguities was unworkable. It is much cleaner now, I believe, and I've replaced the `negative index' implementation with a simple `Not()` type for

[julia-users] Re: pyplot doesn't display anything, how do I choose the right backend

2014-12-03 Thread thr
Almost :) This gave me the right direction. In fact, I have two pythons, but I have to explicitly set PYTHON=python2.7 if I want to see interactive graphs. Here is what I found out about the combinations of backends and python versions: Backends gtk3agg, gtk3cairo, wx, wxagg just seemed to

[julia-users] Re: Julia Mongo

2014-12-03 Thread Tobias Jone
Inside the Mongo.jl file, what is const MONGO_LIB defined as? If it's currently libmongoc, try explicitly setting the suffix, eg const MONGO_LIB = libmongoc-1.0 Bit of a late response, but you never know.

[julia-users] Re: pyplot doesn't display anything, how do I choose the right backend

2014-12-03 Thread Steven G. Johnson
On Wednesday, December 3, 2014 7:28:05 PM UTC-5, thr wrote: Backend TkAgg works with both pythons, but TkAgg doesn't seem to work with PyPlot. This is what I set in my matplotlibrc, which seems to be ignored by PyPlot. Backend gtkAgg works with Python2.7 and PyPlot, but NOT with python3.

Re: [julia-users] Re: Text editor for coding Julia: Atom vs Light Table vs Bracket

2014-12-03 Thread Todd Leo
Hey Mike, I've been used Juno for about a month, and I love it! Coding julia interactively is awesome, exactly how I feel when I was using RStudio! Big thanks! Yesterday I had to regretfully upgrade my project on julia v0.4, with no surprise that Juno doesn't seem to be working(the little