Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-08 Thread Jeffrey Sarnoff
Do others get this warning? If so, what modification of Mike's macro avoids it? WARNING: deprecated syntax "{a,b, ...}". Use "Any[a,b, ...]" instead. On Thursday, September 3, 2015 at 8:12:50 PM UTC-4, Jeffrey Sarnoff wrote: > > tip o' hat to that > > this minor edit, omitting {Any,Any}

[julia-users] Re: overwriting an object - deep copy without copy needed

2015-09-08 Thread Allard van Mossel
Hi Alex, Great to see more people using Julia for scientific simulations! Making copies of your offspring is indeed likely to be detrimental to your model's performance--especially if (presumably) you wish to repeat the simulation many times to obtain accurate estimates of whatever behavior

[julia-users] rownames in data matrices

2015-09-08 Thread Michael Borregaard
Hi, I am learning julia, and thought I would practice by migrating some of my code from R. I run into the problem that the data structures in julia does not seem to offer row names? I looked here in the forum and found a 2 year old discussion, that seems to end of the, IMHO slightly imprecise

Re: [julia-users] Adding remote workers on windows

2015-09-08 Thread 'Greg Plowman' via julia-users
> > I meant the remote machine/network may be firewalled to only accept > incoming ssh, http and other known ports. OK sorry. By now you can probably guess I don't really understand networking. Anyway I turned off the remote firewall entirely, and addprocs() successfully added remote

Re: [julia-users] Re: rownames in data matrices

2015-09-08 Thread Tamas Papp
AFAIK https://github.com/davidavdav/NamedArrays.jl already does this and is maintained actively. Best, Tamas On Tue, Sep 08 2015, Andreas Lobinger wrote: > Hello colleague, > > in the first order i think this could be emulated by a dictionary mapping > the row name to an

Re: [julia-users] Re: rownames in data matrices

2015-09-08 Thread Michael Krabbe Borregaard
Thanks, it looks like that package will do the trick! On Tue, Sep 8, 2015 at 1:33 PM, Tamas Papp wrote: > AFAIK https://github.com/davidavdav/NamedArrays.jl already does this and > is maintained actively. > > Best, > > Tamas > > On Tue, Sep 08 2015, Andreas Lobinger

[julia-users] API deployments on JuliaBox

2015-09-08 Thread Viral Shah
Folks, We are excited to bring to you a new feature on JuliaBox. This is alpha, and mainly being announced for you to try out and see if there is further interest. In your settings page, you should see a new section on APIs. Basically, you can paste a small snippet of code in there and define

Re: [julia-users] Compressing .jld files

2015-09-08 Thread Páll Haraldsson
On Thursday, November 13, 2014 at 4:25:30 AM UTC, Steven G. Johnson wrote: > > Blosc compression of HDF5 files in Julia is implemented at > https://github.com/timholy/HDF5.jl/issues/174 > > Strangely clicking this link gave me issue #173 (and I

[julia-users] Re: rownames in data matrices

2015-09-08 Thread Andreas Lobinger
Hello colleague, in the first order i think this could be emulated by a dictionary mapping the row name to an index into a matrix or DataFrame. Afaics calling this a 'misfeature' comes from trying to make a matrix datatype that has row names by default and many people with

Re: [julia-users] Re: rownames in data matrices

2015-09-08 Thread Cedric St-Jean
DataFrame behavior has been discussed many times, eg. https://groups.google.com/d/msg/julia-users/8UFnEIfIW0k/QNEustV9BQAJ. Short answer: having row names is considered, but a bit of a philosophical difference, so it's not guaranteed to happen at some point. On Tuesday, September 8, 2015 at

[julia-users] Re: PyPlot ERROR: LAPACKException

2015-09-08 Thread Phil_n
The only USE flag used, when installing Julia is emacs, from what I can see. # equery uses julia [ Legend : U - final flag setting for installation] [: I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for

[julia-users] Re: PyPlot ERROR: LAPACKException

