[julia-users] Re: Another (basic) parameterization question

2015-03-21 Thread Seth
015 at 2:42:20 PM UTC-5, Seth wrote: >> >> >> >> I have >> >> abstract AbstractGraph{T<:Integer} >> >> type Graph{T}<:AbstractGraph{T} >> vertices::UnitRange{T} >> edges::Set{Edge{T}} >> finclist::Vector{Vector

[julia-users] Re: Another (basic) parameterization question

2015-03-21 Thread Seth
;s good: julia> Graph(Int16(5)) {5, 0} undirected graph On Saturday, March 21, 2015 at 8:37:55 AM UTC-7, Seth wrote: > > James, > > Thanks. Here's what I get: > > julia> Graph(Int16(5)) > ERROR: MethodError: `convert` has no method matching convert(::Type{ > Unit

[julia-users] Re: Deprecated GnuTLS for Requests.jl

2015-03-23 Thread Seth
The deprecation warning is my fault, I guess. It's safe to ignore if you know what you're doing and you're sure you've got a patched version of GnuTLS. If this is causing a ton of grief I may just take the warning out (you can self-patch by removing line 453 of GnuTLS.jl). On Saturday, March 21

Re: [julia-users] Re: Another (basic) parameterization question

2015-03-23 Thread Seth
Base.one(T) which is defined to > give the multiplicative identity of T which for all subtypes of Real should > be the same as convert(T, 1). You aren't really using it as the > multiplicative identity though so I am not sure which is better. > > On Sat, Mar 21, 2015, 11:55 AM S

Re: [julia-users] Re: Another (basic) parameterization question

2015-03-23 Thread Seth
; functions, but I don't know how it works. >> >> James Fairbanks >> PhD Student >> Georgia Tech >> >> On Mon, Mar 23, 2015 at 11:26 AM, Seth > > wrote: >> >>> Opening a can of worms, here, perhaps, but is there any way to have >&g

Re: [julia-users] Re: Another (basic) parameterization question

2015-03-23 Thread Seth
And to answer my own question, it appears that UnitRange will adopt the datatype with the largest maximum value and promote the other type to it. On Monday, March 23, 2015 at 11:51:47 AM UTC-7, Seth wrote: > > This makes a ton of sense, except for the fact that the attendant > conv

[julia-users] Performance differences between these two constructs?

2015-03-30 Thread Seth
Hi all, Consider the following: typealias Edge Pair{Int,Int} src(e::Edge) = e.first dst(e::Edge) = e.second Under what circumstances, if any, will calling src(e) or dst(e) incur a performance penalty relative to p = Pair{Int,Int}(...) p.first, p.second ? Thanks.

Re: [julia-users] Performance differences between these two constructs?

2015-03-31 Thread Seth
Thanks to both of you for the quick responses! On Tuesday, March 31, 2015 at 8:36:32 AM UTC-7, Stefan Karpinski wrote: > > Indeed, there should be no performance penalty for such simple method > definitions. > > On Tue, Mar 31, 2015 at 1:13 AM, Toivo Henningsson > wrote: > >> As long as no other

[julia-users] Re: Graphs.jl, Page Rank and Weighted Graphs

2015-04-01 Thread Seth
a matrix. See http://lightgraphsjl.readthedocs.org/en/latest/gettingstarted/ for more information and let me know if you have any questions. Your code below is simply g = Graph(3) add_edge!(g,1,2) and then you'd pass a matrix to an appropriate function with a weight at [1,2] of whatever float64 value you needed. Set

[julia-users] Re: Graph package

2015-04-02 Thread Seth
You might check out GraphLayout.jl: https://github.com/IainNZ/GraphLayout.jl On Thursday, April 2, 2015 at 2:48:53 AM UTC-7, pip7...@gmail.com wrote: > > Hi > How can I save the following example plot(g) to .gif / .png or .jpg file > > julia> using Graphs > > julia> g = simple_graph(3) > Directe

[julia-users] Re: Julia development for Arm

2015-04-02 Thread Seth
On Wednesday, April 1, 2015 at 10:32:16 AM UTC-7, Viral Shah wrote: > > There is no definite timeframe. Julia does start up on ARMv7 already, and > I can use it to do a number of computations. It passes about 90% of the > tests. > > What makes our ARM port tough is the lack of easy access to AR

[julia-users] Re: Graphs.jl, Page Rank and Weighted Graphs

2015-04-02 Thread Seth
Rita, If you manage to implement PageRank for LightGraphs, we'd welcome a PR :) Seth. On Thursday, April 2, 2015 at 12:27:09 PM UTC-7, rita...@ciencias.unam.mx wrote: > > Thank you very much for the suggestion, worked perfectly. > > El miércoles, 1 de abril de 2015, 19:13

[julia-users] Better way of assigning diagonal values to sparse matrices?

2015-04-02 Thread Seth
Consider the following: julia> @time e = sprandn(5,5,0.3); elapsed time: 95.837541848 seconds (17178 MB allocated, 0.08% gc time in 4 pauses with 1 full sweep) then: julia> function doinf!(e::SparseMatrixCSC) for i = 1:size(e)[1] e[i,i] = Inf end

[julia-users] Re: Better way of assigning diagonal values to sparse matrices?

2015-04-02 Thread Seth
t; I can't try a matrix that large, I don't have the memory on this system--I > tested with 5000, though, and it is massively faster. > > On Thursday, April 2, 2015 at 3:21:37 PM UTC-5, Seth wrote: >> >> >> >> Consider the following: >> >> ju

[julia-users] Re: unexpected if statement behavior

2015-04-03 Thread Seth
Are you timing the first execution of the function? Because if so it's probably reading in and compiling the DataFrames piece. What happens when you run it for a second time? On Friday, April 3, 2015 at 8:43:12 AM UTC-7, Andre Bieler wrote: > > I have the following (for me) unexpected behavior f

Re: [julia-users] A method with an optional parameter may result in a different method being called

2015-04-08 Thread Seth
> That is a bit surprising indeed. Maybe worth an addition to > > http://docs.julialang.org/en/latest/manual/methods/#note-on-optional-and-keyword-arguments > > ? > It's not only surprising, I'd consider it (absent a real reason why it should be this way) incorrect. Once you've decided whi

[julia-users] Julia gets a mention in phys.org

2015-04-13 Thread Seth
http://phys.org/news/2015-04-probabilistic-lines-code-thousands.html Joining Kulkarni on the paper are his adviser, professor of brain and > cognitive sciences Josh Tenenbaum; Vikash Mansinghka, a research scientist > in MIT's Department of Brain and Cognitive Sciences; and Pushmeet Kohli of >

[julia-users] Re: Speeding up indexing into a Dict{Vector,Vector}

2015-04-13 Thread Seth
Two ideas that *might* work: 1) is hashing the key - that is, if you can represent the Vector{Int} as an immutable type (say, by somehow quickly changing it into an Int64 or Int128, perhaps using hash()) then you store the computed result as the key. The thing to keep in mind here is that if yo

