Re: [julia-users] Type Expr Construction

2014-08-07 Thread Ivar Nesje
dump() also have a second parameter `depth`, that can be increased if you want the full dump. kl. 07:30:51 UTC+2 torsdag 7. august 2014 skrev Tony Fong følgende: Thanks for the report. Glad it helps. On Thursday, August 7, 2014 1:03:28 AM UTC-4, Steve Kelly wrote: Guys, thanks for the

Re: [julia-users] Re: polygonal patches with interpolated colourings

2014-08-07 Thread Andreas Lobinger
Keno: How do you paint the triangles? As bitmap, or via mesh pattern http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-mesh? On Thursday, August 7, 2014 12:54:43 AM UTC+2, Keno Fischer wrote: I have some code that does this for a triangular mesh, using Cairo.jl

Re: [julia-users] Re: polygonal patches with interpolated colourings

2014-08-07 Thread Keno Fischer
I was using bitmaps, but the mesh pattern looks interesting. I'll have to take a look. On Thu, Aug 7, 2014 at 3:07 AM, Andreas Lobinger lobing...@gmail.com wrote: Keno: How do you paint the triangles? As bitmap, or via mesh pattern

[julia-users] Re: polygonal patches with interpolated colourings

2014-08-07 Thread Andrea Vigliotti
Hi Simon, thanks that would be very helpful! I would like to start digging into the graphics library and it would be great to see how code is put together, function called etc... the matlab patch command is called like this: patch(X,Y,C) - where X, Y, and C are arrays with the x-coord, the

Re: [julia-users] Re: polygonal patches with interpolated colourings

2014-08-07 Thread Andrea Vigliotti
Hi Keno, thanks for the message, it would great to take a look at your code, I would like to become a little more familiar with the graphics library, thanks andrea On Wednesday, 6 August 2014 23:54:43 UTC+1, Keno Fischer wrote: I have some code that does this for a triangular mesh, using

Re: [julia-users] Re: polygonal patches with interpolated colourings

2014-08-07 Thread Andreas Lobinger
Hello colleague, On Thursday, August 7, 2014 9:10:14 AM UTC+2, Keno Fischer wrote: I was using bitmaps, but the mesh pattern looks interesting. I'll have to take a look. I patched a local version of Cairo.jl for the mesh patterns, but did not contribute (PR) because this fixes the

[julia-users] Re: question about array comparison

