Re: [Puppet-dev] A question about numbers and representation

2014-09-02 Thread Ken Barber
> TL;DR - I want to specify the max values of integers and floats in the > puppet language for a number of reasons. Skip the background part > to get to "Questions and Proposal" if you are already familiar with > serialization formats, and issues regarding numeric representation. TL;DR: from a Pup

Re: [Puppet-dev] A question about numbers and representation

2014-09-02 Thread Daniele Sluijters
> 2) warn people about cases where where using code in other languages could lead to problems. Unless we want to keep track of every language and how the multiple libraries that exist handle serialisation and deserialisation that's pretty much impossible. "Oh but this breaks in Scala but works

Re: [Puppet-dev] A question about numbers and representation

2014-09-01 Thread markus
> Most serialization formats can simply not deal with > 64 bit values as > regular numbers. They may do horrible things like truncation, or use > the max/min value if a value is too big, or for floating point > drastically lose precision. Eh. It's not that the serialization formats can't deal w

Re: [Puppet-dev] A question about numbers and representation

2014-09-01 Thread Trevor Vaughan
Indeed. Ideally, it would "just work" and do the automatic conversion internally to the language. Unfortunately, this may take a lot of tinkering back and forth under the covers. But, I'd certainly love to never worry about typing again. Now, about those booleans. Trevor On Mon, Sep 1, 201

Re: [Puppet-dev] A question about numbers and representation

2014-09-01 Thread Luke Kanies
On Sep 1, 2014, at 1:54 AM, Henrik Lindberg wrote: > Hi, > Recently I have been looking into serialization of various kinds, and the > issue of how we represent and serialize/deserialize numbers have come up. > > TL;DR - I want to specify the max values of integers and floats in the puppet >

Re: [Puppet-dev] A question about numbers and representation

2014-09-01 Thread Trevor Vaughan
TL;DR; BigInteger/BigDecimal is the "right" thing to do, otherwise cap at the client/server floor. I have a few thoughts here: 1) I don't like losing precision in any case so a cap makes sense (maybe) 2) If you do cap, would you not want to cap to the lowest of the client or server? I.e. if the

[Puppet-dev] A question about numbers and representation

2014-09-01 Thread Henrik Lindberg
Hi, Recently I have been looking into serialization of various kinds, and the issue of how we represent and serialize/deserialize numbers have come up. TL;DR - I want to specify the max values of integers and floats in the puppet language for a number of reasons. Skip the background part to g