[julia-users] Best way of using code introduced in 0.4 in 0.3 builds?

2015-04-15 Thread Seth
Hi, I've switched over to using Pair in one of my modules. Problem is, it's not available in 0.3 (at least not in 0.3.7). Questions: 1) is getting Pair into 0.3 something that Compat.jl should handle, or should it be a request to get it backported to the main 0.3 build? 2) what's the best way

[julia-users] Re: Best way of using code introduced in 0.4 in 0.3 builds?

2015-04-15 Thread Seth
On Wednesday, April 15, 2015 at 11:08:27 AM UTC-7, Steven G. Johnson wrote: > > On Wednesday, April 15, 2015 at 10:31:46 AM UTC-4, Seth wrote: >> >> 1) is getting Pair into 0.3 something that Compat.jl should handle, or >> should it be a request to get it backport

[julia-users] Re: search on docs.julialang.org doesn't seem to work

2015-04-15 Thread Seth
Yes - see https://github.com/JuliaLang/julia/issues/10831 On Wednesday, April 15, 2015 at 9:05:53 PM UTC-7, Christian Peel wrote: > > Searching the documentation on docs.julialang.org doesn't seem to work > for me. I tried in several different browsers, two different macines, and > tried it sev

[julia-users] How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
Could someone please explain what's going on here and what I need to do to fix my package with the latest 0.4 tuple changes? Here's the error (from pkg.julialang.org): ERROR: LoadError: LoadError: LoadError: TypeError: apply_type: in alias, expected Type{T}, got Tuple{TypeVar,TypeVar} in inclu

[julia-users] Re: How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
, Avik Sengupta wrote: >> >> >> Try this: >> >> function _make_simple_undirected_graph{T<:Integer}(n::T, >> edgelist::Vector{Tuple{T,T}}) >> >> On Monday, 20 April 2015 00:18:33 UTC+5:30, Seth wrote: >>> >>> Could someone pleas

[julia-users] Re: How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
Sorry - please disregard. I managed to omit the Vector{} in my paste. It's working correctly. Thank you. On Sunday, April 19, 2015 at 12:44:38 PM UTC-7, Seth wrote: > > This isn't a drop-in replacement: > > ERROR: LoadError: MethodError: `_make_simple_undirected_graph` has

[julia-users] Re: How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
r}(n::T, > edgelist::Vector{@compat(Tuple{T,T})}) > > > On Sunday, April 19, 2015 at 11:58:42 AM UTC-7, Avik Sengupta wrote: >> >> >> Try this: >> >> function _make_simple_undirected_graph{T<:Integer}(n::T, >> edgelist::Vector{Tuple{T,T}}) >

