[julia-users] Re: Return both elapsed time and expression return value

2015-09-11 Thread Seth
I typically do something like @time z = foo(x), so I tried it with @elapsed and this works if you discount the time it takes to assign to z: julia> foo(x) = x*2 foo (generic function with 1 method) julia> y = @elapsed z=foo(4); (y,z) (0.001103395,8) On Friday, September 11, 2015 at 2:03:52 PM

Re: [julia-users] Convert an Array{Any,2} to an AbstractVector in Julia

2015-09-10 Thread Seth
would vec() also work for you? It's supposed to be pretty fast. julia> a = rand(4,4) 4x4 Array{Float64,2}: 0.794534 0.618345 0.941777 0.449794 0.0615869 0.513610.141349 0.874955 0.504186 0.0687788 0.64149 0.863215 0.485404 0.193311 0.766789 0.0304138 julia> vec(a) 16-elem

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

2015-09-09 Thread Seth
Not sure if this is significant, but rmprocs(2) returns immediately with :ok and frees up the memory (again, according to Activity Monitor). On Wednesday, September 9, 2015 at 2:06:24 PM UTC-7, Seth wrote: > > julia> remotecall_fetch(2, whos, ) > From worker 2:

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

2015-09-09 Thread Seth
julia> remotecall_fetch(2, whos, ) >From worker 2:ArrayViews137 KB Module : ArrayViews >From worker 2:AutoHashEquals 5345 bytes Module : AutoHashEquals >From worker 2: Base 20321 KB Module : Base >From worker 2:

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

2015-09-09 Thread Seth
The numerics tested work properly. on Julia Version 0.4.0-pre+7107 Commit 4e44a1c (2015-08-31 16:51 UTC) Platform Info: System: Darwin (x86_64-apple-darwin14.5.0) CPU: Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz WORD_SIZE: 64 BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)

