[julia-users] Memory leak for animated plots

2015-11-19 Thread Andrew Keller
I'd like to use Interact to have a plot that updates frequently in a Jupyter notebook, but it seems like there is a large memory leak somewhere and I am having some trouble tracking down what package is responsible. Within a few minutes of running, the following code will cause the memory used

[julia-users] Re: Do I have simd?

2015-11-19 Thread Damien
Try with: x::Array{Float32,1} = rand(Float32,n) y::Array{Float32,1} = rand(Float32,n) s::Array{Float32,1} = zero(Float64) I believe this fixed a similar issue for me in Julia 0.4. The underlying problem must have been fixed in 0.5-dev. @code_typed is also very useful in diagnosing f

[julia-users] Re: Do I have simd?

2015-11-19 Thread Damien
Try with: x::Array{Float32,1} = rand(Float32,n) y::Array{Float32,1} = rand(Float32,n) s::Float64 = zero(Float64) I believe this fixed a similar issue for me in Julia 0.4. The underlying problem must have been fixed in 0.5-dev. @code_typed is also very useful in diagnosing failure to

[julia-users] Re: Do I have simd?

2015-11-19 Thread Damien
Try with: x = rand(Float32,n)::Array{Float32,1} y = rand(Float32,n)::Array{Float32,1} s = zero(Float64)::Float64 I believe this fixed a similar issue for me in Julia 0.4. The underlying problem must have been fixed in 0.5-dev. @code_typed is also very useful in diagnosing failure

Re: [julia-users] Module documentation not formatting properly

2015-11-19 Thread NotSoRecentConvert
Turns out it was a problem with the file. I still have no idea why but I just renamed the original as a backup and then renamed my test module to what I wanted. It worked! Before I did that I moved ~/.julia/v0.4 to check for caching issues. After it was done reloading everything it still didn't

[julia-users] Build of julia with clang on windows. Clang.jl cannot build

2015-11-19 Thread Tony Kelman
Check if there's already an issue about this at Clang.jl. If not, open a new one.

[julia-users] Remote workers on Windows

2015-11-19 Thread bernhard
Hi Can someone tell me how to get remote workers working on Windows (both machines)? Will I require an ssh tunnel for this? I tried freeSSHd which is working fine when I connect with putty. However when I connect with julia addprocs([(string(usr,"\@192.168.1.35:29"))]) the connection is est

[julia-users] Re: Build of julia with clang on windows. Clang.jl cannot build