[julia-users] Re: How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
o longer need to work around constructing tuples by > splatting: (1, (2,3)…) now works as you would expect it to. And there's no > longer a strange type/value duality to (). > > On Sunday, April 19, 2015 at 5:06:00 PM UTC-4, Seth wrote: >> >> Following up: >> >

[julia-users] Re: How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
Disregard - this appears to be another issue. Will post separately. On Sunday, April 19, 2015 at 4:17:42 PM UTC-7, Seth wrote: > > Thanks, Matt - this is very helpful. > > I'm running into what a problem with PriorityQueue in Base.Collections, > though. I changed > &g

[julia-users] Same Pkg.dir(), different package?

2015-04-19 Thread Seth
Hi, I have two julia binaries: one in /usr/local/bin (5-day-old master), and one in /Users/seth/dev/julia/julia/usr/bin/julia (this is the latest master from today). I'm seeing some very weird behavior: when I do a Pkg.dir("LightGraphs") in both, I get "/Users/seth/.ju

[julia-users] Re: How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
Sorry about this: please don't disregard. It is possible that the TypeError here is being generated during compilation, not during execution, in which case I still need help :) On Sunday, April 19, 2015 at 4:54:08 PM UTC-7, Seth wrote: > > Disregard - this appears to be another

[julia-users] Re: How to fix package after breaking change in 0.4?

2015-04-19 Thread Seth
failing compile. Sorry for the bother. On Sunday, April 19, 2015 at 6:20:28 PM UTC-7, Seth wrote: > > Sorry about this: please don't disregard. It is possible that the > TypeError here is being generated during compilation, not during execution, > in which case I still need h

[julia-users] Re: Same Pkg.dir(), different package?

2015-04-19 Thread Seth
Turns out that the same code was being loaded; the issue was that the error was in compilation, not execution (another victim of the tupocalypse), so the debug statements weren't even given a chance to print anything. On Sunday, April 19, 2015 at 5:04:00 PM UTC-7, Seth wrote: > >

[julia-users] Re: Graphs.jl, Page Rank and Weighted Graphs

2015-04-21 Thread Seth
Just wanted to follow up here - I've just implemented pagerank functionality (based on NetworkX's pagerank_scipy method) in LightGraphs. On Thursday, April 2, 2015 at 12:52:29 PM UTC-7, Seth wrote: > > Rita, > > If you manage to implement PageRank for LightGraphs, we'

[julia-users] Re: type specification syntax for array

2015-04-21 Thread Seth
Another alternative in 0.4 is to use Pair: julia> z = Pair{Int32,Int32}[] 0-element Array{Pair{Int32,Int32},1} julia> push!(z,Pair(Int32(1),Int32(2))) 1-element Array{Pair{Int32,Int32},1}: 1=>2 On Tuesday, April 21, 2015 at 10:22:26 AM UTC-7, Kristoffer Carlsson wrote: > > In v0.3 you would us

Re: [julia-users] Re: type specification syntax for array

2015-04-21 Thread Seth
ng out that one reason to use Pair was that > tuples > were not as efficient as one might have hoped. That's no longer a concern, > thanks to Jeff. > > --Tim > > On Tuesday, April 21, 2015 01:34:05 PM Seth wrote: > > Another alternative in 0.4 is to use Pair: >

[julia-users] Re: Need help/direction on how to optimize some Julia code

2015-04-23 Thread Seth
The use of Requests.jl makes this very hard to benchmark accurately since it introduces (non-measurable) dependencies on network resources. If you @profile the function, can you tell where it's spending most of its time? On Tuesday, April 21, 2015 at 2:12:52 PM UTC-7, Harry B wrote: > > Hello,

[julia-users] Travis build failures, but Pkg.test() works?

2015-05-20 Thread Seth
Hi, I've got a problem with LightGraphs right now: Travis is reporting the build failing (see https://travis-ci.org/JuliaGraphs/LightGraphs.jl/jobs/63368942), relevant info copied below: Warning: both LightGraphs and Base export "blkdiag"; uses of it in module Main must be qualified ERROR: L

[julia-users] Re: Travis build failures, but Pkg.test() works?

2015-05-20 Thread Seth
On Wednesday, May 20, 2015 at 1:18:48 PM UTC-7, Tomas Lycken wrote: > > Just to make sure: what does Pkg.status() say about the package version? > (are you on master or a tag?) Thanks. I'm on master. But the Travis build that's kicking off is also for master.

[julia-users] Re: Travis build failures, but Pkg.test() works?

