Re: [julia-users] Re: Immutable type modification of SparseMatrixCSC

2016-11-06 Thread Kristoffer Carlsson
On Sunday, November 6, 2016 at 2:25:27 AM UTC-8, Milan Bouchet-Valat wrote: > > For reference, here's the long discussion that happened before making > that change: > https://github.com/JuliaLang/julia/pull/16371 > > Indeed I think Tony was right that this has undesirable consequences in >

[julia-users] Re: Defining a type that inherits methods

2016-10-29 Thread Kristoffer Carlsson
This is the issue you are looking for: https://github.com/JuliaLang/julia/issues/9821 On Saturday, October 29, 2016 at 5:54:04 PM UTC+2, Jérémy Béjanin wrote: > > I know that it is not possible to subtype concrete types, but is it > possible in some other way to create a type that behave

[julia-users] Re: Performance of Kernel Inlining

2016-10-29 Thread Kristoffer Carlsson
Could it be some alias checking going on? Anyway, this code is horribly slow on 0.6 (even with #19097) it seems. to_indexes(::Int64, ::Int64, ::Vararg{Int64,N}) at operators.jl:868 (repeats 3 times) kills performance. On Saturday, October 29, 2016 at 5:56:12 AM UTC+2, Jared Crean wrote: > >

[julia-users] Re: Sparse arrays in Julia

2016-10-28 Thread Kristoffer Carlsson
Take a look at https://github.com/JuliaComputing/IndexedTables.jl "This package provides a table data structure where some of the columns form a sorted index. This structure is equivalent to an N-dimensional sparse array, and follows the array API to the extent possible." On Friday, October

[julia-users] Re: Does new "dot" syntax fuse?

2016-10-20 Thread Kristoffer Carlsson
Firstly, don't benchmark in global scope, put things in functions. Secondly, see https://github.com/JuliaLang/julia/pull/17623 for .+ and company. On Thursday, October 20, 2016 at 10:55:25 PM UTC+2, Alexey Cherkaev wrote: > > Hi all! > > Consider example: > > # collect to produce vectors - not

Re: [julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread Kristoffer Carlsson
What do you actually want to do? Extract all characters after a comma? On Thursday, October 20, 2016 at 9:26:01 PM UTC+2, programistawpf wrote: > > Ok, I finded: findin(temp,[","])... > > for i=1:nol > temp=(collect(graphemes(readline(o > poz=(findin(temp,[","])[end])+1 > write(io, temp[poz])

Re: [julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread Kristoffer Carlsson
What do you actually want to do? Extract all words after a comma? On Thursday, October 20, 2016 at 9:26:01 PM UTC+2, programistawpf wrote: > > Ok, I finded: findin(temp,[","])... > > for i=1:nol > temp=(collect(graphemes(readline(o > poz=(findin(temp,[","])[end])+1 > write(io, temp[poz]) >

[julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread Kristoffer Carlsson
rather than by a character index, which cannot be implemented both efficiently and simply for variable-width encodings of Unicode strings. On Thursday, October 20, 2016 at 7:43:22 PM UTC+2, Kristoffer Carlsson wrote: > > Please read http://docs.julialang.org/en/release-0.5/manual/s

[julia-users] Re: prblem with space after "ś", "ć" ERROR: UnicodeError: invalid character index

2016-10-20 Thread Kristoffer Carlsson
Please read http://docs.julialang.org/en/release-0.5/manual/strings/ On Thursday, October 20, 2016 at 7:34:03 PM UTC+2, program...@gmail.com wrote: > > What wrong ? > julia> o=open("string.txt","w") > IOStream() > > julia> write(o,b) > 12 > > julia> close(o) > > julia> o=open("string.txt") >

[julia-users] Re: Benchmarking workflow

2016-10-20 Thread Kristoffer Carlsson
Take a look at https://github.com/JuliaCI/PkgBenchmark.jl On Thursday, October 20, 2016 at 1:32:54 PM UTC+2, ada...@whitman.edu wrote: > > Hello, > I am writing a package that does a lot of computationally expensive work > (molecular dynamics simulations). As a result, I'm doing a lot of >

[julia-users] Re: GR error

2016-10-20 Thread Kristoffer Carlsson
Change Uint32 to UInt32. On Thursday, October 20, 2016 at 12:09:31 PM UTC+2, Henri Girard wrote: > > I am trying to run Animated view of the Riemann Zeta function > > > from GR framework, on julia 0.5 ubuntu 16.04 > > The last : > > f =

Re: [julia-users] Can't overwrite some methods in 0.5.0

2016-10-20 Thread Kristoffer Carlsson
myfunc = a -> begin println("Hey") return sum(a) end

[julia-users] Re: quadgk with 2 arguments

2016-10-15 Thread Kristoffer Carlsson
Perhaps this is what you mean: s = 1.0 quadgk(t -> f(s,t),0,1) On Sunday, October 16, 2016 at 2:37:58 AM UTC+2, digxx wrote: > > having a function of the form f(s,t) defined is it possible to somehow > tell quadgk to not evaluate until I supply a value for s while t should be > the

[julia-users] Re: Interpolations.jl: how to use the scale function?

2016-10-15 Thread Kristoffer Carlsson
itp2 = scale(itp,0:0.1:1) itp2[0] # 0.0 On Saturday, October 15, 2016 at 10:04:37 PM UTC+2, Florian Oswald wrote: > > Hi folks, > > I have question on SO that needs some attention. thanks! > > > http://stackoverflow.com/questions/40045208/how-to-use-scale-in-interpolations-jl >

[julia-users] Re: I have two data collection for mapreduce() vs. generator, which is correct/better implementation? (Julia 0.5)

2016-10-13 Thread Kristoffer Carlsson
I think you will not add the numbers in the same order when SIMD is used. Floating point addition is not commutative so you get slightly different answers. On Thursday, October 13, 2016 at 9:14:31 AM UTC+2, DNF wrote: > > This is about twice as fast with, with @simd: > > function f2(a, p) >

[julia-users] Re: How to print ALL packages of Pkg.available()?

2016-10-10 Thread Kristoffer Carlsson
print(Pkg.available())?

[julia-users] Re: Setting/getting field-like members with side effects

2016-10-09 Thread Kristoffer Carlsson
That was one of the suggestions?

[julia-users] Re: StaticArrays vs FixedSizeArrays

2016-10-07 Thread Kristoffer Carlsson
See https://github.com/SimonDanisch/FixedSizeArrays.jl/issues/159 On Friday, October 7, 2016 at 8:10:56 AM UTC+2, Petr Hlavenka wrote: > > Hi, > With Julia 0.5 I'm little bit confused what is the best approach for high > speed array access. I'm writing a simulation where particles move in the >

Re: [julia-users] Re: Julia-i18n logo proposal

2016-10-05 Thread Kristoffer Carlsson
Personally I like the "j"-sound more for some reason... On Wednesday, October 5, 2016 at 3:29:00 PM UTC+2, Waldir Pimenta wrote: > > Oops, meant to link to julia-i18n-j.svg > in the previous message, rather than twice to the -ju variant. > > On Wednesday,

[julia-users] Re: Error showing value

2016-10-04 Thread Kristoffer Carlsson
Restart julia and try again with my version.

[julia-users] Re: Error showing value

2016-10-04 Thread Kristoffer Carlsson
Did you mean Base.show(io::IO, n::One) = print(io, n.*o*)? On Tuesday, October 4, 2016 at 4:21:57 PM UTC+2, alx wrote: > > Hi, I do wrong, please > > -- > using PyCall > > type One > o::PyObject > One() = new( PyObject(1) ) > end > > Base.show(io::IO, n::One) = print(io, n) > > n=One() > >

[julia-users] Re: memory allocation in nested loops

2016-10-04 Thread Kristoffer Carlsson
The slicing of "r" will also make a new array and thus allocate.

[julia-users] Unexpected results with typeof(DataFrame)

2016-10-03 Thread Kristoffer Carlsson
The int value "1" is an Int32 in one case and an Int64 in another?

[julia-users] Re: Changing Repositories Without Deleting METADATA

2016-10-02 Thread Kristoffer Carlsson
Just git add remote REMOTE_NAME REMOTE_URL in the package folder and then git checkout REMOTE_NAME master git checkout origin master to swap between the repos. On Sunday, October 2, 2016 at 7:01:28 PM UTC+2, Chris Rackauckas wrote: > > Does anyone have a good way to change repositories? A

[julia-users] Re: Changing Repositories Without Deleting METADATA

2016-10-02 Thread Kristoffer Carlsson
Just git remote add REMOTE_NAME REMOTE_URL in the package folder and then git checkout REMOTE_NAME master git checkout origin master to swap between the repos. On Sunday, October 2, 2016 at 7:01:28 PM UTC+2, Chris Rackauckas wrote: > > Does anyone have a good way to change repositories? A

Re: [julia-users] Re: Any 0.5 performance tips?

2016-09-29 Thread Kristoffer Carlsson
Perhaps you can run, @profile together with ProfileView.jl and compare the two julia versions.

[julia-users] Any 0.5 performance tips?

2016-09-28 Thread Kristoffer Carlsson
Look for Core.Box in @code_warntype. See https://github.com/JuliaLang/julia/issues/15276

[julia-users] Re: how to change background color from black and the Pkg.add() reply lines from BLUE to a readable foreground color

2016-09-20 Thread Kristoffer Carlsson
The default info color is actually changed to cyan on latest julia master but it has not made it into a release yet.

[julia-users] Re: What is the best way to element-wise right shift an array?

2016-09-18 Thread Kristoffer Carlsson
Just because you are calling two functions doesn't mean it is slow. Have you benchmarked? On Sunday, September 18, 2016 at 11:55:47 AM UTC+2, K leo wrote: > > I have been using simply A=[0; A[1:end-1]], but found it to be somehow > quite expensive. I saw that there is unshift! but it has to

[julia-users] Re: Tracking down type instability

2016-09-16 Thread Kristoffer Carlsson
What if you add @simd after @inbounds? On Friday, September 16, 2016 at 5:48:00 PM UTC+2, Ben Ward wrote: > > The code for that function not shown is rather similar to the version that > is shown: > > function > distance{T<:MutationType,A<:NucleotideAlphabet}(::Type{Proportion{T}}, >

Re: [julia-users] Tracking down type instability

2016-09-16 Thread Kristoffer Carlsson
It looks fine because for both the SSAValues with "problems" you later have: p::Array{Float64,1} = SSAValue(15) l::Array{Int64,1} = SSAValue(17) so they actually get correctly inferred. As long as your variables list and return value is ok then things are most likely ok. On Friday,

[julia-users] Re: Telling if code is vectorised.

2016-09-14 Thread Kristoffer Carlsson
Your code is type unstable. Use a = UInt64(0). On Wednesday, September 14, 2016 at 4:33:39 PM UTC+2, Ben Ward wrote: > > Hi, > > I've written a simple function: > > function testfun2() > a = 0 > @inbounds @simd for i in UInt64(1):UInt64(1000) > i = i - ((i >> 1) &

[julia-users] Re: Curious parsing behavior

2016-09-14 Thread Kristoffer Carlsson
Does this answer the question? julia> Base.parse("1782.^12. + 1841.^12.") :(1782 .^ 12.0 + 1841 .^ 12.0) julia> Base.parse("1782.^12.+1841.^12.") :(1782 .^ 12 .+ 1841 .^ 12.0) On Wednesday, September 14, 2016 at 3:18:11 PM UTC+2, David Gleich wrote: > > Can anyone give me a quick explanation

[julia-users] Re: NumericExtensions not working on julia-0.5?

2016-09-14 Thread Kristoffer Carlsson
Do note: https://github.com/lindahua/NumericExtensions.jl/commit/16193a86ad0589520f944680a248ad36e3242682 . The Union()s need to be Union{} to work on 0.5. On Wednesday, September 14, 2016 at 2:16:11 PM UTC+2, Neal Becker wrote: > > julia> using NumericExtensions: logsumexp > INFO:

Re: [julia-users] How to use jl_call1 with a struct argument?

2016-09-10 Thread Kristoffer Carlsson
Be aware of https://github.com/JuliaLang/julia/issues/14577#issuecomment-228568059 though On Saturday, September 10, 2016 at 1:06:34 PM UTC+2, Yichao Yu wrote: > > > > On Sat, Sep 10, 2016 at 6:56 AM, K leo > wrote: > >> I tried to compile the code with the GC statements,

[julia-users] Re: Help: how to improve the function performance

2016-09-07 Thread Kristoffer Carlsson
The code in Distances.jl is quite heavily optimized and uses BLAS calls when possible (which it is for Euclidean metric). Your code has many allocations like x = x' and norm(x[:,i] - x[:,j]). On Wednesday, September 7, 2016 at 1:43:11 PM UTC+2, Weicheng Zhu wrote: > > Hi there, > I write a

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

2016-09-07 Thread Kristoffer Carlsson
After discussion with the Julia community stewards I have decided to rename this package. It is now named "OhMyREPL" and can be found at: https://github.com/KristofferC/OhMyREPL.jl. I apologize for the inconvenience.

[julia-users] ANN: PimpMyREPL.jl

2016-09-04 Thread Kristoffer Carlsson
ackage: https://www.youtube.com/watch?v=lTLPAOLLbTU. Make sure you watch the video in 1080p for the text to be non blurry. The URL for the package is: https://github.com/KristofferC/PimpMyREPL.jl if you would rather read the text description than watch the video. Best regards, Kristoffer Carlsson

[julia-users] Re: Package development - best practices

2016-08-31 Thread Kristoffer Carlsson
I also use symlinks like you describe and it tends to work well.

[julia-users] Re: Saving and Loading data (when JLD is not suitable)

2016-08-31 Thread Kristoffer Carlsson
I am sure you know but I just want to point out that it is possible to overload the way JLD saves and loads types. You can write a custom save function that transforms the thing you are trying to save into a format more suitable for HDF5 and then the loader can transform it back into your

[julia-users] Re: Adding items into a tuple

2016-08-30 Thread Kristoffer Carlsson
t = () condition = true for i = 1:N if condition==true t = (t..., i) end end This does not modify the tuple but replaces it with a new longer one. On Tuesday, August 30, 2016 at 7:26:29 AM UTC+2, Alexei Serdiuk wrote: > > Hi, > > I need to choose items from a range (1:N)

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Kristoffer Carlsson
d indicator that eye should be changed. > > On Monday, August 29, 2016 at 7:25:49 AM UTC-7, Kristoffer Carlsson wrote: >> >> You mean a sparse matrix? > >

Re: [julia-users] Re: Return type of eye()

2016-08-29 Thread Kristoffer Carlsson
You mean a sparse matrix?

Re: [julia-users] Invalid history file (~/.julia_history) format

2016-08-25 Thread Kristoffer Carlsson
On my work laptop and the school computers Julia always likes to put its stuff in Z: which is the network drive. It means that students that try to use Julia get really bad package experience because it is super slow to run Pkg stuff on the network drive.

Re: [julia-users] Invalid history file (~/.julia_history) format

2016-08-25 Thread Kristoffer Carlsson
I already made a PR for it. Sorry for stealing it.

Re: [julia-users] Invalid history file (~/.julia_history) format

2016-08-25 Thread Kristoffer Carlsson
ve, and all outputs are written to a separate networked drive). > > On Wednesday, August 24, 2016 at 6:05:27 PM UTC+1, Kristoffer Carlsson > wrote: >> >> What does it say when you run >> >> Base.REPL.find_hist_file() >> >> >> >> On Wednesday, Aug

Re: [julia-users] Invalid history file (~/.julia_history) format

2016-08-24 Thread Kristoffer Carlsson
> message. > > > On Wednesday, August 24, 2016 at 1:12:25 PM UTC+1, Kristoffer Carlsson > wrote: >> >> It is likely "~/.juliarc" that is the file you are after. >> >> On Wednesday, August 24, 2016 at 11:47:16 AM UTC+2, Andy Dobson wrote: >>>

Re: [julia-users] Invalid history file (~/.julia_history) format

2016-08-24 Thread Kristoffer Carlsson
A_HOME*";"*joinpath(JULIA_HOME,"..","Git","bin")*";"*ENV["PATH"] > > > Should there be more here? > > > On Wednesday, August 24, 2016 at 10:36:10 AM UTC+1, Kristoffer Carlsson > wrote: >> >> Maybe you can look int

Re: [julia-users] Invalid history file (~/.julia_history) format

2016-08-24 Thread Kristoffer Carlsson
Maybe you can look into the .juliarc file at the line where it is telling you the error is and see if anything looks strange. On Wednesday, August 24, 2016 at 11:11:54 AM UTC+2, Andy Dobson wrote: > > No, it didn't create another one. I think you're right and I didn't delete > what Julia was

[julia-users] Re: applying non zero boundary conditions in FEM

2016-08-24 Thread Kristoffer Carlsson
Assuming you have the free dof numbers in d_free, the prescribed dofs in d_pres, the values of the non zero DBC in a_pres the solution to the free dofs a_free is: a_free = K[d_free, d_free] \ (f[d_free] - K[d_free, d_pres] * a_pres) It will probably be faster than what you are doing now On

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

[julia-users] Composition of setindex!

2016-08-21 Thread Kristoffer Carlsson
Range indexing produces copies yes. Either just write the loops or use "view" or "sub" to refer to the original memory.

Re: [julia-users] Re: memory allocations when accessing tuple fields of a type

2016-08-20 Thread Kristoffer Carlsson
That creating a new Element allocates is not strange because it creates an array. The map call might allocate due to higher order functions not being optimal in 0.4.

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
See pr 8134. I dont think you have any worse cache locality than with your original tuple.

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
Just make a new type instead of the tuple and directly set the fields of it?

[julia-users] Memory allocations when accessing tuple fields

2016-08-17 Thread Kristoffer Carlsson
Dont benchmark in global scope.

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
Immutables and tuples that contain references to heap allocated objects are currently themselves allocated on the heap. There is an issue about it.

Re: [julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
Unless heap_s is a bitstype then the tuple will be allocated on the heap. But you are saying it is getting allocated twice?

[julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
As always, it is very helpful if there is some code that is actually runnable in the post that contains the problem. It is easier to run Julia code in Julia than in your brain :)

[julia-users] Help needed with excessive memory allocation for Tuples

2016-08-17 Thread Kristoffer Carlsson
What is N typically?

[julia-users] Re: "Constructor methods" for typealiases, why does this code not work in v0.4, but does in v0.5?

2016-08-16 Thread Kristoffer Carlsson
} > Array{OptimizationState{T},1} > > julia> @compat OptimizationTrace{T<:Optimizer}(method::T) = Vector{ > OptimizationState{T}}() > ERROR: cannot define function OptimizationTrace; it already has a value > > > unfortunately not! > > On Tuesday, August 16, 201

[julia-users] "Constructor methods" for typealiases, why does this code not work in v0.4, but does in v0.5?

2016-08-16 Thread Kristoffer Carlsson
What if you throw a @compat in front of the function definition?

[julia-users] Re: ANN: Optim v0.6

2016-08-14 Thread Kristoffer Carlsson
What did you expect them to be? They are right under a big table header saying "Documentation". They have the same style as the other badges which are also clickable and have been for years. I think it is worth seeing if more people can't find the documentation before doing any changes.

[julia-users] Re: ANN: Optim v0.6

2016-08-13 Thread Kristoffer Carlsson
It is linked right at the top in the README? On Saturday, August 13, 2016 at 11:40:24 PM UTC+2, Uwe Fechner wrote: > > Hello, > in the README it says, "for more information, see the documentation". > Is the documentation online available? I cannot find it. > > Uwe > > On Saturday, August 13,

[julia-users] Re: preferred way to dispatch on first element of array?

2016-08-12 Thread Kristoffer Carlsson
No, since the only thing the compiler sees is Vector{Any}. On Friday, August 12, 2016 at 11:36:54 PM UTC+2, Chris Stook wrote: > > Is there a way to dispatch on the type of the first element of an array > without passing the first element as a separate argument. > > for example: > > a =

[julia-users] Re: Incredibly elusive julia 0.5 bug - new undefined behaviour?

2016-08-12 Thread Kristoffer Carlsson
Ref https://github.com/JuliaLang/julia/issues/9535 On Friday, August 12, 2016 at 9:59:20 PM UTC+2, Scott T wrote: > > I've got a really REALLY elusive bug which as far as I can tell boils down > to this line of code: > > shuffleFields!(A, getb(A), getc(A), geta(A)) > > where the intent is to

[julia-users] Re: Using multiple CPU cores to do matrix multiplication with multiple worker processes

2016-08-12 Thread Kristoffer Carlsson
And https://github.com/JuliaLang/julia/issues/16729 On Friday, August 12, 2016 at 7:43:56 PM UTC+2, Kristoffer Carlsson wrote: > > Ref https://github.com/JuliaLang/julia/pull/17429 > > On Friday, August 12, 2016 at 7:39:40 PM UTC+2, Doan Thanh Nam wrote: >> >> Hi, >>

[julia-users] Re: Using multiple CPU cores to do matrix multiplication with multiple worker processes

2016-08-12 Thread Kristoffer Carlsson
Ref https://github.com/JuliaLang/julia/pull/17429 On Friday, August 12, 2016 at 7:39:40 PM UTC+2, Doan Thanh Nam wrote: > > Hi, > > I am new to Julia Language and I am curious to use it for my work. > Recently, I have tried to use it for some of my projects and observed some > interesting

[julia-users] Re: "correct" way to perform evolutionary computation in julia?

2016-08-12 Thread Kristoffer Carlsson
Can you use anonymous functions? On Friday, August 12, 2016 at 7:35:11 PM UTC+2, Garrett Jenkinson wrote: > > I have written a bit of a hack of a library for evolutionary computation, > where I continually evolve a system of "cells" that have different reaction > networks governed by ordinary

[julia-users] Re: How to switfh off combine functrion in sparse?

2016-08-12 Thread Kristoffer Carlsson
try sparse(I,J,V,m,n,(a,b) ->a) On Friday, August 12, 2016 at 5:06:29 PM UTC+2, program...@gmail.com wrote: > > How to switfh off combine functrion in sparse? I need to ingore new value > if in data is duplicat row/col. Somthing like this : sparse(I,J,V,m,n,+=0) > but this dont work. > > Paul

Re: [julia-users] Adding tuples

2016-08-12 Thread Kristoffer Carlsson
hem as an argument to a function to be > written to (as output). Of course I realise there are many applications > where the immutable tuples are better. > > Bill. > > On 12 August 2016 at 12:12, Kristoffer Carlsson <kcarl...@gmail.com > > wrote: > >> They are bitstyp

Re: [julia-users] Adding tuples

2016-08-12 Thread Kristoffer Carlsson
They are bitstypes so if you have a vectoe of them they will be stored "inline" in the vector.

[julia-users] Re: ANN: JuMP 0.14 released

2016-08-11 Thread Kristoffer Carlsson
r, n=2) = [round_me(result, n) for result in > res_vector] > > Any hints, how to write this code in a cleaner way? > > Uwe > > On Tuesday, August 9, 2016 at 1:15:08 PM UTC+2, Kristoffer Carlsson wrote: >> >> I didn't think there were any documentation about GradientNumbers in the >> ForwardDiff documentation hence an implementation detail. Where did you >> read about it? > >

Re: [julia-users] Adding tuples

2016-08-11 Thread Kristoffer Carlsson
Yes, from my experience tuples are commonly used when N is quite small and in the context of "adding tuples" it is likely that you want to do significant work with the resulting tuple and want the creation of it to be type stable. But as always, just benchmark it.

[julia-users] Re: Problems with A\b and BigFloat

2016-08-10 Thread Kristoffer Carlsson
The sparse solvers use UMFPACK and CHOLMOD which are C-libraries and thus only support the standard number types. You would need a pure julia written solver that could take any number type. The stackoverflow error was fixed here: https://github.com/JuliaLang/julia/pull/14902 On Wednesday,

Re: [julia-users] Adding tuples

2016-08-10 Thread Kristoffer Carlsson
The Val{N} version will makes the compiler specialize the tuple creation for that specific value of N. It should be significantly faster for small lengths of the tuple and the return value should also be inferrable. On Wednesday, August 10, 2016 at 8:59:45 PM UTC+2, Jeffrey Sarnoff wrote: > >

[julia-users] Re: Why is Julia 0.5 built from source almost twice as large (on disk) as Julia 0.4?

2016-08-10 Thread Kristoffer Carlsson
The .git history for LLVM is also pretty big ~ 500 MB. I also see I have 3 builds of openblas so if you have multiple of them, you could remove the unnecessary ones.

[julia-users] Why is Julia 0.5 built from source almost twice as large (on disk) as Julia 0.4?

2016-08-10 Thread Kristoffer Carlsson
The openblas tests take an extreme amount of space (600MB) so getting rid of those is pretty good. They are in "build/openblas-SHAID/{ctest/test}

[julia-users] Re: ANN: JuMP 0.14 released

2016-08-09 Thread Kristoffer Carlsson
I didn't think there were any documentation about GradientNumbers in the ForwardDiff documentation hence an implementation detail. Where did you read about it?

Re: [julia-users] precompiling all packages

2016-08-09 Thread Kristoffer Carlsson
Can look at this: https://github.com/staticfloat/MakePkgUpdatePrecompileInTheBackground.jl https://github.com/JuliaLang/julia/issues/16409#issuecomment-228873060

[julia-users] [HELP] I am a beginner and I need some guidance in writing Optimised Code in Julia rather than writing Julia Programs in C Style.

2016-08-09 Thread Kristoffer Carlsson
A few things. Instead of "a=push!(a,(2*((4*g*g)-g)))" you can just do push!(a, ...) and that will modify the existing a so that is has the last element appended. There is no need to assign the result to a again. I think the way you read a user input and then use parse to get the Int for it is

[julia-users] Re: ANN: JuMP 0.14 released

2016-08-08 Thread Kristoffer Carlsson
It is more of an implementation detail but there is DualNumber now. On Monday, August 8, 2016 at 7:27:42 PM UTC+2, Uwe Fechner wrote: > > Well, but in the upgrading guide there is no replacement for > GradientNumber mentioned. > > Any idea? > > Uwe > > On Monday, August 8, 2016 at 7:14:45 PM

[julia-users] Re: I get this error while trying to run *.jl file from Terminal ERROR: LoadError: UndefVarError: input not defined

2016-08-07 Thread Kristoffer Carlsson
Please include the file you are tying to run. On Sunday, August 7, 2016 at 11:09:07 PM UTC+2, Rishabh Raghunath wrote: > > > > Hello, > I am a beginner in the Julia language .. > I get this error while I try to run .jl Julia program file from the > terminal. However It works perfectly fine

[julia-users] Re: ReverseDiffSource on v0.5

2016-08-06 Thread Kristoffer Carlsson
The above was a known bug that has now been fixed and is not related to the actual package. On Saturday, August 6, 2016 at 6:02:29 PM UTC+2, Andrei Zh wrote: > > Just tried it on my Ubuntu 16.04. The last thing I could see was julia > process eating all 16Gb or RAM in ~1 second and hanging on

[julia-users] Re: CALL TO ACTION for package devs

2016-08-04 Thread Kristoffer Carlsson
I would say that if you want to contribute to a package you should be on the latest master commit and work from there. On Friday, August 5, 2016 at 1:45:46 AM UTC+2, Eric Forgy wrote: > > I agree. Another consequence of v0.5 updates on master that are not tagged > is that newbies, wanting to

[julia-users] Re: Is there a way to reclaim memory?

2016-08-02 Thread Kristoffer Carlsson
Copy it into a new array with the correct size? On Tuesday, August 2, 2016 at 7:56:35 PM UTC+2, Seth wrote: > > > > On Tuesday, August 2, 2016 at 10:41:26 AM UTC-7, Seth wrote: >> >> So, a 62.5 million edge LightGraphs.Graph should only take about a 1.25 >> gigs of memory, all-in. However,

[julia-users] Re: How to make a variable length tuple with inferred type

2016-08-01 Thread Kristoffer Carlsson
Nope. nuple(::Function, ::Int) is not type stable because the return type depends on the value of the integer. On Monday, August 1, 2016 at 5:17:10 PM UTC+2, mmh wrote: > > Is this a known bug/regression? > > On Sunday, July 31, 2016 at 10:53:11 PM UTC-4, Sheehan Olver wrote: >> >> It still

[julia-users] Re: Tuples of Functions

2016-08-01 Thread Kristoffer Carlsson
The problem is not with the return value of the passed functions, it is with inferring the type of `f`. Each function has it's own type and that in turn makes `f` bind to different types (first f1 then f2) in the loop i.e a type instability. On Monday, August 1, 2016 at 5:53:23 AM UTC+2,

[julia-users] Re: How do I use @deprecate and depwarn ?

2016-07-31 Thread Kristoffer Carlsson
Why didn't you delete the code for the deprecated function? On Sunday, July 31, 2016 at 2:31:56 AM UTC+2, Daniel Carrera wrote: > > Hello, > > I am trying to make a PR for JuliaStats and I have trouble figuring out > how to properly deprecate an old function. Apparently the @deprecate macro >

[julia-users] Re: @inbounds and @simd not showing any sign of speedup

2016-07-29 Thread Kristoffer Carlsson
It is likely because the ranges are not UnitRanges. On Friday, July 29, 2016 at 5:35:57 AM UTC-4, Andreas Lobinger wrote: > > Hello colleague, > > On Friday, July 29, 2016 at 8:59:36 AM UTC+2, Juan Lopez wrote: >> >> Hello, >> >> I have a function which is doing basically an operation inside a

[julia-users] Re: Tuple type to tuple of types

2016-07-24 Thread Kristoffer Carlsson
Maybe; type MyType end function f(t::DataType) I = () for t in t.types if isa(t, TypeVar) I = (I..., Any) else I = (I..., t) end end return I end julia> f(Tuple{Int64, Float64}) (Int64,Float64) julia> f(Tuple{Int64, MyType, Float32}) (Int64,MyType,Float32) julia> f(NTuple{3}) (Any,Any,Any)

[julia-users] Re: Function `copyconvert`?

2016-07-21 Thread Kristoffer Carlsson
Discussion: https://github.com/JuliaLang/julia/issues/12441 On Thursday, July 21, 2016 at 2:49:19 PM UTC-4, gTcV wrote: > > I recently frequently encounter the situation where I need to both copy as > well as optionally convert an object. It turns out `convert` on its own > will not do the job

[julia-users] Re: I can't believe this spped-up !

2016-07-21 Thread Kristoffer Carlsson
julia> @time for i in 1:10 sleep(1) end 10.054067 seconds (60 allocations: 3.594 KB) julia> @time @parallel for i in 1:10 sleep(1) end 0.195556 seconds (28.91 k allocations: 1.302 MB) 1-element Array{Future,1}: Future(1,1,8,#NULL) On Thursday, July

[julia-users] Re: Coveralls and coverage issues

2016-07-21 Thread Kristoffer Carlsson
Cached...

[julia-users] Re: Coveralls and coverage issues

2016-07-21 Thread Kristoffer Carlsson
Sometimes the badge image is cashed and can be quite hard to update. Ctrl + F5 sometimes work.

[julia-users] Re: Help Julia win a performance comparison!

2016-07-21 Thread Kristoffer Carlsson
Sum the elements and resize the array to that length?

RE: [julia-users] What does Base.box mean in code_warntype?

2016-07-19 Thread Kristoffer Carlsson
Pretty much this https://github.com/JuliaLang/julia/issues/15276

[julia-users] Re: Fast higher order differentiation

2016-07-18 Thread Kristoffer Carlsson
Take a look at ReverseDiffSource.jl. On Monday, July 18, 2016 at 3:59:10 AM UTC-4, Eric Forgy wrote: > > Hi Young Chun, > > Welcome to Julia! Like Jeffrey, I think your question was a good one and > the outcome is even better. > > I don't know how others feel, but as an "oldie", it is super

[julia-users] Fixing some parameters of parametrized type?

2016-07-01 Thread Kristoffer Carlsson
Currently no. There has been discussions about introducing syntax to support what you describe but nothing is yet implemented.

Re: [julia-users] Re: A naive benchmark

2016-07-01 Thread Kristoffer Carlsson
To be explicit, you are looping over things in the wrong order. You want t he next loop iteration to access data that is close in memory to the previous iteration. Right now you are making big jumps in memory between each iteration.

  1   2   3   4   5   6   >