[julia-users] Re: Array of vectors in type definition

2016-07-18 Thread Patrick Kofod Mogensen
Vector{T} means a vector where the elements are of type T. If T = Vector{S} 
then every element in the original vector is itself a vector with elements 
of type S. In your case, S = Float64 and T = Vector{S} = Vector{Float64}. I 
think it's a pretty good idea to make sure you understand this, as the type 
system is important to understand in order to fully exploit multiple 
dispatch, and to get good performance out of Julia programs.

On Tuesday, July 19, 2016 at 12:12:36 AM UTC+2, Ferran Mazzanti wrote:
>
> Hi Mauro,
> your solution seems to work... though I do not understand exactly why :)
> Even Vector{Array{Float64}} works.
> Thanks for your kind help :)
> Ferran.
>


Re: [julia-users] Re: JuliaCon schedule announced

2016-07-18 Thread Christian Peel
I saw quite a few videos with the same problem.

On Mon, Jul 18, 2016 at 1:52 AM, Mauro  wrote:

> A request for a correction: in Keno's Gallium talk the bottom line of
> the screen is cut off.  As most of his talk is a demo, where most things
> happen in the bottom line, this makes it hard to follow along.  Is there
> any chance that this can be re-edited?
>
> On Sun, 2016-07-17 at 07:00, Tony Kelman  wrote:
> > I don't see the tutorial that David Sanders gave, or the one that I
> gave. Might be others missing too?
>



-- 
chris.p...@ieee.org


[julia-users] Re: Array of vectors in type definition

2016-07-18 Thread 'Greg Plowman' via julia-users
Although Vector{Array{Float64}} works, be aware that it is specifying a 
vector of the abstract type Array{Float64} (any dimension allowed).
In general this is not recommended. It is better to specify a concrete type 
where possible.
In your case, this probably means Vector{Vector{Float64}}.


On Tuesday, July 19, 2016 at 8:12:36 AM UTC+10, Ferran Mazzanti wrote:

> Hi Mauro,
> your solution seems to work... though I do not understand exactly why :)
> Even Vector{Array{Float64}} works.
> Thanks for your kind help :)
> Ferran.
>


[julia-users] Re: Calculating pi using parallel computing

2016-07-18 Thread 'Greg Plowman' via julia-users
Maybe something like this:

See http://docs.julialang.org/en/release-0.4/manual/parallel-computing/ 
(particularly 
section Parallel Map and Loops)

@everywhere f(x) = 4/(1+(x*x))

function calc_pi(n)
a,b = 0,1
dx = (b-a)/n
sumfx = @parallel (+) for x in a:dx:b
f(x)
end
return sumfx * dx
end

function test_pi()
for e in 1:9
n = 10^e
pi_approx = calc_pi(n)
@printf("%12d %20.15f %20.15f\n", n, pi_approx, pi_approx - pi)
end
end



On Monday, July 18, 2016 at 2:50:06 PM UTC+10, Arundhyoti Sarkar wrote:

> Hi Guys,
>
> I am trying to run Julia on a cluster for the first time. Essentially I 
> want to calculate the value of Pi by numerical integration. integration of 
> 4/(1+x*x) from 0 to 1 = pi 
> I have written this piece of code but I am unable to parallelize it 
> properly. 
>
> ```
> n=100 # larger the value, larger the number of pieces for integration, 
> greater the precision.
> @everywhere f(x) = 4/(1+(x*x))
> a,b = 0,1
> delta = (b-a)/n
> xs = a+ (0:n-1) * delta
> pieces = pmap(f,xs)
> r1 = @spawn cpi_P.calsum(pieces[1:5])
> r2 = @spawn cpi_P.calsum(pieces[6:end])
>
> println("Process 1 : ",fetch(r1)* delta)
> println("Process 2 : ",fetch(r2)* delta)
> print("PI = ")
> ```
> cpi_P.jl is a module containing the following
> ```
> module cpi_P
> export calsum
>
>   function calsum(fx)
> sum = 0
> for i in 1:size(fx,1)
>sum = sum + fx[i]
> end
> return sum
>end
>
> end
> ```
> The above code works when the number of processes are 2. I want to 
> generalize this to N processes where I can assign N set of pieces for 
> integration using @parallel. Problem is that calsum is dependent on the 
> limits and the cpi_P module needs to accept fx and the limits as inputs. 
>
> I am a novice. Any kind of help will e deeply appreciated. Thanks!
>
>

