Re: [julia-users] Unexpected slowdown

2016-08-22 Thread Achu
I see. Thanks!

On Monday, 22 August 2016 18:28:15 UTC-5, Yichao Yu wrote:
>
>
>
> On Tue, Aug 23, 2016 at 4:58 AM, Achu  
> wrote:
>
>> I have a simple piece of code that finds me 10001 prime numbers. 
>>
>> function a()
>> pl=[2]
>> n=3
>> ct=1
>> while(ct<10001)
>> isnprime=true
>> for a in pl  
>> if n%a==0
>> isnprime=false
>> break
>> end
>> end
>> if isnprime
>> push!(pl,n)
>> ct+=1
>> end
>> n+=2
>> end
>> return pl
>> end
>>
>> When I tweaked the code to check only prime factors less than the sqrt of 
>> the number, it slowed it down by a factor of 3.
>>
>> function a()
>> pl=[2]
>> n=3
>> ct=1
>> while(ct<10001)
>> isnprime=true
>> for a in pl[pl.>
>
> Loops are as fast as "vectorized" (in MATLAB sense) array operations so 
> this won't give you any speed improvement at all.
>
> The loop was operating on all the elements (O(n)) and the check you add is 
> also O(n) with possibly a larger constant factor since it allocates 
> multiple arrays
>
> Simply do
>
> if a >= sqrt(n)
>break
> end
>
> should work
>  
>
>> if n%a==0
>> isnprime=false
>> break
>> end
>> end
>> if isnprime
>> push!(pl,n)
>> ct+=1
>> end
>> n+=2
>> end
>> return pl
>> end
>>
>> Why is that?
>>
>>
>

[julia-users] Re: Why aren't multiple const definitions allowed on a line?

2016-08-22 Thread 'Greg Plowman' via julia-users
global const u = 7, v = 11, w = 13
seems to work.



[julia-users] Re: CHOLMODException

2016-08-22 Thread vavasis
Dominique,

No problem!  Just so you know, the "inner" sparse constructor (in which the 
column-start and row-index arrays are directly specified) does not check 
the ordering.  However, the higher-level 'outer' constructors, e.g., the 
constructor sparse(is,js,es,m,n) that mimics Matlab syntax, will take care 
of the ordering and catch errors.

-- Steve


On Tuesday, August 23, 2016 at 12:37:38 AM UTC-4, Dominique Orban wrote:
>
> Many thanks, Steve! Unsorted row indices were the issue. I mistakenly 
> assumed that calling sparse() sorted the indices for me.
>
> On Monday, August 22, 2016 at 11:24:19 PM UTC-4, vav...@uwaterloo.ca 
> wrote:
>>
>> I've been using the cholmod routines recently also in 0.4.6 (Windows 64) 
>> and have never seen this error.  The routine cholmod_check_sparse seems to 
>> be in source code file cholmod_check.c of the SuiteSparse source code, and 
>> it doesn't seem to do much except check that the row indices are in 
>> increasing order for each column and that all indices are in range.  Is it 
>> possible that your matrix has been corrupted and has row indices out of 
>> order or out of range?
>>
>>
>>
>> On Monday, August 22, 2016 at 9:43:59 PM UTC-4, Dominique Orban wrote:
>>>
>>> I'm trying to solve a least-squares problem using sparse QR, but:
>>>
>>> julia> size(A)
>>> (3140,1988)
>>>
>>> julia> nnz(A)
>>> 8510
>>>
>>> julia> size(b)
>>> (3140,)
>>>
>>> julia> typeof(A)
>>> SparseMatrixCSC{Float64,Int64}
>>>
>>> julia> A \ b
>>> ERROR: Base.SparseMatrix.CHOLMOD.CHOLMODException("")
>>>  in convert at sparse/cholmod.jl:867
>>>  in factorize at sparse/linalg.jl:854
>>>  in \ at linalg/generic.jl:326
>>>
>>>
>>> The matrix A is rank deficient, but I don't think that's the source of 
>>> the problem. I get the same exception if I regularize the problem.
>>>
>>> This is with Julia 0.4.6. The relevant portion of sparse/cholmod.jl is:
>>>
>>>  
>>> 856 function convert{Tv<:VTypes}(::Type{Sparse}, A::SparseMatrixCSC{Tv,
>>> SuiteSparse_long}, stype::Integer)
>>>  857 o = allocate_sparse(A.m, A.n, length(A.nzval), true, true, 
>>> stype, Tv)
>>>  858 s = unsafe_load(o.p)
>>>  859 for i = 1:length(A.colptr)
>>>  860 unsafe_store!(s.p, A.colptr[i] - 1, i)
>>>  861 end
>>>  862 for i = 1:length(A.rowval)
>>>  863 unsafe_store!(s.i, A.rowval[i] - 1, i)
>>>  864 end
>>>  865 unsafe_copy!(s.x, pointer(A.nzval), length(A.nzval))
>>>  866
>>>  867 @isok check_sparse(o)
>>>  868
>>>  869 return o
>>>  870 end
>>>
>>>
>>> How can I find out more about what's gone wrong?
>>>
>>

[julia-users] Re: CHOLMODException

2016-08-22 Thread Dominique Orban
Many thanks, Steve! Unsorted row indices were the issue. I mistakenly 
assumed that calling sparse() sorted the indices for me.

On Monday, August 22, 2016 at 11:24:19 PM UTC-4, vav...@uwaterloo.ca wrote:
>
> I've been using the cholmod routines recently also in 0.4.6 (Windows 64) 
> and have never seen this error.  The routine cholmod_check_sparse seems to 
> be in source code file cholmod_check.c of the SuiteSparse source code, and 
> it doesn't seem to do much except check that the row indices are in 
> increasing order for each column and that all indices are in range.  Is it 
> possible that your matrix has been corrupted and has row indices out of 
> order or out of range?
>
>
>
> On Monday, August 22, 2016 at 9:43:59 PM UTC-4, Dominique Orban wrote:
>>
>> I'm trying to solve a least-squares problem using sparse QR, but:
>>
>> julia> size(A)
>> (3140,1988)
>>
>> julia> nnz(A)
>> 8510
>>
>> julia> size(b)
>> (3140,)
>>
>> julia> typeof(A)
>> SparseMatrixCSC{Float64,Int64}
>>
>> julia> A \ b
>> ERROR: Base.SparseMatrix.CHOLMOD.CHOLMODException("")
>>  in convert at sparse/cholmod.jl:867
>>  in factorize at sparse/linalg.jl:854
>>  in \ at linalg/generic.jl:326
>>
>>
>> The matrix A is rank deficient, but I don't think that's the source of 
>> the problem. I get the same exception if I regularize the problem.
>>
>> This is with Julia 0.4.6. The relevant portion of sparse/cholmod.jl is:
>>
>>  
>> 856 function convert{Tv<:VTypes}(::Type{Sparse}, A::SparseMatrixCSC{Tv,
>> SuiteSparse_long}, stype::Integer)
>>  857 o = allocate_sparse(A.m, A.n, length(A.nzval), true, true, stype
>> , Tv)
>>  858 s = unsafe_load(o.p)
>>  859 for i = 1:length(A.colptr)
>>  860 unsafe_store!(s.p, A.colptr[i] - 1, i)
>>  861 end
>>  862 for i = 1:length(A.rowval)
>>  863 unsafe_store!(s.i, A.rowval[i] - 1, i)
>>  864 end
>>  865 unsafe_copy!(s.x, pointer(A.nzval), length(A.nzval))
>>  866
>>  867 @isok check_sparse(o)
>>  868
>>  869 return o
>>  870 end
>>
>>
>> How can I find out more about what's gone wrong?
>>
>

[julia-users] Re: CHOLMODException

2016-08-22 Thread vavasis
I've been using the cholmod routines recently also in 0.4.6 (Windows 64) 
and have never seen this error.  The routine cholmod_check_sparse seems to 
be in source code file cholmod_check.c of the SuiteSparse source code, and 
it doesn't seem to do much except check that the row indices are in 
increasing order for each column and that all indices are in range.  Is it 
possible that your matrix has been corrupted and has row indices out of 
order or out of range?



On Monday, August 22, 2016 at 9:43:59 PM UTC-4, Dominique Orban wrote:
>
> I'm trying to solve a least-squares problem using sparse QR, but:
>
> julia> size(A)
> (3140,1988)
>
> julia> nnz(A)
> 8510
>
> julia> size(b)
> (3140,)
>
> julia> typeof(A)
> SparseMatrixCSC{Float64,Int64}
>
> julia> A \ b
> ERROR: Base.SparseMatrix.CHOLMOD.CHOLMODException("")
>  in convert at sparse/cholmod.jl:867
>  in factorize at sparse/linalg.jl:854
>  in \ at linalg/generic.jl:326
>
>
> The matrix A is rank deficient, but I don't think that's the source of the 
> problem. I get the same exception if I regularize the problem.
>
> This is with Julia 0.4.6. The relevant portion of sparse/cholmod.jl is:
>
>  
> 856 function convert{Tv<:VTypes}(::Type{Sparse}, A::SparseMatrixCSC{Tv,
> SuiteSparse_long}, stype::Integer)
>  857 o = allocate_sparse(A.m, A.n, length(A.nzval), true, true, stype, 
> Tv)
>  858 s = unsafe_load(o.p)
>  859 for i = 1:length(A.colptr)
>  860 unsafe_store!(s.p, A.colptr[i] - 1, i)
>  861 end
>  862 for i = 1:length(A.rowval)
>  863 unsafe_store!(s.i, A.rowval[i] - 1, i)
>  864 end
>  865 unsafe_copy!(s.x, pointer(A.nzval), length(A.nzval))
>  866
>  867 @isok check_sparse(o)
>  868
>  869 return o
>  870 end
>
>
> How can I find out more about what's gone wrong?
>


[julia-users] Why aren't multiple const definitions allowed on a line?

2016-08-22 Thread Brian Rogoff
julia> global x = 2, y = 3, z = 5
5

julia> const u = 7, v = 11, w = 13
ERROR: syntax: invalid assignment location "11"

Is there a rationale for this difference in behavior? Version 0.6.0-dev.364

-- Brian


[julia-users] CHOLMODException

2016-08-22 Thread Dominique Orban
I'm trying to solve a least-squares problem using sparse QR, but:

julia> size(A)
(3140,1988)

julia> nnz(A)
8510

julia> size(b)
(3140,)

julia> typeof(A)
SparseMatrixCSC{Float64,Int64}

julia> A \ b
ERROR: Base.SparseMatrix.CHOLMOD.CHOLMODException("")
 in convert at sparse/cholmod.jl:867
 in factorize at sparse/linalg.jl:854
 in \ at linalg/generic.jl:326


The matrix A is rank deficient, but I don't think that's the source of the 
problem. I get the same exception if I regularize the problem.

This is with Julia 0.4.6. The relevant portion of sparse/cholmod.jl is:

 
856 function convert{Tv<:VTypes}(::Type{Sparse}, A::SparseMatrixCSC{Tv,
SuiteSparse_long}, stype::Integer)
 857 o = allocate_sparse(A.m, A.n, length(A.nzval), true, true, stype, 
Tv)
 858 s = unsafe_load(o.p)
 859 for i = 1:length(A.colptr)
 860 unsafe_store!(s.p, A.colptr[i] - 1, i)
 861 end
 862 for i = 1:length(A.rowval)
 863 unsafe_store!(s.i, A.rowval[i] - 1, i)
 864 end
 865 unsafe_copy!(s.x, pointer(A.nzval), length(A.nzval))
 866
 867 @isok check_sparse(o)
 868
 869 return o
 870 end


How can I find out more about what's gone wrong?


Re: [julia-users] mapreduce two variable (x,y)

2016-08-22 Thread jmarcellopereira
;) ok, thanks Schnetter

