[julia-users] Re: collect([1 2]) in 0.5.0-

2016-05-26 Thread paul . soederlind
>If so, is there any way of generating a Vector from either a Vector or a scalar vec(collect(x)) seems to work in both cases. /Paul S On Thursday, 26 May 2016 22:16:30 UTC+2, r.e@gmail.com wrote: > > I've also discovered that collect(1) will now generate a 0-dimensional > Array, presumably

Re: [julia-users] Re: Congratulations to Keno

2016-05-26 Thread Eric Forgy
I still don't get it. Must be good though :) On Friday, May 27, 2016 at 12:40:24 PM UTC+8, Jeff Bezanson wrote: > > http://www.registrar.fas.harvard.edu/calendar/five-year-calendar > > Congratulations indeed! > > On Thu, May 26, 2016 at 11:15 PM, Eric Forgy > wrote: > > Context? Link? :) > >

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Ford Ox
Could I for example do something like popped = pop!(collection, ::Last) ? Also important question is usefulness of this approach. Why not just create different method names popfirst, poplast, pop? In the case of setindex, getindex, setfield etc it is obviously superior and irreplaceable. In any

Re: [julia-users] Re: Congratulations to Keno

2016-05-26 Thread Jeff Bezanson
http://www.registrar.fas.harvard.edu/calendar/five-year-calendar Congratulations indeed! On Thu, May 26, 2016 at 11:15 PM, Eric Forgy wrote: > Context? Link? :) > > On Friday, May 27, 2016 at 7:01:25 AM UTC+8, Josef Sachs wrote: >> >> Well done! Onward and upward!

Re: [julia-users] This application has requested the Runtime to terminate it in an unusual way

2016-05-26 Thread Michele Zaffalon
You should at least provide some information on the system (e.g. what Julia version you were using by copying the output of versioninfo()) and a minimal script to reproduce the problem. On Thu, May 26, 2016 at 10:47 PM, wrote: > When i execute the problem . This message appears on the julia wind

[julia-users] Re: Congratulations to Keno

2016-05-26 Thread Eric Forgy
Context? Link? :) On Friday, May 27, 2016 at 7:01:25 AM UTC+8, Josef Sachs wrote: > > Well done! Onward and upward! >

Re: [julia-users] hankelh1(1,z) bug?

2016-05-26 Thread Isaiah Norton
This looks like an issue in the underlying AMOS library from netlib. Both SciPy and SciLab give the same answer as Julia and also use AMOS. mpmath and Wolfram Alpha give the correct answer. Possibly a documentation issue about tolerances in the AMOS implementation, I'm not quite sure. Issue: https

[julia-users] Re: What is Julia and what it is not?

2016-05-26 Thread Scott Jones
It *is* also a very generous language ;-) It gives us very nice facilities for writing performant code generically in rather few LOC - that seems generous to me! On Thursday, May 26, 2016 at 11:34:43 AM UTC-4, Ford Ox wrote: > > :-D :-D :-D > > add generous language: I have meant general purpos

Re: [julia-users] Any up-to-date Julia package for nonlinear regression?

2016-05-26 Thread Jan Drugowitsch
I'm looking for statistical rather than machine learning packages, in the sense that I'd need standard errors and covariates of the regressors, and various other standard statistics (similar to GLMs). The model I'm looking at is fairly simple, and almost a GLM: p(y = 1 | x) = (1-pl) Phi((x - mu

[julia-users] Congratulations to Keno

2016-05-26 Thread Josef Sachs
Well done! Onward and upward!

Re: [julia-users] Any up-to-date Julia package for nonlinear regression?

2016-05-26 Thread Tom Breloff
There's lots of potential options. Can you specify your problem a little more? What type of data? How non-linear? Are we fitting a polynomial? SVM? ANN? Online vs batch? How much noise? What sort of stats do you want? On Thursday, May 26, 2016, Jan Drugowitsch wrote: > Hi all, > > I have some no

Re: [julia-users] Re: collect([1 2]) in 0.5.0-

2016-05-26 Thread Jeff Bezanson
Yes, it would be good to deprecate `collect` to `Vector` (so it always returns a vector like it used to), and call `Array` where we want the result to have the same shape as the iterator. The main wart is that Array{T}(tuple) already has a meaning where the tuple specifies the size, but here the tu

[julia-users] Any up-to-date Julia package for nonlinear regression?