2015-05-20 Thread Seth
Travis shows $ julia -e 'versioninfo()' Julia Version 0.4.0-dev+4850 and I'm on Version 0.4.0-dev+4911. On Wednesday, May 20, 2015 at 1:23:55 PM UTC-7, Tony Kelman wrote: > > There haven't been new Linux nightly builds for about 5 days, there was a > power outage last week and there have bee

[julia-users] Comprehensions and @inbounds

2015-05-21 Thread Seth
Hi all, Consider the following code: foo = [bar(x) for x in a] Is this code as optimized as it can be with respect to indexing? That is, does Julia automatically apply @inbounds to comprehensions? Thanks.

[julia-users] Re: Julia Summer of Code

2015-05-25 Thread Seth
I'd be interested in mentoring a project to develop a robust web stack (starting with OpenSSL, probably). I submitted via NumFocus a couple months ago but the project was not selected. On Friday, May 15, 2015 at 10:57:24 AM UTC-7, Viral Shah wrote: > > Folks, > > The Moore Foundation is genero

[julia-users] Re: julia on arm - some more progress

2015-05-26 Thread Seth
On Monday, May 25, 2015 at 11:51:56 PM UTC-7, Viral Shah wrote: > > I am curious to find out if just `make` works for the Raspberry Pi (both 1 > and 2) from a fresh clone, and other boards as well. > > -viral > > With any luck, I will have results for you shortly. I just pulled the latest sourc

[julia-users] Re: julia on arm - some more progress

2015-05-26 Thread Seth
Alas: libtool: link: gcc -U_FORTIFY_SOURCE -fPIC -fexceptions -Wall -Wsign-compare -o Gperf-trace Gperf-trace.o ../src/.libs/libunwind-arm.a /home/seth/dev/julia/deps/libunwind-1.1/src/.libs/libunwind.a ../src/.libs/libunwind.a -lc -lgcc libtool: link: gcc -U_FORTIFY_SOURCE -fPIC -fexceptions

[julia-users] Re: julia on arm - some more progress

2015-05-26 Thread Seth
Disregard - this was an artifact of "-j 2" - restarting the build seems to have gotten past this point. On Tuesday, May 26, 2015 at 9:15:34 AM UTC-7, Seth wrote: > > Alas: > > libtool: link: gcc -U_FORTIFY_SOURCE -fPIC -fexceptions -Wall > -Wsign-compare -o Gperf-tr

[julia-users] Re: julia on arm - some more progress

2015-05-27 Thread Seth
On Monday, May 25, 2015 at 11:51:56 PM UTC-7, Viral Shah wrote: > > I believe that the build process for arm is reasonably straightforward. > Just `make` and a few hours should get you a julia binary. > > Originally, there were some issues with CPU type and such, but I believe > that was becaus

[julia-users] Re: julia on arm - some more progress

2015-05-27 Thread Seth
On Wednesday, May 27, 2015 at 7:53:22 AM UTC-7, Viral Shah wrote: > > Could you try the instructions in the arm readme around setting the CPU > type? I did an "export JULIA_CPU_ARCH=arm1176jzf-s" followed by "make distcleanall" and "git pull" - make is currently running (no -j2 this time).

[julia-users] Re: julia on arm - some more progress

2015-05-27 Thread Seth
...and same error even with that export.

[julia-users] [ANN: IPNets] Memory-efficient types for IP network representation

2014-12-16 Thread Seth
iated. Please note the known issues at the bottom of the README. As this is still a work in progress, more methods are anticipated. Seth.

Re: [julia-users] Re: overview questions about new doc changes (coming with v 0.4)

2014-12-17 Thread Seth
+1. Please reconsider making a @doc (at least a NOP) for 0.3.x - this way we can start writing repl-printable docstrings that will be useful in 0.4 but not have our code break in earlier versions. On Tuesday, December 16, 2014 4:50:56 PM UTC-8, ele...@gmail.com wrote: > > So if otherwise unchang

Re: [julia-users] Re: overview questions about new doc changes (coming with v 0.4)

2014-12-17 Thread Seth
t and we need to finalize that before anyone should > be adding documentation to 0.3 packages. > > -- John > > On Dec 17, 2014, at 3:15 PM, Seth > > wrote: > > +1. Please reconsider making a @doc (at least a NOP) for 0.3.x - this way > we can start writing repl-prin

[julia-users] Package development - best practices

2014-12-17 Thread Seth
I'm wondering whether folks are actually basing their repos in ~/.julia and doing their development and commits from there, or whether there's some other process that allows development to happen in a more standard location than a hidden directory off of ~ while still allowing use of Pkg. I'm p

[julia-users] Re: Package development - best practices

2014-12-17 Thread Seth
ednesday, December 17, 2014 2:21:44 PM UTC-8, Seth wrote: >> >> I'm wondering whether folks are actually basing their repos in ~/.julia >> and doing their development and commits from there, or whether there's some >> other process that allows development to hap