Em segunda-feira, 22 de agosto de 2016 20:39:11 UTC-3, Erik Schnetter 
escreveu:
>
> This function could be added...
>
> Currently, you'll have to `zip` the two collections, and unzip them in 
> your function:
>
> ```Julia
> mapreduce(a -> begin x,y=a; 2*y^2 - 1 + x end, +, zip([1,2,3], [1,2,3]))
> ```
>
> -erik
>
>
> On Mon, Aug 22, 2016 at 7:31 PM,  
> wrote:
>
>> how to write mapreduce for two variable? Ex:
>>
>> mapreduce((x,y)-> 2*y.^2 - 1 + x, + ,1:3,1:3)
>>
>> LoadError: wrong number of arguments
>> while loading In[182], in expression starting on line 1
>>
>> in anonymous at ./In[182]:1
>>
>>
>>
>>
>>
>
>
> -- 
> Erik Schnetter  
> http://www.perimeterinstitute.ca/personal/eschnetter/
>


Re: [julia-users] mapreduce two variable (x,y)

2016-08-22 Thread Erik Schnetter
This function could be added...

Currently, you'll have to `zip` the two collections, and unzip them in your
function:

```Julia
mapreduce(a -> begin x,y=a; 2*y^2 - 1 + x end, +, zip([1,2,3], [1,2,3]))
```

