fixed.Number reduces stutter and is more informative. This was Jan's point.
In general dot imports are a bad idea when maintaining large code bases since it requires more work to figure out what is actually providing the X that has been added to the . imports pool. It also a prevents the protection you get from importing colliding labels under different name spaces. foo.X and bar.X; import ( . "foo"; . "bar" ) and you have problems. When you change the rules of the game, of course you can win. My point below says that information is not reduced by lossless compression (your claim being the opposite). Given that as you show fixed.Fixed is almost completely compressible without any tricks to 50% its original size (almost because of the capitalisation, but given the requirement for exported labels to be capitalised we can invoke context, though... if you rename your package to Fixed, then you get perfect 50% compression without context). Now given that dot imports are generally considered a bad idea in Go and that as you show your label can be compressed, the conclusion is not that you should compress, but rather there is room to add additional information; fixed.Number. Thanks for playing! On Thu, 2018-11-29 at 16:24 -0600, robert engels wrote: > Right and since fixed.Fixed can be reduced to Fixed with no loss of > information, it is a great lossless compression - more than 50 %. > > Thanks for playing ! > > > > > > On Nov 29, 2018, at 4:11 PM, Daniel Kortschak <dan...@kortschak.io> > > wrote: > > > > That is correct. The number of physical bits used to represent the > > information is reduced. The number of bits of information remains > > the > > same except in the case of lossy compression. > > > > If this were not true, I could propose the following compression > > protocol: count the number of 1 bits in the uncompressed stream and > > represent this as a binary number, recursively apply this to the > > ones- > > count until you have one one bit. This is your compressed data. I > > have > > a truly marvellous decompression scheme to complement this, which > > this > > email is too narrow to contain (damn 80 column limit), but here is > > the > > compressed version, 0x1. > > > > On Thu, 2018-11-29 at 22:07 +0100, Jan Mercl wrote: > > > > > > On Thu, Nov 29, 2018 at 10:02 PM robert engels <rengels@ix.netcom > > > .com > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > I’m pretty sure that is not correct, see > > > https://www.maximumcompression.com > > > > > > > > > > > > > > > > Most lossless text compression is > 85 %, and if you use lossy > > > compression (images, audio) it can be 100:1 > > > > > > Dan was talking about quite different bits. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.