[julia-users] Setting socket options in ZMQ.jl

2016-07-18 Thread Salman Haider

ZeroMQ has an option where the subscribe socket only keeps the last 
message. I was wondering if there is a way to specify that.
Something like the following:

using ZMQ
ctx = Context()
s = Socket(ctx, SUB)
ZMQ.subscribe(s)
ZMQ.set_subscribe(ZMQ.CONFLATE, 1)   # ERROR: LoadError: UndefVarError: 
CONFLATE not defined
ZMQ.connect(s, "tcp://127.0.0.1:5001")


while true
 msg = bytestring(ZMQ.recv(s))
 println(msg)
end



The C++ analog would go something like this:
  zmq::context_t context (1);
  zmq::socket_t subscriber (context, ZMQ_SUB);

  int conflate = 1;

  *subscriber**.setsockopt(ZMQ_CONFLATE, &conflate, sizeof(conflate) );   
// need this in julia*
  subscriber.connect("tcp://localhost:5556");
  subscriber.setsockopt(ZMQ_SUBSCRIBE, "", 0); 


More generally, how are socket options specified in Julia?
http://api.zeromq.org/4-0:zmq-setsockopt

Thanks.


[julia-users] Re: Array of vectors in type definition

2016-07-18 Thread Ferran Mazzanti
Hi Mauro,
your solution seems to work... though I do not understand exactly why :)
Even Vector{Array{Float64}} works.
Thanks for your kind help :)
Ferran.


[julia-users] Re: Calculating pi using parallel computing

2016-07-18 Thread David van Leeuwen
Hello Arundhyoti,

This is probably the answer you were looking for, but a while ago I 
collected several algorithms for computing π.  I just updated these to 
Julia-0.4 here . 

On Monday, July 18, 2016 at 6:52:25 AM UTC+2, Arundhyoti Sarkar wrote:
>
>  The value of n is 10 in the above program
> It can be increased for precision.



Re: [julia-users] Re: Julia String Manipulation

2016-07-18 Thread Yared Melese
Perfect!!! Thank you very much 

It works!

On Monday, July 18, 2016 at 2:39:21 PM UTC-5, Tom Breloff wrote:

> julia> parse(Float64,ans[1])
> 200.5
>
>
> On Mon, Jul 18, 2016 at 3:33 PM, Yared Melese  > wrote:
>
>> Thanks for quick response, it works in most cases but when the number is 
>> float, parse has problem as shown below 
>>
>> How about when the number has decimal points for example 
>>
>> exString = "Exact number 390  \n Exact qty: +200.5 people \n Starting 
>> number:  5 now 16.5A_C"
>> srchStr ="Exact qty:"
>> search(exString, srchStr)
>> ans = exString[search(exString, srchStr)[end]+1:end] |> strip |> split
>> value1= parse(string,ans[1])
>>
>> Thanks 
>> Yared
>>
>>
>> On Monday, July 18, 2016 at 1:31:16 PM UTC-5, Yared Melese wrote:
>>
>>> Hello 
>>>
>>> I was trying to parse a number from string as shown below. Would you 
>>> please let me know if there is easy way to get the number after 
>>> a specific string ? please note that the string can be variable(different)
>>>
>>> goal is to specify search string and put out exact number with out any 
>>> text before and after the number. 
>>>
>>> The current program shown below has two faults 
>>> 1. on line 10, I have to manually enter starting word but cannot put a 
>>> variable as shown below 
>>> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
>>>
>>> 2. I have to only get a number, that means anything in front and behind 
>>> that number should be stripped off
>>>
>>>
>>>
>>> exString = "Exact number 390  \n Exact qty: +200 people \n Starting 
>>> number:  5 now 16.5A_C"
>>> srchStr ="Exact qty:"
>>> b= split(exString,"\n") # put each line to an array form
>>> #find index of excact string match
>>> for i in 1:length(b)
>>> if contains(b[i], srchStr) == true
>>>   srchInd = i
>>> end
>>>end
>>> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
>>> d=replace(c.match, srchStr,"")
>>> print(d)
>>>
>>
>

Re: [julia-users] Re: Julia String Manipulation

2016-07-18 Thread Tom Breloff
julia> parse(Float64,ans[1])
200.5


On Mon, Jul 18, 2016 at 3:33 PM, Yared Melese  wrote:

> Thanks for quick response, it works in most cases but when the number is
> float, parse has problem as shown below
>
> How about when the number has decimal points for example
>
> exString = "Exact number 390  \n Exact qty: +200.5 people \n Starting
> number:  5 now 16.5A_C"
> srchStr ="Exact qty:"
> search(exString, srchStr)
> ans = exString[search(exString, srchStr)[end]+1:end] |> strip |> split
> value1= parse(string,ans[1])
>
> Thanks
> Yared
>
>
> On Monday, July 18, 2016 at 1:31:16 PM UTC-5, Yared Melese wrote:
>
>> Hello
>>
>> I was trying to parse a number from string as shown below. Would you
>> please let me know if there is easy way to get the number after
>> a specific string ? please note that the string can be variable(different)
>>
>> goal is to specify search string and put out exact number with out any
>> text before and after the number.
>>
>> The current program shown below has two faults
>> 1. on line 10, I have to manually enter starting word but cannot put a
>> variable as shown below
>> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
>>
>> 2. I have to only get a number, that means anything in front and behind
>> that number should be stripped off
>>
>>
>>
>> exString = "Exact number 390  \n Exact qty: +200 people \n Starting
>> number:  5 now 16.5A_C"
>> srchStr ="Exact qty:"
>> b= split(exString,"\n") # put each line to an array form
>> #find index of excact string match
>> for i in 1:length(b)
>> if contains(b[i], srchStr) == true
>>   srchInd = i
>> end
>>end
>> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
>> d=replace(c.match, srchStr,"")
>> print(d)
>>
>


[julia-users] Re: Julia String Manipulation

2016-07-18 Thread Yared Melese
Thanks for quick response, it works in most cases but when the number is 
float, parse has problem as shown below 

How about when the number has decimal points for example 

exString = "Exact number 390  \n Exact qty: +200.5 people \n Starting 
number:  5 now 16.5A_C"
srchStr ="Exact qty:"
search(exString, srchStr)
ans = exString[search(exString, srchStr)[end]+1:end] |> strip |> split
value1= parse(string,ans[1])

Thanks 
Yared

On Monday, July 18, 2016 at 1:31:16 PM UTC-5, Yared Melese wrote:

> Hello 
>
> I was trying to parse a number from string as shown below. Would you 
> please let me know if there is easy way to get the number after 
> a specific string ? please note that the string can be variable(different)
>
> goal is to specify search string and put out exact number with out any 
> text before and after the number. 
>
> The current program shown below has two faults 
> 1. on line 10, I have to manually enter starting word but cannot put a 
> variable as shown below 
> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
>
> 2. I have to only get a number, that means anything in front and behind 
> that number should be stripped off
>
>
>
> exString = "Exact number 390  \n Exact qty: +200 people \n Starting 
> number:  5 now 16.5A_C"
> srchStr ="Exact qty:"
> b= split(exString,"\n") # put each line to an array form
> #find index of excact string match
> for i in 1:length(b)
> if contains(b[i], srchStr) == true
>   srchInd = i
> end
>end
> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
> d=replace(c.match, srchStr,"")
> print(d)
>


Re: [julia-users] Julia String Manipulation

2016-07-18 Thread Tom Breloff
Something like this?

julia> search(exString, srchStr)
21:30

julia> exString[search(exString, srchStr)[end]+1:end] |> strip |> split
7-element Array{SubString{ASCIIString},1}:
 "+200"
 "people"
 "Starting"
 "number:"
 "5"
 "now"
 "16.5A_C"

julia> parse(Int, ans[1])
200


On Mon, Jul 18, 2016 at 2:31 PM, Yared Melese  wrote:

> Hello
>
> I was trying to parse a number from string as shown below. Would you
> please let me know if there is easy way to get the number after
> a specific string ? please note that the string can be variable(different)
>
> goal is to specify search string and put out exact number with out any
> text before and after the number.
>
> The current program shown below has two faults
> 1. on line 10, I have to manually enter starting word but cannot put a
> variable as shown below
> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
>
> 2. I have to only get a number, that means anything in front and behind
> that number should be stripped off
>
>
>
> exString = "Exact number 390  \n Exact qty: +200 people \n Starting
> number:  5 now 16.5A_C"
> srchStr ="Exact qty:"
> b= split(exString,"\n") # put each line to an array form
> #find index of excact string match
> for i in 1:length(b)
> if contains(b[i], srchStr) == true
>   srchInd = i
> end
>end
> c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
> d=replace(c.match, srchStr,"")
> print(d)
>