-erik


On Mon, Aug 22, 2016 at 7:31 PM,  wrote:

> how to write mapreduce for two variable? Ex:
>
> mapreduce((x,y)-> 2*y.^2 - 1 + x, + ,1:3,1:3)
>
> LoadError: wrong number of arguments
> while loading In[182], in expression starting on line 1
>
> in anonymous at ./In[182]:1
>
>
>
>
>


-- 
Erik Schnetter 
http://www.perimeterinstitute.ca/personal/eschnetter/


Re: [julia-users] signature of parametric "::Type" methods

2016-08-22 Thread Yichao Yu
On Tue, Aug 23, 2016 at 4:46 AM, Davide Lasagna 
wrote:

> Hi,
>
> Why do i need to specify all the parameters in the signature of methods
> that take `::Type` arguments?
>
> Demo:
> # define some parametric type
> julia> immutable foo{T, N, P, S}
>end
>
> # this will not work, but it seems natural to omit trailing unused
> parameters
> julia> bar{T}(::Type{foo{T}}) = T
> bar (generic function with 1 method)
>
> # yes, it does not work
> julia> bar(foo{1, 2, 3, 4})
> ERROR: MethodError: `bar` has no method matching bar(::Type{foo{1,2,3,4}})
>
> # this will do the job,
> julia> bar2{T, N, P, S}(::Type{foo{T, N, P, S}}) = T
> bar2 (generic function with 1 method)
>
> # yep
> julia> bar2(foo{1, 2, 3, 4})
> 1
>
>
>
If you don't mind also matching foo, foo{1}, foo{1,2}, foo{1,2,3} in
additional to foo{1,2,3,4} and don't need to access any type parameters,
you could use `bar{T<:foo}(::Type{T})`
Not necessarily applicable in this case.


> In methods that take instances of a type it is usually not necessary to
> specify trailing unused parameter, meaning that, for instance
> baz{T}(f::foo{T}) = one(T)
> will work for any values of `N`, `P` and `S`.
>
> Thanks!
>
> P.S. This is on 0.4
>
>
>
>


[julia-users] mapreduce two variable (x,y)

2016-08-22 Thread jmarcellopereira
how to write mapreduce for two variable? Ex:

mapreduce((x,y)-> 2*y.^2 - 1 + x, + ,1:3,1:3)

LoadError: wrong number of arguments
while loading In[182], in expression starting on line 1

in anonymous at ./In[182]:1






Re: [julia-users] Unexpected slowdown

2016-08-22 Thread Yichao Yu
On Tue, Aug 23, 2016 at 4:58 AM, Achu  wrote:

