[julia-users] package reproducibility

2016-10-28 Thread Kevin Kunzmann
Hey, I was just wondering whether Julia has a checkpoint-like functionality (R checkpoint-package ) for using a specific checkpoint of the package ecosystem. With quick development happening this would improve reproducibility drast

[julia-users] most generic way to request iterable type as input

2016-11-08 Thread Kevin Kunzmann
Hi, say I want to define a custom type with a field that accepts any kind of iterable integer type as valid input (both 1:3 as well as collect(1:3)), how would I do that in the most generic way? I know that I can use type test{T<:integer} a::Union{Range{T},Vector{T}} end But there might be ot

[julia-users] type checking arrays

2015-08-18 Thread Kevin Kunzmann
Hi guys, So, I recently revisited Julia and fooled around a bit with Julia Box. Amazing - this looks like the language I never actually dared dreaming of ;) Keep up the greedy work! That being said, my question might be dumb, but I am struggling with the type system of Julia. I want to guarant

Re: [julia-users] type checking arrays

2015-08-18 Thread Kevin Kunzmann
Great, thanks - that makes so much more sense x) On Tuesday, 18 August 2015 10:10:40 UTC+2, Milan Bouchet-Valat wrote: > > Le mardi 18 août 2015 à 00:37 -0700, Kevin Kunzmann a écrit : > > Hi guys, > > > > So, I recently revisited Julia and fooled around a bit with

[julia-users] Julia installer does not put METADATA in user home

2015-08-18 Thread Kevin Kunzmann
Hi, I was just trying to use Juno + Julia prebundled package on a seecond machine (Win 8). It always complains about being not able to establish a connection. So I tried to install pure Julia first. That works fine and I can start a Julia session in the command line. However, when I want to upd

[julia-users] Re: Julia installer does not put METADATA in user home

2015-08-18 Thread Kevin Kunzmann
Saved my day, thanks! On Wednesday, 19 August 2015 08:26:57 UTC+2, Tony Kelman wrote: > > You may need to delete User\.julia and try Pkg.init() again. > > > On Tuesday, August 18, 2015 at 10:33:21 PM UTC-7, Kevin Kunzmann wrote: >> >> Hi, >> >> I was jus

[julia-users] Re: Defining a new numeric type with minimal effort

2016-06-10 Thread Kevin Kunzmann
:T, b::T) = Probability( a.val - b.val ) > (*){T<:Probability}(a::T, b::T) = Probability( a.val * b.val ) > (/){T<:Probability}(a::T, b::T) = Probability( a.val / b.val ) > > You need conversion and promotion if you want to mix Float64 values and > Probability values: 2.0 * P

Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-10 Thread Kevin Kunzmann
e effort. > > Enjoy, > > Jeffrey > > > > > > > > There is desire and activity intending > > > > > > >which is not the same as red marbles are a color of Marbleness > sculpted of a Material inheritance.

Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-10 Thread Kevin Kunzmann
Sorry for spamming, but let me reduce this to it's actual core - forget about probability. what I want to do is immutable MyType{T<:Real} val::T function MyType(x::T) On Saturday, 11 June 2016 07:54:42 UTC+2, Kevin Kunzmann wrote: > > Hey, > > thanks for sticking

Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-10 Thread Kevin Kunzmann
Real and then the conversion back ensures type consistency. I feel as if I am still missing the central point here... Best Kevin On Saturday, 11 June 2016 07:54:42 UTC+2, Kevin Kunzmann wrote: > > Hey, > > thanks for sticking with me ;) > > I am, however, a little bit confused no

Re: [julia-users] Re: Defining a new numeric type with minimal effort

2016-06-11 Thread Kevin Kunzmann
;p' and to clamp the value?) > > immutable Probability > p::Float64 > > Probability(p::Float64) = new( max(0.0. min(p, 1.0)) ) > end > > Probability{T<:Real}(x::T) = Probability( convert(Float64, x) ) > > > > > On Saturday, June 11, 2016 at 1:

[julia-users] Defining a new numeric type with minimal effort

2016-02-28 Thread Kevin Kunzmann
Hey, I have a (probably) very simple question. I would like to define 'Probability' as a new subtype of 'Real', only with the additional restriction that the value must be between 0 and 1. How would I achieve that 'Julia-style'? This should be possible without having to rewrite all these promo