[julia-users] Re: [Announcement] Moving to Discourse (Statement of Intent)

2016-11-05 Thread Robert DJ
I would love to get away from GG, but I can't seem to find a privacy policy/terms for the new Discourse forum. Is it the general Discourse privacy policy (https://www.discourse.org/privacy-policy/) that apply?

[julia-users] Type matching in Julia version 0.4.0-dev+3434

2015-02-19 Thread Robert DJ
Hi, I have just updated Julia for the first time in 10 days and now I face problems with old code: - The error "WARNING: [a] concatenation is deprecated; use [a;] instead". Easy to fix, but what is the reasoning behind adding the ";"? - Type matching has changed: I have a function that takes a

Re: [julia-users] Type matching in Julia version 0.4.0-dev+3434

2015-02-20 Thread Robert DJ
x27;d have to see this spelled out a bit > more to know what change you're referring to. > > > > On Thu, Feb 19, 2015 at 5:49 AM, Robert DJ > wrote: > >> Hi, >> >> I have just updated Julia for the first time in 10 days and now I face >> problems with

[julia-users] Pkg.generate reads git user.name with commas

2015-03-06 Thread Robert DJ
Hi, I've run into a weird problem: When making a new package with Pkg.generate("name", "license") the first non-empty Git commit writes my name with commas between every character: authors: R, o, b, e, r, t My Git user name has been specified as git config --global user.name Robert I've tr

Re: [julia-users] Pkg.generate reads git user.name with commas

2015-03-07 Thread Robert DJ
a deprecation warning). It should be an easy > fix--are you up for it? If not, could you submit a bug report? > > Cheers, > Kevin > > On Fri, Mar 6, 2015 at 3:32 PM, Robert DJ > wrote: > >> Hi, >> >> I've run into a weird problem: When making a

[julia-users] Set precision when printing to file

2015-06-15 Thread Robert DJ
Hi, I would like to write floating point numbers to a file and limit the number of digits/decimals. With e.g. f = open("test.txt", "w") println(f, 1/3) close(f) test.txt contains 0. and I would like it to be only 0.33. Is there a way to do this? Thanks, Robert

[julia-users] Re: Set precision when printing to file

2015-06-17 Thread Robert DJ
It certainly does -- thanks a lot! On Monday, June 15, 2015 at 4:37:35 PM UTC+2, Huda Nassar wrote: > > julia> f = open("test2.txt","w") > IOStream() > julia> @printf(f,"%0.2f",1/3) > julia> close(f) > > This should do the job >

[julia-users] Define functions in loop

2015-09-02 Thread Robert DJ
Hi, I have a situation where a number of functions differ so little that it would make sense to define them by a loop. I don't know if I am using the correct jargon, but here is a small example to illustrate: type test A::Int B::Int end function A(T::test) T.A end fun

[julia-users] Re: Define functions in loop

2015-09-02 Thread Robert DJ
tter > end > end > end > @eval == eval(quote end) == eval( :( ) ) > Am Mittwoch, 2. September 2015 11:16:53 UTC+2 schrieb Robert DJ: >> >> Hi, >> >> I have a situation where a number of functions differ so little that it >> woul

[julia-users] Cannot load NFFT on Mac

2015-09-09 Thread Robert DJ
Hi, I am having a strange problem on Mac (Yosemite): I cannot load the NFFT package. Unfortunately, it is difficult to diagnose as I do not get any errors, Julia just hangs after using NFFT Uninstalling and reinstalling NFFT does not help, neither does a comp

[julia-users] Re: META: What are the chances of moving this forum?

2015-09-09 Thread Robert DJ
I'm not a fan of Google, so I think it would great to find another forum. Besides, I fully agree with the technical issues mentioned. Regarding the need for user accounts on e.g. GitHub, I don't see how that is different from requiring a Google account for participating here... On Wednesday, Se

Re: [julia-users] Cannot load NFFT on Mac