> I have a simple piece of code that finds me 10001 prime numbers.
>
> function a()
> pl=[2]
> n=3
> ct=1
> while(ct<10001)
> isnprime=true
> for a in pl
> if n%a==0
> isnprime=false
> break
> end
> end
> if isnprime
> push!(pl,n)
> ct+=1
> end
> n+=2
> end
> return pl
> end
>
> When I tweaked the code to check only prime factors less than the sqrt of
> the number, it slowed it down by a factor of 3.
>
> function a()
> pl=[2]
> n=3
> ct=1
> while(ct<10001)
> isnprime=true
> for a in pl[pl.

Loops are as fast as "vectorized" (in MATLAB sense) array operations so
this won't give you any speed improvement at all.

The loop was operating on all the elements (O(n)) and the check you add is
also O(n) with possibly a larger constant factor since it allocates
multiple arrays

Simply do

if a >= sqrt(n)
   break
end

should work


> if n%a==0
> isnprime=false
> break
> end
> end
> if isnprime
> push!(pl,n)
> ct+=1
> end
> n+=2
> end
> return pl
> end
>
> Why is that?
>
>


[julia-users] Re: Unexpected slowdown

2016-08-22 Thread Dan
Try keeping the loop over all primes and breaking when `a > maxp` where 
maxp is calculated once before the loop as `maxp = floor(Int,sqrt(n))`.

On Monday, August 22, 2016 at 4:58:30 PM UTC-4, Achu wrote:
>
> I have a simple piece of code that finds me 10001 prime numbers. 
>
> function a()
> pl=[2]
> n=3
> ct=1
> while(ct<10001)
> isnprime=true
> for a in pl  
> if n%a==0
> isnprime=false
> break
> end
> end
> if isnprime
> push!(pl,n)
> ct+=1
> end
> n+=2
> end
> return pl
> end
>
> When I tweaked the code to check only prime factors less than the sqrt of 
> the number, it slowed it down by a factor of 3.
>
> function a()
> pl=[2]
> n=3
> ct=1
> while(ct<10001)
> isnprime=true
> for a in pl[pl. if n%a==0
> isnprime=false
> break
> end
> end
> if isnprime
> push!(pl,n)
> ct+=1
> end
> n+=2
> end
> return pl
> end
>
> Why is that?
>
>

Re: [julia-users] signature of parametric "::Type" methods

2016-08-22 Thread Erik Schnetter
Your observation is correct. This remains the same with Julia 0.5.

`foo{T}` and `foo{T,N,P,S}` are different types. Due to invariance (see the
manual), the method will not match.

Whenever you define a type `foo{T,N,P,S}`, Julia automatically defines an
abstract type `foo{T}` as well, with `foo{T,N,P,S} <: foo{T}`.

-erik


On Mon, Aug 22, 2016 at 4:46 PM, Davide Lasagna 
wrote:

> Hi,
>
> Why do i need to specify all the parameters in the signature of methods
> that take `::Type` arguments?
>
> Demo:
> # define some parametric type
> julia> immutable foo{T, N, P, S}
>end
>
> # this will not work, but it seems natural to omit trailing unused
> parameters
> julia> bar{T}(::Type{foo{T}}) = T
> bar (generic function with 1 method)
>
> # yes, it does not work
> julia> bar(foo{1, 2, 3, 4})
> ERROR: MethodError: `bar` has no method matching bar(::Type{foo{1,2,3,4}})
>
> # this will do the job,
> julia> bar2{T, N, P, S}(::Type{foo{T, N, P, S}}) = T
> bar2 (generic function with 1 method)
>
> # yep
> julia> bar2(foo{1, 2, 3, 4})
> 1
>
>
> In methods that take instances of a type it is usually not necessary to
> specify trailing unused parameter, meaning that, for instance
> baz{T}(f::foo{T}) = one(T)
> will work for any values of `N`, `P` and `S`.
>
> Thanks!
>
> P.S. This is on 0.4
>
>
>
>


-- 
Erik Schnetter 
http://www.perimeterinstitute.ca/personal/eschnetter/


[julia-users] Re: Distributions.jl : generating samples from stable distributions

2016-08-22 Thread Rock Pereira
RCall is a simple two-step process:

   1. Write the R script inside Julia's R macrostrings
   2. Copy the objects in R as objects in Julia

The documentation is just one page. 
http://juliastats.github.io/RCall.jl/latest/gettingstarted/

R has a massive collection in its Distributions Task View 
http://lib.stat.cmu.edu/R/CRAN/web/views/Distributions.html
Search (press F3) for 'stable' to find other packages.

If you're dealing only with draws from the Levy distribution (and not the 
whole family of stable distributions) 
you can do it in Julia: http://distributionsjl.readthedocs.io/en/latest/

using Distributions
x = rand(Levy(u, c), numSamples)


Re: [julia-users] Re: ANN: Documenter.jl 0.3

2016-08-22 Thread Christoph Ortner
In my initial tests, HTML output works just perfectly - and I love the fact 
that it mimics Julia's documentation page. I'll let you know if I run into 
issues.


Re: [julia-users] New to Julia - Need some basic help

2016-08-22 Thread Pigskin Ablanket
No problem.  If you get a chance - great

On Saturday, August 20, 2016 at 12:13:40 PM UTC-4, Jeffrey Sarnoff wrote:
>
> There is a way -- after the weekend.
>
> On Friday, August 19, 2016 at 8:04:58 PM UTC-4, Pigskin Ablanket wrote:
>>
>> I probably dont want to change the input file names more than once 
>> although I would be updating its data daily - and I think I know how to do 
>> that (change the name of the file itself as well as in the code).  The 
>> output file though - I might want to change more regularly,
>>
>> Also - when I ran it - a few things were deprecated - does that just mean 
>> outdated?  Does updating with the new term change the file - or just the 
>> underlying solving?  Not sure if you can know that or not.
>>
>> I was just looking for a way yo shortcut that long as heck include string 
>> I have now.  Cause I will run that daily and lord knows I mistyped it like 
>> 10 times.
>>
>> On Friday, August 19, 2016 at 7:28:40 PM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> You are most welcome.
>>>
>>> What do you want to change, if anything, from day to day, for example: 
>>>  one or both input file names, the output file name, reuse some/all file 
>>> names while changing the data inside?
>>>
>>>
>>> On Friday, August 19, 2016 at 7:01:54 PM UTC-4, Pigskin Ablanket wrote:

 IT Works   Thank you so much.  Found my error in the code.

 I am curious if there is a way to shortcut the command as I would want 
 to run this daily to test and it seems like a lot to type correctly.

 Thanks for the time today

 On Friday, August 19, 2016 at 6:26:34 PM UTC-4, Jeffrey Sarnoff wrote:
>
> Look correct?
>
> I will answer that after you try running it.
>
>
> On Friday, August 19, 2016 at 6:19:33 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Thanks for providing me so much help today - much appreciated.
>>
>> I copied the properties right here for folder Julia  which is where 
>> the code file is located:
>> C:\Users\JHerron\Documents\Documents\Personal\DFS\NHL
>>
>> Interesting that it didnt bring it over as My_Documents.
>>
>> Based on this, I would believe the command needs to be:
>> include("C:\\Users\\JHerron\\Documents\\Documents\\
>> Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
>>
>> Look correct?
>>
>> I made the changes to the paths in the file as well
>>
>> "C:\\Users\\JHerron\\Documents\\Documents\\Personal\\DFS\\NHL\\Julia\\example_skaters.csv"
>>
>> On Friday, August 19, 2016 at 6:01:50 PM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> two things,
>>> you wrote:
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>> and I wonder, do you mean   !   
>>>  !
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
>>> or
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>>>
>>> when you go to the directory where you see the file: 
>>> code_for_Github.jl and you put the mouse on that file and right-click 
>>> to 
>>> see the popup menu and select the last thing "properties" there is 
>>> something that says Location,if does it not exactly match:
>>> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
>>> then you have miscopied it, if it looks like this 
>>> C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
>>> then you should be using (and fix the paths in the 
>>> code_for_Github.jl file, too)
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>>>
>>> ---
>>>
>>>
>>> On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket 
>>> wrote:

 Sadly, I get the following response from 
 include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")

 *ERROR: could not copen file 
 C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
 *in include at boot.jl:261*
 *in include_from_node1 at loading.jl:320*

 On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff 
 wrote:
>
> the "i" in include should be lower case
>
> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket <
> pigskin...@gmail.com> wrote:
>
>> I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
>> Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>> (I hope that was what you meant to do).
>>
>> I got: *ERROR: UndefVarError: Include not defined*
>>
>> On 

[julia-users] Unexpected slowdown

2016-08-22 Thread Achu
I have a simple piece of code that finds me 10001 prime numbers. 

function a()
pl=[2]
n=3
ct=1
while(ct<10001)
isnprime=true
for a in pl  
if n%a==0
isnprime=false
break
end
end
if isnprime
push!(pl,n)
ct+=1
end
n+=2
end
return pl
end

When I tweaked the code to check only prime factors less than the sqrt of 
the number, it slowed it down by a factor of 3.

function a()
pl=[2]
n=3
ct=1
while(ct<10001)
isnprime=true
for a in pl[pl.

[julia-users] signature of parametric "::Type" methods

2016-08-22 Thread Davide Lasagna
Hi, 

Why do i need to specify all the parameters in the signature of methods 
that take `::Type` arguments? 

Demo:
# define some parametric type
julia> immutable foo{T, N, P, S}
   end

# this will not work, but it seems natural to omit trailing unused 
parameters
julia> bar{T}(::Type{foo{T}}) = T
bar (generic function with 1 method)

# yes, it does not work
julia> bar(foo{1, 2, 3, 4})
ERROR: MethodError: `bar` has no method matching bar(::Type{foo{1,2,3,4}})

# this will do the job, 
julia> bar2{T, N, P, S}(::Type{foo{T, N, P, S}}) = T
bar2 (generic function with 1 method)

# yep
julia> bar2(foo{1, 2, 3, 4})
1


In methods that take instances of a type it is usually not necessary to 
specify trailing unused parameter, meaning that, for instance
baz{T}(f::foo{T}) = one(T)
will work for any values of `N`, `P` and `S`.

Thanks!

P.S. This is on 0.4





Re: [julia-users] Re: ANN: Documenter.jl 0.3

2016-08-22 Thread Tim Holy
I haven't inspected anything in detail, but I agree with Kristoffer that my 
first impression is that I really like the new look. Nice work, folks.

Best,
--Tim

On Monday, August 22, 2016 1:30:39 PM CDT Kristoffer Carlsson wrote:
> Just from looking at the generated docs for the Documenter package I would
> say that I strongly like the layout and "feel" of the HTML output. Much
> better than what I have seen from using the Mkdocs.
> 
> Maybe it is a bit redundant to have the base module name before all the
> type and function names?
> 
> On Monday, August 22, 2016 at 10:23:35 PM UTC+2, Michael Hatherly wrote:
> > Yes, Morten's additions to the package over the summer have really be
> > great!
> > 
> > I'd also like to re-emphasise his call for feedback and suggestions
> > (there's already been lots, but we're always looking for more) on the new
> > HTML output,
> > and the package in general. We want to end up with a documentation
> > solution for Julia that any package author can simply pick up and use
> > without having
> > to worry about anything other than writing great content for their docs.
> > It's definitely not there just yet, but we'll get there soon enough I'm
> > sure.
> > 
> > On Monday, 22 August 2016 18:58:43 UTC+2, David Anthoff wrote:
> >> Yes, this is really cool, much appreciated!!
> >> 
> >> 
> >> 
> >> *From:* julia...@googlegroups.com [mailto:julia...@googlegroups.com] *On
> >> Behalf Of *Christoph Ortner
> >> *Sent:* Saturday, August 20, 2016 6:56 PM
> >> *To:* julia-users 
> >> *Subject:* [julia-users] Re: ANN: Documenter.jl 0.3
> >> 
> >> 
> >> 
> >> this is really nice; thank you for putting this package together.
> >> 
> >> On Saturday, 20 August 2016 12:36:21 UTC+1, Morten Piibeleht wrote:
> >> 
> >> On Saturday, August 20, 2016 at 2:18:37 AM UTC+3, Christoph Ortner wrote:
> >> 
> >> I want to give this a try but I can't find the example of HTML output,
> >> which is supposed to be in test/html?
> >> 
> >> 
> >> 
> >> Thank you.
> >> 
> >> 
> >> 
> >> I apologize, the linked docs are a bit outdated and will be updated
> >> shortly. As was already mentioned, since Documenter uses the HTML output
> >> for its own docs, `docs/make.jl` is the best example.
> >> 
> >> 
> >> 
> >> `mkdocs.yml` has been dropped indeed. Instead the site's structure and
> >> title have to be defined in `make.jl`, via the (currently undocumented)
> >> `sitename` and `pages` options.
> >> 
> >> 
> >> 
> >> The HTML site gets built into `build/` directly, where we normally have
> >> outputted the processed Markdown files (with the filenames being
> >> translated
> >> as `path/file.md` -> `path/file.html`).
> >> 
> >> 
> >> 
> >> On Saturday, August 20, 2016 at 2:53:23 AM UTC+3, Stefan Karpinski wrote:
> >> 
> >> On Fri, Aug 19, 2016 at 5:07 PM, Morten Piibeleht  >> 
> >> > wrote:
> >> [*] Developed as part of Morten’s Google Summer of Code project
> >>  >> etails/> .
> >> 
> >> Since I think that page is private, here's the description of the
> >> project:
> >> 
> >> 
> >> 
> >> Yes, the correct link should have been
> >> https://summerofcode.withgoogle.com/projects/#5046486001778688 (but it
> >> basically only contains the description Stefan already posted).




Re: [julia-users] Re: ANN: Documenter.jl 0.3

2016-08-22 Thread Kristoffer Carlsson
Just from looking at the generated docs for the Documenter package I would 
say that I strongly like the layout and "feel" of the HTML output. Much 
better than what I have seen from using the Mkdocs. 

Maybe it is a bit redundant to have the base module name before all the 
type and function names?

On Monday, August 22, 2016 at 10:23:35 PM UTC+2, Michael Hatherly wrote:
>
> Yes, Morten's additions to the package over the summer have really be 
> great!
>
> I'd also like to re-emphasise his call for feedback and suggestions 
> (there's already been lots, but we're always looking for more) on the new 
> HTML output,
> and the package in general. We want to end up with a documentation 
> solution for Julia that any package author can simply pick up and use 
> without having
> to worry about anything other than writing great content for their docs. 
> It's definitely not there just yet, but we'll get there soon enough I'm 
> sure.
>
> On Monday, 22 August 2016 18:58:43 UTC+2, David Anthoff wrote:
>>
>> Yes, this is really cool, much appreciated!!
>>
>>  
>>
>> *From:* julia...@googlegroups.com [mailto:julia...@googlegroups.com] *On 
>> Behalf Of *Christoph Ortner
>> *Sent:* Saturday, August 20, 2016 6:56 PM
>> *To:* julia-users 
>> *Subject:* [julia-users] Re: ANN: Documenter.jl 0.3
>>
>>  
>>
>> this is really nice; thank you for putting this package together.
>>
>> On Saturday, 20 August 2016 12:36:21 UTC+1, Morten Piibeleht wrote:
>>
>> On Saturday, August 20, 2016 at 2:18:37 AM UTC+3, Christoph Ortner wrote:
>>
>> I want to give this a try but I can't find the example of HTML output, 
>> which is supposed to be in test/html? 
>>
>>  
>>
>> Thank you. 
>>
>>  
>>
>> I apologize, the linked docs are a bit outdated and will be updated 
>> shortly. As was already mentioned, since Documenter uses the HTML output 
>> for its own docs, `docs/make.jl` is the best example.
>>
>>  
>>
>> `mkdocs.yml` has been dropped indeed. Instead the site's structure and 
>> title have to be defined in `make.jl`, via the (currently undocumented) 
>> `sitename` and `pages` options.
>>
>>  
>>
>> The HTML site gets built into `build/` directly, where we normally have 
>> outputted the processed Markdown files (with the filenames being translated 
>> as `path/file.md` -> `path/file.html`).
>>
>>  
>>
>> On Saturday, August 20, 2016 at 2:53:23 AM UTC+3, Stefan Karpinski wrote:
>>
>> On Fri, Aug 19, 2016 at 5:07 PM, Morten Piibeleht > > wrote:
>>
>> [*] Developed as part of Morten’s Google Summer of Code project 
>> 
>> .
>>
>> Since I think that page is private, here's the description of the project:
>>
>>  
>>
>> Yes, the correct link should have been 
>> https://summerofcode.withgoogle.com/projects/#5046486001778688 (but it 
>> basically only contains the description Stefan already posted).
>>
>>

Re: [julia-users] Re: ANN: Documenter.jl 0.3

2016-08-22 Thread Michael Hatherly
Yes, Morten's additions to the package over the summer have really be great!

I'd also like to re-emphasise his call for feedback and suggestions 
(there's already been lots, but we're always looking for more) on the new 
HTML output,
and the package in general. We want to end up with a documentation solution 
for Julia that any package author can simply pick up and use without having
to worry about anything other than writing great content for their docs. 
It's definitely not there just yet, but we'll get there soon enough I'm 
sure.

On Monday, 22 August 2016 18:58:43 UTC+2, David Anthoff wrote:
>
> Yes, this is really cool, much appreciated!!
>
>  
>
> *From:* julia...@googlegroups.com  [mailto:
> julia...@googlegroups.com ] *On Behalf Of *Christoph Ortner
> *Sent:* Saturday, August 20, 2016 6:56 PM
> *To:* julia-users 
> *Subject:* [julia-users] Re: ANN: Documenter.jl 0.3
>
>  
>
> this is really nice; thank you for putting this package together.
>
> On Saturday, 20 August 2016 12:36:21 UTC+1, Morten Piibeleht wrote:
>
> On Saturday, August 20, 2016 at 2:18:37 AM UTC+3, Christoph Ortner wrote:
>
> I want to give this a try but I can't find the example of HTML output, 
> which is supposed to be in test/html? 
>
>  
>
> Thank you. 
>
>  
>
> I apologize, the linked docs are a bit outdated and will be updated 
> shortly. As was already mentioned, since Documenter uses the HTML output 
> for its own docs, `docs/make.jl` is the best example.
>
>  
>
> `mkdocs.yml` has been dropped indeed. Instead the site's structure and 
> title have to be defined in `make.jl`, via the (currently undocumented) 
> `sitename` and `pages` options.
>
>  
>
> The HTML site gets built into `build/` directly, where we normally have 
> outputted the processed Markdown files (with the filenames being translated 
> as `path/file.md` -> `path/file.html`).
>
>  
>
> On Saturday, August 20, 2016 at 2:53:23 AM UTC+3, Stefan Karpinski wrote:
>
> On Fri, Aug 19, 2016 at 5:07 PM, Morten Piibeleht  > wrote:
>
> [*] Developed as part of Morten’s Google Summer of Code project 
> 
> .
>
> Since I think that page is private, here's the description of the project:
>
>  
>
> Yes, the correct link should have been 
> https://summerofcode.withgoogle.com/projects/#5046486001778688 (but it 
> basically only contains the description Stefan already posted).
>
>