2015-09-08 Thread Tony Kelman
I don't know enough about Gentoo to be sure, but I suspect the "lib64" there is referring to libblas being compiled as a 64-bit binary. Using 64 bit integers in libblas is a bit unconventional and I'd be surprised if Gentoo were doing that by default. The relevant part of the ebuild is in the

[julia-users] Re: [ANN] ForwardDiff.jl v0.1.0 Released

2015-09-08 Thread Jarrett Revels
> > For the latter, you would need to be able to take linear combinations of > epsilons. Is that currently possible? > If I correctly understand what you're saying, then yes. See the Types section of the notebook I previously linked

[julia-users] Could someone explain ordering on tuples?

2015-09-08 Thread Seth
I *think *it's based on the first element: julia> (2,2) < (3,3) # this makes intuitive sense true julia> (2,2) < (1,3) # this makes intuitive sense false julia> (2,2) < (3,1) # this is somewhat confusing true but it might be nice to have pairwise comparisons, so that, for example, one

[julia-users] Re: Could someone explain ordering on tuples?

2015-09-08 Thread Seth
Gotcha - thanks for confirming. I guess I'll roll my own function to compare matrix sizes. On Tuesday, September 8, 2015 at 12:44:12 PM UTC-7, Kristoffer Carlsson wrote: > > It is based on the first element, if these are equal, compare the next etc > until you find an element that does not

[julia-users] Re: Could someone explain ordering on tuples?

2015-09-08 Thread Kristoffer Carlsson
It is based on the first element, if these are equal, compare the next etc until you find an element that does not match. This is consistent with how Python compares tuples. It is also consistent with how C++ sorts Pairs. On Tuesday, September 8, 2015 at 9:30:32 PM UTC+2, Seth wrote: > > I

[julia-users] strange performance with boolean operators and sparse matrices

2015-09-08 Thread Seth
Hi all, I ran into some puzzling performance today with sparse matrices. I defined _column(a::AbstractSparseArray, i::Integer) = sub(a.rowval, a.colptr[i]:a. colptr[i+1]-1) # material nonimplication ⊅(p::Bool, q::Bool) = p & !q function ⊅(a::SparseMatrixCSC, b::SparseMatrixCSC) (m,n) =

[julia-users] Re: strange performance with boolean operators and sparse matrices

2015-09-08 Thread Seth
(and I realize that my code is really just resultmx[r,c] = !b[r,c] but I wanted to focus on the timing of equivalent boolean operators.) On Tuesday, September 8, 2015 at 3:21:35 PM UTC-7, Seth wrote: > > Hi all, > > I ran into some puzzling performance today with sparse matrices. I defined > >

[julia-users] Re: cleaning up objects in parallel processes?

2015-09-08 Thread Seth
Following up - how do I even begin to determine what's eating up memory on remote processes? Is there something out there I can use to get a report? On Saturday, September 5, 2015 at 5:53:54 PM UTC-7, Seth wrote: > > I've finally made some progress in parallelizing my code. However, at the >

Re: [julia-users] Re: Convert datetime string that has AM/PM to datetime, without using Calendar.jl

2015-09-08 Thread Pontus Stenetorp
On 8 September 2015 at 22:31, Ian Butterworth wrote: > > On Tuesday, 8 September 2015 17:27:25 UTC-4, Ian Butterworth wrote: >> >> I current use Calendar.jl to convert a datetime that contains AM/PM to the >> datetime type like this: >> datetime_string = "2015-08-12

[julia-users] Re: Good, short set of slides introducing Julia

2015-09-08 Thread Jeffrey Sarnoff
I had thought they might have some specific slides that would be helpful. In my experience, whatever the "common task," the audience and the intended result shape the contents of (some of) the presentation. A quick overview of major ways that Julia advances the both the efficacy and the art

[julia-users] Convert datetime string that has AM/PM to datetime, without using Calendar.jl