[julia-users] How to determine the version number associated with a merged PR?

2014-12-27 Thread Seth
Sorry for the (perhaps) silly question, but a PR that I wrote was merged recently and it introduces some new functionality that hasn't yet made it back to previous releases. I'd like to update Compat.jl to account for this. Is there an easy way to determine the version of Julia that received my

[julia-users] Re: How to determine the version number associated with a merged PR?

2014-12-27 Thread Seth
On Saturday, December 27, 2014 2:19:25 PM UTC-5, Seth wrote: > > Sorry for the (perhaps) silly question, but a PR that I wrote was merged > recently and it introduces some new functionality that hasn't yet made it > back to previous releases. I'd like to update Compat.jl

Re: [julia-users] Re: How to determine the version number associated with a merged PR?

2014-12-27 Thread Seth
ranch > > (for example, "0.4.0-dev" tag on master) > > On Sat, Dec 27, 2014 at 5:28 PM, Seth > wrote: > >> >> >> On Saturday, December 27, 2014 2:19:25 PM UTC-5, Seth wrote: >>> >>> Sorry for the (perhaps) silly question, but a PR that I

[julia-users] Nullable use cases / expected behavior?

2015-01-05 Thread Seth
I'm trying to figure out how (and under what circumstances) one would use Nullable. That is, it seems that it might be valuable when you don't know whether the value/object exists (sort of like Python's None, I guess), but then something like "Nullable(3) == 3" returns false, and that sort of m

Re: [julia-users] Re: Nullable use cases / expected behavior?

2015-01-06 Thread Seth
On Tuesday, January 6, 2015 4:43:16 AM UTC-8, Milan Bouchet-Valat wrote: > > > > > > Yeah, (==){T}(a::Nullable{T}, b::T) should be able to be defined as > > !isnull(a) && get(a) == b > I'd consider this definition (which is different from the ones I > suggested above) as unsafe: if `a` is `nu

Re: [julia-users] Improved help system

2015-01-07 Thread Seth
On Wednesday, January 7, 2015 6:44:17 AM UTC-8, Isaiah wrote: > > (1) is basically https://github.com/JuliaLang/julia/issues/3377 > (2) > >> help?> AbstractString >> ERROR: AbstractString not defined > > > works for me, but the other parts might be caused by the method resolution > for edit not

[julia-users] REQUIRES and a specific branch?

2015-01-09 Thread Seth
I find myself frequently using features in other packages that haven't been tagged yet. Is there a way to specify in REQUIRES that, say, the master branch of the package should be used instead of the latest tagged version? This way others, including Travis and Coveralls, can get the correct fun

Re: [julia-users] REQUIRES and a specific branch?

2015-01-11 Thread Seth
On Sunday, January 11, 2015 at 9:00:36 AM UTC-8, René Donner wrote: > > Hi, > > perhaps https://github.com/rened/DeclarativePackages.jl can help you > here. > > Rene > Ah, that looks great. Thank you very much for the pointer. S. > > > Am 09.01.2015 um

[julia-users] [ANN] (and a request for help): GraphCentrality.jl - Centrality measures for Graphs.jl graphs

2015-01-12 Thread Seth
Hi, I'm happy to announce that GraphCentrality.jl is now available via Pkg.add(). In a nutshell, GraphCentrality.jl's current goal is to be the repository for all centrality measures relating to graphs created via the excellent Graphs.jl package. My hope is that it will eventually become part

Re: [julia-users] Re: Strange random NaN's

2015-01-12 Thread Seth
On Monday, January 12, 2015 at 10:01:13 AM UTC-8, Tim Holy wrote: > > I didn't look at your example code at all; it's just a general remark that > if > you allocate an array with Array(Float64, m, n), until you fill it with > something it might contain nans. That can, of course, contaminate ot

[julia-users] Help with convoluted types and Vararg

2016-04-05 Thread Seth
Hi all, I have the following on 0.4.6-pre+18: z = [Pair((+,1,5,7), 3), Pair((-,6,5,3,5,8), 1)] type Foo x::Array{Pair{Tuple{Function, Vararg{Int}}, Int}} end and I'm getting julia> Foo(z) ERROR: MethodError: `convert` has no method matching convert(::Type{Pair{Tuple{Function,Vararg{Int64}

[julia-users] Re: Julia console with inline graphics?

2016-04-06 Thread Seth
ITerm with Compose.jl and TerminalExtensions.jl allows me to use GraphPlots.jl to visualize LightGraph output. On Saturday, April 2, 2016 at 3:45:22 AM UTC-7, Oliver Schulz wrote: > > Hi, > > I'm looking for a Julia console with inline graphics (e.g. to display > Gadfly plots). There's Jupyter/I

Re: [julia-users] Is there a way to convert function name to a string?

2016-04-10 Thread Seth
Simpler, perhaps: julia> foo(x) = x + 6 foo (generic function with 1 method) julia> string(foo) "foo" julia> string(foos) # just to show it's not arbitrary ERROR: UndefVarError: foos not defined On Friday, April 8, 2016 at 11:50:45 PM UTC-7, K leo wrote: > > Thanks. I have an array fo

[julia-users] Is there a way to reclaim memory?

2016-08-02 Thread Seth
So, a 62.5 million edge LightGraphs.Graph should only take about a 1.25 gigs of memory, all-in. However, because the edges are being added to vectors within the datastructure, and each vector is doing its own memory allocation, we wind up with the Julia process taking ~6.5 gigs. Given that we d

[julia-users] Re: Is there a way to reclaim memory?

2016-08-02 Thread Seth
On Tuesday, August 2, 2016 at 10:41:26 AM UTC-7, Seth wrote: > > So, a 62.5 million edge LightGraphs.Graph should only take about a 1.25 > gigs of memory, all-in. However, because the edges are being added to > vectors within the datastructure, and each vector is doing it

Re: [julia-users] Re: Is there a way to reclaim memory?

2016-08-02 Thread Seth
> ... > ``` > > -erik > > > > On Tue, Aug 2, 2016 at 1:56 PM, Seth > > wrote: > >> >> >> On Tuesday, August 2, 2016 at 10:41:26 AM UTC-7, Seth wrote: >>> >>> So, a 62.5 million edge LightGraphs.Graph should only take about a 1

Re: [julia-users] copy a local variable to all parallel workers

2015-10-05 Thread Seth
As a related aside, what's the significance of the "$" in front of "local_var"? On Monday, October 5, 2015 at 4:04:13 PM UTC-7, Jameson wrote: > > despite your naming convention, it looks like "local_var" was a global. > try wrapping it in a let block: > > let local_var=123 > @everywhere var=$lo

[julia-users] Re: adding new method for $ is not allowed, while adding for + is fine

2015-10-07 Thread Seth
Surround it by parens: julia> ($)(x::Int, y::Int) = x+y+5 ... julia> ($)(5,7) 17 On Wednesday, October 7, 2015 at 11:39:03 AM UTC-7, cheng wang wrote: > > Hello everyone, > > I try to do $(x,y)=something, it says: syntax: invalid assignment location > while +(x,y)=something is ok. > > Is there an

[julia-users] Re: adding new method for $ is not allowed, while adding for + is fine

2015-10-07 Thread Seth
Oops, hit post too quickly. Can also be called infix: julia> 5 $ 7 17 On Wednesday, October 7, 2015 at 12:05:10 PM UTC-7, Seth wrote: > > Surround it by parens: > > julia> ($)(x::Int, y::Int) = x+y+5 > ... > julia> ($)(5,7) > 17 > > On Wednesday, October 7, 2

[julia-users] Re: GraphPlot.jl

2015-10-18 Thread Seth
This is very cool! Just FYI for others: we have native LightGraphs integration for GraphPlot now - it joins GraphLayout and TikzGraphs as supported rendering packages. On Friday, October 16, 2015 at 5:57:25 AM UTC-7, Jihui Han wrote: > > https://github.com/afternone/GraphPlot.jl > > >

[julia-users] Re: ANN: A potential new Discourse-based Julia forum

2015-10-18 Thread Seth
"You're replying too quickly. Please wait 277 hours before trying again." one comment every 11 days, or is this a bug? (I'd post it there, but) On Tuesday, October 13, 2015 at 5:50:21 PM UTC-7, Jonathan Malmaud wrote: > > Also just realized there's extensive support for oneboxing (smart inl

[julia-users] Re: ANN: A potential new Discourse-based Julia forum

2015-10-19 Thread Seth
ld be good now. > > On Sunday, October 18, 2015 at 1:28:08 PM UTC-5, Seth wrote: >> >> "You're replying too quickly. Please wait 277 hours before trying again." >> >> one comment every 11 days, or is this a bug? (I'd post it there, but) >&g

[julia-users] What does sizehint! do, exactly?

2015-10-21 Thread Seth
I know it's good to use sizehint! with an estimate of the sizes of (variable-length) containers such as vectors, but I have a couple of questions I'm hoping someone could answer: 1) what are the benefits of using sizehint!? (How does it work, and under what circumstances is it beneficial?) 2) w

Re: [julia-users] What does sizehint! do, exactly?

2015-10-21 Thread Seth
Julia. sizehint! modifies that underlying storage without >> changing the size(A) in Julia. >> >> -Jacob >> >> On Wed, Oct 21, 2015 at 12:46 PM, Seth wrote: >> >>> I know it's good to use sizehint! with an estimate of the sizes of >>> (v

Re: [julia-users] What does sizehint! do, exactly?

2015-10-21 Thread Seth
e object is removed. There's an old > issue about providing a way to "shrink" the underlying storage: > https://github.com/JuliaLang/julia/issues/2879 > > -Jacob > > On Wed, Oct 21, 2015 at 1:26 PM, Seth > wrote: > >> Thanks, Jacob and Stefan. What h

Re: [julia-users] Re: For loop = or in?

2015-10-27 Thread Seth
There are, by my unscientific count*, 439 instances in base that use "for ... =", and 653 using "for ... in". (grep -Ri "for .* =" *.jl | wc -l) On Tuesday, October 27, 2015 at 11:36:01 AM UTC-7, David Anthoff wrote: > > If something like this were to change, it would be good to do it sooner >

[julia-users] ANN: new version of LightGraphs; discontinuation of Julia 0.3 support

2015-10-27 Thread Seth
e's a critical bug identified we'll do our best to fix it. Thanks, Seth.

Re: [julia-users] Re: How to get first number from Int64

2015-10-28 Thread Seth
One solution is to make sure you're using the current release version of Julia: parse(Int,string(lista[3])[1]) works as intended. On Wednesday, October 28, 2015 at 3:06:26 AM UTC-7, paul analyst wrote: > > Is ok but I can`t convert to int > julia> string(lista[3])[1] > '4' > > julia> int(str

[julia-users] Re: Is there a tutorial on how to set up my own Julia cluster?

2015-10-28 Thread Seth
On Wednesday, October 28, 2015 at 10:20:00 AM UTC-7, Ismael VC wrote: > > How can I start 2 workers on each node, using Julia 0.3.11? > > [count*][user@]host[:port] [bind_addr[:port]] > > The way I understand: > > [count*][user@]host[:port] [bind_addr[:port]] > > Is that `count` is an integer whil

Re: [julia-users] Re: For loop = or in?

2015-10-29 Thread Seth
+1 On Thursday, October 29, 2015 at 5:56:46 AM UTC-7, Tom Breloff wrote: > > Lets close the topic. Keep them both. > > On Thu, Oct 29, 2015 at 8:47 AM, feza > > wrote: > >> My only problem with `=` vs `in` >> is that even the base julia code is inconsistent! Looking at one file ( I >> can't rem

[julia-users] Re: installing julia via cygwin

2015-11-01 Thread Seth
It sounds like you don't have '.' in your path. In cygwin, in your bin directory, type ./julia and see if that works. On Sunday, November 1, 2015 at 3:31:42 PM UTC-8, digxx wrote: > > Thank you. After hours of compilation it finally finished without errors. > Now I have the Julia.exe file in my

[julia-users] Properties of IntSet?

2015-11-05 Thread Seth
Could someone please clue me in on IntSet? 1) Does the fact that it's implemented as a bitstring mean that it's a dense vector that takes n bits to store values from 1:n? 2) Does this also mean that search and insertion is O(1)? 3) What are common use cases for IntSets? 4) Anything else that's in