RE: [julia-users] Re: ANN: Documenter.jl 0.3

2016-08-22 Thread David Anthoff
Yes, this is really cool, much appreciated!!

 

From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On 
Behalf Of Christoph Ortner
Sent: Saturday, August 20, 2016 6:56 PM
To: julia-users 
Subject: [julia-users] Re: ANN: Documenter.jl 0.3

 

this is really nice; thank you for putting this package together.

On Saturday, 20 August 2016 12:36:21 UTC+1, Morten Piibeleht wrote:

On Saturday, August 20, 2016 at 2:18:37 AM UTC+3, Christoph Ortner wrote:

I want to give this a try but I can't find the example of HTML output, which is 
supposed to be in test/html? 

 

Thank you. 

 

I apologize, the linked docs are a bit outdated and will be updated shortly. As 
was already mentioned, since Documenter uses the HTML output for its own docs, 
`docs/make.jl` is the best example.

 

`mkdocs.yml` has been dropped indeed. Instead the site's structure and title 
have to be defined in `make.jl`, via the (currently undocumented) `sitename` 
and `pages` options.

 

The HTML site gets built into `build/` directly, where we normally have 
outputted the processed Markdown files (with the filenames being translated as 
`path/file.md  ` -> `path/file.html`).

 

On Saturday, August 20, 2016 at 2:53:23 AM UTC+3, Stefan Karpinski wrote:

On Fri, Aug 19, 2016 at 5:07 PM, Morten Piibeleht  > wrote:

[*] Developed as part of Morten’s  

 Google Summer of Code project.

Since I think that page is private, here's the description of the project:

 

Yes, the correct link should have been 
https://summerofcode.withgoogle.com/projects/#5046486001778688 (but it 
basically only contains the description Stefan already posted).



Re: [julia-users] ERROR: MethodError: `vec2ltri_alt` has no method matching vec2ltri_alt(::Array{Float64,2})

2016-08-22 Thread Yichao Yu
On Mon, Aug 22, 2016 at 10:58 PM, Ahmed Mazari 
wrote:

> Hello,
>
> relying on these two links. l tried to make a lower triangular matrix from
> a given matrix but it doesn't work.
>
> the used function is
>
> function vec2ltri_alt{T}(v::AbstractVector{T}, z::T=zero(T)) n = length(v) v1 
> = vcat(0,v) s = round(Int,(sqrt(8n+1)-1)/2) s*(s+1)/2 == n || 
> error("vec2utri: length of vector is not triangular") s+=1 [ i>j ? 
> v1[round(Int, j*(j-1)/2+i)] : (i == j ? z : NaN) for i=1:s, j=1:s ] end
>
>

A matrix is not an AbstractVector
Use AbstractArray here should work (at least for the dispatch part)


>
>
>
> l got this error  when l did this
>
> vec2ltri_alt(rand(5000,5000)) #  because l have a matrix of 5000 by 5000,
> so l gave as a paramter my matrix
>
> *ERROR: MethodError: `vec2ltri_alt` has no method matching
> vec2ltri_alt(::Array{Float64,2})*
>
> http://stackoverflow.com/questions/39039553/lower-triangular
> -matrix-in-julia
>
> https://groups.google.com/forum/#!topic/julia-users/UARlZBCNlng
>
> thank you
>


[julia-users] Re: ERROR: MethodError: `vec2ltri_alt` has no method matching vec2ltri_alt(::Array{Float64,2})

2016-08-22 Thread Ahmed Mazari


function vec2ltri_alt{T}(v::AbstractVector{T}, z::T=zero(T))
n = length(v)
v1 = vcat(0,v)
s = round(Int,(sqrt(8n+1)-1)/2)
s*(s+1)/2 == n || error("vec2utri: length of vector is not triangular")
s+=1
[ i>j ? v1[round(Int, j*(j-1)/2+i)] : (i == j ? z : NaN) for i=1:s, j=1:s ]
end