2015-09-09 Thread Robert DJ
()`; then, `using NFFT` without problems. > > On Wed, Sep 9, 2015 at 3:37 PM, Robert DJ > wrote: > >> Hi, >> >> I am having a strange problem on Mac (Yosemite): I cannot load the NFFT >> <https://github.com/tknopp/NFFT.jl> package. >> >> Unfortuna

Re: [julia-users] Cannot load NFFT on Mac

2015-09-10 Thread Robert DJ
I figured out what the problem is: In the directory where I tried to load NFFT I also had a file called 'nfft.jl' (non-capital letters). Apparently 'using NFFT' was trying to load the local file. On Thursday, September 10, 2015 at 8:24:22 AM UTC+2, Robert DJ wrote: > &

[julia-users] Compute selected eigenvectors with eigvecs

2015-12-16 Thread Robert DJ
I would like to compute the eigenvector of a particular eigenvalue and according to the docs, eigvecs is up for the job. However, I get errors. The following call should give the same output as eigvecs(A): julia> A = rand(3,3) 3x3 Array{Float64,2}: 0.165111 0.995671 0.393572 0.496099 0.6403

[julia-users] Re: Compute selected eigenvectors with eigvecs

2015-12-16 Thread Robert DJ
Ahh! I see that I did not read the docs for eigvecs correctly! Thanks a lot! On Wednesday, December 16, 2015 at 10:43:42 AM UTC+1, Robert DJ wrote: > > I would like to compute the eigenvector of a particular eigenvalue and > according to the docs, eigvecs is up for the job. > Ho

[julia-users] Arithmetic with TypePar

2016-06-01 Thread Robert DJ
I have a custom type with a TypePar denoting a dimension and would like to define the following: type Foo{D} bar::Array{D+1} end However, this does not work. As D is only 1 or 2 it would OK with type Foo{1} bar::Matrix end type Foo{2} bar::Array{3} end but unfortunately this isn't working, ei

[julia-users] Re: Arithmetic with TypePar

2016-06-01 Thread Robert DJ
+ bar[:,:,2] I *could* instead (for D = 2) move the third dimension to extra columns... On Wednesday, June 1, 2016 at 8:56:28 PM UTC+2, Robert DJ wrote: > > I have a custom type with a TypePar denoting a dimension and would like to > define the following: > > type Foo{D} > bar

Re: [julia-users] Re: Arithmetic with TypePar

2016-06-02 Thread Robert DJ
; possible, I think it's mostly a complicated thing to implement, and people > haven't demonstrated the necessity for this yet. > > > > On Thu, Jun 2, 2016 at 2:07 AM, Robert DJ > wrote: > >> The problem with not specifying D is type inference. I actually have more

[julia-users] Re: Arithmetic with TypePar

2016-06-03 Thread Robert DJ
o(1) > > or use typealias > > On Wednesday, June 1, 2016 at 2:56:28 PM UTC-4, Robert DJ wrote: >> >> I have a custom type with a TypePar denoting a dimension and would like >> to define the following: >> >> type Foo{D} >> bar::Array{D+1} >> end &g

[julia-users] Writable arrays

2016-06-15 Thread Robert DJ
In a function that modifies an array argument I would like to pass at least (Dense)Arrays and SubArrays (from `slice`). AbstractArray is too broad a type -- a LinSpace does not allow changing an entry. What would be a suitable class? Union{DenseArray, SubArray} works, but is there a better choi

[julia-users] Selecting the right types

2014-10-17 Thread Robert DJ
Hi, I am having some troubles understanding and selecting the right types. I have implemented an approximation of Lambert’s W function in two versions: One for scalar input and one for array input. I’ve chosen the type Real for the scalar version and Array{Float64} for the array version. But

Re: [julia-users] Selecting the right types

2014-10-17 Thread Robert DJ
happening. > > On Fri, Oct 17, 2014 at 11:37 AM, Robert DJ > wrote: > >> Hi, >> >> I am having some troubles understanding and selecting the right types. >> >> I have implemented an approximation of Lambert’s W function in two >> versions: One for

Re: [julia-users] Selecting the right types

2014-10-18 Thread Robert DJ
The missing restart must be thing - I've just gotten used to not worrying about reloading when using IJulia. This type works - thanks! On Friday, October 17, 2014 10:48:28 PM UTC+2, Mauro wrote: > > >>> I am having some troubles understanding and selecting the right types. > >>> > >>> I have i

Re: [julia-users] Selecting the right types

2014-10-18 Thread Robert DJ
nstead of an option. >- For the array version, you could use map instead of a loop; or don't >provide an array version, that might be more Julia-like. > > > On Friday, October 17, 2014 10:23:53 PM UTC+2, Robert DJ wrote: >> >> That's a good point! I

[julia-users] Array/tuple issues

2014-11-11 Thread Robert DJ
Hi I've run into some array issues that I suspect are quite easy, but I haven't found answers on Uncle Google or in the docs. In the example below I would like to do the following (more elegant): - Create the array of arrays A where the size of the inner arrays are determined by the input 'dim

[julia-users] Re: Array/tuple issues

2014-11-12 Thread Robert DJ
[dims...]...) for l = 0:2] > @show A > > > J = [1 3 ; 2 4] > I = kron(J, ones(Int,2,2)) > K = rand(4) > B = K[I] > @show B > > > C = zeros( dims... ) > @show C > > nothing > end > > > > This is running

Re: [julia-users] Array/tuple issues

2014-11-12 Thread Robert DJ
Thank you! I'll take a look at that. On Wednesday, November 12, 2014 10:53:19 AM UTC+1, John Myles White wrote: > > Unfinished FAQ about dots: > https://github.com/JuliaLang/julia/pull/8065#issuecomment-52747406 > > -- John > > On Nov 12, 2014, at 9:14 AM, Robert DJ &g

[julia-users] Voronoi tess / ccall with Fortran

2016-02-02 Thread Robert DJ
Hi, I am looking for way to work with Voronoi tesselations. I have a set of 2D points where the stored order is not important, but has to be preserved in the final result. I would like to compute the bounded Voronoi tesselation of the points (i.e., the Voronoi tesselation intersected with a bou

Re: [julia-users] Voronoi tess / ccall with Fortran

2016-02-02 Thread Robert DJ
this > package: https://github.com/Voxel8/Voronoi.jl > > On Tue, Feb 2, 2016 at 7:23 AM, Robert DJ > wrote: > >> Hi, >> >> I am looking for way to work with Voronoi tesselations. I have a set of >> 2D points where the stored order is not important, but has t

[julia-users] Re: Voronoi tess / ccall with Fortran

2016-02-02 Thread Robert DJ
I'm no next to nothing about Fortran -- I was mostly inspired by the package https://github.com/simonster/GLMNet.jl/ I'll look into Ptr/Ref ! On Tuesday, February 2, 2016 at 3:55:50 PM UTC+1, Lutfullah Tomak wrote: > > I think you already know Fortran functions take arguments by > reference/poin

[julia-users] Re: Mutual reference between scripts

2016-02-04 Thread Robert DJ
You can take a look at a package to get inspiration: One master file includes all the other files with code and load any 3rd party dependencies. You then include the master file in Julia to have all of your functions available. On Thursday, February 4, 2016 at 6:33:35 AM UTC+1, Cristian Garcia

[julia-users] Re: Voronoi tess / ccall with Fortran

2016-02-11 Thread Robert DJ
I ended up wrapping the Fortran code from the R package. If it's of interest I'm sharing the code: https://github.com/robertdj/Deldir.jl

[julia-users] Function check without @assert

2016-04-21 Thread Robert DJ
I've become fond of using the @assert macro for checking input to functions, e.g. @assert size(A) == size(B) @assert x > 0 Now I've read discussions like https://github.com/JuliaLang/julia/issues/10614 where I see that this not recommended and that @assert is slow. What is then the "right" Jul

[julia-users] Re: Function check without @assert

2016-04-22 Thread Robert DJ
Thanks a lot for the explanations! I'll stick with the throwing for now. I'm using Julia v0.4.0 which does not seem to have the @check / @require. I'm compiling v0.4.5 now to see if that includes these macros.

[julia-users] Pkg.publish problem

2016-05-08 Thread Robert DJ
I'm having a weird problem iwth Pkg.publish. I've successfully tagged a new package version Pkg.tag("Deldir") INFO: Tagging Deldir v0.0.3 INFO: Committing METADATA for Deldir But when running `Pkg.publish()` (in Julia v0.4): INFO: Validating METADATA INFO: Pushing Deldir permanent tags: v0.0.3

[julia-users] Re: Pkg.publish problem

2016-05-09 Thread Robert DJ
It works -- and so is publish. Thanks! On Monday, May 9, 2016 at 9:45:52 AM UTC+2, Kristoffer Carlsson wrote: > > You can delete the tag and recreate it or force push to update the tag. > This thread seems to have a lot of good information: > http://stackoverflow.com/questions/19298600/tag-alrea

[julia-users] Problem with Images

2014-01-24 Thread Robert DJ
Hi I am having trouble making the Images package work. I've just pull'd and make'd the latest version of Julia and removed my .julia directory. In Julia I've executed the following commands: Pkg.add("Images") Pkg.add("ImageView") using Images The response from the last command is: Warning: N

Re: [julia-users] Problem with Images

2014-01-24 Thread Robert DJ
That worked like a charm :-) Thanks!

[julia-users] How to reload?

2014-01-29 Thread Robert DJ
I am starting to work on a package, but I've run into a very mundane problem: I can't figure out how to reload functions after editing. The first time I load the package with using I discover a bug, fix it and run reload("") But I still get the same error. If I exit Julia, start it again and

[julia-users] Re: How to reload?

2014-01-29 Thread Robert DJ
That kind of reloading/recompilation would definitely be nice, but in my example I just change one function that does not depend on anything else. If I reload the package shouldn't I then get the new version of the functions in the package?

Re: [julia-users] How to reload?

2014-01-29 Thread Robert DJ
Aah! I hadn't thought about the scope function call. Autoreload seems like a nice way to go! On a more subjective level, I am wondering if I go about this the wrong way: When working on a package/collection of functions what is the 'best' way to go about an edit-test cycle? Using Autoreload on t