[julia-users] Re: Julia Hands-on: Introductory Tutorial for Distributed Computing

2015-11-06 Thread Seth
André, Would you mind posting a link to the notebooks? (Also, if there's any possibility of an English translation for your presentation, that'd be amazing.) Thanks, S. On Friday, November 6, 2015 at 3:07:47 AM UTC-8, André Lage wrote: > > Hello, > > I'll be giving the tutorial "Introduction

[julia-users] Re: "using Gadfly" (using a package) only if needed

2015-11-06 Thread Seth
The way we do it in LightGraphs is as follows: try using GraphMatrices import GraphMatrices.CombinatorialAdjacency nothing catch end and then if isdefined(:GraphMatrices) ... conditional code here end taking advantage of the fact that :Package is defined when "Package" is impo

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

2015-11-06 Thread Seth
For what it's worth, I'm getting julia> timeit(1000,1000) GFlop= 2.3913033081289967 GFlop (SIMD) = 2.2694726426420293 julia> versioninfo() Julia Version 0.4.1-pre+22 Commit 669222e* (2015-11-01 00:06 UTC) Platform Info: System: Darwin (x86_64-apple-darwin14.5.0) CPU: Intel(R) Core(TM

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

2015-11-06 Thread Seth
Hi Rob, I built it (and openblas) myself (via git clone) since I'm testing out Cxx.jl. Xcode is Version 7.1 (7B91b). Seth. On Friday, November 6, 2015 at 3:54:04 PM UTC-8, Rob J Goedman wrote: > > Seth, > > You must have built Julia 0.4.1-pre yourself. Did you use brew? >

Re: [julia-users] Re: The growth of Julia userbase

2015-11-09 Thread Seth
If I'm reading the graphs correctly, the underlying data is a year old. On Monday, November 9, 2015 at 3:10:41 PM UTC-8, Ken B wrote: > > Here's a nice comparison of languages used in github repo's and Julia is > #43 out of 50: > http://githut.info/ > > On Thursday, 5 November 2015 02:50:43 UTC+1

[julia-users] did something change already with arrays in 0.5?

2015-11-11 Thread Seth
LightGraphs started failing 0.5 tests, while -release is fine: https://travis-ci.org/JuliaGraphs/LightGraphs.jl/jobs/90631116 apparently foo[3,:] now returns [x,y,z] instead of [x y z]. 1) could someone confirm this new behavior? 2) what's the best way of handling this besides disabling tests on

[julia-users] Re: Google releases TensorFlow as open source

2015-11-11 Thread Seth
Awesome. Feel free to open up a LightGraphs issue to track. On Wednesday, November 11, 2015 at 2:24:13 PM UTC-8, Alireza Nejati wrote: > > Both! :)