On Monday, August 22, 2016 at 4:58:56 PM UTC+2, Ahmed Mazari wrote:
>
> Hello,
>
> relying on these two links. l tried to make a lower triangular matrix from 
> a given matrix but it doesn't work.
>
> the used function is 
>
> function vec2ltri_alt{T}(v::AbstractVector{T}, z::T=zero(T)) n = length(v) v1 
> = vcat(0,v) s = round(Int,(sqrt(8n+1)-1)/2) s*(s+1)/2 == n || 
> error("vec2utri: length of vector is not triangular") s+=1 [ i>j ? 
> v1[round(Int, j*(j-1)/2+i)] : (i == j ? z : NaN) for i=1:s, j=1:s ] end
>
>
>
> l got this error  when l did this
>
> vec2ltri_alt(rand(5000,5000)) #  because l have a matrix of 5000 by 5000, 
> so l gave as a paramter my matrix
>
> *ERROR: MethodError: `vec2ltri_alt` has no method matching 
> vec2ltri_alt(::Array{Float64,2})*
>
>
> http://stackoverflow.com/questions/39039553/lower-triangular-matrix-in-julia
>
> https://groups.google.com/forum/#!topic/julia-users/UARlZBCNlng
>
> thank you
>


[julia-users] ERROR: MethodError: `vec2ltri_alt` has no method matching vec2ltri_alt(::Array{Float64,2})

2016-08-22 Thread Ahmed Mazari
Hello,

relying on these two links. l tried to make a lower triangular matrix from 
a given matrix but it doesn't work.

the used function is 

function vec2ltri_alt{T}(v::AbstractVector{T}, z::T=zero(T)) n = length(v) v1 = 
vcat(0,v) s = round(Int,(sqrt(8n+1)-1)/2) s*(s+1)/2 == n || error("vec2utri: 
length of vector is not triangular") s+=1 [ i>j ? v1[round(Int, j*(j-1)/2+i)] : 
(i == j ? z : NaN) for i=1:s, j=1:s ] end



l got this error  when l did this

vec2ltri_alt(rand(5000,5000)) #  because l have a matrix of 5000 by 5000, 
so l gave as a paramter my matrix

*ERROR: MethodError: `vec2ltri_alt` has no method matching 
vec2ltri_alt(::Array{Float64,2})*

http://stackoverflow.com/questions/39039553/lower-triangular-matrix-in-julia

https://groups.google.com/forum/#!topic/julia-users/UARlZBCNlng

thank you


[julia-users] Re: Juila vs Mathematica (Wolfram language): high-level features

2016-08-22 Thread Daniel George
It gets even faster if you make the slight change shown below in red:

$CompilationTarget = "C";
f = Compile[{{x, _Real, 1}, {min, _Real}, {max, _Real}}, 
  Module[{count = 0},
   Do[If[min <= i <= max, count++], {i, x}]; count], 
  "RuntimeOptions" -> "Speed"];

On Monday, July 21, 2014 at 5:29:02 AM UTC-5, johan...@gmail.com wrote:
>
> On Saturday, January 25, 2014 8:41:08 PM UTC+1, Johan Sigfrids wrote:
>>
>> On Saturday, January 25, 2014 9:24:17 PM UTC+2, Jason Merrill wrote: 
>>>
>>>   mma> data = RandomReal[1.,1*^7]; min = .2; max = .3;
>>>   mma> Total@Unitize@Clip[data,{min,max},{0,0}]
>>>
>>> I claim that it takes *a lot* of experience to know that that is the 
>>> code that is going to be fast, compared to the other 15 approaches people 
>>> bring up there, because the mapping between Mathematica's core constructs 
>>> and the machine's core constructs is far more complicated and indirect than 
>>> for Julia.
>>>
>>> In contrast, it doesn't take deep familiarity with Julia's standard 
>>> library to come up with about the fastest way to write this operation.
>>>
>>>   julia> function count_range(arr, min, max)
>>>   count = 0
>>>   for elt in arr
>>> if min < elt < max count += 1 end
>>>   end
>>>   count
>>> end
>>>
>>> It takes more than one line to write, but it's *obvious*. My Mathematica 
>>> license is expired these days, so I can't run the benchmark, but I bet it 
>>> also smokes the fast solution in Mathematica.
>>>
>>
>> Having a Mathematica license and being curious I compared them. The Julia 
>> version is roughly 10x faster than the Mathematica version.  
>>
>
> I compared with Mathematica 9. Total@Unitize@Clip[data,{min,max},{0,0}] 
> was for me roughly 3x slower than the Julia version; which sounds 
> reasonable since Total, Unitize and Clip run once though the data. In 
> Mathematica 9 you also have the option to compile to C, which then runs as 
> fast as the Julia version:
>
> $CompilationTarget = "C";
> f = Compile[{{x, _Real, 1}, {min, _Real}, {max, _Real}}, 
>   Module[{count = 0},
>Do[If[min <= x[[i]] <= max, count++], {i, Length@x}]; count], 
>   "RuntimeOptions" -> "Speed"];
>


[julia-users] Re: Distributions.jl : generating samples from stable distributions

2016-08-22 Thread Mirmu
Ok, after a glance at the literature, I understand those distributions are 
quite tricky to sample from.
Using RCall might be a bit overkill.
Maybe 
http://prac.im.pwr.wroc.pl/~hugo/publ/AWeronRWeron95_LNP.pdf
would be an easy (if slow) way ? (although I am not a statistician so I 
cannot judge its accuracy). I could give it a shot for the package if you 
feel it's worthy

Best


Re: [julia-users] { } vector syntax is discontinued?

2016-08-22 Thread Mauro
It used to mean Any[], but not anymore (so `Any[]` is the new syntax).
It was still usable in 0.4 with a deprecation warning, now in 0.5 an
error is thrown.  It will get a new meaning in the 0.6 release, but it
is not decided for what yet. See e.g.:
https://github.com/JuliaLang/julia/issues/8470

On Mon, 2016-08-22 at 11:13, Simon Frost  wrote:
> Dear All,
>
> Apologies if this is mentioned somewhere, but I couldn't find the answer in
> various searches. What does '{ } vector syntax is discontinued' mean, and
> what is the new syntax?
>
> Best
> Simon


[julia-users] { } vector syntax is discontinued?

2016-08-22 Thread Simon Frost
Dear All,

Apologies if this is mentioned somewhere, but I couldn't find the answer in 
various searches. What does '{ } vector syntax is discontinued' mean, and 
what is the new syntax?

Best
Simon


