[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] Check if type "contains" Any

2015-09-20 Thread Tommy Hofmann
I would like to write a function "contains_any(T)" which checks wether a type T "contains" Any. For example contains_any(Integer) = false contains_any(Any) = true contains_any(Tuple{Integer, Any}) = true contains_any(Tuple{Tuple{Integer, Any}, Float64}) = true etc. How could one do this in

[julia-users] Re: Check if type "contains" Any

2015-09-21 Thread Tommy Hofmann
@Tomas: I also want contains_any(Array{Any, 2}) == contains_any(Union{Integer, Any}) == true. I tried isleaftype before but isleaftype(Integer) == isleaftype(Any) == false, i.e. I cannot distinguish between abstract types and Any. @Mauro: Thanks for the T.parameters hint. This looks like the

Re: [julia-users] quick 'n ez way to get allsupertypes(x), allsubtypes(x)?

2016-02-09 Thread Tommy Hofmann
You implicitly assume that a type has only finitely many sub/supertypes, which for arbitrary types is clearly not the case. The simplest example is Any but you can also get this behavior when defining recursive types. More generally, given types TL, TU there is no way of returning all types T

Re: [julia-users] quick 'n ez way to get allsupertypes(x), allsubtypes(x)?

2016-02-10 Thread Tommy Hofmann
; > > On Wednesday, February 10, 2016 at 2:32:35 AM UTC-5, Tommy Hofmann wrote: >> >> You implicitly assume that a type has only finitely many sub/supertypes, >> which for arbitrary types is clearly not the case. The simplest example is >> Any but you can also get t

[julia-users] Circular parametric types

2016-01-27 Thread Tommy Hofmann
I am trying to define two parametric types with circular dependency as follows. abstract abstest type t1{A <: abstest, B} x::A y::B end type t2{C, B} <: abstest x::C y::t1{t2{C, B}, B} end Unfortunately it doesn't work: ERROR: TypeError: t1: in A, expected A<:abstest, got

Re: [julia-users] Circular parametric types

2016-01-28 Thread Tommy Hofmann
This is now https://github.com/JuliaLang/julia/issues/14825 On Wednesday, January 27, 2016 at 4:52:00 PM UTC+1, Yichao Yu wrote: > > On Wed, Jan 27, 2016 at 10:35 AM, Tommy Hofmann <tho...@gmail.com > > wrote: > > I am trying to define two parametric types wit

Re: [julia-users] Circular parametric types

2016-01-28 Thread Tommy Hofmann
On Thursday, January 28, 2016 at 12:23:34 PM UTC+1, Toivo Henningsson wrote: > > Yes, you're right! I guess that you would have to break the chain at some > point with Any or similar, which doesn't feel quite satisfying. But maybe > it's the best that you can do for now. > > In your code, when

Re: [julia-users] Circular parametric types

2016-01-28 Thread Tommy Hofmann
On Thursday, January 28, 2016 at 10:57:59 AM UTC+1, Toivo Henningsson wrote: > > In the meantime, you can relax the second type definition to > > type t2{C, T} <: abstest > x::C > y::T > end > > which will allow you to construct all the parametric types that you want, > plus some more. You

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Tommy Hofmann
What about this post? https://groups.google.com/forum/#!searchin/julia-users/documentation/julia-users/q7rwopVQHV4/o-mDXpqhAwAJ Note that instead of Lexicon.jl one should use Documenter.jl but the workflow is similar. Documenter.jl provides an easy way to combine docstrings and manually written

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Tommy Hofmann
ing like Sphinx/MakeTheDocs (I don't > really know what that is)? I like that look much better; the font from the > Documenter.jl examples is wonky and hard to read. > > On Wednesday, May 11, 2016 at 9:01:48 AM UTC-7, Tommy Hofmann wrote: >> >> What about this post

[julia-users] Re: Package Documentation Tools

2016-05-11 Thread Tommy Hofmann
n choose a > different theme)? I think I got this now. > > On Wednesday, May 11, 2016 at 9:33:57 AM UTC-7, Tommy Hofmann wrote: >> >> Do you also want to support the repl help system? By this I mean, do you >> want to do the following also for your custom func

[julia-users] Re: Arrays of user defined types, indexing and copying.