[julia-users] Re: did something change already with arrays in 0.5?

2015-11-11 Thread Seth
2015 at 8:43:02 PM UTC-8, Tony Kelman wrote: > > Yes. https://github.com/JuliaLang/julia/pull/13612 > It's in NEWS.md. > > Make your code version-dependent if it can't handle the new behavior. > > > On Wednesday, November 11, 2015 at 8:19:32 PM UTC-8, Seth wrote:

[julia-users] Re: haskey for Set

2015-11-12 Thread Seth
in(el, S) or el in S. On Thursday, November 12, 2015 at 2:36:28 PM UTC-8, Freddy Chua wrote: > > haskey does not work for Set ? It only works for Dict. Should it be that > way? How do I test whether an element is in a Set? >

[julia-users] Re: Boost.Python-like CppWrapper package

2015-11-12 Thread Seth
Sorry for the naive question, but how is this different from Cxx.jl? (see https://github.com/Keno/Cxx.jl). On Thursday, November 12, 2015 at 2:48:26 PM UTC-8, Bart Janssens wrote: > > Hello, > > I've recently started using Julia, thanks to the great intro at the Julia > meetup in Gent two months

[julia-users] Re: did something change already with arrays in 0.5?

2015-11-12 Thread Seth
in Base? > > > On Wednesday, November 11, 2015 at 8:50:17 PM UTC-8, Seth wrote: >> >> Thanks, Tony. It's in tests, so I guess I can make it version-dependent. >> Is there a better way to do it? I had version conditionals throughout the >> code during the 0.3 - 0.4 cy

Re: [julia-users] Re: haskey for Set

2015-11-12 Thread Seth
nk you. > > Freddy Chua > > > On Thu, Nov 12, 2015 at 3:06 PM, Seth > wrote: > >> in(el, S) or el in S. >> >> >> On Thursday, November 12, 2015 at 2:36:28 PM UTC-8, Freddy Chua wrote: >>> >>> haskey does not work for Set ? It only wor

Re: [julia-users] macro to exclude code depending on VERSION

2015-11-12 Thread Seth
This could be useful to me :) I have a couple of functions that require JuMP but I don't want to add JuMP to my REQUIRE file. My usual tactic of checking isdefined(:JuMP) won't work because JuMP uses macros that are evaluated prior to runtime. However, I was unable to make the following code wo