2016-05-26 Thread Jan Drugowitsch
Hi all, I have some nonlinear regression problems that I'd like to solve. Unfortunately, NLreg.jl doesn't seem to work on my Julia 0.4.5 installation, but instead fails on the README example code with julia> const sd1 = readtable(Pkg.dir("NLreg","data","sd1.csv.gz")); julia> nl = fit(BolusSD1

[julia-users] This application has requested the Runtime to terminate it in an unusual way

2016-05-26 Thread tannirind
When i execute the problem . This message appears on the julia window. How can I fix it ? Thank you "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

Re: [julia-users] Redefine constant

2016-05-26 Thread tannirind
Thnak you Michele .but I am using Jump On Thursday, May 26, 2016 at 1:00:16 PM UTC+2, Michele Zaffalon wrote: > > At the REPL, you can use workspace() > > > On Thu, May 26, 2016 at 12:10 PM, > wrote: > >> w

[julia-users] Re: collect([1 2]) in 0.5.0-

2016-05-26 Thread r . e . reeve
I've also discovered that collect(1) will now generate a 0-dimensional Array, presumably as part of the same update, while collect([1]) still generates a Vector. Is this intended too? If so, is there any way of generating a Vector from either a Vector or a scalar - I was using collect to do thi

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Ford Ox
Yea I agree with you that multiple dispatch can achieve the same thing and much better (such a lovely feature). But there is a problem - consider: type Dequeue ... end type Last end type First end getindex(d::Dequeue, ::Last) = last(d) getindex(d::Dequeue, ::First) = first(d) pop!(d::Dequeue, ::

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Ford Ox
Yeah I agree with you, we can use multiple dispatch with completely same result and it will actually work. Even the user will know, what types of parameters he should paste in. Problems begin when I import it. Lets say I have defined it like this: type Dequeue ... end type Last end type First en

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Matt Bauman
So, if I understand correctly, the problem you're trying to solve is that A[end] lowers to getindex(A, endof(A)), but you want to know that the index is the last one since you can implement a more efficient algorithm in that case. Making getindex a macro won't solve this problem, so lets set as

Re: [julia-users] DateTime conversion in DataFrames

2016-05-26 Thread akrun
Thank you all for the replies. The array comprehension works. On Thursday, May 26, 2016 at 10:49:41 PM UTC+5:30, Alex Mellnik wrote: > > To expand slightly on what Milan said, while you can pass DateTime an > array of strings and a format code, in some cases the conversion function > you want

[julia-users] Re: Julia Memory Management

2016-05-26 Thread Oscar Blumberg
When video game people say that they usually mean "tracing gc" instead of "gc" and it's about the latency, not the throughput, which Yichao explained. A game has a soft deadline every few tens of milliseconds to render to the screen and gc pauses can make the experience miserable. Interestingly a

[julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Kristoffer Carlsson
Not completely related but I have had the following happen a few times: function compute_val(dim) if dim == 1 return "boink" elseif dim == 2 return "bink" elseif dim == 3 return "bank" end end The last "elseif" should have been an "else" and now the function

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Stefan Karpinski
The difference is that a symbol is a value but `end` is not a value. If you can write v[:foo] then you should also be able to do this: x = :foo v[x] This precludes doing the lookup at compile time – except as an optimization. That argument doesn't apply to `end` since the `end` keyword is pur

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Bart Janssens
In C++ I had quite a few nasty bugs where it turned out that I forgot the return statement, and the function then just returns garbage (if declared as non-void, so I think this can't happen in Julia since you don't declare the return type). At least what is returned in Julia is now clearly defi

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Ford Ox
Dne čtvrtek 26. května 2016 18:03:50 UTC+2 Yichao Yu napsal(a): > > > Because it is done at compile time, where you can even decide to call > > completely different function. See > > dequeue = . > > dequeue[:first] # is replaced with different function than dequeue[1] > > dequeue[:last] #

Re: [julia-users] Re: Julia Memory Management

2016-05-26 Thread Stefan Karpinski
This is pointlessly philosophical and off topic at this point. On Thu, May 26, 2016 at 2:13 PM, Ford Ox wrote: > This is the wrong question to ask >> > > I wanted to write 'good enough' but then I discarded it since its too > broad term. It was a mistake. > > I was wondering, whether there will

[julia-users] Re: Julia Memory Management

2016-05-26 Thread Ford Ox
> > This is the wrong question to ask > I wanted to write 'good enough' but then I discarded it since its too broad term. It was a mistake. I was wondering, whether there will ever be so well rounded GC, that ... "reference counting, manual allocation / freeing and all that c++ stuff will be

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Ford Ox
> > This is the wrong question to ask > I wanted to write 'good enough' but then I discarded it since its too broad term. It was a mistake. I was wondering, whether there will ever be so well rounded GC, that ... "reference counting, manual allocation / freeing and all that c++ stuff will be o

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Jeff Bezanson
I love this topic; can't resist chiming in. There is indeed a lot of misinformation out there about "manual memory management". I believe all the gains (if any) to be had from manual memory management come from (1) requesting stack allocation (it can be hard for a compiler to prove that the lifetim

Re: [julia-users] DateTime conversion in DataFrames

2016-05-26 Thread Alex Mellnik
To expand slightly on what Milan said, while you can pass DateTime an array of strings and a format code, in some cases the conversion function you want to use may not accept arrays. In this case, you can do the same thing with array comprehension: df1 = DataFrame(V1 = DateTime[DateTime(d, "m/

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Didier Verna
"'Tobias Knopp' via julia-users" wrote: > We are currently talking about the long function form which are > inherently non-functional since they involve a function body which is > evaluated step by step. Nope. In that particular case, size is what matters ;-). You may switch to the long form

Re: [julia-users] collect([1 2]) in 0.5.0-

2016-05-26 Thread Jeffrey Sarnoff
+1 Vector and Array On Thursday, May 26, 2016 at 9:51:37 AM UTC-4, Milan Bouchet-Valat wrote: > > Le jeudi 26 mai 2016 à 09:03 -0400, Stefan Karpinski a écrit : > > Perhaps these should be called Vector and Array? As in Vector(f(x) > > for x in A) and Array(f(x) for x in A). > Cf. https://gith

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Chris Rackauckas
Ahh, that makes sense. Thanks for clearing that up. On Thursday, May 26, 2016 at 8:59:14 AM UTC-7, Yichao Yu wrote: > > On Thu, May 26, 2016 at 11:44 AM, Chris Rackauckas > wrote: > > Thanks, that's good to know. Can you explain a little bit about why it > would > > hurt performance? > > See

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Yichao Yu
> Because it is done at compile time, where you can even decide to call > completely different function. See > dequeue = . > dequeue[:first] # is replaced with different function than dequeue[1] > dequeue[:last] # is replaced with different function than dequeue[end] ( > O(1) vs O(n) ) I don't

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Yichao Yu
On Thu, May 26, 2016 at 11:44 AM, Chris Rackauckas wrote: > Thanks, that's good to know. Can you explain a little bit about why it would > hurt performance? See my response on an old thread. https://groups.google.com/forum/?fromgroups=#!searchin/julia-users/Suspending$20Garbage$20Collection$20for

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Ford Ox
I wonder there will be ever be so fast Garbage Collector, that reference counting, manual allocation / freeing and all that c++ stuff will be obsolete...

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Ford Ox
Dne čtvrtek 26. května 2016 17:40:34 UTC+2 Yichao Yu napsal(a): > > On Thu, May 26, 2016 at 11:31 AM, Ford Ox > > wrote: > > Lets start from scratch. > > > > What if this syntax would be possible in Julia: > > > > collection = [i for i in 1:10] > > @show collection[:first] > > @show colle

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Yichao Yu
On Thu, May 26, 2016 at 11:41 AM, Ford Ox wrote: > I wonder there will be ever be so fast Garbage Collector, that reference > counting, manual allocation / freeing and all that c++ stuff will be > obsolete... This is the wrong question to ask. As I mentioned already, a tracing GC is usually much

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Chris Rackauckas
Thanks, that's good to know. Can you explain a little bit about why it would hurt performance? On Thursday, May 26, 2016 at 8:23:34 AM UTC-7, Yichao Yu wrote: > > On Thu, May 26, 2016 at 11:06 AM, Chris Rackauckas > wrote: > > I see mentions like this one every once in awhile: > > > > "D lan

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Yichao Yu
On Thu, May 26, 2016 at 11:31 AM, Ford Ox wrote: > Lets start from scratch. > > What if this syntax would be possible in Julia: > > collection = [i for i in 1:10] > @show collection[:first] > @show collection[:middle] > @show collection[:last] > @show collection[:first] = -1 > @show collection[:mi

Re: [julia-users] Reading from a TCP socket with quasi-continuous data transfer

2016-05-26 Thread Isaiah Norton
On Tue, May 24, 2016 at 4:43 PM, Joshua Jones < highly.creative.pseudo...@gmail.com> wrote: > Hi, > > First post to the group, but I've been coding in Julia for about a year > now. > Welcome! *Questions*: > >1. If I try to read from the TCP buffer, it blocks; CTRL-C seemingly >can't inte

[julia-users] Re: What is Julia and what it is not?

2016-05-26 Thread Ford Ox
:-D :-D :-D add generous language: I have meant general purpose language of course. Dne čtvrtek 26. května 2016 16:50:16 UTC+2 Chris Rackauckas napsal(a): > > As mentioned, the goal is for it to be a general purpose language with a > scientific focus: > > Scientific language - It already has th

Re: Soukromá zpráva ohledně: [julia-users] Re: getindex vs @getindex

2016-05-26 Thread Ford Ox
*Lets start from scratch.* What if this syntax would be possible in Julia: collection = [i for i in 1:10] @show collection[:first] @show collection[:middle] @show collection[:last] @show collection[:first] = -1 @show collection[:middle] = -1 @show collection[:my_own_name] = -1 > collection[1] =

Re: [julia-users] Julia Memory Management

2016-05-26 Thread Yichao Yu
On Thu, May 26, 2016 at 11:06 AM, Chris Rackauckas wrote: > I see mentions like this one every once in awhile: > > "D language is a special case, as it has GC, but it's also optional (as with > Julia)" > > Is GC optional? No, Not for julia objects. > I thought the only way to discard something f

[julia-users] Julia Memory Management

2016-05-26 Thread Chris Rackauckas
I see mentions like this one every once in awhile: "D language is a special case, as it has GC, but it's also optional (as with Julia)" Is GC optional? I thought the only way to discard something from memory was to set it to zero and call garbage control (which then runs the whole garbage cont

[julia-users] Re: What is Julia and what it is not?

2016-05-26 Thread Chris Rackauckas
As mentioned, the goal is for it to be a general purpose language with a scientific focus: Scientific language - It already has that down. It's easy to do mathematics with it, it's fast to prototype algorithms, and the code has very high performance. This is what most scientists are looking for

Re: [julia-users] collect([1 2]) in 0.5.0-

2016-05-26 Thread Milan Bouchet-Valat
Le jeudi 26 mai 2016 à 09:03 -0400, Stefan Karpinski a écrit : > Perhaps these should be called Vector and Array? As in Vector(f(x) > for x in A) and Array(f(x) for x in A). Cf. https://github.com/JuliaLang/julia/issues/16029 > On Wed, May 25, 2016 at 7:07 PM, Jeffrey Sarnoff > wrote: > > I hope

Re: [julia-users] DateTime conversion in DataFrames

2016-05-26 Thread Milan Bouchet-Valat
Le jeudi 26 mai 2016 à 06:15 -0700, akrun a écrit : > I am using the DataFrames package.  I find it difficult to convert to > DateTime.  > >       println(DateTime("4/5/2002 04:20", "m/d/y H:M"))  > gives output > >       2002-04-05T04:20:00 > > However, if I try > >   df1 = DataFrame(V1 =

[julia-users] DateTime conversion in DataFrames

2016-05-26 Thread akrun
I am using the DataFrames package. I find it difficult to convert to DateTime. println(DateTime("4/5/2002 04:20", "m/d/y H:M")) gives output 2002-04-05T04:20:00 However, if I try df1 = DataFrame(V1 = ["4/5/2002 04:20", "4/5/2002 04:25"]) println(DateTime(df1[:V1]))

Re: [julia-users] collect([1 2]) in 0.5.0-

2016-05-26 Thread Tom Breloff
+1 Stefan. This is so much better and less likely to confuse. On Thursday, May 26, 2016, Stefan Karpinski wrote: > Perhaps these should be called Vector and Array? As in Vector(f(x) for x > in A) and Array(f(x) for x in A). > > On Wed, May 25, 2016 at 7:07 PM, Jeffrey Sarnoff < > jeffrey.sarn...

Re: [julia-users] Redefine constant

2016-05-26 Thread Stefan Karpinski
Don't redefine constants? On Thu, May 26, 2016 at 6:10 AM, wrote: > when i defined the const like > > Const a_max = [30,30] > Const a_min = [0,10] > > I fined the warning > > WARNING: redefining constant a_max > WARNING: redefining constant a_min > > > > how can I resolve this issue ?? Thank yo

Re: [julia-users] collect([1 2]) in 0.5.0-

2016-05-26 Thread Stefan Karpinski
Perhaps these should be called Vector and Array? As in Vector(f(x) for x in A) and Array(f(x) for x in A). On Wed, May 25, 2016 at 7:07 PM, Jeffrey Sarnoff wrote: > I hope Julia is not ready to drop the immediacy of clarity when it is > new-found and current use adjacent (e.g. "shape-preserving

Re: [julia-users] Re: reductions in 0.5 and dropping dimensions

2016-05-26 Thread a. kramer
I see, yes the broadcasting does allow you to do some useful things: my first example could be rewritten as (A ./ mean(A,1))[1,:]. I'm not convinced that this is the most "natural" way to do things but I can see it being powerful. I believe APL drops dimensions with sum or any other reduction

Re: [julia-users] Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Rafael Fourquet
And indeed, as Scott points, a function can switch from using the short form to the long form only because the number of characters grows a bit, which is uncorelated to the functionalness. Having the short form and long form disagree on the "default" returned value would increase the risk to introd

Re: [julia-users] Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Rafael Fourquet
I would be sorry to see this so elegant functional aspect of Julia return to the void. It fits well with the expression-rather-than-statement feel of Julia. Regarding the annoyance of having to explicitly "return nothing" for "procedures" (functions which are called only for side-effects): I would

[julia-users] Re: What is Julia and what it is not?

2016-05-26 Thread Scott Jones
Jeff has already answered that it is not intended to be only a scientific language, at his thesis defense, and reaffirmed that just two nights ago at a talk. If I can state the case correctly, they felt that if they made the best scientific/numeric/technical language, which was a much harder tas

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Scott Jones
Hmm, I use the long function form whenever the function is over 2 (at most 92 char) lines, so I disagree strongly that just because it uses the function form, it is inherently "non-functional". foo(a) = "fits on one line" bar{maybe_many_parameters}(lots_of_long_arguments) = "too long for one

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Scott Jones
So, another type could be added, say `Nothing` (currently deprecated) that converts everything to nothing without error. That would not be a special case then, right? There are a lot of other decisions in Julia that were made for pragmatic reasons - I think indicating that `nothing` should alwa

Re: [julia-users] What is Julia and what it is not?

2016-05-26 Thread Ford Ox
The purpose of this question is to not make topics about features that are not going be implemented. For example if julia is not supposed to become easily scalable language, it is useless to talk about coupling...

Re: [julia-users] What is Julia and what it is not?

2016-05-26 Thread Tamas Papp
It is great that you are enthusiastic about Julia, but questions like this generate little useful traffic. On Thu, May 26 2016, Ford Ox wrote: > How should be julia 1.0 seen when it is finished? > > Purpose: > Scientific language only? > Generous language? > Scripting language? > Easily scala

[julia-users] What is Julia and what it is not?

2016-05-26 Thread Ford Ox
How should be julia 1.0 seen when it is finished? Purpose: Scientific language only? Generous language? Scripting language? Easily scalable language? Add yours...

Re: [julia-users] Re: static compilation

2016-05-26 Thread Ján Adamčák
I reported it as bug. #16595

Re: [julia-users] Redefine constant

2016-05-26 Thread Michele Zaffalon
At the REPL, you can use workspace() On Thu, May 26, 2016 at 12:10 PM, wrote: > when i defined the const like > > Const a_max = [30,30] > Const a_min = [0,10] > > I fined the warning > > WARNING: redefini

[julia-users] Redefine constant

2016-05-26 Thread tannirind
when i defined the const like Const a_max = [30,30] Const a_min = [0,10] I fined the warning WARNING: redefining constant a_max WARNING: redefining constant a_min how can I resolve this issue ?? Thank you

Re: [julia-users] Re: Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread 'Tobias Knopp' via julia-users
We are currently talking about the long function form which are inherently non-functional since they involve a function body which is evaluated step by step. This is against the nature of a purely functional language. Thus, I cannot see how its intuitive from a functional side that the last sta

[julia-users] Re: ANN / Request for testers: Pardiso.jl

2016-05-26 Thread Kristoffer Carlsson
Thank you both for the help! I made a PR to METADATA with a new release for the missing BaseTestNext (it is so easy to forget stuff like that when you have no C.I running). Happy to hear that things are still working. // Kristoffer On Thursday, May 26, 2016 at 6:44:46 AM UTC+2, Patrick Belli

[julia-users] Lack of an explicit return in Julia, heartache or happiness?

2016-05-26 Thread Ford Ox
It looks like the problem pple has is the fact that they are not sure what their function returns and forget to return nothing. If print(methodname) prints automatically it's return type, you can easily avoid this confusion. foo() = 5 >>foo() -> Int Now you can just easily check what actual