[julia-users] Re: Passing data through Optim

2015-09-29 Thread Tomas Lycken
The performance penalty from global variables comes from the fact that non-const global variables are type unstable, which means that the compiler has to generate very defensive, and thus slow, code. The same thing is, for now, true also for anonymous functions and functions passed as

Re: [julia-users] How to use variables in subsets of DataFrames ?

2015-09-29 Thread Fred
Great answer Rob ! This is exactly what I was looking for ! Many Thanks ! Fred Le lundi 28 septembre 2015 17:35:15 UTC+2, Rob J Goedman a écrit : > > Fred, > > Would below example work for you? > > *julia> **dft = readtable("/Users/rob/Desktop/test.csv", separator = > '\t')* > *8x5

[julia-users] Re: How to create an array of a given type?

2015-09-29 Thread Michael Hatherly
This is probably https://github.com/JunoLab/atom-julia-client/issues/44 — just a display issue with arrays containing #undef. Not sure when someone will have a chance to fix it. Until someone does you'll need to avoid trying to display results containing undefined references. If you’d like to

[julia-users] Re: Passing data through Optim

2015-09-29 Thread Kristoffer Carlsson
In my experience a closure is much faster than a function that accesses global variables even if it is passed to another function as an argument. Two different examples. Here we pass a function that accesses (non const) globals to another function: a = 3 g(f::Function, b, N) = f(b, N)

[julia-users] Escher image

2015-09-29 Thread Yakir Gagnon
How do you show a local image (say it’s in the directory where you ran escher --serve)? ​

[julia-users] Is it possible to "precompile" during the "__precompile__"?

2015-09-29 Thread Sheehan Olver
I'm wondering if its possible to have functions precompiled for specific types during the __precompile__ stage, so that this does not need to be repeated for each using? Gadfly seems to do this by defining a _precompile_() function, but it's unclear whether that's compiling during the

[julia-users] Re: suppress deprecation warnings

2015-09-29 Thread David van Leeuwen
Hello, On Thursday, September 17, 2015 at 7:28:10 PM UTC+2, Michael Francis wrote: > > How can I suppress the printing of deprecation warnings in 0.4? I need to > temporarily suppress these so that I can see the wood for the trees. > I think I have the same request: is there a way to disable

[julia-users] Re: Is it possible to "precompile" during the "__precompile__"?

2015-09-29 Thread Kristoffer Carlsson
These are precompiled "once and for all" and are recompiled when the source changes. Relevant package: https://github.com/timholy/SnoopCompile.jl On Tuesday, September 29, 2015 at 8:16:36 AM UTC+2, Sheehan Olver wrote: > > > I'm wondering if its possible to have functions precompiled for