[julia-users] Re: [ECCN] What packages are included in the basic distribution of Julia

2016-08-22 Thread Páll Haraldsson
On Thursday, March 17, 2016 at 8:27:33 PM UTC, Naiyuan Chiang wrote:
>
>
> Hi,
>
> I am working in United Technologies Research Center (UTRC), and currently 
> I am interested in using Julia for my researches.
> According to the IT support of UTRC, I wonder if the distribution of 
> Julia comes with certain packages, e.g. Crypto, by default. 
>

Since my discussion here, mbedTLS is a dependency of Julia. It probably 
changes things..

I haven't look closely what is in mbedTLS, or if just parts are compiled 
in, anybody know it not to be a problem?

-- 
Palli.
 

> My understanding is no, but an official reply can help us to accurately 
> identify the ECCN regulations for Julia.
>
> My IT support's original words are "Julia appears to be open source, but 
> does have at least one package that uses SSL (Crypto, see 
> *http://pkg.julialang.org/* ). So without the 
> packages, the language would likely be 5D992, but is open source, so should 
> be not subject to the regulations. If the language comes with the Crypto 
> package by default, then the distribution would be considered 5D002 and we 
> would need to ask about license exception TSU to treat it otherwise."
>
> Thanks, 
>
> Nai-Yuan
>


Re: [julia-users] Re: binary searched sets/maps & faster symbols

2016-08-22 Thread Yichao Yu
On Mon, Aug 22, 2016 at 4:05 PM, Yichao Yu  wrote:

>
>
> On Mon, Aug 22, 2016 at 5:56 AM,  wrote:
>
>> And to reconnect this stream of energy to the original point of my
>> posting:
>>
>> What do you think about changing the symbol storage in Julia to use
>> ordered, indexed storage instead of hashed? Does that make sense at all to
>> you? I've been playing around with this idea of
>>
>
> No. Symbols are already sorted internally and interned. They are not meant
> to be a replacement/alternative for strings and must not be used that way.
> I'm not aware of much application of symbol comparison but they are defined
> that way to provide a repeatable/reliable semantics so comparing
> index/pointer is not acceptable in general. Comparing the hash is used
> internally but will also cause a more confusing semantics so it shouldn't
> be used.
>

Shouldn't be used -> shouldn't be used as the definition of cmp(::Symbol,
::Symbol)


Re: [julia-users] Re: binary searched sets/maps & faster symbols

2016-08-22 Thread Yichao Yu
On Mon, Aug 22, 2016 at 5:56 AM,  wrote:

> And to reconnect this stream of energy to the original point of my posting:
>
> What do you think about changing the symbol storage in Julia to use
> ordered, indexed storage instead of hashed? Does that make sense at all to
> you? I've been playing around with this idea of
>

No. Symbols are already sorted internally and interned. They are not meant
to be a replacement/alternative for strings and must not be used that way.
I'm not aware of much application of symbol comparison but they are defined
that way to provide a repeatable/reliable semantics so comparing
index/pointer is not acceptable in general. Comparing the hash is used
internally but will also cause a more confusing semantics so it shouldn't
be used. We can also fairly easily speed it up by inlining some C function
calls if the performance of that is important.

If you just need to sort a few symbols (and making sure you're not just
using Symbols as strings) in a undefined order that is only stable within
one session, you can just compare the pointer directly.


> array based, ordered, indexed sets for a while in different languages;
> getting decent results. Symbols are used more than created which means that
> the minor speed hit in interning should pay back as soon as you sort
> anything by a symbolic name. Seems to do fine up to around 100k symbols,
> but I have no idea what you're using in there right now or the other
> requirements. Just an idea...
>
> /fncodr
>
>
> Den söndag 21 augusti 2016 kl. 23:44:35 UTC+2 skrev fnc...@gmail.com:
>>
>> Also, nice to see you again, despite somewhat irrelevant circumstances.
>> Watched you speak in Gothenburg a couple of years ago. Although you were
>> only given an hour, you gave a competent enough impression for me to learn
>> yet another language. Just wanted you to know that something came out of
>> that, for whatever it's worth. Thanks.
>>
>> /fncodr
>>
>> Den söndag 21 augusti 2016 kl. 23:38:31 UTC+2 skrev fnc...@gmail.com:
>>>
>>> No, you're both wrong.
>>> Licenses don't add anything but restrictions to giving something away
>>> without conditions, how could they? How could a page full of legal bullshit
>>> ever make anyone more free?
>>> I know that's the story you were told, I've been up there on the
>>> barricades, but enough is enough. Outside of corporations, and I don't give
>>> a damn about corporations, licenses add nothing but headaches, division and
>>> wasted effort. I'm sorry about the community standards, you should know
>>> better than to play their game for them.
>>>
>>> /fncodr
>>>
>>> Den söndag 21 augusti 2016 kl. 22:19:25 UTC+2 skrev Stefan Karpinski:

 Also, please don't use phrases like "got your panties in a knot" –
 this is a violation of the Julia community standards
 .

 On Sun, Aug 21, 2016 at 3:55 PM, Stefan Karpinski  wrote:

> Steven is correct here: licenses are what allow people to use your
> code, not a mechanism for constraining what people can do – by default 
> they
> have no rights to your code. If you want to let people do whatever they
> want with your code, use the MIT license
>  or the even more permissive ISC
> license . You can also state
> that you release the code into the public domain, but that's actually less
> effective than granting a license like ISC since not all countries have
> processes for reliably donating works to the public domain (e.g.
> continental Europe), so people in those countries would not legally be
> allowed to use your code.
>
> TL;DR: just put the ISC license on it.
>
> On Sun, Aug 21, 2016 at 1:25 PM, Steven G. Johnson  > wrote:
>
>>
>>
>> On Sunday, August 21, 2016 at 12:11:26 PM UTC-4, fnc...@gmail.com
>> wrote:
>>>
>>> I gave a statement, on why I don't offer licenses.
>>>
>>
>> Not offering a license means that no one can copy, modify, or
>> redistribute your code.
>>
>> Saying "Go bananas; use it, break it; embrace and extend it", while
>> it gives some permissions, is actually not sufficient to qualify as
>> open source .  For example,
>> you don't explicitly give permission for people to sell it as part of
>> commercial products, so as a result that usage is prohibited (by 
>> default).
>>
>> It took many years for people in scientific computing to realize that
>> licenses were important for example (and as a result the Netlib 
>> repository
>> ended up having huge headaches), and there are other prominent examples 
>> of
>> problems stemming from software without a license because the authors
>> didn't think they needed one (e.g. qmail).   Learn from the