2016-08-14 Thread Tommy Hofmann
Indeed, the behavior of deepcopy with respect to arrays of user defined types is surprising. If you define Base.deepcopy_internal(x::MyType, ::ObjectIdDict) = MyType(deepcopy(x.a)) then deepcopy(MyType_Vec[[1, 3, 1]]) gives a new object with "independent" elements. See also

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

2016-08-14 Thread Tommy Hofmann
There was exactly the same discussion about links to the documentation in the announcement of Documenter.jl: https://groups.google.com/forum/?fromgroups#!topic/julia-users/8el-G75Tj1A Maybe it is not as obvious as people like to think. Someone not being familiar with Github or travis badges

[julia-users] Re: Arrays of user defined types, indexing and copying.

2016-08-14 Thread Tommy Hofmann
copy has to keep and update a dictionary as it > traverses the datastructure in order to provide the behaviour. Without it, > it would be impossible to copy cyclic data-structures, as the recursive > traversal would never end. > > On Sunday, August 14, 2016 at 11:36:04 AM UTC-4, Tomm

Re: [julia-users] Re: Arrays of user defined types, indexing and copying.

2016-08-14 Thread Tommy Hofmann
before returning. >> > > > On Sun, Aug 14, 2016 at 3:03 PM, Tommy Hofmann <tho...@gmail.com > > wrote: > >> But for users the following might be surprising: If a user defines >> deepcopy(::T) for a user defined type T and x is of type Array{T, 1}, then

[julia-users] Re: ANN: Algebraic numbers

2016-07-13 Thread Tommy Hofmann
Looks cool! It is quite different to Hecke. You work in the field of all algebraic numbers, while Hecke works with elements inside an algebraic number field. I skimmed over the code and noticed that you use ZZ. If you care about performance, you might want to change ZZ to FlintZZ. The variabe

[julia-users] Re: ANN: Algebraic numbers

2016-07-14 Thread Tommy Hofmann
I think the guaranteed root isolation exists only in Fredrik's repository and in Hecke. It is not merged in the official Nemo repository (yet). We hope to include it in the next Nemo release. On Thursday, July 14, 2016 at 12:44:12 AM UTC+2, Alireza Nejati wrote: > > To confuse two roots, the

[julia-users] Re: ANN: Algebraic numbers

2016-07-13 Thread Tommy Hofmann
g else I use QQ. Would it > make much of a difference? > > Cheers, > > On Wednesday, July 13, 2016 at 10:13:41 PM UTC+12, Tommy Hofmann wrote: >> >> Looks cool! >> >> It is quite different to Hecke. You work in the field of all algebraic >> numbers, whil

Re: [julia-users] Re: help with deepcopy_internal

2016-08-24 Thread Tommy Hofmann
pointed out, the builtin deepcopy function works out of the box for your custom type. On Wednesday, August 24, 2016 at 9:02:19 AM UTC+2, Yichao Yu wrote: > > > > On Tue, Aug 23, 2016 at 5:19 PM, Tommy Hofmann <tho...@gmail.com > > wrote: > >> Why do you think that dee

[julia-users] Re: help with deepcopy_internal

2016-08-23 Thread Tommy Hofmann
Why do you think that deepcopy works on SelfReferential without defining deepcopy_internal? Line 8 of deepcopy.jl is: deepcopy(x) = deepcopy_internal(x, ObjectIdDict()) On Tuesday, August 23, 2016 at 10:52:35 AM UTC+2, Chris Stook wrote: > > I created this simple example to try to understand

Re: [julia-users] Re: Nemo AcbField error

2016-10-27 Thread Tommy Hofmann
There is a reason I asked to check for two libflint files three days ago. I saw this error with the missing libflint-13.dll before. The ln command can and will fail silently for various reasons.

[julia-users] Re: Nemo AcbField error

2016-10-19 Thread Tommy Hofmann
pari was not built/downloaded properly. Do a Pkg.build("Nemo") in julia and check again. On Wednesday, October 19, 2016 at 2:44:20 AM UTC+2, Jeffrey Sarnoff wrote: > > I do not get that error. Are you using the current versions of Julia nd > Nemo? You may see a warning message with the first

Re: [julia-users] Re: Nemo AcbField error

2016-10-24 Thread Tommy Hofmann
Sorry, I meant arb and not pari. Something is off with the libraries. You can try the following: 1. Remove all files in .julia\v0.5\Nemo\local\lib and then do a Pkg.build("Nemo") again. 2. If 1. doesn't help, check if the following files are in Nemo\local\lib: "libwinpthread-1.dll",