Re: [julia-users] Re: testing intrument Automation

2016-07-18 Thread Yared Melese
Thanks - Instrument drivers works just fine 

Here is reference for others 

using Instruments
   PXA = GenericInstrument()
   connect!(PXA,"GPIB0::18::INSTR")   # Connect to Instrument with name PXA
   write(PXA, "system:preset")  # Write to PXA instrument 
   acp = split((query(PXA, "read:ACP?")),",")  # read ACP from Inst 



On Monday, July 4, 2016 at 1:29:50 PM UTC-5, Keno Fischer wrote:

> You may want to look at Instruments.jl: 
> https://github.com/BBN-Q/Instruments.jl 
>
> On Mon, Jul 4, 2016 at 2:00 PM, Alex Mellnik  > wrote: 
> > Hi Yared, 
> > 
> > This should be possible, but it could be less than ideal in some 
> instances. 
> > What exactly are you hoping to automate? 
> > 
> > Like Isaiah, I don't know of a specific GPIB library for Julia, but if 
> you 
> > are using the NI drivers you can call them directly from Julia (see 
> > 
> http://docs.julialang.org/en/release-0.4/manual/calling-c-and-fortran-code/ 
> > and there's a bit of specific information about the GPIB libraries here: 
> > 
> http://alex.mellnik.net/application-notes/application-notesusing-nis-gpib-drivers-in-qt/).
>  
>
> > 
> > -A 
> > 
> > 
> > On Saturday, July 2, 2016 at 5:39:07 PM UTC-7, Yared Melese wrote: 
> >> 
> >> Can Julia be used as instrument test Automation? Send commands via GPIB 
> to 
> >> different instruments 
> >> 
> >> If so is there Visa library for it? 
> >> 
> >> Thanks 
> >> Yared 
>


[julia-users] Julia String Manipulation

2016-07-18 Thread Yared Melese
Hello 

I was trying to parse a number from string as shown below. Would you please 
let me know if there is easy way to get the number after a specific string 
? please note that the string can be variable(different)

goal is to specify search string and put out exact number with out any 
text before and after the number. 

The current program shown below has two faults 
1. on line 10, I have to manually enter starting word but cannot put a 
variable as shown below 
c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])

2. I have to only get a number, that means anything in front and behind 
that number should be stripped off



exString = "Exact number 390  \n Exact qty: +200 people \n Starting 
number:  5 now 16.5A_C"
srchStr ="Exact qty:"
b= split(exString,"\n") # put each line to an array form
#find index of excact string match
for i in 1:length(b)
if contains(b[i], srchStr) == true
  srchInd = i
end
   end
c = match(r"$srchStr[\w|\w %s%f%f|.|:|+]*", b[srchInd])
d=replace(c.match, srchStr,"")
print(d)


[julia-users] Re: Fast higher order differentiation

2016-07-18 Thread Kristoffer Carlsson
Take a look at ReverseDiffSource.jl. 

On Monday, July 18, 2016 at 3:59:10 AM UTC-4, Eric Forgy wrote:
>
> Hi Young Chun,
>
> Welcome to Julia! Like Jeffrey, I think your question was a good one and 
> the outcome is even better.
>
> I don't know how others feel, but as an "oldie", it is super encouraging 
> to me that:
>
>1. People can even ask questions like this
>2. Julia provides a highly satisfactory solution
>
> When I was a kid, we had to walk uphill to in the snow to school both ways 
> and we could not ask such questions. Even if we could ask, the answer would 
> be less than satisfactory. The possibilities the young scientists today are 
> provided is tremendous and I look forward to seeing what you and others 
> come up with.
>
> Out of curiosity, is anyone using Julia for fast polynomial approximations 
> such as fast-multipole methods in gravitation/electromagnetics? This kind 
> of fast auto-differentiation seems perfectly suited for these large-scale 
> problems.
>
> Cheers!
> Eric
>


Re: [julia-users] Array of vectors in type definition

2016-07-18 Thread Mauro
Array{Float64}[] creates an instance of type Vector{Array{Float64}}.
You need the type, probably Vector{Vector{Float64}}.


On Mon, 2016-07-18 at 17:13, Ferran Mazzanti  wrote:
> Guys,
>
> today I've tried to include a vector of vectors as part of atype
> definition, something like
>
> type caw
>legs :: Int64
>spots :: Array{Float64}[]
> end
>
> but that fails. Shall I understand that it is not possible to define that
> in a type definition? I just wanted to include a structrure that could grow
> by adding more data dynamically...
>
> Any hint about this?
>
> Thanks for your kind help,
>
> Ferran.