Re: [julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Scott Jones
Yes, one of the things that won me over was that I could write many fewer lines of code that I'd have to do in C/C++/Java (and that was when I was still a total novice - which I still am in many ways, but getting better). Python has been successful IMO because it's easy to quickly get stuff up

Re: [julia-users] Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Mauro
I don't think that you need nor that you should use generated functions. But maybe I'm wrong, what are you trying to achieve? This should work as you want: function testfun2!{N}(X,Y::NTuple{N,Float64}) for i in eachindex(X), j in 1:N # much better to have the loop this way X[i][j] =

Re: [julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Tom Breloff
One of the recent "why is my code slow" posts from a new user had a statement that was something along the lines of "sure it's still 4-5 times faster than python, but I expected it to be much faster". I think this sums it up... new users hear of Julia's blazing speed and expect it to be as fast

Re: [julia-users] Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Alan Crawford
Thanks. The example was intended as an illustration of a more complex code in which this was an issue. However, maybe i could do it without the @generated. I will revisit it and see if I really did need it... Thanks, Alan was just an illustration of a the larger piece of code where I am

Re: [julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Tom Breloff
Leave it to Scott to make things more complicated... :) On Tue, Sep 29, 2015 at 9:47 AM, Scott Jones wrote: > Yes, one of the things that won me over was that I could write many fewer > lines of code that I'd have to do in C/C++/Java (and that was when I was > still

[julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Páll Haraldsson
On Tuesday, September 29, 2015 at 10:20:18 AM UTC, Tomas Lycken wrote: > > One thing Python does well, which Julia doesn't (yet) succeed in, is make > it easy to start coding from zero experience and get something that > executes "well enough" > I think, this may be a little unfair to Julia.

Re: [julia-users] Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Mauro
> Thanks. The example was intended as an illustration of a more complex > code in which this was an issue. However, maybe i could do it without > the @generated. I will revisit it and see if I really did need it... Well, it is always hard to tell what's best. If you need certainty, then you

[julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Tomas Lycken
I think, this may be a little unfair to Julia. I agree that it’s unfair - but new users are seldom fair. What I meant to get at was not that Julia code by an inexperienced programmer is worse than anything else, but just that since Julia *can* be so fast, I think there’s a big risk that the

[julia-users] [Doc, IJulia, rc3] `cumsum` documentation problem?

2015-09-29 Thread Sisyphuss
Cumulative sum along a dimension ``dim`` (defaults to 1). See also :func:`cumsum!` to use a preallocated output array, both for performance and to control the precision of the output (e.g. to avoid overflow). cumsum cumsum! cumsum_kbn

[julia-users] Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Alan Crawford
I would like to preallocate memory of an array of arrays and pass it to a function to be filled in. I have created an example below that illustrates my question(s). Based on my (probably incorrect) understanding that it would be desirable to fix the type in my function, I would like to be

[julia-users] Re: Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Tomas Lycken
If you’re trying this out in the REPL, you might have stumbled on the fact that list comprehensions currently aren’t type stable, unless you tell Julia the type of the elements. So instead of Xinput = [Array{Float64}(InnerArrayPts) for r in 1:OuterArrayPts] in your setup, do Xinput =

[julia-users] Re: AssertionError: Base.Test.length(#3232#inftypes) Base.Test.== 1

2015-09-29 Thread Tomas Lycken
Hah, it helps to ask for help. Then you find the solution yourself! For completeness, here’s the entire erroring file: module ConstantTests using Interpolations, Base.Test A = rand(Float64, 10) * 100 for (constructor, copier) in ((interpolate, x->x), (interpolate!, copy)) # this

[julia-users] AssertionError: Base.Test.length(#3232#inftypes) Base.Test.== 1

2015-09-29 Thread Tomas Lycken
I'm introducing some breaking changes in a package, and I want to do it little-by-little and running the test-suite in parts in between to make sure I don't break more than I intend to. After changing a couple of constructors (but probably not all that need it) from taking `Type{T}` arguments

Re: [julia-users] Escher image

2015-09-29 Thread Shashi Gowda
You can put the image in the assets/ directory under the directory you started the server in and then show it with image("assets/img.jpg") On Tue, Sep 29, 2015, 11:50 AM Yakir Gagnon <12.ya...@gmail.com> wrote: > How do you show a local image (say it’s in the directory where you ran escher >

Re: [julia-users] Re: Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Alan Crawford
Many thanks! alan On 29 Sep 2015, at 13:04, Tomas Lycken wrote: > makes a difference in this specific case is a little beyond me, but an > educated guess says that with that guarantee, it is possible to know what > type Array(Float64, InnerArrayPts) will return, making

[julia-users] Re: Passing data through Optim

2015-09-29 Thread Tomas Lycken
Kristoffer, your example still uses a *non-const* global. Using this benchmark , I get the following results: Non-const global 0.017629 seconds (999.84 k allocations: 15.256 MB) Const global 0.02 seconds (6 allocations: 192 bytes)

[julia-users] Re: Passing data through Optim

2015-09-29 Thread Andras Niedermayer
If you're using Julia 0.4 you can also use call overloading, which is almost as convenient as closures and as fast as const globals. An extension of Tomas's benchmark gives me this: Non-const global 0.027968 seconds (999.84 k

[julia-users] Re: Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Tomas Lycken
Type-inference in the REPL usually doesn’t give you as tight types as you’d like, mainly because it has to give room for what you *might* do in the future. Declaring variables const in the REPL (i.e. in global scope) helps with that, since it gives type-inference some guarantees that the

[julia-users] Re: Julia release candidates downloading with Ubuntu PPA

2015-09-29 Thread Tommy Hofmann
According to https://groups.google.com/d/topic/julia-users/Cm5ToWMx3tw/discussion the answer is no. On Tuesday, September 29, 2015 at 9:57:13 AM UTC+8, Scott Jones wrote: > > Because we needed to use some of the functionality which had been in 0.4, > we'd been using the nightly builds from

[julia-users] What's the reason of the Success of Python?

2015-09-29 Thread Sisyphuss
While waiting Julia 0.4 stabilizing, let's do some brainstorming. What's the reason of the Success of Python? If Julia had appeared 10 years earlier, will Python still have this success?

[julia-users] Re: Passing data through Optim

2015-09-29 Thread Christopher Fisher
Thank you everyone for your help and examples. Its been very instructive. I found that simply assigning SubData in SubLoop1 as a const speed up the code 82 fold. I will try to incorporate the other advice where ever possible.

[julia-users] Re: Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Alan Crawford
Thanks Tomas, works perfectly. I was testing out some code in the REPL... Relatedly and without abusing the thread too much, I wondered if you might be able to help me understand why the setting InnerArrayPts as const created the desired type stable array comprehension? Namely, const

[julia-users] Displaying images in Jupyter notebook

2015-09-29 Thread cormullion
I installed Jupyter and opened a new notebook. It works fine (Jupyter 4.0.6, Julia 0.4.0-rc2). Now I want to start using Images.jl. So: using Images img = imread("/tmp/simple.png") But I get this response: UnableToOpenConfigureFile `coder.xml' @

Re: [julia-users] Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Mauro
> Thanks Mauro - really useful to know. So it seems that in this > particular instance the number of nested loops does change with N, so > I think the code would fall into the latter case. Sorry, I wasn't clear: no, only the number of iterations would change. With numbers of nested loops I

Re: [julia-users] [Doc, IJulia, rc3] `cumsum` documentation problem?

2015-09-29 Thread Yichao Yu
On Tue, Sep 29, 2015 at 10:01 AM, Sisyphuss wrote: > Cumulative sum along a dimension ``dim`` (defaults to 1). > See also :func:`cumsum!` to use a preallocated output array, > both for performance and to control the precision of the > output (e.g. to avoid overflow). > >

[julia-users] `broadcast` should have returned the BitArray type?

2015-09-29 Thread Sisyphuss
[1;3] .> 2 2-element BitArray{1}: false true = broadcast(>,[1;3],2) 2-element Array{Int64,1}: 0 1 = Is the difficulty because of type instability?

Re: [julia-users] Passing Array{Array{T,N},1} to a function

2015-09-29 Thread Jameson Nash
Note that generated function are not generally needed for that, as Tim Holy pointed out yesterday in https://groups.google.com/d/msg/julia-users/iX-R5luh-0M/QUeBXBLxBwAJ. That also help avoid the downside of generated functions (they are hard to write correctly, hard to read, slow for dispatch,

Re: [julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Scott Jones
On Tuesday, September 29, 2015 at 10:14:48 AM UTC-4, Tom Breloff wrote: > > Leave it to Scott to make things more complicated... :) > Of course! :) I just wanted it to reflect better which language might do better for a company, where the programmer's time may be worth a lot more than the

Re: [julia-users] [Doc, IJulia, rc3] `cumsum` documentation problem?

2015-09-29 Thread Sisyphuss
Yes, I did talk about that. I thought It had been solved before the release candidates. On Tuesday, September 29, 2015 at 4:17:46 PM UTC+2, Yichao Yu wrote: > > On Tue, Sep 29, 2015 at 10:01 AM, Sisyphuss > wrote: > > Cumulative sum along a dimension ``dim`` (defaults to

Re: [julia-users] Pkg.[update()/install()/build()] woes on Windows 10 64 bit

2015-09-29 Thread Evan Fields
So I deleted just ArrayViews from .julia, still got errors. Decided to delete the whole of .julia, did Pkg.add("Images"), and got this: _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_)| Documentation: http://docs.julialang.org _ _

[julia-users] ANN: Glove.jl

2015-09-29 Thread Dom Luna
Hey all, I started this a couple of months back but ran into a couple of issues and sort of just had it on the backburner. I worked on it these last couple of days and I've gotten it to a usable state. https://github.com/domluna/Glove.jl I haven't done anything to make it parallel yet, that

Re: [julia-users] How do I pass an event handle via ccall?

2015-09-29 Thread Chris Stook
That simple detailed explanation is exactly what I needed. Thank you.

[julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Edmondo Giovannozzi
First of all I want to say that you are doing an excellent job. I program in Fortran and python but I'm keeping an eye on Julia, I haven't decided to switch yet. I'm not afraid to learn a new language, so I may do it in the future. Python is slow, but most of the time I use vectorized

[julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Daniel Carrera
On Tuesday, 29 September 2015 12:20:18 UTC+2, Tomas Lycken wrote: > > One thing Python does well, which Julia doesn't (yet) succeed in, is make > it easy to start coding from zero experience and get something that > executes "well enough" (although, as always with first-time coders, code >

[julia-users] fminbox question

2015-09-29 Thread Weichi Ding
Hi, I'm new to the Optim package and am trying to find a minimum using bounding box constraints. I wrote a function like this: function func(x::Vector) ... end It works fine using optimize() >optimize(func,[360e-12, 240e-12,15e-15]) Results of Optimization Algorithm * Algorithm: Nelder-Mead

[julia-users] Re: Displaying images in Jupyter notebook

2015-09-29 Thread cormullion
thanks Steven. I looked again through Images' issues, and it might be related to this one: https://github.com/timholy/Images.jl/issues/237 .

[julia-users] Metaprogramming and Dispatch

2015-09-29 Thread Matt
I want to write a method that is very similar between two types, with slight divergences. I'd like to write it avoiding code duplication. To take a simple example, let's say that the two types are Vector and Matrix. The method must print "I'm an array" for the two types, and then prints "I'm

Re: [julia-users] Escher image

2015-09-29 Thread Yakir Gagnon
Thanks! On Tuesday, September 29, 2015 at 9:55:06 PM UTC+10, Shashi Gowda wrote: > > You can put the image in the assets/ directory under the directory you > started the server in and then show it with image("assets/img.jpg") > > On Tue, Sep 29, 2015, 11:50 AM Yakir Gagnon <12.y...@gmail.com >

[julia-users] Re: Will Julia likely ever allow negative indexing of arrays

2015-09-29 Thread Luke Stagner
Nice to see more plasma physicists using Julia. a=0.0 > You could just do a[:] = 0.0 to set all the elements to zero or you could do a=zeros(n) In regards to the negative indexing I think that while negative indexing may not be a part of base you should be able to replicate the effect with

[julia-users] Re: Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Luke Stagner
I'm not sure what version of Julia you are using but in Julia 0.3.9 x = linspace(0,1,N) does return a linearly spaced N-element array of floats from 0-1 On Tuesday, September 29, 2015 at 3:44:43 PM UTC-7, feza wrote: > > In matlab x = linspace(0,1,n) creates a vector of floats of length n.

[julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread feza
In matlab x = linspace(0,1,n) creates a vector of floats of length n. In julia it seems like the only way to do this is to use x = collect( linspace(0,1,n) ) . Is there a nicer syntax? I do mainly numeric computing and I find this quite common in my code. Thanks.

[julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Daniel Carrera
On Tuesday, 29 September 2015 14:50:14 UTC+2, Páll Haraldsson wrote: > > Even if Julia were as slow as Python, it seems to be a better language - > more maintainable > Exactly! I never liked Python. I use Julia because I like the language itself. The fact that it is fast is actually secondary,

Re: [julia-users] Escher plotting example

2015-09-29 Thread Yakir Gagnon
while it doesn't issue any errors, the slider doesn't affect the plot...? Yakir Gagnon The Queensland Brain Institute (Building #79) The University of Queensland Brisbane QLD 4072 Australia cell +61 (0)424 393 332 work +61 (0)733 654 089 On Wed, Sep 30, 2015 at 2:25 PM, Yakir Gagnon

Re: [julia-users] ANN: Glove.jl

2015-09-29 Thread Kevin Squire
Hi Dom, It would be useful to include a short description when announcing a package. Cheers, Kevin On Tuesday, September 29, 2015, Dom Luna wrote: > Hey all, > > I started this a couple of months back but ran into a couple of issues and > sort of just had it on the

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Stefan Karpinski
I'm curious why you need a vector rather than an object. Do you mutate it after creating it? Having linspace return an object instead of a vector was a bit of a unclear judgement call so getting feedback would be good. On Tuesday, September 29, 2015, Patrick Kofod Mogensen <

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Luke Stagner
Personally I don't like the behaviour. (Perhaps I am just too used to numpy/matlab convention). Also we already had linrange (although curiously not logrange) if we wanted to use a range. On Tuesday, September 29, 2015 at 5:59:52 PM UTC-7, Stefan Karpinski wrote: > > I'm curious why you need a

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Luke Stagner
A range should act (for the most part) exactly like an array. For example indexing into a range is identical (syntax-wise) to indexing an array. What I am concerned about is performance. For instance if I had a range that has a large amount of elements would indexing into it be slower then

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Luke Stagner
A range should act (for the most part) exactly like an array. For example indexing into a range is identical (syntax-wise) to indexing an array. What I am concerned about is performance. For instance if I had a range that has a large amount of elements would indexing into it be slower then

Re: [julia-users] restricting the type of bitstype type parameters

2015-09-29 Thread Tim Holy
Yes, the syntax you proposed already works. Try it out. --Tim On Tuesday, September 29, 2015 06:42:36 PM Tom Lee wrote: > Is there any way to restrict a type parameter to a particular bitstype, or > is this planned in the next type design iteration? eg: > > type FixedVector{T<:Number,

Re: [julia-users] Metaprogramming and Dispatch

2015-09-29 Thread Stefan Karpinski
The branch on the first version will be eliminated. The second version is far more idiomatic, however. Consider that the second version is trivially extensible to more types while the first version cannot be extended at all. On Tuesday, September 29, 2015, Matt wrote: > I

[julia-users] Re: ANN: Glove.jl

2015-09-29 Thread Dom Luna
Thanks Kevin. This slipped my mind. Glove (or rather GloVe, Glove is just easier to type) stands for Global Word Vectors. The package implements the algorithm in described http://nlp.stanford.edu/projects/glove/. The idea is to represent words as a vector of floats that capture word

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread feza
Strange it *was* giving me an error saying deprecated and that I should use collect, but now it's fine. On Tuesday, September 29, 2015 at 10:28:12 PM UTC-4, Sheehan Olver wrote: > > fez, I'm pretty sure the code works fine without the collect: when exp is > called on linspace it converts it to

[julia-users] Re: Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Chris
In 0.4 the linspace function returns a range object, and you need to use collect() to expand it. I'm also interested in nicer syntax.

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Chris
For me, I think I just expect a vector from experience, and I could probably just change the way I work with a little effort. One exception (I think) is that I often do numerical integration over a range of values, and I need the results at every value. I'm not sure if there's a way to do that

Re: [julia-users] Metaprogramming and Dispatch

2015-09-29 Thread Jameson Nash
As Stefan mentioned, the `@generated` function below is equivalent to the first function you posted, except that it is worse style since it is not extensible, will generally require more memory, it is less readable (and it seems to be giving the wrong answer for N > 2 and N == 0?) The Julia-style

[julia-users] Escher plotting example

2015-09-29 Thread Yakir Gagnon
I’m trying to use Escher as the main GUI for a program I’m writing. I need to replot some data every time the user changes a slider. The plotting.jl example seems like the best point to start at. But I get the following error (shown only in the browser, not at the shell): UndefVarError: inch

Re: [julia-users] Escher plotting example

2015-09-29 Thread Yakir Gagnon
omg, awesome! Thank you (again)! Yakir Gagnon The Queensland Brain Institute (Building #79) The University of Queensland Brisbane QLD 4072 Australia cell +61 (0)424 393 332 work +61 (0)733 654 089 On Wed, Sep 30, 2015 at 2:17 PM, Shashi Gowda wrote: > here is the

[julia-users] Re: ANN: FileIO.jl, for loading and saving formatted files

2015-09-29 Thread Patrick Kofod Mogensen
As Stefan - I love it. Imo, stuff like this really enhances the user experience and productivity. On Tuesday, September 29, 2015 at 3:24:13 PM UTC-4, Tim Holy wrote: > > Simon Danisch and I are pleased to introduce FileIO.jl > (https://github.com/JuliaIO/FileIO.jl), a package for centralizing

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread elextr
On Wednesday, September 30, 2015 at 11:37:44 AM UTC+10, Luke Stagner wrote: > > A range should act (for the most part) exactly like an array. For example > indexing into a range is identical (syntax-wise) to indexing an array. What > I am concerned about is performance. For instance if I had a

Re: [julia-users] Metaprogramming and Dispatch

2015-09-29 Thread Matt
Hey, Sorry I'm not sure what you're referring too. Just to clarify. I have written 3 functions in the first subject. The first function uses run time dispatch, the second use sub-auxiliary functions at every differing line, the third uses the @eval style. I like the syntax of the first

[julia-users] Re: Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Patrick Kofod Mogensen
Is it because you use it many times? just define a clinspace that collects the linspace. On Tuesday, September 29, 2015 at 6:44:43 PM UTC-4, feza wrote: > > In matlab x = linspace(0,1,n) creates a vector of floats of length n. In > julia it seems like the only way to do this is to use x =

Re: [julia-users] Metaprogramming and Dispatch

2015-09-29 Thread Matt
Thanks for answering. Sorry I deleted my question after finding what I wanted. If some people are interested, I like the two solutions below: for t in (Vector, Matrix) @eval begin function f2(x::$t) println("I'm an array") $(t == Vector ? :(println("I'm a

Re: [julia-users] Escher plotting example

2015-09-29 Thread Shashi Gowda
here is the change you need: https://github.com/shashi/Escher.jl/commit/d2b5c57dd91abc74901821120f57e020809b3bb1 On Wed, Sep 30, 2015 at 9:45 AM, Shashi Gowda wrote: > You need Gadfly.inch in place of inch. It's because of a new change in > Julia 0.4 - if two packages

[julia-users] julia unikernel - rumprun

2015-09-29 Thread Martin Somers
Hi Just wondering if anyone might have any insight if this might be possible to do with Julia - ie run Julia as a unikernel under rumprun https://gandro.github.io/2015/09/27/rust-on-rumprun/ M

[julia-users] Re: Nicer syntax collect(linspace(0,1,n))?

2015-09-29 Thread Patrick Kofod Mogensen
No: julia> logspace(0,3,5) 5-element Array{Float64,1}: 1.0 5.62341 31.6228 177.828 1000.0 On Tuesday, September 29, 2015 at 8:50:47 PM UTC-4, Luke Stagner wrote: > > Thats interesting. Does logspace also return a range? > > On Tuesday, September 29, 2015 at 5:43:28 PM

[julia-users] restricting the type of bitstype type parameters

2015-09-29 Thread Tom Lee
Is there any way to restrict a type parameter to a particular bitstype, or is this planned in the next type design iteration? eg: type FixedVector{T<:Number, n::Integer} data::NTuple{n,T} end You can achieve this by adding checks in the constructor, but doing so always makes things so

[julia-users] Package badge URLs for nightly build

2015-09-29 Thread Júlio Hoffimann
Hi, Could you please confirm the badge URLs for nightly builds are obsolete and that I have to use a specific Julia version now? https://github.com/juliohm/ImageQuilting.jl/blob/master/README.md -Júlio

Re: [julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Christoph Ortner
I prefer Julia to Python for many reasons, not only performance, but purely regarding performance I often wondered: How much is the poor Python performance just a current state. In fact NUMBA can often take care if it in a very low-effort way. (a) What is numba lacking now, compared to

[julia-users] ANN: FileIO.jl, for loading and saving formatted files

2015-09-29 Thread Tim Holy
Simon Danisch and I are pleased to introduce FileIO.jl (https://github.com/JuliaIO/FileIO.jl), a package for centralizing the handling of formatted files. The package contains utilities for querying files/filenames by their extensions and/or magic bytes to deduce their content. It then allows

[julia-users] Re: Will Julia likely ever allow negative indexing of arrays

2015-09-29 Thread Mark Sherlock
Thanks for all the replies, I'll check the links provided. Just to give a summary of the reasons As John Gibson pointed out Fourier expansions would be one example. When solving PDE's we use "ghost cells" to provide boundary conditions. A physical variable, let's say density, could be

Re: [julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Scott Jones
Well, I do think there is a lot special about Julia's design that could not be added on to Python - the macro programming, multiple dispatch capabilities and the powerful type system (hopefully with traits built into the language in the future!) are what most set it apart from other languages,

[julia-users] Re: What's the reason of the Success of Python?

2015-09-29 Thread Steven G. Johnson
On Tuesday, September 29, 2015 at 12:42:04 PM UTC-4, Edmondo Giovannozzi wrote: > > First of all I want to say that you are doing an excellent job. > I program in Fortran and python but I'm keeping an eye on Julia, I haven't > decided to switch yet. I'm not afraid to learn a new language, so I

[julia-users] Re: Is it possible to "precompile" during the "__precompile__"?

2015-09-29 Thread Steven G. Johnson
On Tuesday, September 29, 2015 at 2:16:36 AM UTC-4, Sheehan Olver wrote: > > > I'm wondering if its possible to have functions precompiled for specific > types during the __precompile__ stage, so that this does not need to be > repeated for each using? > > Gadfly seems to do this by defining a

[julia-users] Re: How to create an array of a given type?

2015-09-29 Thread Dongning Guo
I suppressed the display and problem solved! Thanks! On Tuesday, September 29, 2015 at 1:15:26 AM UTC-5, Michael Hatherly wrote: > > This is probably https://github.com/JunoLab/atom-julia-client/issues/44 — > just a display issue with arrays containing #undef. Not sure when someone > will have

[julia-users] Re: Displaying images in Jupyter notebook

2015-09-29 Thread Steven G. Johnson
Probably you should file an issue at the Images.jl github page. (I saw something similar on Alan's machine. My suspicion was a misconfigured ImageMagick, but I was able to get it working just by downgrading the Images package to an older version. So, you might be able to do a git bisect and

Re: [julia-users] ANN: FileIO.jl, for loading and saving formatted files

2015-09-29 Thread Stefan Karpinski
This is great – I love this kind of thing. On Tue, Sep 29, 2015 at 3:24 PM, Tim Holy wrote: > Simon Danisch and I are pleased to introduce FileIO.jl > (https://github.com/JuliaIO/FileIO.jl), a package for centralizing the > handling of formatted files. The package contains