2015-11-19 Thread J Luis
Just remove the '-rdynamic' from that line of the Makefile. But you'll find some other problem later that I don't remember anymore (I've tried this too some time ago) Joaquim quinta-feira, 19 de Novembro de 2015 às 11:51:14 UTC, Tony Kelman escreveu: > > Check if there's already an issue about

[julia-users] Re: Build of julia with clang on windows. Clang.jl cannot build

2015-11-19 Thread Petr Hlavenka
@Tony Kelman There already exists the same issue for OSX on ihnorton/Clang.jl, #145. I've added my symptoms to that issue. Removal of -rdynamic does not help. Petr On Thursday, November 19, 2015 at 1:30:03 PM UTC+1, J Luis wrote: > > Just remove the '-rdynamic' from that line of the Makefile. Bu

[julia-users] Using Gadfly with sublime-ijulia or vim

2015-11-19 Thread Ashley Kleinhans
I was wondering if someone could help me with a very basic question (as a newbie on so many levels). I finally managed to get spy() working under Gadfly, thanks to the good people at stack exchange. But I have to type each line into terminal for it to pop up with a plot and even then I had to b

[julia-users] parse #

2015-11-19 Thread Ján Adamčák
Hi guys, I tried a parse specific config file with this syntax: param#value for this case parse("R#10") but parse returned me only :R How I can parse this string(file), when I can parse it like value, operator, value? :(R # 10) ? Thanks for your help.

Re: [julia-users] parse #

2015-11-19 Thread Stefan Karpinski
parse is for parsing Julia code, which this isn't. You should use regular expressions to pull out substrings and then parse them with specific parse(Int, str) methods. On Thu, Nov 19, 2015 at 9:46 AM, Ján Adamčák wrote: > Hi guys, > > I tried a parse specific config file with this syntax: > > pa

Re: [julia-users] Using Gadfly with sublime-ijulia or vim

2015-11-19 Thread Tom Breloff
Wrap your spy call: "display(spy(...))" On Thursday, November 19, 2015, Ashley Kleinhans wrote: > I was wondering if someone could help me with a very basic question (as a > newbie on so many levels). I finally managed to get spy() working under > Gadfly, thanks to the good people at stack excha

Re: [julia-users] Memory leak for animated plots

2015-11-19 Thread Tom Breloff
You're creating a new Gadfly.Plot object every update, which is a bad idea even if Gadfly's memory management was perfect. Plots.jl gives you the ability to add to or replace the underlying data like this: using Plots gadfly() getxy() = (1:10, rand(10)) plt = plot(x, y) # overwrite underlying plo

Re: [julia-users] Re: norm() is faster than maxabs()

2015-11-19 Thread Sisyphuss
norm() is even faster than maximum() ! On Wednesday, November 18, 2015 at 8:49:59 PM UTC+1, Tim Holy wrote: > > Note also that: > > function mynorm(x) > s = zero(x[1]^2) > @inbounds @simd for I in eachindex(x) > s += x[I]^

[julia-users] PyPlot behavior change in 0.4? (plt[:show] required?)

2015-11-19 Thread NotSoRecentConvert
Has PyPlot's default behavior changed in 0.4? When I plot nothing shows up with 0.3 code but there are also no errors. I'm able to save it and everything looks fine but I can't see or interact with the plots when my code is finished. Somebody mentioned plt[:show]() to make all the plots visible

[julia-users] Re: PyPlot behavior change in 0.4? (plt[:show] required?)

2015-11-19 Thread Damien
On my machine (0.4 / 0.5-dev) I need to call display(gcf()) for the figure to appear. Maybe we should open an issue for that in IJulia. On Thursday, 19 November 2015 16:52:24 UTC+1, NotSoRecentConvert wrote: > > Has PyPlot's default behavior changed in 0.4? When I plot nothing shows up > with 0.

[julia-users] Re: PyPlot behavior change in 0.4? (plt[:show] required?)

2015-11-19 Thread NotSoRecentConvert
It's a problem in the REPL as well. I haven't tried it with IJulia.

Re: [julia-users] Memory leak for animated plots

2015-11-19 Thread Andrew Keller
Maybe generating a new plot every time is not great practice, on account of the performance hit. That being said, I think it's perfectly legitimate to do what I'm doing for prototyping purposes. I can achieve the frame rate I want and the main example shown on https://github.com/JuliaLang/Intera

Re: [julia-users] Memory leak for animated plots

2015-11-19 Thread Stefan Karpinski
This should work – if there's a memory leak that's never reclaimed by gc, that's a bug. On Thu, Nov 19, 2015 at 11:55 AM, Andrew Keller wrote: > Maybe generating a new plot every time is not great practice, on account > of the performance hit. That being said, I think it's perfectly legitimate >

[julia-users] What is the easiest way to create type Sex.Female | No constants or final support in Julia

2015-11-19 Thread Frank
Hi, alllow a newbie question. Trying to create type that has immutable const value What i want to do is assign a value with a constant person.sex = Sex.MALE This doesnt work type SEX immutable MALE end immutable FEMALE end end there is no CONSTANT, no ATOM, no FI

[julia-users] Re: What is the easiest way to create type Sex.Female | No constants or final support in Julia

2015-11-19 Thread Damien
See http://docs.julialang.org/en/release-0.4/stdlib/base/?highlight=enum#Base.Val{c} On Thursday, 19 November 2015 18:36:48 UTC+1, Frank wrote: > > > > Hi, > > alllow a newbie question. Trying to create type that has immutable const > value > > What i want to do is assign a value with a constan

Re: [julia-users] What is the easiest way to create type Sex.Female | No constants or final support in Julia

2015-11-19 Thread Milan Bouchet-Valat
Le jeudi 19 novembre 2015 à 09:36 -0800, Frank a écrit : > > > Hi, > > alllow a newbie question. Trying to create type that has immutable > const value > > What i want to do is assign a value with a constant > > person.sex = Sex.MALE > > This doesnt work > > type SEX > immuta

Re: [julia-users] Memory leak for animated plots

2015-11-19 Thread Keno Fischer
Sounds like the memory leak is on the browser side? Maybe something is keeping a javascript reference to the plot? Potentially a Jupyter/IJulia bug? On Thu, Nov 19, 2015 at 12:01 PM, Stefan Karpinski wrote: > This should work – if there's a memory leak that's never reclaimed by gc, > that's a bu

[julia-users] Are print, warn, etc. "preemptible"?

2015-11-19 Thread Jonathan Malmaud
Yes, all IO functions yield.

Re: [julia-users] What is the easiest way to create type Sex.Female | No constants or final support in Julia

2015-11-19 Thread Frank
thanks a lot. Was previously looking for enum, but found old post saying its still in the works. This is what i want Thanks! Am Donnerstag, 19. November 2015 18:51:14 UTC+1 schrieb Milan Bouchet-Valat: > > Le jeudi 19 novembre 2015 à 09:36 -0800, Frank a écrit : > > > > > > Hi, > > > > alllo

[julia-users] More conda troubles

2015-11-19 Thread J Luis
After the troubles with conda that I reported 2 or 3 days ago I ended up nuking my .julia dir. Now I being bitten again julia> Pkg.build("NetCDF") INFO: Building NetCDF Traceback (most recent call last): File "C:\j\.julia\v0.4\Conda\deps\usr\Scripts\conda-script.py", line 2, in from cond

[julia-users] Re: PyPlot behavior change in 0.4? (plt[:show] required?)

2015-11-19 Thread Steven G. Johnson
On Thursday, November 19, 2015 at 10:52:24 AM UTC-5, NotSoRecentConvert wrote: > > Has PyPlot's default behavior changed in 0.4? When I plot nothing shows up > with 0.3 code but there are also no errors. I'm able to save it and > everything looks fine but I can't see or interact with the plots

[julia-users] Re: More conda troubles

2015-11-19 Thread Steven G. Johnson
Have you set up some environment variables that could affect Python? e.g. is PYTHONPATH or similar set in your environment? Maybe Conda should unset these before running the conda scripts.

Re: [julia-users] parse #

2015-11-19 Thread Steven G. Johnson
On Thursday, November 19, 2015 at 9:48:40 AM UTC-5, Stefan Karpinski wrote: > > parse is for parsing Julia code, which this isn't. You should use regular > expressions to pull out substrings and then parse them with specific > parse(Int, str) methods. > If it is just "param#val" on each line I w

Re: [julia-users] Formatting function definition to accept ASCIIString AND UTF8String

2015-11-19 Thread Steven G. Johnson
On Wednesday, November 18, 2015 at 7:56:13 AM UTC-5, NotSoRecentConvert wrote: > > It works now. > > @bernhard, my problem wasn't with joinpath but with the changes to the > string types. My code used String so it didn't care if it was ASCIIString > or UTF8String and swapping String with Abstr

[julia-users] Re: More conda troubles

2015-11-19 Thread J Luis
In fact I had. I always call julia from a bat file that I use to set paths of interest and calls my WinPython portable installation. Now changed that but I'm again in a broken state julia> Pkg.rm("NetCDF") INFO: Installing Conda v0.1.8 INFO: Removing Formatting v0.1.4 INFO: Removing NetCDF v0.3.

[julia-users] Re: Access Bloomberg data with Julia

2015-11-19 Thread milktrader
It wouldn't take much to make a Julia package for this. Bloomberg data is subscription-based, no? You could copy how Quandl.jl does this and simply replace the Quandl api with the Bloomberg api. Good luck On Wednesday, November 18, 2015 at 5:58:56 PM UTC-5, Charles Santana wrote: > > Hi, > >

[julia-users] Re: More conda troubles

2015-11-19 Thread J Luis
It's so annoying that Pkg.rm() does not rm. So I manually cleaned the cash and .trash after Pkg.rm("Conda") but it still doesn't install netCDF. I wish I could use what I already have in my computer (netcdf and all of its dependencies) and not duplicating them (if it worked). julia> Pkg.build("N

[julia-users] Passing types in @parallel

2015-11-19 Thread Jason Castiglione
I constructed my own type to store LDPC codes. The module is at https://github.com/jasontuna/LDPC It is stored in a Julia module and I load it with @everywhere using LDPC I would like to run several simulations in parallel calculating bit error rates for passing codewords through a particular

[julia-users] Re: More conda troubles

2015-11-19 Thread J Luis
oops, I obviously meant 'cache' not 'cash' quinta-feira, 19 de Novembro de 2015 às 20:33:28 UTC, J Luis escreveu: > > It's so annoying that Pkg.rm() does not rm. So I manually cleaned the cash > and .trash after Pkg.rm("Conda") but it still doesn't install netCDF. > I wish I could use what I alre

[julia-users] Memory corruption with GrammaticalEvolution

2015-11-19 Thread Ritchie Lee
Hello, I am encountering some memory corruption problems when using GrammaticalEvolution.jl. I don't think the problem is in GrammaticalEvolution though, so I am posting here to see if I can get some feedback. Here is a minimal example that will reproduce the problem: ```julia using Grammati

[julia-users] Better alternative to find all permutations?

2015-11-19 Thread Ratan Sur
I want to get all the unique permutations of an array of a certain length and this is the only way I currently know how to do it in one line. Is there a builtin function for this? julia> unique(collect(permutations([1;0;0;0;1]))) 10-element Array{Array{Int64,1},1}: [1,0,0,0,1] [1,0,0,1,0] [1,

[julia-users] Better alternative to find all permutations?

2015-11-19 Thread Eric Forgy
Hi Ratan, I don't know of a builtin function, but it looks like your code will first construct an array with all permutations and then reduce that to just the unique ones. I haven't used it yet, so hope I don't send you in the wrong direction, but you might have a look at Lazy.jl. That might he

[julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread David P. Sanders
El jueves, 19 de noviembre de 2015, 14:45:41 (UTC-6), Ratan Sur escribió: > > I want to get all the unique permutations of an array of a certain length > and this is the only way I currently know how to do it in one line. Is > there a builtin function for this? > > julia> unique(collect(permuta

Re: [julia-users] Re: indexing with non Integer Reals is deprecated

2015-11-19 Thread Tony Kelman
MatlabCompat.jl already exists: https://github.com/MatlabCompat/MatlabCompat.jl On Tuesday, November 17, 2015 at 2:52:30 PM UTC-8, Sheehan Olver wrote: > > > For both non-integer indexing and linrange, it seems that complaints about > "hard for newcomers" really mean "hard for newcomers from Ma

[julia-users] passing data by remotecall_fetch slower than writing & loading from disk

2015-11-19 Thread Andre Bieler
I have an array (lets call it "data") containing composite types. something like type MyType x::Float64 y::Float64 end (basically just a collection of Floats and Ints..) Now sending this data to a worker by remotecall_fetch(iProc, someFunc, data) is about 100 times slower than the followi

Re: [julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Stefan Karpinski
That's definitely more memory efficient, but not much more computationally efficient. There's probably a much cleverer way to compute the unique permutations of a set of values that contain repetitions. It's arguable that this is what permutations ought to do in the first place. On Thu, Nov 19, 20

[julia-users] Re: More conda troubles

2015-11-19 Thread Tony Kelman
Looks like that's probably a dlopen failure? Or check the libnetcdf in dependency walker? On Thursday, November 19, 2015 at 12:35:10 PM UTC-8, J Luis wrote: > > oops, I obviously meant 'cache' not 'cash' > > quinta-feira, 19 de Novembro de 2015 às 20:33:28 UTC, J Luis escreveu: >> >> It's so ann

[julia-users] Re: Access Bloomberg data with Julia

2015-11-19 Thread milktrader
Hmm, looking at the Bloomberg API it appears you'll need to wrap their C API, so a bit more involved than what Quandl.jl does. I didn't realize Bloomberg had an open source initiative. On Thursday, November 19, 2015 at 3:21:31 PM UTC-5, milktrader wrote: > > It wouldn't take much to make a Jul

Re: [julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Ratan Sur
I saw a comment in combinatorics.jl that this stuff is being moved over there so I'll check out if that's the same implementation. I think my use of the function is more likely what people want when thinking: "oh, I want all the permutations of this array" On Thursday, November 19, 2015 at 4:12

Re: [julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Stefan Karpinski
It is the same code. However, I do think that there's a strong case to be made that when the elements of an array are non-unique, you want the distinguishable permutations of it, not all of the permutations. On Thu, Nov 19, 2015 at 4:16 PM, Ratan Sur wrote: > I saw a comment in combinatorics.jl

Re: [julia-users] Re: Access Bloomberg data with Julia

2015-11-19 Thread Charles Novaes de Santana
Hi, Thanks for the tips! I am taking a look at their python api and my first idea was to use PyCall.jl to call their functions. But I will also consider the option to adapt Quandl.jl functions. I forgot to send the link for the bloomberg open source initiative: http://www.bloomberglabs.com/api/li

[julia-users] Re: Memory corruption with GrammaticalEvolution

2015-11-19 Thread Ritchie Lee
Update: Here is an even simpler example, no GrammaticalEvolution: ```julia function to_function(code::Expr) @eval f() = $code return f end function get_code() r1 = rand() r2 = rand() Expr(:comparison, r1, :<, r2) end using Debug @debug function script1() srand(0) for i = 1:10

[julia-users] Get pid of subprocess?

2015-11-19 Thread Erik Schnetter
How do I get the pid of a subprocess in Julia? I want to create a subprocess that lives for a long time, potentially longer than the Julia interpreter. I thus want to know its pid (process id) so that I can control it later (e.g. via ps or kill). The Process type doesn't seem to have a "pid" fiel

[julia-users] Re: More conda troubles

2015-11-19 Thread J Luis
Nope. The trouble is that after installing 295 MB of Condas (I mean a full python when I already had one and did not ask for another), there was some problem and libnetcdf was not installed. quinta-feira, 19 de Novembro de 2015 às 21:12:15 UTC, Tony Kelman escreveu: > > Looks like that's probab

Re: [julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Jeffrey Sarnoff
I agree, permutations() should give the distinguishable permutations; allpermutations() should give each and every one. On Thursday, November 19, 2015 at 4:30:54 PM UTC-5, Stefan Karpinski wrote: > > It is the same code. However, I do think that there's a strong case to be > made that when the e

[julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread rafzalan
Hi, I already implemented *lexicographic premutations generation* algorithm based on a *Donald Knuth* work. #lexicographic premutations generation, By Donald Knuth function lpremutations{T}(a::T) b=Vector{T}() sort!(a) n=length(a) while(true) push!(b,copy(a)) j=n-1 while(

[julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Dan
How about this: using StatsBase using Iterators function uniquepermutations(base) zpos = Vector{Vector{Vector{Int}}}() zval = Vector{Int}() left = length(base) for (v,c) in countmap(base) push!(zpos,collect(subsets(collect(1:left),c))) push!(zval,v) left -=

[julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Dan
Well, the previous listing worked only for Int vectors. Following is a more properly typed version. Various optimizations are possible: @inbounds, reducing allocations, etc. function uniquepermutations(base) zpos = Vector{Vector{Vector{Int}}}() zval = Vector{eltype(base)}() left = le

Re: [julia-users] Re: Access Bloomberg data with Julia

2015-11-19 Thread milktrader
I'll start on this package but not promising I have time to devote right now. https://github.com/milktrader/Bloomberg.jl Stop by and check the progress though and feel free to contribute. Cheers, Dan On Thursday, November 19, 2015 at 4:46:42 PM UTC-5, Charles Santana wrote: > > Hi, > > Thanks

[julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread rafzalan
sorry for typo error in *permutations*.

[julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Dan
Knuth's lexicographic permutations version is best (in terms of speed, memory. perhaps less readable). The function name in the code snippet even has a little permutation by itself ;)

Re: [julia-users] Re: Access Bloomberg data with Julia

2015-11-19 Thread Charles Novaes de Santana
Wow! Great initiative!! I am watching it. Thanks for being so proactive! Although it is the very first time I am trying to do something related to finances I hope I can help somehow. Cheers, Charles On 20 November 2015 at 00:38, milktrader wrote: > I'll start on this package but not promising

Re: [julia-users] Re: Better alternative to find all permutations?

2015-11-19 Thread Ratan Sur
I sense pull requests :P On Thu, Nov 19, 2015, 18:57 Dan wrote: > Knuth's lexicographic permutations version is best (in terms of speed, > memory. perhaps less readable). > The function name in the code snippet even has a little permutation by > itself ;) >

[julia-users] Re: Are print, warn, etc. "preemptible"?

2015-11-19 Thread vmarsi75-ggroups via julia-users
Thanks, Jonathan. On Friday, 20 November 2015 00:18:02 UTC+5:30, Jonathan Malmaud wrote: > > Yes, all IO functions yield.

[julia-users] Trees in Julia

2015-11-19 Thread Vishnu Raj
Hi, I want to create a tree of nodes where each node will have only one parent and arbitrary number of children. Also each branch can go to arbitrary depth. Now, if I want to define julia type for such a node, how it should be like? In C++, I can use struct trieNode { // hold data unsigned id;

Re: [julia-users] Looking for ideas and topics to include in an introductory workshop in Julia

2015-11-19 Thread Arin Basu
Thanks a million Tamas. These are very helpful pointers indeed. Arin On Wednesday, 9 September 2015 22:27:16 UTC+12, Tamas Papp wrote: > > Hi Arin, > > I am planning something similar in the near future and have been > thinking about this too. Maybe you could organize your discussion around >

Re: [julia-users] Looking for ideas and topics to include in an introductory workshop in Julia

2015-11-19 Thread Arin Basu
Thanks Mauro. This is excellent. Arin On Wednesday, 9 September 2015 22:12:27 UTC+12, Mauro wrote: > > Probably, the current state-of-the-art in introduction tutorials is > David Sander's: > > https://www.youtube.com/watch?v=gQ1y5NUD_RI&index=2&list=PLP8iPy9hna6Sdx4soiGrSefrmOPdUWixM > > > On

[julia-users] Re: problem running jl files

2015-11-19 Thread Forrest Curo
Okay, the problem was that Ubuntu julia was version 4.1, properly installed, while Debian was 4.0 with directories in nonestandard places. Downloading & extracting the 4.1 binary to my home directory, running it from there as: julia-cbe1bee3a8/bin/julia newbox.jl works fine. On Wed, Nov 18, 2015

[julia-users] Re: Passing types in @parallel

2015-11-19 Thread Jason Castiglione
Figured it out. For some reason doing the following works, using LDPC @everywhere using LDPC On Thursday, November 19, 2015 at 10:33:26 AM UTC-10, Jason Castiglione wrote: > I constructed my own type to store LDPC codes. > The module is at > https://github.com/jasontuna/LDPC > > It is store

[julia-users] Versioning for unregistered Packages

2015-11-19 Thread Leonardo
Hi all, I've created a local package (with Pkg.generate() ), I've modified source and I've committed it with git, also tagging package source with git -a , but Pkg.status() show version "0.0.0-". Anyone know why, and how can I change version shown by Julia? Many thanks in advance Leonardo

Re: [julia-users] Module documentation not formatting properly

2015-11-19 Thread Michael Hatherly
Just a follow up from further discussion between NotSoRecentConvert and myself about this off-list: Turns out the differences in behaviour between the two files was that they had different line endings... namely `\r\n` and `\n`. Related: https://github.com/JuliaLang/julia/issues/11988. - Mike