2015-09-08 Thread Ian Butterworth
I current use Calendar.jl to convert a datetime that contains AM/PM to the datetime type like this: datetime_string = "2015-08-12 12:01:23 PM" timeout = unix2datetime(Calendar.parse(datetime_string, timein).millis/1000) I'd like to do it without calendar.jl if possible. Any ideas?

[julia-users] Re: Good, short set of slides introducing Julia

2015-09-08 Thread andrew cooke
i'd actually already looked at those (should have said, sorry) - they're longer than what i was needing, but i could pick a few slides. i just wondered if what i was doing (basically, selling to scientific programmers in < 10 mins) was a common task. andrew On Tuesday, 8 September 2015

[julia-users] Re: Good, short set of slides introducing Julia

2015-09-08 Thread Jeffrey Sarnoff
Here is one place to look svaksha's list of slide presentations . For those who may not be familiar with details of copyright (a) written material is copyrighted even when there is no formal copyright statement (b) it

[julia-users] Re: Convert datetime string that has AM/PM to datetime, without using Calendar.jl

2015-09-08 Thread Ian Butterworth
Sorry, error in example. Should read: datetime_string = "2015-08-12 12:01:23 PM" timeout = unix2datetime(Calendar.parse("-MM-dd hh:mm:ss aa", datetime_string).millis/1000) On Tuesday, 8 September 2015 17:27:25 UTC-4, Ian Butterworth wrote: > > I current use Calendar.jl to convert a

[julia-users] automatic conversion Pair to Tuple -- failure of type inference?

2015-09-08 Thread vavasis
The following code loops over a Dict: function test_paircvt1() d = Dict(1=>5.5, 3=>-2.2) s1 = 0 s2 = 0.0 for (k,v) in d s1 += k s2 += v end s1, s2 end Two issues to ask about: (1) Since eltype(d)==Pair{Int,Float64}, Julia is automatically converting

[julia-users] Adding backslashes to a string fails

2015-09-08 Thread amiksvi
Hi all, I'm trying to do a simple thing, adding a backslash before every underscore in a string, ex: my_beautiful_string should become my\_beautiful\_string. To do that, I tried: julia> replace("my_beautiful_string", "_", "\_") "my_beautiful_string" julia> replace("my_beautiful_string", "_",

Re: [julia-users] Adding backslashes to a string fails

2015-09-08 Thread Joshua Ballanco
I think you’re just seeing the REPL printing the String object, which represents backslashes as escaped. Printing the result should clarify things: julia> replace("my_beautiful_string", "_", "\\_") "my\\_beautiful\\_string" julia> println(replace("my_beautiful_string", "_", "\\_"))

Re: [julia-users] Re: rownames in data matrices

2015-09-08 Thread Michael Krabbe Borregaard
Interesting to follow that discussion, thanks. I can see the philosophical arguments not to, though I think rownames are intuitive and nice. On Tue, Sep 8, 2015 at 2:37 PM, Cedric St-Jean wrote: > DataFrame behavior has been discussed many times, eg. >

[julia-users] Re: automatic conversion Pair to Tuple -- failure of type inference?

2015-09-08 Thread Simon Kornblith
There is no conversion from Pair to Tuple. The construction: (a, b, c) = d works for any iterable collection d. The same holds for the for loop construction. There used to be a type inference issue, but I fixed it in https://github.com/JuliaLang/julia/pull/12493. The output of code_warntype

Re: [julia-users] Adding backslashes to a string fails

2015-09-08 Thread amiksvi
Oh God, you're right, I don't know if I'm more ashamed or mad to have lost so much time on that, thank you very much anyway! Le mardi 8 septembre 2015 16:11:44 UTC+2, Joshua Ballanco a écrit : > > I think you’re just seeing the REPL printing the String object, which > represents backslashes as

Re: [julia-users] Re: Convert datetime string that has AM/PM to datetime, without using Calendar.jl

