Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Mauro
Also at the Julia REPL:

julia> apropos("standard deviation")
randn!
stdm
std
randn

help?> std
search: std stdm STDIN STDOUT STDERR setdiff setdiff! hist2d hist2d! stride 
strides StridedArray StridedVector StridedMatrix StridedVecOrMat redirect_stdin

  std(v[, region])

  Compute the sample standard deviation of a vector or array v, optionally 
along dimensions in region. The algorithm returns an estimator of the generative
  distribution's standard deviation under the assumption that each entry of 
v is an IID drawn from that generative distribution. This computation is 
equivalent to
  calculating sqrt(sum((v - mean(v)).^2) / (length(v) - 1)). Note: Julia 
does not ignore NaN values in the computation. For applications requiring the 
handling of
  missing data, the DataArray package is recommended.

Having said this, documentation always needs improvements and is
certainly not on Matlab's level of completeness.  Please contribute
where you find it lacking.  See
https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation


On Fri, 2016-02-12 at 09:18, NotSoRecentConvert  wrote:
> You can even download the entire thing as a PDF, HTML, or EPUB if you want
> to highlight, annotate, or bookmark your most searched functions. Look in
> the lower right of the page for "v: latest" and click it for more options.
>
> On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah Tomak wrote:
>>
>> There is this one
>>
>> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.std
>>
>> Instead of google, I use this manual for search.
>>
>>


[julia-users] Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Patrick Kofod Mogensen
Is it possible to create a colormap as described in the title using 
Colors.jl? I couldn't seem to find anything on Colormaps and 
transparency/opacity.

Best,
Patrick


Re: [julia-users] Autoformatting for Julia?

2016-02-12 Thread Tony Kelman
Would maybe be better to start a new thread asking about this rather than 
adding to an old one.

But anyway, no there is not currently anyone working on a standalone Julia 
formatter as far as I know. The IDE's under development as Eclipse and Atom 
plugins are working on their own formatters, but they are somewhat specific 
to the IDE environment that they're written for. It would be great to have 
something command-line or a Julia package that looked into this, and could 
be used like clang-format or yapf.


On Thursday, February 11, 2016 at 8:58:33 PM UTC-8, Maxim Grechkin wrote:
>
> Was there any progress on this lately? I've noticed that atom-beautify 
> plugin doesn't have Julia support(
> https://github.com/Glavin001/atom-beautify/issues/799), but there doesn't 
> seem to be a tool that it can hook into.
>
> On Saturday, January 11, 2014 at 9:22:14 AM UTC-8, Stefan Karpinski wrote:
>>
>> Kind of. I don't think that expression printing is even remotely good 
>> enough for this yet, but that's the basic idea that makes the most sense to 
>> me. No point in using separate parse or print code when there's already 
>> functions that do this stuff.
>>
>>
>> On Sat, Jan 11, 2014 at 12:06 PM, Job van der Zwan  
>> wrote:
>>
>>> So you are saying that the most of the tooling required for an 
>>> auto-formatting tool is already there?
>>>
>>> On Thursday, 9 January 2014 14:42:40 UTC+1, Stefan Karpinski wrote:

 I would be into having an auto-formatting tool. The way to do this 
 would be to work on the printing of ASTs until the way the code prints is 
 the standard way it should be formatted. Then you have an auto-formatter: 
 parse the code and print the resulting AST. One missing thing is that 
 parser currently discards comments.


 On Thu, Jan 9, 2014 at 6:48 AM, Job van der Zwan  
 wrote:

> The problem I see with that is that you can wait for a *very* long 
> time before any consensus emerges. There are simply many choices to be 
> made 
> in that regard which at the end of the day are kind of arbitrary - that 
> *a* choice is made and consistently followed is more important, and 
> again the benefit of autoformatting is that you don't have to waste 
> putting 
> effort into doing so.
>
> Having something something concrete to respond to also helps with the 
> discussion - an autoformatting tool will impose a certain style, which 
> will 
> drive the discussion of standardising proper style. If people disagree 
> with 
> the formatting it provides, great! That means a discussion is triggered.
>
> So instead of waiting for a consensus to emerge, I think that building 
> an autoformatting tool with a "good enough first guess" in terms of style 
> would be the place to start. Even if it starts out with terrible style 
> choices otherwise.
>
> (is this worth starting a separate discussion on the topic?)
>
>
> On Thursday, 9 January 2014 03:18:05 UTC+1, John Myles White wrote:
>
>> There is not yet, because there is still not a consensus on proper 
>> style. Hopefully once we have that, it will be easier to make a julia 
>> fmt 
>> tool. 
>>
>>  — John 
>>
>> On Jan 8, 2014, at 6:09 PM, Job van der Zwan  
>> wrote: 
>>
>> > Depends on what you mean with legibility. 
>> > 
>> > For example (and not at all related to x.f(y) vs f(x, y)), if I 
>> look at my experience with the Go programming language, once you get 
>> used 
>> to its imposed One True Way of formatting it really makes reading other 
>> people's source code a lot easier. And talking about spending energy on 
>> the 
>> subject of legibility: setting up my editor to use go-fmt (the 
>> autoformatting tool) when building/saving code means I don't have to 
>> spend 
>> any time thinking about it when writing my own code either; it will 
>> automatically get fixed. 
>> > 
>> > It's one of those things the Go developers are very enthusiastic 
>> about, and at first you go "really? That's a killer feature?" but after 
>> using it you do start to miss it in other languages. 
>> > 
>> > Speaking of which, is there an autoformatting tool for Julia? 
>>
>

>>

[julia-users] Re: depsy.org

2016-02-12 Thread Jeffrey Sarnoff
Depsy responded.  This service currently covers the 11,223 Python and R 
research software packages available on PyPi and CRAN
They are open to including Julia. To allocate their scarce resources, they 
need to hear from many members of the Julia community:

  Thanks for getting in touch! Very sorry for the delay in getting back to 
you, the post-release madness around Depsy caused us to miss some emails it 
looks like.
  Yes Julia absolutely fits our mission! We're looking to expand to other 
languages, and feedback from the community will be the main way we 
prioritize.
  So, your email counts as a +1 vote for Julia.

Look at http://depsy.org/ to see how indexing the Julia package ecosystem 
software, authorship and papers can be good for the professional you.
Email should be brief, addressed to Jason Priem  and 
cc Heather Piwowar .

( *Stefan, perhaps repost the meaning as a compelling new topic so that 
more people know and may email. *)



On Thursday, January 7, 2016 at 11:48:56 AM UTC-5, Jeffrey Sarnoff wrote:
>
> Andreas,
>
> I find this on-topic.  Depsy is built and run by Impactstory and funded by 
> the 
> National Science Foundation.  They give as a contact email 
> t...@impactstory.org.
> I sent a brief note as an interested third party (my tax dollars at work).
>
> Thanks,
>
> Jeffrey Sarnoff
>
> On Thursday, January 7, 2016 at 9:19:33 AM UTC-5, Andreas Lobinger wrote:
>>
>> Hello colleagues,
>>
>> maybe offtopic, maybe not. This crossed my desk two times the last days: 
>> depsy.org, a project to show researchers impact on scientific software. 
>> Currently they do R and python only, and it's my strong believe they need 
>> to be informed to pick up julia along that.
>>
>> Wishing a happy day,
>> Andreas
>>
>>
>>

[julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread NotSoRecentConvert
You can even download the entire thing as a PDF, HTML, or EPUB if you want 
to highlight, annotate, or bookmark your most searched functions. Look in 
the lower right of the page for "v: latest" and click it for more options.

On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah Tomak wrote:
>
> There is this one
>
> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.std
>
> Instead of google, I use this manual for search. 
>
>

Re: [julia-users] Autoformatting for Julia?

2016-02-12 Thread Cristóvão Duarte Sousa
I don't know if it has been said here before, sorry if I'm repeating, but:
a way to represent the "concrete" syntax tree, convert it to AST and then 
back would be of great use here, 
see https://github.com/JuliaLang/JuliaParser.jl/issues/22 .

I actually thought a lot about that, and imagine that the `Expr` type could 
have an extra field to hold syntax delimiters (punctuation and whitespace) 
which is found around and between its arguments.
But a great knowledge of the parsers, both Flisp and Julia written ones, 
would be required.
Then I also wondered that maybe one formal, but incomplete, grammar could 
be useful to construct such tree, as in intermediate step between source 
code and real AST.

That would allow the creation of very powerful autoformatting tools, along 
with lints, refactoring and other advanced IDE functionalities.

On Friday, February 12, 2016 at 4:58:33 AM UTC, Maxim Grechkin wrote:
>
> Was there any progress on this lately? I've noticed that atom-beautify 
> plugin doesn't have Julia support(
> https://github.com/Glavin001/atom-beautify/issues/799), but there doesn't 
> seem to be a tool that it can hook into.
>
> On Saturday, January 11, 2014 at 9:22:14 AM UTC-8, Stefan Karpinski wrote:
>>
>> Kind of. I don't think that expression printing is even remotely good 
>> enough for this yet, but that's the basic idea that makes the most sense to 
>> me. No point in using separate parse or print code when there's already 
>> functions that do this stuff.
>>
>>
>> On Sat, Jan 11, 2014 at 12:06 PM, Job van der Zwan  
>> wrote:
>>
>>> So you are saying that the most of the tooling required for an 
>>> auto-formatting tool is already there?
>>>
>>> On Thursday, 9 January 2014 14:42:40 UTC+1, Stefan Karpinski wrote:

 I would be into having an auto-formatting tool. The way to do this 
 would be to work on the printing of ASTs until the way the code prints is 
 the standard way it should be formatted. Then you have an auto-formatter: 
 parse the code and print the resulting AST. One missing thing is that 
 parser currently discards comments.


 On Thu, Jan 9, 2014 at 6:48 AM, Job van der Zwan  
 wrote:

> The problem I see with that is that you can wait for a *very* long 
> time before any consensus emerges. There are simply many choices to be 
> made 
> in that regard which at the end of the day are kind of arbitrary - that 
> *a* choice is made and consistently followed is more important, and 
> again the benefit of autoformatting is that you don't have to waste 
> putting 
> effort into doing so.
>
> Having something something concrete to respond to also helps with the 
> discussion - an autoformatting tool will impose a certain style, which 
> will 
> drive the discussion of standardising proper style. If people disagree 
> with 
> the formatting it provides, great! That means a discussion is triggered.
>
> So instead of waiting for a consensus to emerge, I think that building 
> an autoformatting tool with a "good enough first guess" in terms of style 
> would be the place to start. Even if it starts out with terrible style 
> choices otherwise.
>
> (is this worth starting a separate discussion on the topic?)
>
>
> On Thursday, 9 January 2014 03:18:05 UTC+1, John Myles White wrote:
>
>> There is not yet, because there is still not a consensus on proper 
>> style. Hopefully once we have that, it will be easier to make a julia 
>> fmt 
>> tool. 
>>
>>  — John 
>>
>> On Jan 8, 2014, at 6:09 PM, Job van der Zwan  
>> wrote: 
>>
>> > Depends on what you mean with legibility. 
>> > 
>> > For example (and not at all related to x.f(y) vs f(x, y)), if I 
>> look at my experience with the Go programming language, once you get 
>> used 
>> to its imposed One True Way of formatting it really makes reading other 
>> people's source code a lot easier. And talking about spending energy on 
>> the 
>> subject of legibility: setting up my editor to use go-fmt (the 
>> autoformatting tool) when building/saving code means I don't have to 
>> spend 
>> any time thinking about it when writing my own code either; it will 
>> automatically get fixed. 
>> > 
>> > It's one of those things the Go developers are very enthusiastic 
>> about, and at first you go "really? That's a killer feature?" but after 
>> using it you do start to miss it in other languages. 
>> > 
>> > Speaking of which, is there an autoformatting tool for Julia? 
>>
>

>>

[julia-users] Compilation of Julia on cluster - getting some error

2016-02-12 Thread Ben Ward
Hi Julia community!

I've got Julia compiled successfully on my workstation without issue, but 
I'm trying to do it now in my cluster environment at work, which I believe 
is RedHat or some similar linux.

I have permissions to install and compile software in a given directory. 
However during compilation I get some errors to do with OpenBLAS I've not 
seen before when compiling on my workstation:

../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such instruction
: `vpermpd $ 0x1b,%ymm2,%ymm2'
../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such 
instruction: `vpermpd $ 0x1b,%ymm3,%ymm3'
../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such 
instruction: `vpermpd $ 0xb1,%ymm2,%ymm2'
../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such instruction
: `vpermpd $ 0xb1,%ymm3,%ymm3'
make[3]: *** [dgemm_kernel_HASWELL.o] Error 1
make[3]: *** Waiting for unfinished jobs
make[2]: *** [libs] Error 1
\033[33;1m*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. 
Rebuild with 'make OPENBLAS_USE_THREAD=0' if OpenBLAS had trouble linking 
libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were 
errors building SandyBridge support. Both these options can also be used 
simultaneously. ***\033[0m
make[1]: *** [build/openblas/libopenblas64_.so] Error 1
make: *** [julia-deps] Error 2


I've tried make -C deps clean-openblas but I still get the error appear, 
and I don't know if what I'm seeing is OpenBLAS having trouble linking with 
libpthread.so, or if it's an error building sandybridge support - or if 
it's an issue that's neither of those two and something else entirely.
Any advice is greatly appreciated.

Many Thanks,
Ben.


Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Michele Zaffalon
But the original point is still valid: using the search box in the official
documentation page http://docs.julialang.org/en/release-0.4, searching for
"standard deviation" does not bring up any useful hit, despite the fact
that Base.std is fairly well documented and contains the words standard
deviation.
Is there a reason why it should work at the REPL but not in the webpage?


On Fri, Feb 12, 2016 at 9:25 AM, Mauro  wrote:

> Also at the Julia REPL:
>
> julia> apropos("standard deviation")
> randn!
> stdm
> std
> randn
>
> help?> std
> search: std stdm STDIN STDOUT STDERR setdiff setdiff! hist2d hist2d!
> stride strides StridedArray StridedVector StridedMatrix StridedVecOrMat
> redirect_stdin
>
>   std(v[, region])
>
>   Compute the sample standard deviation of a vector or array v,
> optionally along dimensions in region. The algorithm returns an estimator
> of the generative
>   distribution's standard deviation under the assumption that each
> entry of v is an IID drawn from that generative distribution. This
> computation is equivalent to
>   calculating sqrt(sum((v - mean(v)).^2) / (length(v) - 1)). Note:
> Julia does not ignore NaN values in the computation. For applications
> requiring the handling of
>   missing data, the DataArray package is recommended.
>
> Having said this, documentation always needs improvements and is
> certainly not on Matlab's level of completeness.  Please contribute
> where you find it lacking.  See
>
> https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation
>
>
> On Fri, 2016-02-12 at 09:18, NotSoRecentConvert  wrote:
> > You can even download the entire thing as a PDF, HTML, or EPUB if you
> want
> > to highlight, annotate, or bookmark your most searched functions. Look in
> > the lower right of the page for "v: latest" and click it for more
> options.
> >
> > On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah Tomak wrote:
> >>
> >> There is this one
> >>
> >> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.std
> >>
> >> Instead of google, I use this manual for search.
> >>
> >>
>


[julia-users] Re: Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Andreas Lobinger
In the discussions about ColorTypes it showed up, that the majority 
prefered color independent of opacity. I'd guess you need to get the 
colormap via Colors.jl and then add the opacity information (created by 
linscale etc.). But i'm not sure that applying a color defined as 
color+transparency (RGBA etc.) is clearly defined in all cases. At least in 
plotting/rendering using RGB is prevalent.

On Friday, February 12, 2016 at 10:48:06 AM UTC+1, Patrick Kofod Mogensen 
wrote:
>
> Is it possible to create a colormap as described in the title using 
> Colors.jl? I couldn't seem to find anything on Colormaps and 
> transparency/opacity.
>
> Best,
> Patrick
>


[julia-users] Re: Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Peter Kovesi
I have recently added a package for generating a variety of perceptually 
uniform colour maps which may be of interest to you
https://github.com/peterkovesi/PerceptualColourMaps.jl
However I do not consider transparency

Cheers
Peter

On Friday, February 12, 2016 at 5:48:06 PM UTC+8, Patrick Kofod Mogensen 
wrote:
>
> Is it possible to create a colormap as described in the title using 
> Colors.jl? I couldn't seem to find anything on Colormaps and 
> transparency/opacity.
>
> Best,
> Patrick
>


Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Lutfullah Tomak
Sorry deleted that post because that wasn't I used.

Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Milan Bouchet-Valat
Le vendredi 12 février 2016 à 09:51 +0100, Michele Zaffalon a écrit :
> But the original point is still valid: using the search box in the
> official documentation page http://docs.julialang.org/en/release-0.4,
> searching for "standard deviation" does not bring up any useful hit,
> despite the fact that Base.std is fairly well documented and contains
> the words standard deviation.
> Is there a reason why it should work at the REPL but not in the
> webpage?
Searching for "deviation" works, so it's quite mysterious that
"standard deviation" doesn't... Looks like a bug in the Sphinx search
engine.

Google's behavior is really weird too. Even a query like "standard
deviation julia site:docs.julialang.org" gives the manual page home for
the standard library first (even if it doesn't contain "deviation"), as
well as pages mentioning "standard error". Maybe some pages are not
indexed at all? Could something be tweaked in the Sphinx configuration?


Regards

> 
> On Fri, Feb 12, 2016 at 9:25 AM, Mauro  wrote:
> > Also at the Julia REPL:
> > 
> >     julia> apropos("standard deviation")
> >     randn!
> >     stdm
> >     std
> >     randn
> > 
> >     help?> std
> >     search: std stdm STDIN STDOUT STDERR setdiff setdiff! hist2d
> > hist2d! stride strides StridedArray StridedVector StridedMatrix
> > StridedVecOrMat redirect_stdin
> > 
> >       std(v[, region])
> > 
> >       Compute the sample standard deviation of a vector or array v,
> > optionally along dimensions in region. The algorithm returns an
> > estimator of the generative
> >       distribution's standard deviation under the assumption that
> > each entry of v is an IID drawn from that generative distribution.
> > This computation is equivalent to
> >       calculating sqrt(sum((v - mean(v)).^2) / (length(v) - 1)).
> > Note: Julia does not ignore NaN values in the computation. For
> > applications requiring the handling of
> >       missing data, the DataArray package is recommended.
> > 
> > Having said this, documentation always needs improvements and is
> > certainly not on Matlab's level of completeness.  Please contribute
> > where you find it lacking.  See
> > https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#impr
> > oving-documentation
> > 
> > 
> > On Fri, 2016-02-12 at 09:18, NotSoRecentConvert 
> > wrote:
> > > You can even download the entire thing as a PDF, HTML, or EPUB if
> > you want
> > > to highlight, annotate, or bookmark your most searched functions.
> > Look in
> > > the lower right of the page for "v: latest" and click it for more
> > options.
> > >
> > > On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah Tomak
> > wrote:
> > >>
> > >> There is this one
> > >>
> > >> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.std
> > >>
> > >> Instead of google, I use this manual for search.
> > >>
> > >>
> > 


Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Milan Bouchet-Valat
Le vendredi 12 février 2016 à 04:16 -0800, J Luis a écrit :
> One main 'dislike' I find in the documentation is that, contrary to
> Matlab and R examples that have one page for each function, in julia
> we have lots of functions per page with short and often cryptic
> descriptions. Example
> 
> std(v[, region])
> Compute the sample standard deviation of a vector or array v,
> optionally along dimensions in region.
> 
> To have longer and, VERY IMPORTANT, usage examples one need a per
> function page manual.
It's not that common for several Julia functions to be documented on
the same page. Actually, it's probably less common than in R (have a
look at ?grep or ?read.table). But indeed the docs could be expanded in
some cases. If you make pull requests adding examples (more precisely
doctests that are run and checked when building Julia), I'm sure they
will be welcome.


Regards

> sexta-feira, 12 de Fevereiro de 2016 às 11:10:54 UTC, Milan Bouchet-
> Valat escreveu:
> > Le vendredi 12 février 2016 à 09:51 +0100, Michele Zaffalon a
> > écrit : 
> > > But the original point is still valid: using the search box in
> > the 
> > > official documentation page http://docs.julialang.org/en/release-
> > 0.4, 
> > > searching for "standard deviation" does not bring up any useful
> > hit, 
> > > despite the fact that Base.std is fairly well documented and
> > contains 
> > > the words standard deviation. 
> > > Is there a reason why it should work at the REPL but not in the 
> > > webpage? 
> > Searching for "deviation" works, so it's quite mysterious that 
> > "standard deviation" doesn't... Looks like a bug in the Sphinx
> > search 
> > engine. 
> > 
> > Google's behavior is really weird too. Even a query like "standard 
> > deviation julia site:docs.julialang.org" gives the manual page home
> > for 
> > the standard library first (even if it doesn't contain
> > "deviation"), as 
> > well as pages mentioning "standard error". Maybe some pages are
> > not 
> > indexed at all? Could something be tweaked in the Sphinx
> > configuration? 
> > 
> > 
> > Regards 
> > 
> > > 
> > > On Fri, Feb 12, 2016 at 9:25 AM, Mauro 
> > wrote: 
> > > > Also at the Julia REPL: 
> > > > 
> > > >     julia> apropos("standard deviation") 
> > > >     randn! 
> > > >     stdm 
> > > >     std 
> > > >     randn 
> > > > 
> > > >     help?> std 
> > > >     search: std stdm STDIN STDOUT STDERR setdiff setdiff!
> > hist2d 
> > > > hist2d! stride strides StridedArray StridedVector
> > StridedMatrix 
> > > > StridedVecOrMat redirect_stdin 
> > > > 
> > > >       std(v[, region]) 
> > > > 
> > > >       Compute the sample standard deviation of a vector or
> > array v, 
> > > > optionally along dimensions in region. The algorithm returns
> > an 
> > > > estimator of the generative 
> > > >       distribution's standard deviation under the assumption
> > that 
> > > > each entry of v is an IID drawn from that generative
> > distribution. 
> > > > This computation is equivalent to 
> > > >       calculating sqrt(sum((v - mean(v)).^2) / (length(v) -
> > 1)). 
> > > > Note: Julia does not ignore NaN values in the computation. For 
> > > > applications requiring the handling of 
> > > >       missing data, the DataArray package is recommended. 
> > > > 
> > > > Having said this, documentation always needs improvements and
> > is 
> > > > certainly not on Matlab's level of completeness.  Please
> > contribute 
> > > > where you find it lacking.  See 
> > > > https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#
> > impr 
> > > > oving-documentation 
> > > > 
> > > > 
> > > > On Fri, 2016-02-12 at 09:18, NotSoRecentConvert  > om> 
> > > > wrote: 
> > > > > You can even download the entire thing as a PDF, HTML, or
> > EPUB if 
> > > > you want 
> > > > > to highlight, annotate, or bookmark your most searched
> > functions. 
> > > > Look in 
> > > > > the lower right of the page for "v: latest" and click it for
> > more 
> > > > options. 
> > > > > 
> > > > > On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah
> > Tomak 
> > > > wrote: 
> > > > >> 
> > > > >> There is this one 
> > > > >> 
> > > > >> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.s
> > td 
> > > > >> 
> > > > >> Instead of google, I use this manual for search. 
> > > > >> 
> > > > >> 
> > > > 


Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Michele Zaffalon
On mine, it points to the functions randn and randn!

On Fri, Feb 12, 2016 at 11:48 AM, Lutfullah Tomak 
wrote:

> For reference, it shows up in my search.
>
>
> http://docs.julialang.org/en/release-0.4/search/?q=standard+deviation_keywords=yes=default
>
> About google side, I think that MATLAB and R are used for years and thus
> results are indexed better for them.


[julia-users] Re: Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Patrick Kofod Mogensen
Actually, it came up in a plotting context 
https://github.com/tbreloff/Plots.jl/issues/138 . The use case is to 
overlay colors on a world map where blue means colder than average and red 
means warmer than average. Of course, if there is not much difference from 
the average, you don't want it to be white, you want it to be transparent, 
such that you can actually see the map. Thanks for pointing me towards the 
discussion in ColorTypes.jl

On Friday, February 12, 2016 at 11:19:28 AM UTC+1, Andreas Lobinger wrote:
>
> In the discussions about ColorTypes it showed up, that the majority 
> prefered color independent of opacity. I'd guess you need to get the 
> colormap via Colors.jl and then add the opacity information (created by 
> linscale etc.). But i'm not sure that applying a color defined as 
> color+transparency (RGBA etc.) is clearly defined in all cases. At least in 
> plotting/rendering using RGB is prevalent.
>
> On Friday, February 12, 2016 at 10:48:06 AM UTC+1, Patrick Kofod Mogensen 
> wrote:
>>
>> Is it possible to create a colormap as described in the title using 
>> Colors.jl? I couldn't seem to find anything on Colormaps and 
>> transparency/opacity.
>>
>> Best,
>> Patrick
>>
>

Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Lutfullah Tomak
For reference, I had used just 'deviation'.

http://docs.julialang.org/en/release-0.4/search/?q=deviation_keywords=yes=default#

Another instance of 'standard deviation' shows up in the search but this one 
when 'standard deviation' is searched. 

Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Michael Borregaard
Maybe a good time to repost this link: 
https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation
 


As I understand it, the julia documentation format is still an evolving 
entity. Google-searching in R works well because of the massive number of 
google searches / site visits to R pages. When I started using R, during my 
PhD in 2006, it was almost impossible to google R functions, and there were 
all kinds of (not very functional) search engines to bring up R results. 
Today everybody just googles it. I feel completely confident that julia 
will have the same development, and a lot faster.

Den fredag den 12. februar 2016 kl. 13.16.08 UTC+1 skrev J Luis:
>
> One main 'dislike' I find in the documentation is that, contrary to Matlab 
> and R examples that have one page for each function, in julia we have lots 
> of functions per page with short and often cryptic descriptions. Example
>
> std(*v*[, *region*])
>
> Compute the sample standard deviation of a vector or array v, optionally 
> along dimensions in region.
>
> To have longer and, VERY IMPORTANT, usage examples one need a per function 
> page manual.
>
> sexta-feira, 12 de Fevereiro de 2016 às 11:10:54 UTC, Milan Bouchet-Valat 
> escreveu:
>>
>> Le vendredi 12 février 2016 à 09:51 +0100, Michele Zaffalon a écrit : 
>> > But the original point is still valid: using the search box in the 
>> > official documentation page http://docs.julialang.org/en/release-0.4, 
>> > searching for "standard deviation" does not bring up any useful hit, 
>> > despite the fact that Base.std is fairly well documented and contains 
>> > the words standard deviation. 
>> > Is there a reason why it should work at the REPL but not in the 
>> > webpage? 
>> Searching for "deviation" works, so it's quite mysterious that 
>> "standard deviation" doesn't... Looks like a bug in the Sphinx search 
>> engine. 
>>
>> Google's behavior is really weird too. Even a query like "standard 
>> deviation julia site:docs.julialang.org" gives the manual page home for 
>> the standard library first (even if it doesn't contain "deviation"), as 
>> well as pages mentioning "standard error". Maybe some pages are not 
>> indexed at all? Could something be tweaked in the Sphinx configuration? 
>>
>>
>> Regards 
>>
>> > 
>> > On Fri, Feb 12, 2016 at 9:25 AM, Mauro  wrote: 
>> > > Also at the Julia REPL: 
>> > > 
>> > > julia> apropos("standard deviation") 
>> > > randn! 
>> > > stdm 
>> > > std 
>> > > randn 
>> > > 
>> > > help?> std 
>> > > search: std stdm STDIN STDOUT STDERR setdiff setdiff! hist2d 
>> > > hist2d! stride strides StridedArray StridedVector StridedMatrix 
>> > > StridedVecOrMat redirect_stdin 
>> > > 
>> > >   std(v[, region]) 
>> > > 
>> > >   Compute the sample standard deviation of a vector or array v, 
>> > > optionally along dimensions in region. The algorithm returns an 
>> > > estimator of the generative 
>> > >   distribution's standard deviation under the assumption that 
>> > > each entry of v is an IID drawn from that generative distribution. 
>> > > This computation is equivalent to 
>> > >   calculating sqrt(sum((v - mean(v)).^2) / (length(v) - 1)). 
>> > > Note: Julia does not ignore NaN values in the computation. For 
>> > > applications requiring the handling of 
>> > >   missing data, the DataArray package is recommended. 
>> > > 
>> > > Having said this, documentation always needs improvements and is 
>> > > certainly not on Matlab's level of completeness.  Please contribute 
>> > > where you find it lacking.  See 
>> > > https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#impr 
>> > > oving-documentation 
>> > > 
>> > > 
>> > > On Fri, 2016-02-12 at 09:18, NotSoRecentConvert  
>> > > wrote: 
>> > > > You can even download the entire thing as a PDF, HTML, or EPUB if 
>> > > you want 
>> > > > to highlight, annotate, or bookmark your most searched functions. 
>> > > Look in 
>> > > > the lower right of the page for "v: latest" and click it for more 
>> > > options. 
>> > > > 
>> > > > On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah Tomak 
>> > > wrote: 
>> > > >> 
>> > > >> There is this one 
>> > > >> 
>> > > >> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.std 
>> > > >> 
>> > > >> Instead of google, I use this manual for search. 
>> > > >> 
>> > > >> 
>> > > 
>>
>

[julia-users] Re: Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Andreas Lobinger
discussion was about ColorTypes but not in -> 
https://github.com/JuliaLang/Color.jl/issues/101



Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread J Luis
One main 'dislike' I find in the documentation is that, contrary to Matlab 
and R examples that have one page for each function, in julia we have lots 
of functions per page with short and often cryptic descriptions. Example

std(*v*[, *region*])

Compute the sample standard deviation of a vector or array v, optionally 
along dimensions in region.

To have longer and, VERY IMPORTANT, usage examples one need a per function 
page manual.

sexta-feira, 12 de Fevereiro de 2016 às 11:10:54 UTC, Milan Bouchet-Valat 
escreveu:
>
> Le vendredi 12 février 2016 à 09:51 +0100, Michele Zaffalon a écrit : 
> > But the original point is still valid: using the search box in the 
> > official documentation page http://docs.julialang.org/en/release-0.4, 
> > searching for "standard deviation" does not bring up any useful hit, 
> > despite the fact that Base.std is fairly well documented and contains 
> > the words standard deviation. 
> > Is there a reason why it should work at the REPL but not in the 
> > webpage? 
> Searching for "deviation" works, so it's quite mysterious that 
> "standard deviation" doesn't... Looks like a bug in the Sphinx search 
> engine. 
>
> Google's behavior is really weird too. Even a query like "standard 
> deviation julia site:docs.julialang.org" gives the manual page home for 
> the standard library first (even if it doesn't contain "deviation"), as 
> well as pages mentioning "standard error". Maybe some pages are not 
> indexed at all? Could something be tweaked in the Sphinx configuration? 
>
>
> Regards 
>
> > 
> > On Fri, Feb 12, 2016 at 9:25 AM, Mauro  
> wrote: 
> > > Also at the Julia REPL: 
> > > 
> > > julia> apropos("standard deviation") 
> > > randn! 
> > > stdm 
> > > std 
> > > randn 
> > > 
> > > help?> std 
> > > search: std stdm STDIN STDOUT STDERR setdiff setdiff! hist2d 
> > > hist2d! stride strides StridedArray StridedVector StridedMatrix 
> > > StridedVecOrMat redirect_stdin 
> > > 
> > >   std(v[, region]) 
> > > 
> > >   Compute the sample standard deviation of a vector or array v, 
> > > optionally along dimensions in region. The algorithm returns an 
> > > estimator of the generative 
> > >   distribution's standard deviation under the assumption that 
> > > each entry of v is an IID drawn from that generative distribution. 
> > > This computation is equivalent to 
> > >   calculating sqrt(sum((v - mean(v)).^2) / (length(v) - 1)). 
> > > Note: Julia does not ignore NaN values in the computation. For 
> > > applications requiring the handling of 
> > >   missing data, the DataArray package is recommended. 
> > > 
> > > Having said this, documentation always needs improvements and is 
> > > certainly not on Matlab's level of completeness.  Please contribute 
> > > where you find it lacking.  See 
> > > https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#impr 
> > > oving-documentation 
> > > 
> > > 
> > > On Fri, 2016-02-12 at 09:18, NotSoRecentConvert  > 
> > > wrote: 
> > > > You can even download the entire thing as a PDF, HTML, or EPUB if 
> > > you want 
> > > > to highlight, annotate, or bookmark your most searched functions. 
> > > Look in 
> > > > the lower right of the page for "v: latest" and click it for more 
> > > options. 
> > > > 
> > > > On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah Tomak 
> > > wrote: 
> > > >> 
> > > >> There is this one 
> > > >> 
> > > >> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.std 
> > > >> 
> > > >> Instead of google, I use this manual for search. 
> > > >> 
> > > >> 
> > > 
>


[julia-users] Re: Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Steven G. Johnson


On Friday, February 12, 2016 at 5:19:28 AM UTC-5, Andreas Lobinger wrote:
>
> In the discussions about ColorTypes it showed up, that the majority 
> prefered color independent of opacity. I'd guess you need to get the 
> colormap via Colors.jl and then add the opacity information (created by 
> linscale etc.). But i'm not sure that applying a color defined as 
> color+transparency (RGBA etc.) is clearly defined in all cases. At least in 
> plotting/rendering using RGB is prevalent.
>

Matplotlib (via PyPlot) allows you to define a colormap with an alpha 
channel.


Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Lutfullah Tomak
For reference, it shows up in my search.

http://docs.julialang.org/en/release-0.4/search/?q=standard+deviation_keywords=yes=default

About google side, I think that MATLAB and R are used for years and thus 
results are indexed better for them.

Re: [julia-users] Calling a macro to generate functions

2016-02-12 Thread Stefan Karpinski
At a higher level, you seem to be doing something that involves a lot of
metaprogramming. Can you say a little more about the higher level goal and
why it entails so much macrology?

On Thu, Feb 11, 2016 at 4:37 PM, Julia Tylors  wrote:

> Hi;
>
>
> I am having a problem of calling a macro with predetermined values from a
> Dictionary.
> How do i solve this problem?
>
> Thanks
>
>
> module X
> const cmds = Dict{Symbol,Symbol}(
> :L => :leech,   :R => :raise
> )
>
> macro fun_gen(fname,label)
> efname = esc(fname)
> elabel = esc(label)
> quote
> function $(efname)()
> $elabel
> end
> export $(efname)
> end
> end
>
> for kv in cmds
> @fun_gen kv[2] kv[1]
> end
> end
>
> but this doesn't work.
>
> because @fun_gen exactly takes them as kv[2] kv[1]
>
> How can i do this?
> and what is the exact problem here?
>
> Thanks
>


[julia-users] custom ctags for Julia

2016-02-12 Thread Christof Stocker

Hi!

Are there any VIM users here who have a nice 
[tagbar](https://github.com/majutsushi/tagbar) going?


For the tagbar to work properly one needs to have a Julia language 
definition for [ctags](http://ctags.sourceforge.net/). I have found one 
[here](https://github.com/JuliaLang/julia/blob/master/contrib/ctags) 
that nicely lists all the functions, which is great, but I wonder if 
anyone has already put in the additional effort and created a custom one 
that also lists types, and macros etc. Would be much appreciated.


Re: [julia-users] Autoformatting for Julia?

2016-02-12 Thread Erik Schnetter
On Fri, Feb 12, 2016 at 5:17 AM, Cristóvão Duarte Sousa
 wrote:
> I don't know if it has been said here before, sorry if I'm repeating, but:
> a way to represent the "concrete" syntax tree, convert it to AST and then
> back would be of great use here, see
> https://github.com/JuliaLang/JuliaParser.jl/issues/22 .
>
> I actually thought a lot about that, and imagine that the `Expr` type could
> have an extra field to hold syntax delimiters (punctuation and whitespace)
> which is found around and between its arguments.

Adding to the `Expr` type is expensive, since it's used a lot.
Instead, you can add extra `Expr` objects, e.g. `Expr(:empty_line)`,
or `Expr(:block_comment, "text")`, or `Expr(:inline_comment, "text")`.

-erik

> But a great knowledge of the parsers, both Flisp and Julia written ones,
> would be required.
> Then I also wondered that maybe one formal, but incomplete, grammar could be
> useful to construct such tree, as in intermediate step between source code
> and real AST.
>
> That would allow the creation of very powerful autoformatting tools, along
> with lints, refactoring and other advanced IDE functionalities.
>
> On Friday, February 12, 2016 at 4:58:33 AM UTC, Maxim Grechkin wrote:
>>
>> Was there any progress on this lately? I've noticed that atom-beautify
>> plugin doesn't have Julia
>> support(https://github.com/Glavin001/atom-beautify/issues/799), but there
>> doesn't seem to be a tool that it can hook into.
>>
>> On Saturday, January 11, 2014 at 9:22:14 AM UTC-8, Stefan Karpinski wrote:
>>>
>>> Kind of. I don't think that expression printing is even remotely good
>>> enough for this yet, but that's the basic idea that makes the most sense to
>>> me. No point in using separate parse or print code when there's already
>>> functions that do this stuff.
>>>
>>>
>>> On Sat, Jan 11, 2014 at 12:06 PM, Job van der Zwan 
>>> wrote:

 So you are saying that the most of the tooling required for an
 auto-formatting tool is already there?

 On Thursday, 9 January 2014 14:42:40 UTC+1, Stefan Karpinski wrote:
>
> I would be into having an auto-formatting tool. The way to do this
> would be to work on the printing of ASTs until the way the code prints is
> the standard way it should be formatted. Then you have an auto-formatter:
> parse the code and print the resulting AST. One missing thing is that 
> parser
> currently discards comments.
>
>
> On Thu, Jan 9, 2014 at 6:48 AM, Job van der Zwan 
> wrote:
>>
>> The problem I see with that is that you can wait for a very long time
>> before any consensus emerges. There are simply many choices to be made in
>> that regard which at the end of the day are kind of arbitrary - that a
>> choice is made and consistently followed is more important, and again the
>> benefit of autoformatting is that you don't have to waste putting effort
>> into doing so.
>>
>> Having something something concrete to respond to also helps with the
>> discussion - an autoformatting tool will impose a certain style, which 
>> will
>> drive the discussion of standardising proper style. If people disagree 
>> with
>> the formatting it provides, great! That means a discussion is triggered.
>>
>> So instead of waiting for a consensus to emerge, I think that building
>> an autoformatting tool with a "good enough first guess" in terms of style
>> would be the place to start. Even if it starts out with terrible style
>> choices otherwise.
>>
>> (is this worth starting a separate discussion on the topic?)
>>
>>
>> On Thursday, 9 January 2014 03:18:05 UTC+1, John Myles White wrote:
>>>
>>> There is not yet, because there is still not a consensus on proper
>>> style. Hopefully once we have that, it will be easier to make a julia 
>>> fmt
>>> tool.
>>>
>>>  — John
>>>
>>> On Jan 8, 2014, at 6:09 PM, Job van der Zwan 
>>> wrote:
>>>
>>> > Depends on what you mean with legibility.
>>> >
>>> > For example (and not at all related to x.f(y) vs f(x, y)), if I
>>> > look at my experience with the Go programming language, once you get 
>>> > used to
>>> > its imposed One True Way of formatting it really makes reading other
>>> > people's source code a lot easier. And talking about spending energy 
>>> > on the
>>> > subject of legibility: setting up my editor to use go-fmt (the
>>> > autoformatting tool) when building/saving code means I don't have to 
>>> > spend
>>> > any time thinking about it when writing my own code either; it will
>>> > automatically get fixed.
>>> >
>>> > It's one of those things the Go developers are very enthusiastic
>>> > about, and at first you go "really? That's a killer feature?" but 
>>> > after
>>> > using it 

[julia-users] Re: Compilation of Julia on cluster - getting some error

2016-02-12 Thread Tony Kelman
Your binutils is too old for avx2 instructions. See 
https://github.com/JuliaLang/julia#linux-build-troubleshooting - 
OPENBLAS_NO_AVX2=1 should fix it.

On Friday, February 12, 2016 at 1:35:14 AM UTC-8, Ben Ward wrote:
>
> Hi Julia community!
>
> I've got Julia compiled successfully on my workstation without issue, but 
> I'm trying to do it now in my cluster environment at work, which I believe 
> is RedHat or some similar linux.
>
> I have permissions to install and compile software in a given directory. 
> However during compilation I get some errors to do with OpenBLAS I've not 
> seen before when compiling on my workstation:
>
> ../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such 
> instruction: `vpermpd $ 0x1b,%ymm2,%ymm2'
> ../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such 
> instruction: `vpermpd $ 0x1b,%ymm3,%ymm3'
> ../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such 
> instruction: `vpermpd $ 0xb1,%ymm2,%ymm2'
> ../kernel/x86_64/dgemm_kernel_4x8_haswell.S:2651: Error: no such 
> instruction: `vpermpd $ 0xb1,%ymm3,%ymm3'
> make[3]: *** [dgemm_kernel_HASWELL.o] Error 1
> make[3]: *** Waiting for unfinished jobs
> make[2]: *** [libs] Error 1
> \033[33;1m*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. 
> Rebuild with 'make OPENBLAS_USE_THREAD=0' if OpenBLAS had trouble linking 
> libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were 
> errors building SandyBridge support. Both these options can also be used 
> simultaneously. ***\033[0m
> make[1]: *** [build/openblas/libopenblas64_.so] Error 1
> make: *** [julia-deps] Error 2
>
>
> I've tried make -C deps clean-openblas but I still get the error appear, 
> and I don't know if what I'm seeing is OpenBLAS having trouble linking with 
> libpthread.so, or if it's an error building sandybridge support - or if 
> it's an issue that's neither of those two and something else entirely.
> Any advice is greatly appreciated.
>
> Many Thanks,
> Ben.
>


Re: [julia-users] Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Tom Breloff
Peter: your package looks interesting... I may add the ability to pass your
colormap objects directly into Plots functions. I'll open an issue when I
have a chance and cc you.

On Friday, February 12, 2016, Tom Breloff  wrote:

> Patrick I have solutions for custom colormaps with alpha in Plots... Maybe
> this thread is good motivation to dedicate a page in the documentation. The
> gist is that you can pass in a ColorGradient, which you can construct with
> predefined gradient names, custom color vectors, and custom interpolation
> points. Do a search for ColorGradient in the Plots issues and you should
> find some examples.
>
> On Friday, February 12, 2016, Peter Kovesi  > wrote:
>
>> I have recently added a package for generating a variety of perceptually
>> uniform colour maps which may be of interest to you
>> https://github.com/peterkovesi/PerceptualColourMaps.jl
>> However I do not consider transparency
>>
>> Cheers
>> Peter
>>
>> On Friday, February 12, 2016 at 5:48:06 PM UTC+8, Patrick Kofod Mogensen
>> wrote:
>>>
>>> Is it possible to create a colormap as described in the title using
>>> Colors.jl? I couldn't seem to find anything on Colormaps and
>>> transparency/opacity.
>>>
>>> Best,
>>> Patrick
>>>
>>


Re: [julia-users] Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Tom Breloff
Patrick I have solutions for custom colormaps with alpha in Plots... Maybe
this thread is good motivation to dedicate a page in the documentation. The
gist is that you can pass in a ColorGradient, which you can construct with
predefined gradient names, custom color vectors, and custom interpolation
points. Do a search for ColorGradient in the Plots issues and you should
find some examples.

On Friday, February 12, 2016, Peter Kovesi  wrote:

> I have recently added a package for generating a variety of perceptually
> uniform colour maps which may be of interest to you
> https://github.com/peterkovesi/PerceptualColourMaps.jl
> However I do not consider transparency
>
> Cheers
> Peter
>
> On Friday, February 12, 2016 at 5:48:06 PM UTC+8, Patrick Kofod Mogensen
> wrote:
>>
>> Is it possible to create a colormap as described in the title using
>> Colors.jl? I couldn't seem to find anything on Colormaps and
>> transparency/opacity.
>>
>> Best,
>> Patrick
>>
>


Re: [julia-users] sub-ranges within CartesianRange

2016-02-12 Thread Stefan Karpinski
I'm kind of curious what the use case is. How are you using CartesianRanges?

On Thu, Feb 11, 2016 at 9:00 PM, Greg Plowman 
wrote:

> Suppose I have a CartesianRange and want to access a sub-range.
>
> start = CartesianIndex((1,1,1))
> stop = CartesianIndex((5,5,5))
> cr = CartesianRange{start, stop)
>
>
> Something like:
> sub_cr = SubCartesianRange(cr,x,y) where x,y are arbitrary
> CartesianIndexes within cr.
>
>
> then I could do
>
> for a in sub_cr
>...
> end
>
> length(sub_cr)
>
> etc.
>
> I note that constructing CartesianRange(x,y) is valid code, but won't
> work because, we need to somehow embed start, stop into the sub-range.
> Also, it is possible for some x[i] > y[i], and I think the logic for
> CartesianRanges requires x[i] <= y[i] for all i.
>
> Is there something for sub-ranges like this already?
>
>


[julia-users] ANN: FastTransforms.jl v0.0.1

2016-02-12 Thread richard . slevinsky
I'm pleased to announce the new package FastTransforms.jl available here:

https://github.com/MikaelSlevinsky/FastTransforms.jl

The aim of this package is to provide a new class of fast transforms based 
on the use of asymptotic formulae to relate the transforms to a small 
number of fast Fourier transforms. This new class of fast transforms does 
not require large pre-computation for fast execution, and they are designed 
to work on expansions of functions with any degree of regularity.

Version v0.0.1 implements the Chebyshev–Jacobi transform and its inverse. 
For details on the algorithm, see:

http://arxiv.org/abs/1602.02618.

The transform is based on the fast and accurate numerical evaluation of 
Jacobi expansions at the Chebyshev–Lobatto points. This allows the fast 
conversion of Chebyshev expansion coefficients to Jacobi expansion 
coefficients and back. Convert between as many as one million Jacobi 
coefficients with parameters (α,β) ∈ (-1/2,1/2]^2 to Jacobi coefficients 
with parameters (γ,δ) ∈ (-1/2,1/2]^2 with high absolute accuracy in a 
little over two minutes!
julia> using FastTransforms

julia> @time jjt(rand(1_000_001),0.1,0.2,0.3,0.4);
128.491023 seconds (534 allocations: 534.084 MB)

If the Jacobi parameters (α,β) are not significantly beyond the half-open 
square (-1/2,1/2]^2, then increment and decrement operators are used to 
pre- and post-process the fast transform with linear complexity (and linear 
conditioning) in the degree.


[julia-users] CUDArt: loop inside device do

2016-02-12 Thread Joaquim Masset Lacombe Dias Garcia
Can I have a standard julia "for loop" inside a "device do" of CUDArt?

I tried the following example:

using CUDArt, MyCudaModule

nrow = 10
ncol = 3000

mat = ones(Float64,nrow,ncol)
out1 = zeros(Float64,nrow)
vec = Float64[1:nrow;]
out2 = zeros(Float64,nrow)

d_mat  = CudaArray(mat)
d_out1 = CudaArray(out1)
d_vec  = CudaArray(vec)
d_out2 = CudaArray(out2)
d_nrow = CudaArray(Int32[nrow;])
d_ncol = CudaArray(Int32[ncol;])

result = devices(dev->capability(dev)[1]>=2) do devlist
MyCudaModule.init(devlist) do dev
blocks = 1
threads = nrow
global result = 0
result = for i in 1:10
MyCudaModule.cudaSumCol(d_out1,d_mat,d_ncol,blocks,threads)

result = to_host(d_out1)[1]
end
end
end

cudaSumCol is a function ta simply sums a matrix´s entries convetring it 
into a column, it was wrapped just like the example on CUArt´s README.
the above code without the loop part work just perfectly.

Should I try something different, like not using the do devlist?

thanks,
Joaquim


Re: [julia-users] sub-ranges within CartesianRange

2016-02-12 Thread Tim Holy
Are x and y offsets with respect to the "parent" range cr?

If so, you can achieve this with a 1-liner,

CartesianRange(cr.start+x-1, cr.start+y-1)

although you need https://github.com/JuliaLang/julia/pull/15030 to support the 
"- 1". On julia 0.4, that would have to be

@generated function Base.(:-){N}(I::CartesianIndex{N}, i::Integer)
args = [:(I[$d]-i) for d = 1:N]
:(CartesianIndex(tuple($(args...
end

As a homework exercise, one could add bounds-checking if desired. But:

> I note that constructing CartesianRange(x,y) is valid code, but won't work
> because, we need to somehow embed start, stop into the sub-range.
> Also, it is possible for some x[i] > y[i], and I think the logic for
> CartesianRanges requires x[i] <= y[i] for all i.

Already ahead of you there :-).

julia> I1 = CartesianIndex((3,3,3))
CartesianIndex{3}((3,3,3))

julia> I2 = CartesianIndex((5,1,7))
CartesianIndex{3}((5,1,7))

julia> R = CartesianRange(I1, I2)
CartesianRange{CartesianIndex{3}}(CartesianIndex{3}((3,3,3)),CartesianIndex{3}
((5,1,7)))

julia> s = start(R)
CartesianIndex{3}((3,3,8))

julia> done(R, s)
true

meaning that it is an empty iterator (the body of a for loop would never 
execute).

Best,
--Tim



Re: [julia-users] Diverging Colormap (like RdBu) with opacity going from 1 to 0 in the middle and back to 1

2016-02-12 Thread Tom Breloff
For reference, I just added an example of color gradients with alpha here:
https://github.com/tbreloff/Plots.jl/issues/138#issuecomment-183374401

On Fri, Feb 12, 2016 at 9:18 AM, Tom Breloff  wrote:

> Peter: your package looks interesting... I may add the ability to pass
> your colormap objects directly into Plots functions. I'll open an issue
> when I have a chance and cc you.
>
>
> On Friday, February 12, 2016, Tom Breloff  wrote:
>
>> Patrick I have solutions for custom colormaps with alpha in Plots...
>> Maybe this thread is good motivation to dedicate a page in the
>> documentation. The gist is that you can pass in a ColorGradient, which you
>> can construct with predefined gradient names, custom color vectors, and
>> custom interpolation points. Do a search for ColorGradient in the Plots
>> issues and you should find some examples.
>>
>> On Friday, February 12, 2016, Peter Kovesi 
>> wrote:
>>
>>> I have recently added a package for generating a variety of perceptually
>>> uniform colour maps which may be of interest to you
>>> https://github.com/peterkovesi/PerceptualColourMaps.jl
>>> However I do not consider transparency
>>>
>>> Cheers
>>> Peter
>>>
>>> On Friday, February 12, 2016 at 5:48:06 PM UTC+8, Patrick Kofod Mogensen
>>> wrote:

 Is it possible to create a colormap as described in the title using
 Colors.jl? I couldn't seem to find anything on Colormaps and
 transparency/opacity.

 Best,
 Patrick

>>>


Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread NotSoRecentConvert
That's similar to how I learned Matlab programming. They had similar 
functions listed at the bottom of each function page. Add in the forums and 
reverse engineering other peoples' code and you have the majority of Matlab 
learning experience. 


Re: [julia-users] Autoformatting for Julia?

2016-02-12 Thread Cristóvão Duarte Sousa
Yes, but then where such Exprs will placed? Not inside the args array of
other Exprs...
I guess that if it is necessary to revert back to source code from an AST,
then a modification to Expr has to be made...

On Fri, Feb 12, 2016 at 1:47 PM Erik Schnetter  wrote:

> On Fri, Feb 12, 2016 at 5:17 AM, Cristóvão Duarte Sousa
>  wrote:
> > I don't know if it has been said here before, sorry if I'm repeating,
> but:
> > a way to represent the "concrete" syntax tree, convert it to AST and then
> > back would be of great use here, see
> > https://github.com/JuliaLang/JuliaParser.jl/issues/22 .
> >
> > I actually thought a lot about that, and imagine that the `Expr` type
> could
> > have an extra field to hold syntax delimiters (punctuation and
> whitespace)
> > which is found around and between its arguments.
>
> Adding to the `Expr` type is expensive, since it's used a lot.
> Instead, you can add extra `Expr` objects, e.g. `Expr(:empty_line)`,
> or `Expr(:block_comment, "text")`, or `Expr(:inline_comment, "text")`.
>
> -erik
>
> > But a great knowledge of the parsers, both Flisp and Julia written ones,
> > would be required.
> > Then I also wondered that maybe one formal, but incomplete, grammar
> could be
> > useful to construct such tree, as in intermediate step between source
> code
> > and real AST.
> >
> > That would allow the creation of very powerful autoformatting tools,
> along
> > with lints, refactoring and other advanced IDE functionalities.
> >
> > On Friday, February 12, 2016 at 4:58:33 AM UTC, Maxim Grechkin wrote:
> >>
> >> Was there any progress on this lately? I've noticed that atom-beautify
> >> plugin doesn't have Julia
> >> support(https://github.com/Glavin001/atom-beautify/issues/799), but
> there
> >> doesn't seem to be a tool that it can hook into.
> >>
> >> On Saturday, January 11, 2014 at 9:22:14 AM UTC-8, Stefan Karpinski
> wrote:
> >>>
> >>> Kind of. I don't think that expression printing is even remotely good
> >>> enough for this yet, but that's the basic idea that makes the most
> sense to
> >>> me. No point in using separate parse or print code when there's already
> >>> functions that do this stuff.
> >>>
> >>>
> >>> On Sat, Jan 11, 2014 at 12:06 PM, Job van der Zwan <
> j.l.van...@gmail.com>
> >>> wrote:
> 
>  So you are saying that the most of the tooling required for an
>  auto-formatting tool is already there?
> 
>  On Thursday, 9 January 2014 14:42:40 UTC+1, Stefan Karpinski wrote:
> >
> > I would be into having an auto-formatting tool. The way to do this
> > would be to work on the printing of ASTs until the way the code
> prints is
> > the standard way it should be formatted. Then you have an
> auto-formatter:
> > parse the code and print the resulting AST. One missing thing is
> that parser
> > currently discards comments.
> >
> >
> > On Thu, Jan 9, 2014 at 6:48 AM, Job van der Zwan <
> j.l.van...@gmail.com>
> > wrote:
> >>
> >> The problem I see with that is that you can wait for a very long
> time
> >> before any consensus emerges. There are simply many choices to be
> made in
> >> that regard which at the end of the day are kind of arbitrary -
> that a
> >> choice is made and consistently followed is more important, and
> again the
> >> benefit of autoformatting is that you don't have to waste putting
> effort
> >> into doing so.
> >>
> >> Having something something concrete to respond to also helps with
> the
> >> discussion - an autoformatting tool will impose a certain style,
> which will
> >> drive the discussion of standardising proper style. If people
> disagree with
> >> the formatting it provides, great! That means a discussion is
> triggered.
> >>
> >> So instead of waiting for a consensus to emerge, I think that
> building
> >> an autoformatting tool with a "good enough first guess" in terms of
> style
> >> would be the place to start. Even if it starts out with terrible
> style
> >> choices otherwise.
> >>
> >> (is this worth starting a separate discussion on the topic?)
> >>
> >>
> >> On Thursday, 9 January 2014 03:18:05 UTC+1, John Myles White wrote:
> >>>
> >>> There is not yet, because there is still not a consensus on proper
> >>> style. Hopefully once we have that, it will be easier to make a
> julia fmt
> >>> tool.
> >>>
> >>>  — John
> >>>
> >>> On Jan 8, 2014, at 6:09 PM, Job van der Zwan  >
> >>> wrote:
> >>>
> >>> > Depends on what you mean with legibility.
> >>> >
> >>> > For example (and not at all related to x.f(y) vs f(x, y)), if I
> >>> > look at my experience with the Go programming language, once you
> get used to
> >>> > its imposed One True Way of formatting it really makes reading
> other
> >>> > people's source code a lot easier. And talking about spending
> energy 

Re: [julia-users] Autoformatting for Julia?

2016-02-12 Thread Erik Schnetter
Line numbers are already handled in this way:

julia> parse("f(x)=x") |> dump
Expr
  head: Symbol =
  args: Array(Any,(2,))
1: Expr
  head: Symbol call
  args: Array(Any,(2,))
1: Symbol f
2: Symbol x
  typ: Any
2: Expr
  head: Symbol block
  args: Array(Any,(2,))
1: LineNumberNode
  file: Symbol none
  line: Int64 1
2: Symbol x
  typ: Any
  typ: Any

-erik

On Fri, Feb 12, 2016 at 10:25 AM, Cristóvão Duarte Sousa
 wrote:
> Yes, but then where such Exprs will placed? Not inside the args array of
> other Exprs...
> I guess that if it is necessary to revert back to source code from an AST,
> then a modification to Expr has to be made...
>
> On Fri, Feb 12, 2016 at 1:47 PM Erik Schnetter  wrote:
>>
>> On Fri, Feb 12, 2016 at 5:17 AM, Cristóvão Duarte Sousa
>>  wrote:
>> > I don't know if it has been said here before, sorry if I'm repeating,
>> > but:
>> > a way to represent the "concrete" syntax tree, convert it to AST and
>> > then
>> > back would be of great use here, see
>> > https://github.com/JuliaLang/JuliaParser.jl/issues/22 .
>> >
>> > I actually thought a lot about that, and imagine that the `Expr` type
>> > could
>> > have an extra field to hold syntax delimiters (punctuation and
>> > whitespace)
>> > which is found around and between its arguments.
>>
>> Adding to the `Expr` type is expensive, since it's used a lot.
>> Instead, you can add extra `Expr` objects, e.g. `Expr(:empty_line)`,
>> or `Expr(:block_comment, "text")`, or `Expr(:inline_comment, "text")`.
>>
>> -erik
>>
>> > But a great knowledge of the parsers, both Flisp and Julia written ones,
>> > would be required.
>> > Then I also wondered that maybe one formal, but incomplete, grammar
>> > could be
>> > useful to construct such tree, as in intermediate step between source
>> > code
>> > and real AST.
>> >
>> > That would allow the creation of very powerful autoformatting tools,
>> > along
>> > with lints, refactoring and other advanced IDE functionalities.
>> >
>> > On Friday, February 12, 2016 at 4:58:33 AM UTC, Maxim Grechkin wrote:
>> >>
>> >> Was there any progress on this lately? I've noticed that atom-beautify
>> >> plugin doesn't have Julia
>> >> support(https://github.com/Glavin001/atom-beautify/issues/799), but
>> >> there
>> >> doesn't seem to be a tool that it can hook into.
>> >>
>> >> On Saturday, January 11, 2014 at 9:22:14 AM UTC-8, Stefan Karpinski
>> >> wrote:
>> >>>
>> >>> Kind of. I don't think that expression printing is even remotely good
>> >>> enough for this yet, but that's the basic idea that makes the most
>> >>> sense to
>> >>> me. No point in using separate parse or print code when there's
>> >>> already
>> >>> functions that do this stuff.
>> >>>
>> >>>
>> >>> On Sat, Jan 11, 2014 at 12:06 PM, Job van der Zwan
>> >>> 
>> >>> wrote:
>> 
>>  So you are saying that the most of the tooling required for an
>>  auto-formatting tool is already there?
>> 
>>  On Thursday, 9 January 2014 14:42:40 UTC+1, Stefan Karpinski wrote:
>> >
>> > I would be into having an auto-formatting tool. The way to do this
>> > would be to work on the printing of ASTs until the way the code
>> > prints is
>> > the standard way it should be formatted. Then you have an
>> > auto-formatter:
>> > parse the code and print the resulting AST. One missing thing is
>> > that parser
>> > currently discards comments.
>> >
>> >
>> > On Thu, Jan 9, 2014 at 6:48 AM, Job van der Zwan
>> > 
>> > wrote:
>> >>
>> >> The problem I see with that is that you can wait for a very long
>> >> time
>> >> before any consensus emerges. There are simply many choices to be
>> >> made in
>> >> that regard which at the end of the day are kind of arbitrary -
>> >> that a
>> >> choice is made and consistently followed is more important, and
>> >> again the
>> >> benefit of autoformatting is that you don't have to waste putting
>> >> effort
>> >> into doing so.
>> >>
>> >> Having something something concrete to respond to also helps with
>> >> the
>> >> discussion - an autoformatting tool will impose a certain style,
>> >> which will
>> >> drive the discussion of standardising proper style. If people
>> >> disagree with
>> >> the formatting it provides, great! That means a discussion is
>> >> triggered.
>> >>
>> >> So instead of waiting for a consensus to emerge, I think that
>> >> building
>> >> an autoformatting tool with a "good enough first guess" in terms of
>> >> style
>> >> would be the place to start. Even if it starts out with terrible
>> >> style
>> >> choices otherwise.
>> >>
>> >> (is this worth starting a separate discussion on the topic?)
>> >>
>> >>
>> >> On Thursday, 9 

Re: [julia-users] Re: documentation suggestions

2016-02-12 Thread Douglas Bates
On Thursday, February 11, 2016 at 3:06:45 PM UTC-6, ivo welch wrote:
>
>
> hi doug---and vice-versa.  it's interesting that a core function (reading 
> a .csv file) would not be in a native julia library.  when are you 
> switching your students to julia?  regards,  /iaw
>

Writing a function to read a .csv file is not trivial - partly because CSV 
is not well-defined.  It is also the case of an itch getting scratched - if 
those working on Julia with the skills to write such a function don't have 
a need to read .csv files that particular functionality stagnates.

The definition and functionality of data frames, which are the natural 
output when reading a CSV file,  in Julia is still being debated.  In R the 
choices were much easier because R was designed to emulate S version 3 in 
which a data frame was a central construct.  Sacrifices in performance were 
made to allow for checking for NA's during each atomic arithmetic 
operation.  That trade-off wouldn't fly in Julia.  Also R vector structures 
all allow for element names - again at an expense in performance.

I'm not really in the position to convert my students as I am now an 
Emeritus Professor.  I do still offer a seminar series on "Statistics with 
Julia" and have convinced some students to use Julia in thesis research.

I would be quite happy with Julia if only git and I got along better.  I 
just lost three days worth of work this morning because of yet another git 
disaster.

>
> 
> Ivo Welch (ivo@gmail.com )
> http://www.ivo-welch.info/
> J. Fred Weston Distinguished Professor of Finance
> Anderson School at UCLA, C519
> Free Finance Textbook, http://book.ivo-welch.info/
> Exec Editor, Critical Finance Review, 
> http://www.critical-finance-review.org/
> Editor and Publisher, FAMe, http://www.fame-jagazine.com/
>
> On Thu, Feb 11, 2016 at 12:37 PM, Douglas Bates  > wrote:
>
>> Hi Ivo,
>>
>> Good to hear from you.
>>
>> On Wednesday, February 10, 2016 at 9:58:37 AM UTC-6, ivo welch wrote:
>>>
>>>
>>> ladies and gents---I am not (yet) a julia user.
>>>
>>> may I suggest adding more examples into two places where julia users 
>>> will face starting hurdles?
>>>
>>> [1] the I/O docs of julia.  like, reading and writing csv files that are 
>>> compressed and decompressed on-the-fly, even if not in the ultimate 
>>> efficient manner.a large fraction of the time and frustration of new 
>>> users is consumed by the task of shoehorning data into and out of new 
>>> computer languages.  with all of R's problem, the ' d <- read.csv("f.csv")' 
>>> and 'd<-read.csv(pipe(paste("gzcat ", fname)))' reduced this entry 
>>> frustration greatly.  perhaps xml file reading and writing.  perhaps...
>>>
>>> [2] more 'standard task' programs would be great.  read a csv file, run 
>>> a regression according to variable names on the command line, print output, 
>>> draw a graph.  I know there are fragments throughout the docs, but some 
>>> section with ready to run complete programs would be good, perhaps at the 
>>> end of the manual.
>>>
>>> in a year, I hope to switch my students from R to julia.
>>>
>>
>> My main use of the RCall package is to import datasets from R into 
>> Julia.  If I have a dataset in an R package I use, e.g.
>>
>>  julia> using RCall
>>
>> julia> ds = rcopy("lme4::Dyestuff")
>> 30x2 DataFrames.DataFrame
>> | Row | Batch | Yield  |
>> |-|---||
>> | 1   | "A"   | 1545.0 |
>> | 2   | "A"   | 1440.0 |
>> | 3   | "A"   | 1440.0 |
>> | 4   | "A"   | 1520.0 |
>> | 5   | "A"   | 1580.0 |
>> | 6   | "B"   | 1540.0 |
>> | 7   | "B"   | 1555.0 |
>> | 8   | "B"   | 1490.0 |
>> | 9   | "B"   | 1560.0 |
>> | 10  | "B"   | 1495.0 |
>> | 11  | "C"   | 1595.0 |
>> | 12  | "C"   | 1550.0 |
>> | 13  | "C"   | 1605.0 |
>> | 14  | "C"   | 1510.0 |
>> | 15  | "C"   | 1560.0 |
>> | 16  | "D"   | 1445.0 |
>> | 17  | "D"   | 1440.0 |
>> | 18  | "D"   | 1595.0 |
>> | 19  | "D"   | 1465.0 |
>> | 20  | "D"   | 1545.0 |
>> | 21  | "E"   | 1595.0 |
>> | 22  | "E"   | 1630.0 |
>> | 23  | "E"   | 1515.0 |
>> | 24  | "E"   | 1635.0 |
>> | 25  | "E"   | 1625.0 |
>> | 26  | "F"   | 1520.0 |
>> | 27  | "F"   | 1455.0 |
>> | 28  | "F"   | 1450.0 |
>> | 29  | "F"   | 1480.0 |
>> | 30  | "F"   | 1445.0 |
>>
>> If I wanted to read a CSV file using the facilities in R I could use
>>
>> julia> rcopy("read.csv('/usr/share/distro-info/debian.csv')")
>> 17x6 DataFrames.DataFrame
>> | Row | version | codename   | series | created  | 
>> release  | eol  |
>>
>> |-|-|||--|--|--|
>> | 1   | 1.1 | "Buzz" | "buzz" | "1993-08-16" | 
>> "1996-06-17" | "1997-06-05" |
>> | 2   | 1.2 | "Rex"  | "rex"  | "1996-06-17" | 
>> "1996-12-12" | "1998-06-05" |
>> | 3   | 1.3 | "Bo"   | "bo"   | "1996-12-12" | 
>> "1997-06-05" | "1999-03-09" |
>> | 4   | 2.0 | "Hamm" | "hamm" 

[julia-users] Re: looking for an equivalent function to "independence_test" in the R coin package

2016-02-12 Thread Douglas Bates
On Thursday, February 11, 2016 at 6:27:26 PM UTC-6, Albert Cardona wrote:
>
> The formula operator is there via the GLM package [1], but I can't find 
> the equivalent of the independent_test function [2].
>
> [1] https://github.com/JuliaStats/GLM.jl 
> [2] http://www.inside-r.org/packages/cran/coin/docs/IndependenceTest
>
> I am not that familiar with the coin package for R but knowing the authors 
I imagine that it is non-trivial.  That particular function sits on top of 
what I imagine is considerable infrastructure and translating it into 
idiomatic Julia would take some time.  Effective Julia code is usually 
based on thoughtful definitions of a hierarchy of types and methods.  The 
S3 style of programming in R usually needs considerable refactoring to 
become idiomatic Julia.  Having a formula type is the least of the issues 
here.
 

> Thanks in advance for any pointers.
>
> Albert
>


Re: [julia-users] Re: documentation suggestions

2016-02-12 Thread Jeffrey Sarnoff
Doug,  I found some shelter after months of being bit by git using this 
(free for non-commercial use) www.syntevo.com/smartgit/ 



On Friday, February 12, 2016 at 12:49:27 PM UTC-5, Douglas Bates wrote:
>
> On Thursday, February 11, 2016 at 3:06:45 PM UTC-6, ivo welch wrote:
>>
>>
>> hi doug---and vice-versa.  it's interesting that a core function (reading 
>> a .csv file) would not be in a native julia library.  when are you 
>> switching your students to julia?  regards,  /iaw
>>
>
> Writing a function to read a .csv file is not trivial - partly because CSV 
> is not well-defined.  It is also the case of an itch getting scratched - if 
> those working on Julia with the skills to write such a function don't have 
> a need to read .csv files that particular functionality stagnates.
>
> The definition and functionality of data frames, which are the natural 
> output when reading a CSV file,  in Julia is still being debated.  In R the 
> choices were much easier because R was designed to emulate S version 3 in 
> which a data frame was a central construct.  Sacrifices in performance were 
> made to allow for checking for NA's during each atomic arithmetic 
> operation.  That trade-off wouldn't fly in Julia.  Also R vector structures 
> all allow for element names - again at an expense in performance.
>
> I'm not really in the position to convert my students as I am now an 
> Emeritus Professor.  I do still offer a seminar series on "Statistics with 
> Julia" and have convinced some students to use Julia in thesis research.
>
> I would be quite happy with Julia if only git and I got along better.  I 
> just lost three days worth of work this morning because of yet another git 
> disaster.
>
>>
>> 
>> Ivo Welch (ivo@gmail.com)
>> http://www.ivo-welch.info/
>> J. Fred Weston Distinguished Professor of Finance
>> Anderson School at UCLA, C519
>> Free Finance Textbook, http://book.ivo-welch.info/
>> Exec Editor, Critical Finance Review, 
>> http://www.critical-finance-review.org/
>> Editor and Publisher, FAMe, http://www.fame-jagazine.com/
>>
>> On Thu, Feb 11, 2016 at 12:37 PM, Douglas Bates  wrote:
>>
>>> Hi Ivo,
>>>
>>> Good to hear from you.
>>>
>>> On Wednesday, February 10, 2016 at 9:58:37 AM UTC-6, ivo welch wrote:


 ladies and gents---I am not (yet) a julia user.

 may I suggest adding more examples into two places where julia users 
 will face starting hurdles?

 [1] the I/O docs of julia.  like, reading and writing csv files that 
 are compressed and decompressed on-the-fly, even if not in the ultimate 
 efficient manner.a large fraction of the time and frustration of new 
 users is consumed by the task of shoehorning data into and out of new 
 computer languages.  with all of R's problem, the ' d <- 
 read.csv("f.csv")' 
 and 'd<-read.csv(pipe(paste("gzcat ", fname)))' reduced this entry 
 frustration greatly.  perhaps xml file reading and writing.  perhaps...

 [2] more 'standard task' programs would be great.  read a csv file, run 
 a regression according to variable names on the command line, print 
 output, 
 draw a graph.  I know there are fragments throughout the docs, but some 
 section with ready to run complete programs would be good, perhaps at the 
 end of the manual.

 in a year, I hope to switch my students from R to julia.

>>>
>>> My main use of the RCall package is to import datasets from R into 
>>> Julia.  If I have a dataset in an R package I use, e.g.
>>>
>>>  julia> using RCall
>>>
>>> julia> ds = rcopy("lme4::Dyestuff")
>>> 30x2 DataFrames.DataFrame
>>> | Row | Batch | Yield  |
>>> |-|---||
>>> | 1   | "A"   | 1545.0 |
>>> | 2   | "A"   | 1440.0 |
>>> | 3   | "A"   | 1440.0 |
>>> | 4   | "A"   | 1520.0 |
>>> | 5   | "A"   | 1580.0 |
>>> | 6   | "B"   | 1540.0 |
>>> | 7   | "B"   | 1555.0 |
>>> | 8   | "B"   | 1490.0 |
>>> | 9   | "B"   | 1560.0 |
>>> | 10  | "B"   | 1495.0 |
>>> | 11  | "C"   | 1595.0 |
>>> | 12  | "C"   | 1550.0 |
>>> | 13  | "C"   | 1605.0 |
>>> | 14  | "C"   | 1510.0 |
>>> | 15  | "C"   | 1560.0 |
>>> | 16  | "D"   | 1445.0 |
>>> | 17  | "D"   | 1440.0 |
>>> | 18  | "D"   | 1595.0 |
>>> | 19  | "D"   | 1465.0 |
>>> | 20  | "D"   | 1545.0 |
>>> | 21  | "E"   | 1595.0 |
>>> | 22  | "E"   | 1630.0 |
>>> | 23  | "E"   | 1515.0 |
>>> | 24  | "E"   | 1635.0 |
>>> | 25  | "E"   | 1625.0 |
>>> | 26  | "F"   | 1520.0 |
>>> | 27  | "F"   | 1455.0 |
>>> | 28  | "F"   | 1450.0 |
>>> | 29  | "F"   | 1480.0 |
>>> | 30  | "F"   | 1445.0 |
>>>
>>> If I wanted to read a CSV file using the facilities in R I could use
>>>
>>> julia> rcopy("read.csv('/usr/share/distro-info/debian.csv')")
>>> 17x6 DataFrames.DataFrame
>>> | Row | version | codename   | series | created  | 
>>> release  | eol  |
>>>
>>> |-|-|||--|--|--|
>>> | 1   

[julia-users] @generated function cumulative definition

2016-02-12 Thread Isaac Yonemoto
As generated functions are right now, if you have a type-variadic section 
of code, you have two options:

1) generate varying segments at the top, assign them to a variable and 
perform code insertion using $

This has obvious difficulties with readability.

2) create a variable, say "code" that holds the current, cumulative code, 
and append to that variable by doing something like:

code = quote
  $code
  #more code here
end

This adds a lot of boilerplate overhead.

I quickly wrote a macro system that reduces this to a single @code macro

Don't know if anyone else would find this useful, but I'll take comments 
before pushing this to a package.

https://gist.github.com/ityonemo/65230126faddab4c6021

Isaac


Re: [julia-users] Re: Googling the functions I need in Julia is hard

2016-02-12 Thread Po Choi
Good point. I tried to use this search box in Juila manual, but get nothing.
In R and Matlab, the search would return the function sd/std.

I think, not only the "words" in Julia documentation is needed to improved, 
but also the search engine.

On Friday, February 12, 2016 at 12:52:19 AM UTC-8, Michele Zaffalon wrote:
>
> But the original point is still valid: using the search box in the 
> official documentation page http://docs.julialang.org/en/release-0.4, 
> searching for "standard deviation" does not bring up any useful hit, 
> despite the fact that Base.std is fairly well documented and contains the 
> words standard deviation.
> Is there a reason why it should work at the REPL but not in the webpage?
>
>
> On Fri, Feb 12, 2016 at 9:25 AM, Mauro  
> wrote:
>
>> Also at the Julia REPL:
>>
>> julia> apropos("standard deviation")
>> randn!
>> stdm
>> std
>> randn
>>
>> help?> std
>> search: std stdm STDIN STDOUT STDERR setdiff setdiff! hist2d hist2d! 
>> stride strides StridedArray StridedVector StridedMatrix StridedVecOrMat 
>> redirect_stdin
>>
>>   std(v[, region])
>>
>>   Compute the sample standard deviation of a vector or array v, 
>> optionally along dimensions in region. The algorithm returns an estimator 
>> of the generative
>>   distribution's standard deviation under the assumption that each 
>> entry of v is an IID drawn from that generative distribution. This 
>> computation is equivalent to
>>   calculating sqrt(sum((v - mean(v)).^2) / (length(v) - 1)). Note: 
>> Julia does not ignore NaN values in the computation. For applications 
>> requiring the handling of
>>   missing data, the DataArray package is recommended.
>>
>> Having said this, documentation always needs improvements and is
>> certainly not on Matlab's level of completeness.  Please contribute
>> where you find it lacking.  See
>>
>> https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#improving-documentation
>>
>>
>> On Fri, 2016-02-12 at 09:18, NotSoRecentConvert > > wrote:
>> > You can even download the entire thing as a PDF, HTML, or EPUB if you 
>> want
>> > to highlight, annotate, or bookmark your most searched functions. Look 
>> in
>> > the lower right of the page for "v: latest" and click it for more 
>> options.
>> >
>> > On Friday, February 12, 2016 at 8:03:27 AM UTC+1, Lutfullah Tomak wrote:
>> >>
>> >> There is this one
>> >>
>> >> http://docs.julialang.org/en/release-0.4/stdlib/math/#Base.std
>> >>
>> >> Instead of google, I use this manual for search.
>> >>
>> >>
>>
>
>

[julia-users] How to do multiple dispatch on different dimension of matrices?

2016-02-12 Thread Po Choi
Can I do something like this?
testMatrix(x::Array{1}) = println("It is 1-dimensional.")
testMatrix(x::Array{2}) = println("It is 2-dimensional.")

The above does not work because Array{1} == Array{1, N}

One solution is
testMatrixAgain{T}(x::Array{T, 1}) = println("It is 1-dimensional.")
testMatrixAgain{T}(x::Array{T, 2}) = println("It is 2-dimensional.")

However, the parametric type is actually not used. Is there any way that I 
don't need the parametric type?


Re: [julia-users] CUDArt: loop inside device do

2016-02-12 Thread Tim Holy
That loop is not proper julia syntax (i.e., this issue has nothing to do with 
CUDArt).

julia> global s

julia> s = 0
0

julia> s = for i = 1:10
   s = s+1
   end

julia> s

julia> s == nothing
true

--Tim


On Friday, February 12, 2016 08:51:47 AM Joaquim Masset Lacombe Dias Garcia 
wrote:
> Can I have a standard julia "for loop" inside a "device do" of CUDArt?
> 
> I tried the following example:
> 
> using CUDArt, MyCudaModule
> 
> nrow = 10
> ncol = 3000
> 
> mat = ones(Float64,nrow,ncol)
> out1 = zeros(Float64,nrow)
> vec = Float64[1:nrow;]
> out2 = zeros(Float64,nrow)
> 
> d_mat  = CudaArray(mat)
> d_out1 = CudaArray(out1)
> d_vec  = CudaArray(vec)
> d_out2 = CudaArray(out2)
> d_nrow = CudaArray(Int32[nrow;])
> d_ncol = CudaArray(Int32[ncol;])
> 
> result = devices(dev->capability(dev)[1]>=2) do devlist
> MyCudaModule.init(devlist) do dev
> blocks = 1
> threads = nrow
> global result = 0
> result = for i in 1:10
> MyCudaModule.cudaSumCol(d_out1,d_mat,d_ncol,blocks,threads)
> 
> result = to_host(d_out1)[1]
> end
> end
> end
> 
> cudaSumCol is a function ta simply sums a matrix´s entries convetring it
> into a column, it was wrapped just like the example on CUArt´s README.
> the above code without the loop part work just perfectly.
> 
> Should I try something different, like not using the do devlist?
> 
> thanks,
> Joaquim



Re: [julia-users] Unitful.jl for physical units

2016-02-12 Thread Tim Holy
I have long been meaning to get around to making SIUnits type-stable under 
arithmetic. I've only glanced at your code, but it looks like you just 
scratched one big, bad TODO item off my list! Seems like you've included a 
number of other nice features, too (many thanks for the microns support, it 
will make a difference). I'll be excited to play with this.

Best,
--Tim

On Friday, February 12, 2016 12:23:22 PM Andrew Keller wrote:
> I'm happy to share a package I wrote for using physical units in Julia,
> Unitful.jl . Much credit and
> gratitude is due to Keno Fischer for the SIUnits.jl
>  package which served as my
> inspiration. This is a work in progress, but I think perhaps a serviceable
> one depending on what you're doing.
> 
> Like SIUnits.jl, this package encodes units in the type signature to avoid
> run-time performance penalties. From there, the implementations diverge.
> The package is targeted to Julia 0.5 / master, as there are some
> limitations with how promote_op is used in Julia 0.4 (#13803)
> . I decided it wasn't worth
> targeting 0.4 if the behavior would be inconsistent.
> 
> Some highlights include:
> 
>- Non-SI units are treated on the same footing as SI units, with only a
>few exceptions (unit conversion method). Use whatever weird units you
>want.
>- Support for units like micron / (meter Kelvin), where some of the
>units could cancel out but you don't necessarily want them to.
>- Support for LinSpace and other Range types. Probably there are still
>some glitches to be found, though.
>- Support for rational exponents of units.
>- Some tests (see these for usage examples).
> 
> Please see the documentation for a comprehensive discussion, including
> issues / to do list, as well as how to add your own units, etc.
> Comments and feedback are welcome.
> 
> Best,
> Andrew Keller



Re: [julia-users] Unitful.jl for physical units

2016-02-12 Thread Tom Breloff
Andrew this looks really great.  Thanks for the contribution!

On Fri, Feb 12, 2016 at 4:27 PM, Tim Holy  wrote:

> I have long been meaning to get around to making SIUnits type-stable under
> arithmetic. I've only glanced at your code, but it looks like you just
> scratched one big, bad TODO item off my list! Seems like you've included a
> number of other nice features, too (many thanks for the microns support, it
> will make a difference). I'll be excited to play with this.
>
> Best,
> --Tim
>
> On Friday, February 12, 2016 12:23:22 PM Andrew Keller wrote:
> > I'm happy to share a package I wrote for using physical units in Julia,
> > Unitful.jl . Much credit
> and
> > gratitude is due to Keno Fischer for the SIUnits.jl
> >  package which served as my
> > inspiration. This is a work in progress, but I think perhaps a
> serviceable
> > one depending on what you're doing.
> >
> > Like SIUnits.jl, this package encodes units in the type signature to
> avoid
> > run-time performance penalties. From there, the implementations diverge.
> > The package is targeted to Julia 0.5 / master, as there are some
> > limitations with how promote_op is used in Julia 0.4 (#13803)
> > . I decided it wasn't
> worth
> > targeting 0.4 if the behavior would be inconsistent.
> >
> > Some highlights include:
> >
> >- Non-SI units are treated on the same footing as SI units, with only
> a
> >few exceptions (unit conversion method). Use whatever weird units you
> >want.
> >- Support for units like micron / (meter Kelvin), where some of the
> >units could cancel out but you don't necessarily want them to.
> >- Support for LinSpace and other Range types. Probably there are still
> >some glitches to be found, though.
> >- Support for rational exponents of units.
> >- Some tests (see these for usage examples).
> >
> > Please see the documentation for a comprehensive discussion, including
> > issues / to do list, as well as how to add your own units, etc.
> > Comments and feedback are welcome.
> >
> > Best,
> > Andrew Keller
>
>


Re: [julia-users] Unitful.jl for physical units

2016-02-12 Thread Stefan Karpinski
This is very, very cool. The implementation does seems to suggest some
interesting potential way that Base could support this better. Please don't
hesitate to bring these up as issues or on julia-dev. Really smooth support
for units in Julia is a killer feature.

On Fri, Feb 12, 2016 at 3:23 PM, Andrew Keller 
wrote:

> I'm happy to share a package I wrote for using physical units in Julia,
> Unitful.jl . Much credit
> and gratitude is due to Keno Fischer for the SIUnits.jl
>  package which served as my
> inspiration. This is a work in progress, but I think perhaps a serviceable
> one depending on what you're doing.
>
> Like SIUnits.jl, this package encodes units in the type signature to avoid
> run-time performance penalties. From there, the implementations diverge.
> The package is targeted to Julia 0.5 / master, as there are some
> limitations with how promote_op is used in Julia 0.4 (#13803)
> . I decided it wasn't
> worth targeting 0.4 if the behavior would be inconsistent.
>
> Some highlights include:
>
>- Non-SI units are treated on the same footing as SI units, with only
>a few exceptions (unit conversion method). Use whatever weird units
>you want.
>- Support for units like micron / (meter Kelvin), where some of the
>units could cancel out but you don't necessarily want them to.
>- Support for LinSpace and other Range types. Probably there are still
>some glitches to be found, though.
>- Support for rational exponents of units.
>- Some tests (see these for usage examples).
>
> Please see the documentation for a comprehensive discussion, including
> issues / to do list, as well as how to add your own units, etc.
> Comments and feedback are welcome.
>
> Best,
> Andrew Keller
>


Re: [julia-users] CUDArt: loop inside device do

2016-02-12 Thread Joaquim Dias Garcia
Oh! Sure, thanks for the prompt answer!
Sorry for the dumb question... 

Joaquim

> On 12 de fev de 2016, at 20:36, Tim Holy  wrote:
> 
>> On Friday, February 12, 2016 08:30:26 PM Joaquim Dias Garcia wrote:
>> Is there any way around it?
>> 
>> I was planning a monte-carlo code, but all the iteration rely on some huge
>> amount of data which is always the same. So sending it back and forth to
>> the device would be a bottleneck...
> 
> Again, you can use loops, you just have to write your code in a way that is 
> actually valid syntax. Something like this:
> 
> result = devices(dev->capability(dev)[1]>=2) do devlist
>MyCudaModule.init(devlist) do dev
>result = Array(T, n)
>d_mat = CudaArray(mat)
># more allocation here...
>for i = 1:n
>result[i] = my_calculation(d_mat, othervariables, i)
>end
>result
>end
> end
> 
> The problem with your old version is that `result = for i = 1:n...` is not 
> supported syntax in julia.
> 
> --Tim
> 


Re: [julia-users] Using `Rational` with `Poly`

2016-02-12 Thread Fengyang Wang
You are right; it did not work. I made some modifications to fix it, but 
they required a significant rethinking of many of the methods, so it would 
be a different type entirely. Nemo supports rational functions in any case, 
and I think that's a better idea.

On Sunday, February 7, 2016 at 11:21:17 AM UTC-5, Stefan Karpinski wrote:
>
> There are various assumptions baked into the rational code that may or may 
> not be satisfied by non-integer numeric types. I would suggest taking the 
> code from Base and trying it out without that restriction and seeing how it 
> goes.
>
> On Saturday, February 6, 2016, Fengyang Wang  > wrote:
>
>> I was looking for a Julia package to handle rational functions, when I 
>> noticed that the `Polynomials` package implements `gcd`, `div`, and `rem`. 
>> So it would be possible to simply use `Rational{Poly}`... or so I thought. 
>> Unfortunately, the type `Rational` prevents this use, since it requires its 
>> type parameter to derive from `Integer`.
>>
>> I think it would be more in line with Julia's goal of polymorphism if 
>> `Rational` "just worked" with any Euclidean domain. Is there some 
>> justification for the current behaviour, or should I file this as a issue 
>> (or make a pull request)?
>>
>

Re: [julia-users] CUDArt: loop inside device do

2016-02-12 Thread Joaquim Dias Garcia
Is there any way around it? 

I was planning a monte-carlo code, but all the iteration rely on some huge 
amount of data which is always the same. So sending it back and forth to the 
device would be a bottleneck...

Re: [julia-users] Re: documentation suggestions

2016-02-12 Thread Kristoffer Carlsson
It is hard to actually lose work with git. With git reflog you can always see 
where your HEAD has been and you can then git reset to a previous revision. 

[julia-users] Unitful.jl for physical units

2016-02-12 Thread Andrew Keller
I'm happy to share a package I wrote for using physical units in Julia, 
Unitful.jl . Much credit and 
gratitude is due to Keno Fischer for the SIUnits.jl 
 package which served as my 
inspiration. This is a work in progress, but I think perhaps a serviceable 
one depending on what you're doing. 

Like SIUnits.jl, this package encodes units in the type signature to avoid 
run-time performance penalties. From there, the implementations diverge. 
The package is targeted to Julia 0.5 / master, as there are some 
limitations with how promote_op is used in Julia 0.4 (#13803) 
. I decided it wasn't worth 
targeting 0.4 if the behavior would be inconsistent. 

Some highlights include:

   - Non-SI units are treated on the same footing as SI units, with only a 
   few exceptions (unit conversion method). Use whatever weird units you 
   want.
   - Support for units like micron / (meter Kelvin), where some of the 
   units could cancel out but you don't necessarily want them to.
   - Support for LinSpace and other Range types. Probably there are still 
   some glitches to be found, though.
   - Support for rational exponents of units.
   - Some tests (see these for usage examples).

Please see the documentation for a comprehensive discussion, including 
issues / to do list, as well as how to add your own units, etc.
Comments and feedback are welcome.

Best,
Andrew Keller


Re: [julia-users] Using `Rational` with `Poly`

2016-02-12 Thread Stefan Karpinski
Interesting. If the changes don't hurt the original use case of the type,
they may be reasonable to make.

On Fri, Feb 12, 2016 at 4:59 PM, Fengyang Wang 
wrote:

> You are right; it did not work. I made some modifications to fix it, but
> they required a significant rethinking of many of the methods, so it would
> be a different type entirely. Nemo supports rational functions in any case,
> and I think that's a better idea.
>
> On Sunday, February 7, 2016 at 11:21:17 AM UTC-5, Stefan Karpinski wrote:
>>
>> There are various assumptions baked into the rational code that may or
>> may not be satisfied by non-integer numeric types. I would suggest taking
>> the code from Base and trying it out without that restriction and seeing
>> how it goes.
>>
>> On Saturday, February 6, 2016, Fengyang Wang  wrote:
>>
>>> I was looking for a Julia package to handle rational functions, when I
>>> noticed that the `Polynomials` package implements `gcd`, `div`, and `rem`.
>>> So it would be possible to simply use `Rational{Poly}`... or so I thought.
>>> Unfortunately, the type `Rational` prevents this use, since it requires its
>>> type parameter to derive from `Integer`.
>>>
>>> I think it would be more in line with Julia's goal of polymorphism if
>>> `Rational` "just worked" with any Euclidean domain. Is there some
>>> justification for the current behaviour, or should I file this as a issue
>>> (or make a pull request)?
>>>
>>


Re: [julia-users] CUDArt: loop inside device do

2016-02-12 Thread Tim Holy
On Friday, February 12, 2016 08:30:26 PM Joaquim Dias Garcia wrote:
> Is there any way around it?
> 
> I was planning a monte-carlo code, but all the iteration rely on some huge
> amount of data which is always the same. So sending it back and forth to
> the device would be a bottleneck...

Again, you can use loops, you just have to write your code in a way that is 
actually valid syntax. Something like this:

result = devices(dev->capability(dev)[1]>=2) do devlist
MyCudaModule.init(devlist) do dev
result = Array(T, n)
d_mat = CudaArray(mat)
# more allocation here...
for i = 1:n
result[i] = my_calculation(d_mat, othervariables, i)
end
result
end
end

The problem with your old version is that `result = for i = 1:n...` is not 
supported syntax in julia.

--Tim



Re: [julia-users] Autoformatting for Julia?

2016-02-12 Thread Cristóvão Duarte Sousa
Hum, OK, it uses block Exprs... That may then work for punctuation and
whitespace too.

On Fri, Feb 12, 2016 at 4:20 PM Erik Schnetter  wrote:

> Line numbers are already handled in this way:
>
> julia> parse("f(x)=x") |> dump
> Expr
>   head: Symbol =
>   args: Array(Any,(2,))
> 1: Expr
>   head: Symbol call
>   args: Array(Any,(2,))
> 1: Symbol f
> 2: Symbol x
>   typ: Any
> 2: Expr
>   head: Symbol block
>   args: Array(Any,(2,))
> 1: LineNumberNode
>   file: Symbol none
>   line: Int64 1
> 2: Symbol x
>   typ: Any
>   typ: Any
>
> -erik
>
> On Fri, Feb 12, 2016 at 10:25 AM, Cristóvão Duarte Sousa
>  wrote:
> > Yes, but then where such Exprs will placed? Not inside the args array of
> > other Exprs...
> > I guess that if it is necessary to revert back to source code from an
> AST,
> > then a modification to Expr has to be made...
> >
> > On Fri, Feb 12, 2016 at 1:47 PM Erik Schnetter 
> wrote:
> >>
> >> On Fri, Feb 12, 2016 at 5:17 AM, Cristóvão Duarte Sousa
> >>  wrote:
> >> > I don't know if it has been said here before, sorry if I'm repeating,
> >> > but:
> >> > a way to represent the "concrete" syntax tree, convert it to AST and
> >> > then
> >> > back would be of great use here, see
> >> > https://github.com/JuliaLang/JuliaParser.jl/issues/22 .
> >> >
> >> > I actually thought a lot about that, and imagine that the `Expr` type
> >> > could
> >> > have an extra field to hold syntax delimiters (punctuation and
> >> > whitespace)
> >> > which is found around and between its arguments.
> >>
> >> Adding to the `Expr` type is expensive, since it's used a lot.
> >> Instead, you can add extra `Expr` objects, e.g. `Expr(:empty_line)`,
> >> or `Expr(:block_comment, "text")`, or `Expr(:inline_comment, "text")`.
> >>
> >> -erik
> >>
> >> > But a great knowledge of the parsers, both Flisp and Julia written
> ones,
> >> > would be required.
> >> > Then I also wondered that maybe one formal, but incomplete, grammar
> >> > could be
> >> > useful to construct such tree, as in intermediate step between source
> >> > code
> >> > and real AST.
> >> >
> >> > That would allow the creation of very powerful autoformatting tools,
> >> > along
> >> > with lints, refactoring and other advanced IDE functionalities.
> >> >
> >> > On Friday, February 12, 2016 at 4:58:33 AM UTC, Maxim Grechkin wrote:
> >> >>
> >> >> Was there any progress on this lately? I've noticed that
> atom-beautify
> >> >> plugin doesn't have Julia
> >> >> support(https://github.com/Glavin001/atom-beautify/issues/799), but
> >> >> there
> >> >> doesn't seem to be a tool that it can hook into.
> >> >>
> >> >> On Saturday, January 11, 2014 at 9:22:14 AM UTC-8, Stefan Karpinski
> >> >> wrote:
> >> >>>
> >> >>> Kind of. I don't think that expression printing is even remotely
> good
> >> >>> enough for this yet, but that's the basic idea that makes the most
> >> >>> sense to
> >> >>> me. No point in using separate parse or print code when there's
> >> >>> already
> >> >>> functions that do this stuff.
> >> >>>
> >> >>>
> >> >>> On Sat, Jan 11, 2014 at 12:06 PM, Job van der Zwan
> >> >>> 
> >> >>> wrote:
> >> 
> >>  So you are saying that the most of the tooling required for an
> >>  auto-formatting tool is already there?
> >> 
> >>  On Thursday, 9 January 2014 14:42:40 UTC+1, Stefan Karpinski wrote:
> >> >
> >> > I would be into having an auto-formatting tool. The way to do this
> >> > would be to work on the printing of ASTs until the way the code
> >> > prints is
> >> > the standard way it should be formatted. Then you have an
> >> > auto-formatter:
> >> > parse the code and print the resulting AST. One missing thing is
> >> > that parser
> >> > currently discards comments.
> >> >
> >> >
> >> > On Thu, Jan 9, 2014 at 6:48 AM, Job van der Zwan
> >> > 
> >> > wrote:
> >> >>
> >> >> The problem I see with that is that you can wait for a very long
> >> >> time
> >> >> before any consensus emerges. There are simply many choices to be
> >> >> made in
> >> >> that regard which at the end of the day are kind of arbitrary -
> >> >> that a
> >> >> choice is made and consistently followed is more important, and
> >> >> again the
> >> >> benefit of autoformatting is that you don't have to waste putting
> >> >> effort
> >> >> into doing so.
> >> >>
> >> >> Having something something concrete to respond to also helps with
> >> >> the
> >> >> discussion - an autoformatting tool will impose a certain style,
> >> >> which will
> >> >> drive the discussion of standardising proper style. If people
> >> >> disagree with
> >> >> the formatting it provides, great! That means a discussion is
> >> >> triggered.
> >> >>
> 

[julia-users] Re: looking for an equivalent function to "independence_test" in the R coin package

2016-02-12 Thread Taylor Maxwell
Depending on what parts of their package you are interested in, to 
implement a small subset of their functionality I recently wrote some code 
in both Julia and R (to make sure I had an idea what they were doing to 
replicate their results)  based on the equations in page 258 of:
Hothorn T, Hornik K, Van De Wiel MA, Zeileis A, 2006. A lego system for 
conditional inference. The American Statistician 60:257-263.

The base "independencetest" function I wrote only implements scenarios 
where you have ytrans (one or more transforms of a dependent variable) and 
one set of factors as a matrix of indicator variable (xtrans) although I 
think incorporating more on the "x" side would not be hard.  It does not 
take into account multiple "blocks" and so far I have not needed to look 
into how hard that would be.

On top of this I wrote functions to do the some of the transformations that 
convert y to ytrans as input into the independenttest function (which is 
surprisingly simple).  The transformations I wrote make it possible to 
implement the Kruskal-Wallis test for location, the Fligner-Killeen test 
for scale, and a multisample Lepage test that incorporates those two tests 
jointly (the reason I did this), all with the quadratic test (Cquad).  It 
would be trivial to write the transformations for many of the other 
nonparametric tests. I wrote it to do both a parametric test as well one 
using Monte Carlo. It appears to work well and reasonably fast with the 
little testing I have done.

If you are interested I could send you the code.


On Thursday, February 11, 2016 at 5:27:26 PM UTC-7, Albert Cardona wrote:
>
> The formula operator is there via the GLM package [1], but I can't find 
> the equivalent of the independent_test function [2].
>
> [1] https://github.com/JuliaStats/GLM.jl 
> [2] http://www.inside-r.org/packages/cran/coin/docs/IndependenceTest
>
>
> Thanks in advance for any pointers.
>
> Albert
>