[julia-users] Array of vectors in type definition

2016-07-18 Thread Ferran Mazzanti
Guys,

today I've tried to include a vector of vectors as part of atype 
definition, something like

type caw
   legs :: Int64
   spots :: Array{Float64}[]
end

but that fails. Shall I understand that it is not possible to define that 
in a type definition? I just wanted to include a structrure that could grow
by adding more data dynamically...

Any hint about this?

Thanks for your kind help,

Ferran.


[julia-users] Re: [ANN] LombScargle.jl: compute periodogram for unevenly sampled data

2016-07-18 Thread Ken B
Thank you Mose for this package! I've had the need for this functionality 
before but back then not the time to implement it. When the need arises 
again I now know where to go :)

On Monday, 18 July 2016 10:16:28 UTC+2, Mosè Giordano wrote:
>
> Dear all,
>
> I'm pleased to announce the first release of LombScargle.jl 
> , a package to compute the 
> Lomb-Scargle periodogram 
> .  
> Differently from standard FFT, this can be used to find periodicities in 
> unevenly sampled data, which is a fairly common case in astronomy, a field 
> where this periodogram is widely used.
>
> The README.md has some examples of use, in addition a manual is available 
> at http://lombscarglejl.readthedocs.io/
>
> The package implements the standard Lomb-Scargle periodogram that doesn't 
> take into account a non-null mean of the signal (but it is possible to 
> automatically subtract the average of the signal from the signal itself, 
> and this is the default), and the generalised Lomb-Scargle algorithm which 
> instead can deal with a non-null mean.
>
> Relevant papers on this topic are:
>
>- Townsend, R. H. D. 2010, ApJS, 191, 247 (URL: 
>http://dx.doi.org/10.1088/0067-0049/191/2/247, Bibcode: 
>http://adsabs.harvard.edu/abs/2010ApJS..191..247T)
>- Zechmeister, M., Kürster, M. 2009, A&A, 496, 577 (URL: 
>http://dx.doi.org/10.1051/0004-6361:200811296, Bibcode: 
>http://adsabs.harvard.edu/abs/2009A%26A...496..577Z)
>
> In the future I may implement another much-faster Lomb-Scargle algorithm 
> by Press & Rybicki (1989, ApJ, 338, 277), which however requires the data 
> to be equally sampled (but in this case also the FFT can be used).
>
> In order to test and benchmark the results of LombScargle.jl I compared 
> the result with those of equivalent methods 
> 
>  
> provided by Astropy package.  Running Julia 0.5 I found that the standard 
> Lomb-Scargle periodogram as implemented in LombScargle.jl is ~40% and ~65 
> faster than the "scipy" and "cython" methods of Astropy, respectively 
> (they're both in Cython, not pure Python).  Instead, the generalised 
> Lomb-Scargle periodogram in LombScargle.jl is ~25% faster than the "cython" 
> method in Astropy.
>
> The LombScargle.jl package is licensed under the MIT “Expat” License.
>
> Bye,
> Mosè
>


Re: [julia-users] Threading in 0.5

2016-07-18 Thread Yichao Yu
On Mon, Jul 18, 2016 at 4:25 AM, Bart Janssens  wrote:
> Op ma 18 jul. 2016 00:10 schreef Yichao Yu :
>>
>> On Sun, Jul 17, 2016 at 6:07 PM, Bart Janssens 
>> wrote:
>> > Hi all,
>> >
>> > I'd like to experiment a bit with 0.5 threading for QML.jl, by trying to
>> > call a Julia function from within the QML rendering thread, which is
>> > created
>>
>> This is not supported.
>
>
> Ok, are there any plans to support this kind of scenario? Should I create an
> issue on GitHub for this?

Likely not in 1.0. It's a superset of
https://github.com/JuliaLang/julia/issues/16134 and it's unclear now
(to me at least) what the programming model is with a mix of worker
threads (i.e. spawning threads is merely an optimization) and requires
threads (i.e. the program will not behave correctly if the code is
running on the same thread).


[julia-users] [ANN] Calc.jl - a calculator for the REPL

2016-07-18 Thread Tom Short
https://github.com/tshort/Calc.jl

This adds a REPL mode for an RPN calculator initiated by the = key.
Operations and key strokes generally mimic Emacs Calc. It's pretty easy to
add your own operations. The RPN style can use less keys. Undo and redo are
easy.


Re: [julia-users] Re: JuliaCon schedule announced

2016-07-18 Thread Mauro
A request for a correction: in Keno's Gallium talk the bottom line of
the screen is cut off.  As most of his talk is a demo, where most things
happen in the bottom line, this makes it hard to follow along.  Is there
any chance that this can be re-edited?

On Sun, 2016-07-17 at 07:00, Tony Kelman  wrote:
> I don't see the tutorial that David Sanders gave, or the one that I gave. 
> Might be others missing too?


Re: [julia-users] Threading in 0.5

2016-07-18 Thread Bart Janssens
Op ma 18 jul. 2016 00:10 schreef Yichao Yu :

> On Sun, Jul 17, 2016 at 6:07 PM, Bart Janssens 
> wrote:
> > Hi all,
> >
> > I'd like to experiment a bit with 0.5 threading for QML.jl, by trying to
> > call a Julia function from within the QML rendering thread, which is
> created
>
> This is not supported.
>

Ok, are there any plans to support this kind of scenario? Should I create
an issue on GitHub for this?

>


[julia-users] Re: ANN: New Julia Packages website

2016-07-18 Thread Adrian Salceanu
Sure, I'll take a look at the current source and then we can go into more 
details. 

In general though, I think it's important to come up with a higher level 
(branding/visual) strategy, in regards to Julia online resources. 

1. what's the value of (web) design. http://julialang.org/ looks a bit 
simple/dated, though that's not necessarily a bad thing. Some other 
languages have fancy home pages 
(http://www.scala-lang.org/, https://kotlinlang.org/, https://www.python.org/). 
Other go for a minimalist approach 
(https://swift.org/, http://elixir-lang.org/). The minimalist approach is 
nice and it's in line with what Julia has now. In my opinion the current 
website can stay pretty much as it is but ideally with an update in terms 
of typography. The serif font doesn't quite communicate "new, modern 
programming language and technology". 

2. how will the ecosystem be organized? For example, now the Pkg project 
(and the listing) is a subdomain of julialang.org. This hints that it's the 
same website and it might make sense to keep the same visual identity. 
Other technologies have opted to separate the package managers into 
distinct projects, with different websites and visual identities 
(https://hex.pm/, https://rubygems.org/, https://www.npmjs.com/, etc). 

A

miercuri, 13 iulie 2016, 14:07:26 UTC+2, Tony Kelman a scris:
>
> "Improvements" might mean up to and including complete replacement. The 
> main thing I'd want to be sure we keep is having a mechanism for uploading 
> automated nightly results from PackageEvaluator, building the pulse page 
> http://pkg.julialang.org/pulse.html, etc.
>
>
> On Wednesday, July 13, 2016 at 2:13:25 AM UTC-7, Adrian Salceanu wrote:
>>
>> Thanks Mosè! :) 
>>
>> I think Tony's idea is the best way to go about it. This website is more 
>> of a temporary patch as searching in pkg.julialang is inefficient (just 
>> browser search with little context and then if something looks interesting 
>> you have to open the repo, look around, get back, etc). Like I said, I'd 
>> very much prefer to collaborate on building a modern and useful package 
>> management and discovery ecosystem, something in the lines of 
>> https://hex.pm or https://rubygems.org - rather than spread our limited 
>> resources on similar projects. 
>>
>> Tony, happy to help, but we need to get more specific about improvements. 
>> If we're talking basic additions to the existing codebase, we can add 
>> search capabilities as I also expose this data through an API (ex: 
>> http://genieframework.com/api/v1/packages/search?q=tensorflow). If we're 
>> talking about building a modern platform, similar to say hex.pm then 
>> it's easier to extend the website I've built (as it's almost there). 
>>
>>
>> miercuri, 13 iulie 2016, 09:04:51 UTC+2, Tony Kelman a scris:
>>>
>>> Regarding package keywords, that would be something to include in the 
>>> Pkg3 manifest file, see https://github.com/JuliaLang/PkgDev.jl/issues/37 
>>> for initial thoughts.
>>>
>>> I'm pretty much maintaining pkg.julialang.org at the moment, we can 
>>> certainly consider improvements. The website source is in the JuliaCI 
>>> organization, as are the scripts that generate it (in PackageEvaluator.jl) 
>>> nightly.
>>>
>>>
>>> On Tuesday, July 12, 2016 at 9:52:05 AM UTC-7, Mosè Giordano wrote:

 Hi Adrian,

 nice website!

 What I'd like to have in a Julia packages website is categories.  This 
 would greatly enhances the possibilities for the users to find the package 
 they're looking for.  Currently one must use search strings, but they may 
 not be very effective if the package author didn't use the exact words one 
 is using in the search.  Of course this requires help from package 
 authors.  I'm using a "keywords" cookie in the package comments like the 
 one suggested in Emacs Lisp conventions: 
 https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html#Library-Headers
   
 Maybe something similar can be implemented in METADATA.jl and Pkg.generate 
 could accept a category list as argument.  We can choose a set of 
 "official" keywords that are listed in Julia packages websites.  I hope 
 this will improve discoverability of packages.

 Bye,
 Mosè


 I've setup an early version of a Julia packages website, for your 
> package discovery pleasure: http://genieframework.com/packages 
>
> Fair warning, this is a test case website for Genie.jl, the full stack 
> web framework I'm working on - and 90% of my focus was on building the 
> actual framework and the app, rather than the accuracy of the data. 
>
> That being said, the app works quite well as far as I can tell 
> (feedback welcome!) and compared to pkg.julialang.org it has a few 
> extra features:  
> * full text search in README 
> * it includes both METADATA registered packages and extra packages 
> crawled from GitHu

[julia-users] [ANN] LombScargle.jl: compute periodogram for unevenly sampled data

2016-07-18 Thread Mosè Giordano
Dear all,

I'm pleased to announce the first release of LombScargle.jl
, a package to compute the
Lomb-Scargle periodogram
.
Differently from standard FFT, this can be used to find periodicities in
unevenly sampled data, which is a fairly common case in astronomy, a field
where this periodogram is widely used.

The README.md has some examples of use, in addition a manual is available
at http://lombscarglejl.readthedocs.io/

The package implements the standard Lomb-Scargle periodogram that doesn't
take into account a non-null mean of the signal (but it is possible to
automatically subtract the average of the signal from the signal itself,
and this is the default), and the generalised Lomb-Scargle algorithm which
instead can deal with a non-null mean.

Relevant papers on this topic are:

   - Townsend, R. H. D. 2010, ApJS, 191, 247 (URL:
   http://dx.doi.org/10.1088/0067-0049/191/2/247, Bibcode:
   http://adsabs.harvard.edu/abs/2010ApJS..191..247T)
   - Zechmeister, M., Kürster, M. 2009, A&A, 496, 577 (URL:
   http://dx.doi.org/10.1051/0004-6361:200811296, Bibcode:
   http://adsabs.harvard.edu/abs/2009A%26A...496..577Z)

In the future I may implement another much-faster Lomb-Scargle algorithm by
Press & Rybicki (1989, ApJ, 338, 277), which however requires the data to
be equally sampled (but in this case also the FFT can be used).

In order to test and benchmark the results of LombScargle.jl I compared the
result with those of equivalent methods

provided by Astropy package.  Running Julia 0.5 I found that the standard
Lomb-Scargle periodogram as implemented in LombScargle.jl is ~40% and ~65
faster than the "scipy" and "cython" methods of Astropy, respectively
(they're both in Cython, not pure Python).  Instead, the generalised
Lomb-Scargle periodogram in LombScargle.jl is ~25% faster than the "cython"
method in Astropy.

The LombScargle.jl package is licensed under the MIT “Expat” License.

Bye,
Mosè


[julia-users] Re: Fast higher order differentiation

2016-07-18 Thread Eric Forgy
Hi Young Chun,

Welcome to Julia! Like Jeffrey, I think your question was a good one and 
the outcome is even better.

I don't know how others feel, but as an "oldie", it is super encouraging to 
me that:

   1. People can even ask questions like this
   2. Julia provides a highly satisfactory solution

When I was a kid, we had to walk uphill to in the snow to school both ways 
and we could not ask such questions. Even if we could ask, the answer would 
be less than satisfactory. The possibilities the young scientists today are 
provided is tremendous and I look forward to seeing what you and others 
come up with.

Out of curiosity, is anyone using Julia for fast polynomial approximations 
such as fast-multipole methods in gravitation/electromagnetics? This kind 
of fast auto-differentiation seems perfectly suited for these large-scale 
problems.

Cheers!
Eric