Re: [julia-users] macro to exclude code depending on VERSION

2015-11-12 Thread Seth
...and I just discovered Requires.jl. Fantastic stuff. On Thursday, November 12, 2015 at 8:55:23 PM UTC-8, Seth wrote: > > This could be useful to me :) > > I have a couple of functions that require JuMP but I don't want to add > JuMP to my REQUIRE file. My usual tactic o

[julia-users] General question on indexing

2015-11-13 Thread Seth
Is it always expected that foo[i] == collect(foo)[i]? I'm running into a bit of an issue with undirected graphs where this may not be the case for collections of graph edges, and I'm wondering how much time I should sink into fixing a problem that might not even exist. The discrepancy is with a

Re: [julia-users] Re: General question on indexing

2015-11-15 Thread Seth
Thank you, Tim - I'll definitely check it out. Right now I can't seem to find an efficient way of doing it, but there are a few tricks in Iterators.jl that might work. On Sunday, November 15, 2015 at 1:33:29 PM UTC-8, Tim Holy wrote: > > This may also be a case where writing an iterator that jus

[julia-users] Re: push! performance

2015-11-15 Thread Seth
What happens if you use sizehint!() with dynamic()? On Sunday, November 15, 2015 at 3:35:45 PM UTC-8, Steven G. Johnson wrote: > > function prealloc(n) > a = Array(Int, n) > for i = 1:n > a[i] = i > end > return a > end > function dynamic(n) > a = Int[] > for i = 1:

<    1   2   3   4   >