2014-08-07 Thread Gunnar Farnebäck
Is this easy enough? julia x = reshape(1:16, 4, 4) 4x4 Array{Int64,2}: 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16 julia a = x[1,:] 1x4 Array{Int64,2}: 1 5 9 13 julia [a == x[k,:] for k = 1:size(x,1)] 4-element Array{Any,1}: true false false false julia any([a == x[k,:]

Re: [julia-users] how can i get and print the file name and the code line where it is printed?

2014-08-07 Thread mamamaxxx19
This is great, just what i am looking for. But when i try to use it, it says ERROR: @showln not defined i use the newest julia version, i tryed different types of importing this macro... any idea? thanks -Matthias

Re: [julia-users] how can i get and print the file name and the code line where it is printed?

2014-08-07 Thread Ivar Nesje
The @showln macro was not merged because Tim closed it because nobody commented positively for a week. We try to limit the number of exports in Julia Base, and we try to not have too many related concepts to do almost the same thing. I don't have a strong opinion on this, but Stefan's

Re: [julia-users] how can i get and print the file name and the code line where it is printed?

2014-08-07 Thread Ivar Nesje
A problem with @showln is that it is visually confusing with @showIn (with a capital i instead of a lowercase L). kl. 11:50:25 UTC+2 torsdag 7. august 2014 skrev Ivar Nesje følgende: The @showln macro was not merged because Tim closed it because nobody commented positively for a week. We try

[julia-users] 0.3 RC2 released - website not yet updated

2014-08-07 Thread Uwe Fechner
Hello, on the download web page (http://julialang.org/downloads/) there is still RC1 announced, but if you click on any of the download links you get the 0.3 RC2 version. Perhaps the web site should be updated. Best regards and thanks for the good work! Uwe

Re: [julia-users] Type Expr Construction

2014-08-07 Thread Toivo Henningsson
Or you can use Base.Meta.show_sexpr to show the representation of an AST more succinctly.

Re: [julia-users] how can i get and print the file name and the code line where it is printed?

2014-08-07 Thread mamamaxxx19
Thank you, this works for me

[julia-users] Re: needless loss of performance: immutable conflates two concepts

2014-08-07 Thread Jason Riedy
And Stephen Vavasis writes: You say that probably no improvement would be possible if 'fast' updating were available for immutable in my code. In this case, why is there such a huge difference between fast and slow updating for the non-immutable case? Is there some optimization available in

[julia-users] Re: Ordinary least squares regression

2014-08-07 Thread Jason Solack
This is great! Thank you very much for the reply!! On Wednesday, August 6, 2014 11:34:54 PM UTC-4, Taylor Maxwell wrote: I haven't seen code to do it yet but it is very simple to calculate with a LinearModel from GLM Below is some code to calculate r-squared or adjusted r-squared from a

[julia-users] Re: Ordinary least squares regression

2014-08-07 Thread Simon Kornblith
This doesn't seem quite right: assuming the model has an intercept, SStot is traditionally the sum of squares of the intercept only model (i.e., sumabs2(y - mean(y)). You can see this if you add a constant to the first column of dd, which should not change R^2 but instead results in an

[julia-users] Re: Ordinary least squares regression

2014-08-07 Thread Taylor Maxwell
Sorry, I threw it up quickly, I should have spent more time making sure it was correct. On Thursday, August 7, 2014 8:17:22 AM UTC-6, Simon Kornblith wrote:

[julia-users] in(x::Any,y::Any) -- why?

2014-08-07 Thread vavasis
I've noticed that the 'in' function appears to accept any pair of arguments; it returns 'false' in the case that the arguments make no sense. I suppose that some file has defined in(x::Any,y::Any) to be false. Why is this so? This definition appears to impede debugging because, for example,

Re: [julia-users] in(x::Any,y::Any) -- why?

2014-08-07 Thread Stefan Karpinski
These are the methods of in: julia methods(in) # 14 methods for generic function in: in{T:Integer}(x,r::Range{T:Integer}) at range.jl:566 in(x,r::Range{T}) at range.jl:562 in(x::Number,y::Number) at number.jl:40 in(n::Integer,s::IntSet) at intset.jl:125 in(p::(Any,Any),a::Associative{K,V}) at

[julia-users] Re: in(x::Any,y::Any) -- why?

2014-08-07 Thread vavasis
Stefan, Here are some meaningless examples of in(.,.) that do not give an error message: julia VERSION v0.3.0-rc2+12 julia x = IntSet([3,5]) IntSet([3, 5]) julia in(3,x) true julia in(x,3) false julia in(abc,19) false julia in(19,abc) false -- Steve On Thursday, August 7, 2014

Re: [julia-users] Re: question about array comparison

2014-08-07 Thread K Leo
Thanks to both for the responses. Related questions: how does one turn a 2-dimensional array into a 1-dimensional array of row arrays? Also, the default behavior of julia is that a row of a 2-dimensional array is also a 2-dimensional array. Would anyone comment why this is the case? Should

Re: [julia-users] Re: in(x::Any,y::Any) -- why?

2014-08-07 Thread Stefan Karpinski
So the trouble here is a) we don't have an abstract type for collections, and b) numbers and strings are both iterable. So all of these end up working, just not how you'd expect. If you iterate 19, it yields itself once, which is not equal to abc. If you iterate abc, you get 'a' then 'b' then 'c',

Re: [julia-users] Re: in(x::Any,y::Any) -- why?

2014-08-07 Thread Stefan Karpinski
I opened an issue to discuss how to improve this: https://github.com/JuliaLang/julia/issues/7903 On Thu, Aug 7, 2014 at 7:33 PM, Stefan Karpinski ste...@karpinski.org wrote: So the trouble here is a) we don't have an abstract type for collections, and b) numbers and strings are both

[julia-users] DataFrame redtable - no method readtable!

2014-08-07 Thread Philip Pedruco
Hi All, I'm quite new to Julia and I've been trying to work with the DataFrame package and I've come up against an issue with readtable when I try to import a txt or csv file. It's exactly the same issue as the issue reported here https://github.com/JuliaStats/DataFrames.jl/issues/356, that

Re: [julia-users] Best way to generate random variables from the same family with different parameters?

2014-08-07 Thread Omar David Perez
Johan's approach is actually very elegant (and pythonic). On Monday, 13 January 2014 23:00:25 UTC, John Myles White wrote: FWIW, I really like Johan's approach. For me, the main difficulty with emulating R's interface is that the current version of `rand` is a method that takes exactly one

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

2014-08-07 Thread Tim Holy
Now, it looks like you're doing it right. I expected this, see https://github.com/timholy/Grid.jl/pull/38. This is part of what I meant by refactoring :). However, for image interpolation even further savings beyond that pull request are possible: for example, you only need one call to floor

Re: [julia-users] DataFrame redtable - no method readtable!

2014-08-07 Thread Isaiah Norton
Please try upgrading to 0.3(rc) to get the latest changes. DataFrames itself claims to support 0.2, but perhaps some dependency does not, so 0.4.3 might be the last resolvable version... There are many improvements in 0.3 and it has been actively used by a large number of people for months now, so

Re: [julia-users] Strange LLVM error

2014-08-07 Thread Keno Fischer
Hi Wally, I ran your code for a couple of hours today, but it never crashed for me. Can you tell me what I should do to reproduce? On Thu, Aug 7, 2014 at 3:03 PM, yaoismyh...@gmail.com wrote: Edit: I got rid of the collect function in the code, and while very slow, the code does what I

Re: [julia-users] DataFrame redtable - no method readtable!

2014-08-07 Thread Philip Pedruco
Hi Isaiah, Using 0.3 worked like a charm and thanks for the prompt reply! Cheers Phil