[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 fu

[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
(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 matrice

[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) = si

[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.

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

2015-09-08 Thread Seth
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 *think *it's based on the first element: >> >> julia> (2,2) <

[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 ca

[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? >

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

2015-09-06 Thread Seth
The thing is, there's no large array allocated anywhere. Everything's shared memory. On Sunday, September 6, 2015 at 5:10:48 AM UTC-7, Nils Gudat wrote: > > Not entirely sure about this, but wouldn't you have to first re-allocate > those large arrays before gc() can free up the memory? That's ho

[julia-users] Re: abs() returning negative numbers??

2015-09-05 Thread Seth
You're passing a UInt8 to f() which results in a mod of 0x0001, from which 3 is subtracted resulting in 0xfffe return value. Casting that to an Int, you get -2. Try f(UInt8(4)) to see this in action. In 0.4, your test_abs() example results in an InexactError. On Saturda

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

2015-09-05 Thread Seth
I've finally made some progress in parallelizing my code. However, at the end of the run, I have my answer in my main process (the REPL) and each worker process has about 1GB of memory held. Is there a way to tell the worker processes to free that memory? @everywhere gc() didn't seem to do it,

Re: [julia-users] FYI: PackageEvaluator/pkg.julialang.org badge URL change

2015-09-02 Thread Seth
Another suggestion would be to allow the package maintainer to specify which version of code s/he wants to test with each version. As an example, I will be tagging a version of my package that will be the final one that supports 0.3; it will make no sense for successive releases of the code to

[julia-users] Re: Performing conversion on a tuple of arguments

2015-09-01 Thread Seth
More precisely, foo(a::Real...) = map(x->floor(Integer,x),a) On Tuesday, September 1, 2015 at 11:32:15 AM UTC-7, Seth wrote: > > Assuming you have such a conversion function available (let's use floor() > for our example), you could do > a = (1.1, 2.2, 3.3, 4.4) > map

[julia-users] Re: Performing conversion on a tuple of arguments

2015-09-01 Thread Seth
Assuming you have such a conversion function available (let's use floor() for our example), you could do a = (1.1, 2.2, 3.3, 4.4) map(x->floor(Integer,x), a) which yields a tuple of ints. I don't claim "best" or even "Julian"; there may be a more clever approach. :) On Tuesday, September 1, 2

[julia-users] Re: Help for 'mean' (version 0.4)

2015-09-01 Thread Seth
Unreproducible here: _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.0-pre+7107 (2015

Re: [julia-users] Julia 0.4 warnings and how to fix

2015-09-01 Thread Seth
Thanks, Yichao! As a related aside, it appears that using import violates Style Guide #33 (per https://github.com/johnmyleswhite/Style.jl), so is the idiomatic / preferred way of doing this limited to using Base.(:==) ? On Tuesday, September 1, 2015 at 9:06:42 AM UTC-7, Yichao Yu wrote: > > > On

[julia-users] Re: IDE for Julia

2015-09-01 Thread Seth
You can create a watch window that has your plot in it so that it's not on top of your code. Bonus: if you change your variables, it updates after evaluation. See http://imgur.com/elLU3M7 for an example. Of course, even with these features, it might not be right for you. You can have a console

[julia-users] Re: IDE for Julia

2015-09-01 Thread Seth
Have you tried Hydrogen with Atom? It has all of those things (subjectively). On Tuesday, September 1, 2015 at 7:05:59 AM UTC-7, STAR0SS wrote: > > I think a good IDE should have: > > - A proper console and a good way to send single line and block of codes > to it (e.g. matlab's code section) >

Re: [julia-users] IDE for Julia

2015-08-31 Thread Seth
dates dynamically. On Monday, August 31, 2015 at 5:19:40 PM UTC-7, Jeffrey Sarnoff wrote: > > How are people who are using Atom+Hydrogen setting up Atom for Julia and > are there other packages of particular help? > > On Monday, August 31, 2015 at 3:47:15 PM UTC-4, Seth wrote: &g

Re: [julia-users] IDE for Julia

2015-08-31 Thread Seth
It does with the excellent Hydrogen plugin: see http://imgur.com/b8UGF1N for an example I whipped up. On Monday, August 31, 2015 at 12:09:01 PM UTC-7, Sheehan Olver wrote: > > Does Atom Support Gadfly graphics yet? > > (I got it installed but the output from Gadfly is just "Plot(...)" > > On Tues

[julia-users] Re: help with parallelization

2015-08-30 Thread Seth
100+ cores at some point. On Saturday, August 29, 2015 at 7:33:45 PM UTC-7, Seth wrote: > > Thanks. Dijkstra is defined, but the shared array is probably an issue. > Is there a way to parallelize this?

[julia-users] Re: help with parallelization

2015-08-29 Thread Seth
Thanks. Dijkstra is defined, but the shared array is probably an issue. Is there a way to parallelize this?

[julia-users] Re: help with parallelization

2015-08-29 Thread Seth
Following up - this doesn't seem to work and I don't know why: julia> nprocs() 4 julia> @everywhere d = Vector{LightGraphs.DijkstraState}(3000) julia> @everywhere g = readgraph( "/Users/seth/dev/julia/wip/LightGraphs.jl/test/testdata/pgp2.jgz")["pgp"] jul

[julia-users] help with parallelization

2015-08-28 Thread Seth
I'm not understanding the docs on parallelization. I'd like to parallelize a betweenness centrality calculation: for s in nodes state = dijkstra_shortest_paths(g, s; allpaths=true) if endpoints _accumulate_endpoints!(betweenness, state, g, s) else

Re: [julia-users] Re: What is the fastest way to perform 100k blocking IO operations in parallel?

2015-08-24 Thread Seth
:42:16 AM UTC-7, Uwe Fechner wrote: > > Did you try the DNS servers from Google, e.g. 8.8.8.8 ? > I never saw a reply that needs more than one second. > (Well, in our university network.) > > Am Montag, 24. August 2015 16:25:06 UTC+2 schrieb Seth: >> >> Name resolution

Re: [julia-users] Re: What is the fastest way to perform 100k blocking IO operations in parallel?

2015-08-24 Thread Seth
Name resolution delays are generally an issue with network latency. Trying to resolve 1000 uncached names will take a while on any system: seth@schroeder:~$ time host www.julialang.org www.julialang.org is an alias for julialang.github.io. julialang.github.io is an alias for

Re: [julia-users] Creating a new version of a package

2015-08-23 Thread Seth
You can use Pkg.publish() with 2FA. It's a bit tricky - see https://github.com/JuliaLang/julia/issues/10766#issuecomment-90788604 for a possible workaround. On Sunday, August 23, 2015 at 9:17:10 AM UTC-7, Timothée Poisot wrote: > > If you use 2-factors authentication, it seems that you have to p

[julia-users] Re: Are Base.any() and Base.all() optimal?

2015-08-20 Thread Seth
See https://github.com/JuliaLang/julia/issues/11750 and https://github.com/JuliaLang/julia/pull/11774. On Thursday, August 20, 2015 at 9:08:08 AM UTC-7, Pablo San-Jose wrote: > > > > Hi all, > > this is my first post here. I'm a heavy Mathematica user, and a big fan of > Julia. Many thanks to al

Re: [julia-users] Re: help with try/catch?

2015-08-19 Thread Seth
https://github.com/JuliaLang/julia/issues/12697 On Tuesday, August 18, 2015 at 3:37:28 PM UTC-7, Yichao Yu wrote: > > > On Aug 18, 2015 6:27 PM, "Seth" > > wrote: > > > > > > > > On Tuesday, August 18, 2015 at 3:16:48 PM UTC-7, Yichao Yu wrote: &g

Re: [julia-users] Re: help with try/catch?

2015-08-18 Thread Seth
On Tuesday, August 18, 2015 at 3:16:48 PM UTC-7, Yichao Yu wrote: > > > You cannot use import in local scope. Use eval or @eval > > > But why do the other ones (including when the "try" returns "nothing") work?

[julia-users] Re: help with try/catch?

2015-08-18 Thread Seth
Another followup: julia> try using LightGraphs catch y println("y = $y") end y = ErrorException("unsupported or misplaced expression using") On Tuesday, August 18, 2015 at 2:18:43 PM UTC-7, Seth wrote: > > > > I wasn'

[julia-users] Re: help with try/catch?

2015-08-18 Thread Seth
following up, try using LightGraphs nothing catch end works. On Tuesday, August 18, 2015 at 2:18:43 PM UTC-7, Seth wrote: > > > > I wasn't sure how to search for this in issues: > > julia> try >using LightGraphs >catch >end > &

[julia-users] help with try/catch?

2015-08-18 Thread Seth
I wasn't sure how to search for this in issues: julia> try using LightGraphs catch end julia> Graph ERROR: UndefVarError: Graph not defined but julia> try using LightGraphs true catch false end true julia> Graph LightGraphs.Graph

[julia-users] Re: How to write zero before decimal in julia, when output result to file? Thank you!

2015-08-11 Thread Seth
Try @printf or @sprintf: julia> a = @sprintf("%0.3f", .8454) "0.845" julia> a = @sprintf("%0.3f", 1.8454) "1.845" On Tuesday, August 11, 2015 at 1:21:30 PM UTC-7, meib...@163.com wrote: > > How to write zero before decimal in julia, when output result to file? As > example, I use writedlm t

Re: [julia-users] Assistance with understanding typing

2015-08-11 Thread Seth
Vector{Tuple{String,String}}) > > > even though > > Tuple{ASCIIString,ASCIIString} <: Tuple{String,String}. > > > See: > http://docs.julialang.org/en/release-0.3/manual/types/#parametric-composite-types > > On Tue, Aug 11, 2015 at 1:26 PM, Seth > wrote: &g

Re: [julia-users] Difficulty making latest Julia master

2015-08-11 Thread Seth
I did a make distcleanall and it worked. Might be overkill. On Tuesday, August 11, 2015 at 10:25:09 AM UTC-7, ron.s...@gmail.com wrote: > > I had that problem yesterday. Isaiah's solution worked for me.

[julia-users] Assistance with understanding typing

2015-08-11 Thread Seth
Consider foo(a::Vector) = 1 bar(a::Vector{Tuple}) = 2 baz(a::Vector{Tuple{AbstractString, AbstractString}}) = 3 foo(a::AbstractString) = foo([(a,a)]) bar(a::AbstractString) = bar([(a,a)]) baz(a::AbstractString) = baz([(a,a)]) Results: julia> foo("a") 1 julia> bar("a") ERROR: MethodError: `bar

[julia-users] Re: PSA: auto-precompile your modules

2015-08-10 Thread Seth
Issue filed: https://github.com/JuliaLang/julia/issues/12545 On Monday, August 10, 2015 at 2:18:25 PM UTC-7, Seth wrote: > > Sorry to follow up, but I've confirmed this is the case (it was also in > the original announcement; sorry for overlooking it). > > In any case - durin

[julia-users] Re: PSA: auto-precompile your modules

2015-08-10 Thread Seth
On Monday, August 10, 2015 at 2:03:54 PM UTC-7, Seth wrote: > > Hi, > > I'm running into a weird problem that I think is related to > precompilation. It seems that __precompile__() will attempt to precompile > all dependencies as well (that is, if you're "using Foo&

[julia-users] Re: PSA: auto-precompile your modules

2015-08-10 Thread Seth
Hi, I'm running into a weird problem that I think is related to precompilation. It seems that __precompile__() will attempt to precompile all dependencies as well (that is, if you're "using Foo", Foo will get precompiled). Is this true? In my case, it appears that the precompilation in LightGr

Re: [julia-users] Coveralls question

2015-08-04 Thread Seth
: > > https://github.com/IainNZ/Coverage.jl/pull/55 > > Regards, > > Abel Soares Siqueira > > 2015-08-04 17:16 GMT-03:00 Seth >: > >> Is there a way to mark certain blocks of code within Julia so that they >> don't count towards testing coverage? I

[julia-users] Coveralls question

2015-08-04 Thread Seth
Is there a way to mark certain blocks of code within Julia so that they don't count towards testing coverage? I have some code that, for various reasons, doesn't get called during normal operations and I don't want to trigger it during testing since it's basically "return false" type stuff. The

[julia-users] Re: Dispatching on Subtypes

2015-08-03 Thread Seth
::Furniture) = 10 >> f (generic function with 1 method) >> >> julia> f(Table()) >> 10 >> >> >> >> On Thursday, July 23, 2015 at 1:01:39 PM UTC-4, Vinuth Madinur wrote: >>> >>> Yes! >>> >>> Thats awesome. >

[julia-users] Re: parallel threads broken, replacing module

2015-07-29 Thread Seth
Reference: https://github.com/JuliaLang/julia/issues/12381 On Wednesday, July 29, 2015 at 5:35:14 PM UTC-7, Seth wrote: > > For what it's worth, I'm seeing the same thing: > > julia> @everywhere using LightGraphs > WARNING: replacing module LightGraphs > WARNIN

[julia-users] Re: parallel threads broken, replacing module

2015-07-29 Thread Seth
For what it's worth, I'm seeing the same thing: julia> @everywhere using LightGraphs WARNING: replacing module LightGraphs WARNING: replacing module LightGraphs WARNING: replacing module LightGraphs WARNING: replacing module LightGraphs exception on 4: ... (Lots of error messages / backtraces remo

Re: [julia-users] Re: Read GML format graphs by using LightGraphs.jl

2015-07-28 Thread Seth
) build, but graphs load in both 0.3 and 0.4. On Friday, July 17, 2015 at 9:29:07 PM UTC-7, andrew cooke wrote: > > > the very latest from git has fixes for the issues Seth raised, i hope / > believe. later this weekend i'll probably make a new release, but right >

[julia-users] Re: Fastest way to create a sparse random boolean matrix...

2015-07-23 Thread Seth
rue > [1, 5] = true > > julia> full(spmat) > 5x5 Array{Bool,2}: > false true false false true > true false true false false > true false false true false > false true true false false > true true false false false > >

[julia-users] Fastest way to create a sparse random boolean matrix...

2015-07-23 Thread Seth
Hi all, I'm looking for really clever (FAST) ways of creating an NxN sparse random boolean matrix that has the following properties: * exactly k (k <= N) true values per row, and * no true values on the diagonal (mx[i,i]). Anyone have an ingenious way of creating something like this?

[julia-users] Re: Dispatching on Subtypes

2015-07-23 Thread Seth
Is this what you're looking for? julia> abstract Furniture julia> type Table <: Furniture end julia> f{T<:Furniture}(::Type{T}) = 10 f (generic function with 1 method) julia> f(Furniture) 10 julia> f(Table) 10 On Thursday, July 23, 2015 at 9:34:12 AM UTC-7, Vinuth Madinur wrote: > > Hi, > >

[julia-users] Re: Passing keyword arguments through a function

2015-07-21 Thread Seth
That is, julia> f(x::Int, y::Int=5, z::Int=3) = x+y+z f (generic function with 3 methods) julia> f(x::Float64, args...) = f(floor(Int,x), args...) f (generic function with 4 methods) julia> f(5.0,1,2) 8 julia> f(5.0) 13 On Tuesday, July 21, 2015 at 7:53:01 AM UTC-7, Seth wrote

[julia-users] Re: Passing keyword arguments through a function

2015-07-21 Thread Seth
On Tuesday, July 21, 2015 at 7:14:02 AM UTC-7, Linus Härenstam-Nielsen wrote: > > I am looking for a way to automatically pass on all keyword arguments > through a function. Naively I would like to be able to do something like > this: > > f(x::Int; y::Int=5, z::Int=3) = x+y+z > f(x::Float64;

[julia-users] Re: SOLVED: ERROR: `start` has no method matching start(::Nothing)

2015-07-20 Thread Seth
Is it possible to specify the type of a function/method's return value? That is, if it were possible to define foo() so that we knew it would return an Int64, say, then 1) we could guarantee type stability, and 2) we could also throw a warning or error if it returned something else. On Monday,

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-17 Thread Seth
>> * So now we're in this inconsistent state: most of the time (15 out of 16 >> times) objects that claim to be equal get put in different slots because >> their hashes are different. But sometimes they'll happen to end up in the >> same slot, and you get this

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-17 Thread Seth
cause > their hashes are different. But sometimes they'll happen to end up in the > same slot, and you get this very different behavior (which happened to be > what you want in this case — the one-element uniqued vector). > > > On Friday, July 17, 2015 at 10:55:31 A

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-17 Thread Seth
by rand(UInt). This way it won't collide with other >>> types. I really need to spend a bit more time with my interfaces chapter >>> and add this info there. >>> >>> On Thursday, July 16, 2015 at 12:07:50 PM UTC-4, Seth wrote: >>> >>>&g

[julia-users] Re: Read GML format graphs by using LightGraphs.jl

2015-07-16 Thread Seth
in the file. Not sure this is a huge problem. On Thursday, July 16, 2015 at 3:11:41 PM UTC-7, andrew cooke wrote: > > > hi, seth contacted me to see whether my ParserCombinator library could do > this, and i've just finished adding support for GML. you can see it at >

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-16 Thread Seth
t;. And that's exactly how most > base functions do it. > > On Thursday, July 16, 2015 at 12:35:25 PM UTC-4, Seth wrote: >> >> >> >> On Thursday, July 16, 2015 at 9:25:01 AM UTC-7, Matt Bauman wrote: >>> >>> On Thursday, July 16, 2015 a

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-16 Thread Seth
On Thursday, July 16, 2015 at 9:25:01 AM UTC-7, Matt Bauman wrote: > > On Thursday, July 16, 2015 at 12:19:25 PM UTC-4, milktrader wrote: >> >> Also, back to the OP question, is the correct solution to simply define >> >> Base.hash(f::Foo) = f.x >> > > No, I'd define Base.hash(f::Foo) = hash(f.

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-16 Thread Seth
ses dictionaries > to do potentially weird things. > > On Thu, Jul 16, 2015 at 12:04 PM, Seth > wrote: > >> I can't because I just rebuilt to latest to test >> https://github.com/JuliaLang/julia/issues/12063 - but I'll try on the >> latest master... >>

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-16 Thread Seth
> wrote: > >> julia> hash(foos[1]) #and hash(foos[2]) >> 0xfa40ebab47e8bee1 >> >> julia> hash(foos[2]) >> 0x00ef97f955461671 >> >> On Thursday, July 16, 2015 at 11:36:03 AM UTC-4, Stefan Karpinski wrote: >>> >>> Dan and/or Seth, can you try that ag

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-16 Thread Seth
ursday, July 16, 2015 at 8:36:03 AM UTC-7, Stefan Karpinski wrote: > > Dan and/or Seth, can you try that again and check if hash(foos[1]) and > hash(foos[2]) have the same last hex digit? > > On Thu, Jul 16, 2015 at 11:30 AM, Matt Bauman > wrote: > >> Bizarre. I happen

Re: [julia-users] The unique function and iterables of custom composite types

2015-07-16 Thread Seth
I can confirm this works as described by milktrader on 0.4.0-dev+5860 (2015-07-08 20:57 UTC) Commit 7fa43ed (7 days old master). julia> unique(foos) 1-element Array{Foo,1}: Foo(4) On Thursday, July 16, 2015 at 7:52:03 AM UTC-7, Stefan Karpinski wrote: > > I don't see that on 0.4-dev – it also

[julia-users] Re: Read GML format graphs by using LightGraphs.jl

2015-07-11 Thread Seth
ould be to import the gml into NetworkX (http://networkx.github.io) and then write it out as GraphML, which you should then be able to use in LightGraphs. Seth. On Saturday, July 11, 2015 at 3:48:52 AM UTC-7, Charles Santana wrote: > > Hi folks, > > Following the sugges

Re: [julia-users] Problems using PyCall and Igraph

2015-07-11 Thread Seth
Charles, LightGraphs has an active dev community so if there's something you need that's not yet there, let us know (via issues). We also welcome PRs :) Seth. On Saturday, July 11, 2015 at 2:44:54 AM UTC-7, Charles Santana wrote: > > Thanks Seth, for your suggestion. I wil

Re: [julia-users] Problems using PyCall and Igraph

2015-07-10 Thread Seth
Hi Charles, igraph is indeed very good, but you might want to look at some Julia-native graph libraries. Graphs.jl and LightGraphs.jl are available, and the latter performs very favorably compared with igraph. On Friday, July 10, 2015 at 4:57:36 PM UTC-7, Charles Santana wrote: > > Hi again, >

Re: [julia-users] Errors while trying to install Cxx Package

2015-07-10 Thread Seth
I haven't read the entire thread here, but if you're in the top-level julia source directory and have built julia from source, the binary is located in ./usr/bin/julia . On Friday, July 10, 2015 at 7:19:53 AM UTC-7, Kostas Tavlaridis-Gyparakis wrote: > > Any suggestions pls??? > > On Friday, J

Re: [julia-users] Re: Did something change ~8 days ago with type parameterization in 0.4?

2015-07-10 Thread Seth
low-up. > > On Wednesday, 8 July 2015 11:43:51 UTC-3, Seth wrote: >> >> As a followup: referencing T via info() in >> the MinCutVisitor(graph::SimpleGraph, distmx::AbstractArray) results in an >> error ("UndefVarError: T not defined"), but if I don't explic

Re: [julia-users] Re: Did something change ~8 days ago with type parameterization in 0.4?

2015-07-08 Thread Seth
Another followup: replacing spzeros(Float64,8,8) with zeros(Float64,8,8) in the test results in a pass, even though both of them are derived (evenually) from AbstractArray{Float64, 2}. I'm so confused. On Wednesday, July 8, 2015 at 9:43:51 AM UTC-5, Seth wrote: > > As a followup: re

[julia-users] Re: Hydrogen package on Atom editor

2015-07-08 Thread Seth
I've been using it for a while for prototyping. It's really great. On Sunday, July 5, 2015 at 2:07:07 PM UTC-5, Spencer Russell wrote: > > Hey all, > > I just discovered the Hydrogen package > for the Atom editor which hooks into a Jupyter kernel. I just tested

[julia-users] Re: Redirection STDERR to DevNull

2015-07-08 Thread Seth
See also https://github.com/JuliaLang/julia/issues/12050 On Tuesday, July 7, 2015 at 8:45:45 PM UTC-5, Scott Jones wrote: > > I was attempting to redirect STDERR temporarily to DevNull, i.e. > olderr = STDERR > try > redirect_stderr(DevNull) > ... code that outputs warning messages ... > f

Re: [julia-users] Re: Did something change ~8 days ago with type parameterization in 0.4?

2015-07-08 Thread Seth
, @compat(Vector{Int}()) ) end On Wednesday, July 8, 2015 at 7:45:40 AM UTC-5, Seth wrote: > > I don't have T as a global that I know of. > > Bug report (for reference) is > https://github.com/JuliaLang/julia/issues/12063 > > Thanks. > > On Wednesday, July 8, 2

Re: [julia-users] Re: Did something change ~8 days ago with type parameterization in 0.4?

2015-07-08 Thread Seth
I don't have T as a global that I know of. Bug report (for reference) is https://github.com/JuliaLang/julia/issues/12063 Thanks. On Wednesday, July 8, 2015 at 7:42:59 AM UTC-5, Yichao Yu wrote: > > On Wed, Jul 8, 2015 at 8:32 AM, Seth > > wrote: > > Yichao, > >

Re: [julia-users] Re: Did something change ~8 days ago with type parameterization in 0.4?

2015-07-08 Thread Seth
default constructor > > > On Tue, Jul 7, 2015 at 8:05 PM, andrew cooke > wrote: > > > > what's T in the last chunk of code? you have typemax(T), but no T as a > type > > parameter. is that really working? > > > > > > On Tuesday

[julia-users] Re: Did something change ~8 days ago with type parameterization in 0.4?

2015-07-08 Thread Seth
you have typemax(T), but no T as a > type parameter. is that really working? > > On Tuesday, 7 July 2015 20:03:24 UTC-3, Seth wrote: >> >> I have the following code: >> >> type MinCutVisitor{T} <: AbstractMASVisitor >> graph::SimpleGraph >> paritie

[julia-users] Did something change ~8 days ago with type parameterization in 0.4?

2015-07-07 Thread Seth
Array{Bool,1}, ::Array{Int64,1}, ::T, ::T, ::Integer, :: AbstractArray{T,2}, ::Array{Int64,1}) LightGraphs.MinCutVisitor{T}(::Union{LightGraphs.Graph,LightGraphs.DiGraph }, ::AbstractArray{T,2}) call{T}(::Type{T}, ::Any) ... in call at /Users/seth/.julia/v0.4/LightGraphs/src/maxadjvisit.j

[julia-users] Re: Performance regression in 0.4

2015-06-30 Thread Seth
Yup, got it. bisecting now. On Tuesday, June 30, 2015 at 6:02:06 PM UTC-5, andrew cooke wrote: > > bisect is log(n)... > > On Tuesday, 30 June 2015 19:36:03 UTC-3, Seth wrote: >> >> I can't tell what changed to cause this. The versions are 35 days apart. >> >

[julia-users] Re: Performance regression in 0.4

2015-06-30 Thread Seth
y that? > > On Tuesday, June 30, 2015 at 11:07:35 PM UTC+2, Seth wrote: >> >> Please replace "vertex" with "edge" below. Sorry about that. >> >> On Tuesday, June 30, 2015 at 4:03:15 PM UTC-5, Seth wrote: >>> >>> I'm seeing a fairly

[julia-users] Re: Performance regression in 0.4

2015-06-30 Thread Seth
Please replace "vertex" with "edge" below. Sorry about that. On Tuesday, June 30, 2015 at 4:03:15 PM UTC-5, Seth wrote: > > I'm seeing a fairly significant performance regression between Julia > Version 0.4.0-dev+5008 and Julia Version 0.4.0-dev+5712 ,a

[julia-users] Performance regression in 0.4

2015-06-30 Thread Seth
I'm seeing a fairly significant performance regression between Julia Version 0.4.0-dev+5008 and Julia Version 0.4.0-dev+5712 ,and I don't know how to go about identifying what's wrong. I'm timing betweenness_centrality in LightGraphs.jl. It used to be among the fastest implementations out there

[julia-users] Re: Did something change with @test or round(Float64)?

2015-06-30 Thread Seth
Following up again: it appears that x::Vector * A::SparseMatrixCSC was removed via a commit last week. <https://github.com/JuliaLang/julia/commit/d914fb34a75d1c0246195665ad63a6b01a733913> Is anyone aware of a workaround? On Tuesday, June 30, 2015 at 11:06:05 AM UTC-5, Seth

[julia-users] Re: Did something change with @test or round(Float64)?

2015-06-30 Thread Seth
s works in 0.4.0-dev+5008 but is broken in nightly. On Tuesday, June 30, 2015 at 10:31:58 AM UTC-5, Seth wrote: > > Trying to get Travis to behave, but I'm running into a new (for me) error > message. Does anyone have any ideas? That should be rounding a Float64 to > three decim

[julia-users] Did something change with @test or round(Float64)?

2015-06-30 Thread Seth
Trying to get Travis to behave, but I'm running into a new (for me) error message. Does anyone have any ideas? That should be rounding a Float64 to three decimal places. It works on 0.4.0-dev+5008. The line is @test round(pagerank(g5)[3],3) == 0.318 (I don't know where those extra parens (in

Re: [julia-users] read(STDIN,Char); in Win ,

2015-06-26 Thread Seth
Given your use case, why aren't you using readline() and chomp()? On Monday, June 22, 2015 at 2:31:38 PM UTC-5, paul analyst wrote: > > I now it. But how to do the code usefull ? > > Paul > > W dniu poniedziałek, 22 czerwca 2015 20:41:23 UTC+2 użytkownik Stefan > Karpinski napisał: >> >> You're o

[julia-users] Re: cycle detection and cycle basis

2015-06-26 Thread Seth
LightGraphs has cycle detection as well (https://github.com/JuliaGraphs/LightGraphs.jl). On Monday, June 22, 2015 at 9:11:35 AM UTC-5, Michela Di Lullo wrote: > > Hi, > > does anyone know if there is any algorithm for cycle detection or cycle > basis computation (for directed graphs) in julia?

[julia-users] Re: matlab-like textscan function?

2015-06-26 Thread Seth
On Tuesday, June 23, 2015 at 10:45:11 PM UTC-5, Garrett Jenkinson wrote: > > Sorry if this is overly basic question, but I searched around the > documentation and the user group questions and have not been able to find > an answer. I wondering if there was a way in Julia to read from a formatte

Re: [julia-users] preferred syntax for creating empty vectors?

2015-06-19 Thread Seth
rote: > > Cross-reference: https://github.com/JuliaLang/Compat.jl/issues/105 > > On Fri, Jun 19, 2015 at 11:49 AM, Seth > wrote: > >> >> >> I note that Int[] works in 0.3 and 0.4, but Vector{Int}() and >> Array{Int,1}() were introduced at some point in 0.4 (

[julia-users] Re: Is there a reason any(p, c) isn't lazy?

2015-06-19 Thread Seth
16 or more elements. For other > array types, it still never takes it. > > On Thursday, June 18, 2015 at 12:07:48 PM UTC-4, Seth wrote: >> >> Thanks, Josh. I opened #11750 >> <https://github.com/JuliaLang/julia/issues/11750>. >> >> On Thursday, June 18,

[julia-users] preferred syntax for creating empty vectors?

2015-06-19 Thread Seth
I note that Int[] works in 0.3 and 0.4, but Vector{Int}() and Array{Int,1}() were introduced at some point in 0.4 (but this syntax hasn't been backported or Compat'ed for 0.3 - I have an issue open for that). Going forward, what's the recommended way to do this? (Am I missing another construc

[julia-users] Re: Is there a reason any(p, c) isn't lazy?

2015-06-18 Thread Seth
l stop computing in the case of searching for a > single true or false value. However, it seems the call to mapreduce instead > goes to a more specific method that doesn't implement this shortcut. If > 'any' were to call mapfoldl directly, it would do the lazy compu

[julia-users] Re: good time to start to learn julia?

2015-06-18 Thread Seth
On Thursday, June 18, 2015 at 9:58:05 AM UTC-5, Tom Breloff wrote: > > Will the language change? Yes. Will you have to relearn things? Yes. > Will new releases break code? Yes. Should you start using Julia now? > YES! > > The language is fairly mature, considering its age. I've been usin

[julia-users] Is there a reason any(p, c) isn't lazy?

2015-06-18 Thread Seth
julia> function bar(x) info("bar $x") x end bar (generic function with 1 method) julia> any(v->bar(v), [false, false, true, false, false]) INFO: bar false INFO: bar false INFO: bar true INFO: bar false INFO: bar false true Is there a reason the rest of the elements in t

Re: [julia-users] map() vs list comprehension - any preference?

2015-06-17 Thread Seth
B, 3.64% gc time) > > > julia> @time f2(2,ones(1_000_000)); > 633.149 milliseconds (2000 k allocations: 70313 KB, 0.91% gc time) > > > On Wednesday, June 17, 2015 at 12:04:52 PM UTC-4, Seth wrote: >> >> Sorry - it's part of a function: >> >> in_edg

Re: [julia-users] map() vs list comprehension - any preference?

2015-06-17 Thread Seth
scope as each module has its > own global scope. Best move it into a function. M > > On Wed, 2015-06-17 at 17:22, Seth > > wrote: > > The speedups are both via the REPL (global scope?) and inside a module. > I > > did a code_native on both - results are &

Re: [julia-users] map() vs list comprehension - any preference?

2015-06-17 Thread Seth
ed the comprehension to be faster. Is this in global > scope? If so you may want to try the speed comparison again where each of > these occur in a function body and only depend on function arguments. > > On Tue, Jun 16, 2015 at 10:12 AM, Seth > wrote: > >> I have been using list compr

Re: [julia-users] Re: How to read any lines with stream open(file)

2015-06-17 Thread Seth
You can also use chomp() which is specific to newlines (strip() removes all whitespace) Base.chomp(string) Remove a trailing newline from a string julia> a = "asd " "asd " julia> chomp(a) "asd " julia> strip(a) "asd" On Wednesday, June 17, 2015 at 4:41:45 AM UTC-5, René Donner wrote: > >

<    1   2   3   4   >