2015-09-08 Thread Ian Butterworth
Thanks for the tip, although I'm getting an error with your code in 0.4.0-dev Any idea why? using Base.Dates ds = "2015-08-12 12:01:23 PM" DateTime(ds, DateFormat("-mm-dd HH:MM:SS")) - (contains(ds, "AM") ? Hour (12) : Hour(0)) LoadError: ArgumentError: Non-digit character encountered

[julia-users] Re: Good, short set of slides introducing Julia

2015-09-08 Thread cdm
maybe helpful, maybe not ... some links from the main Julia page: http://nbviewer.ipython.org/url/julialang.org/benchmarks.ipynb http://julialang.org/benchmarks.csv obviously, the most "famous" collection of the benchmark data from the "High-Performance JIT Compiler" section of the

Re: [julia-users] Re: Convert datetime string that has AM/PM to datetime, without using Calendar.jl

2015-09-08 Thread Jacob Quinn
I'm not seeing the error on the latest master _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | |

[julia-users] Re: strange performance with boolean operators and sparse matrices

2015-09-08 Thread James Fairbanks
> > #= This is the function from Base that is being used when you call & on >> two sparse matrices >> function ($f){S,T}(A::AbstractArray{S}, B::AbstractArray{T}) >> F = similar(A, promote_op($F,S,T), promote_shape(size(A),size(B))) >> for i in eachindex(A,B) >> @inbounds F[i] =

[julia-users] Re: cleaning up objects in parallel processes?

2015-09-08 Thread Seth
Yes, but it's small - it's a type with a couple of vectors that won't exceed the number of vertices in the graph. On Monday, September 7, 2015 at 2:04:58 AM UTC-7, Nils Gudat wrote: > > Aren't you locally creating state on each of the worker processes? >

Re: [julia-users] Re: The new Dict syntax in 0.4 is very verbose

2015-09-08 Thread Michael Turok
That is elegantif I only could follow how it works On Thursday, September 3, 2015 at 4:40:54 PM UTC-4, Mike Innes wrote: > > FWIW I mocked up a json syntax macro: > > using MacroTools, Lazy > > import MacroTools: prewalk > > function prockey(key) > @capture(key, (a_:b_) | (a_=>b_)) ||

Re: [julia-users] Re: Convert datetime string that has AM/PM to datetime, without using Calendar.jl

2015-09-08 Thread Ian Butterworth
Ok. I'm running 0.4.0-dev on juliabox I managed to make it work by removing the last 3 characters from the input string, and using single format characters. Also caught a bug that occurs when the hour in the string = 12, and it's PM. I believe that hour was incorrectly being shifted.. but

[julia-users] Re: strange performance with boolean operators and sparse matrices

2015-09-08 Thread Seth
Thanks, James. Is this worthy of a github issue? On Tuesday, September 8, 2015 at 5:00:53 PM UTC-7, James Fairbanks wrote: > > #= This is the function from Base that is being used when you call & on >>> two sparse matrices >>> function ($f){S,T}(A::AbstractArray{S}, B::AbstractArray{T}) >>>

[julia-users] Re: strange performance with boolean operators and sparse matrices

2015-09-08 Thread Seth
Ref: https://github.com/JuliaLang/julia/issues/13024 On Tuesday, September 8, 2015 at 5:17:57 PM UTC-7, Seth wrote: > > Thanks, James. Is this worthy of a github issue? > > On Tuesday, September 8, 2015 at 5:00:53 PM UTC-7, James Fairbanks wrote: >> >> #= This is the function from Base that is

[julia-users] ANN: SoftConfidenceWeighted.jl.

2015-09-08 Thread Takeshi ISHITA
New release of Softconfidenceweighted.jl I just implemented Exact Soft Confidence Weighted (SCW) in Julia, and published as a package Softconfidenceweighted.jl (still not registered, but will

[julia-users] a floating point test for other's environments

2015-09-08 Thread Jeffrey Sarnoff
I wrote this FloatTest to find out if three things that should be true of numerics with Julia hold for the wide variety of working environments in use. It is 40 lines -- just click 'raw', copy it and paste it into your REPL. It is done immediately.