python implementation of a new integer encoding algorithm.

2015-02-17 Thread janhein . vanderburg
In http://optarbvalintenc.blogspot.nl/ I propose a new way to encode arbitrarily valued integers and the python code that can be used as a reference for practical implementations of codecs. The encoding algorithm itself is optimized for transmission and storage requirements without any processo

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
On Tuesday, February 17, 2015 at 2:17:02 PM UTC+1, Chris Angelico wrote: > This is a fine forum to ask in. However, you may find that the advice > you get isn't quite what you were asking for. In my case, the advice > I'm offering is: Don't do this. Thanks Chris; let me explain why I want this. As

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
On Tuesday, February 17, 2015 at 3:13:41 PM UTC+1, Dave Angel wrote: > This is a fine forum for such a discussion. I for one would love to > participate. However, note that it isn't necessary true that "the > smaller the better" is a good algorithm. In context, there are > frequently a number

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
On Tuesday, February 17, 2015 at 3:35:16 PM UTC+1, Chris Angelico wrote: > Oh, incidentally: If you want a decent binary format for > variable-sized integer, check out the MIDI spec. I did some time ago, thanks, and it is indeed a decent format. I also looked at variations of that approach. None o

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
On Tuesday, February 17, 2015 at 5:43:43 PM UTC+1, Paul Rubin wrote: > This is a reasonable place to ask specific python questions. The > algorithm description itself is pretty confusing though, and it seems to > address a problem that doesn't particularly seem to need a solution. > It's pretty t

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
Op woensdag 18 februari 2015 10:36:37 UTC+1 schreef Chris Angelico: > I would actually look at it the other way: I'm aware of that, since you already warned me with "This is a fine forum to ask in. However, you may find that the advice you get isn't quite what you were asking for. In my case, ...

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
Op woensdag 18 februari 2015 11:33:18 UTC+1 schreef Laura Creighton: > Hi Jan. Hi Laura, thanks for your comments; let me explain my why: > Should you ever need an assembler programmer for > quick and dirty hacks for the PDP-11 line (11/20 and 11/05 preferred > as it is harder) I am still the wom

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
Op woensdag 18 februari 2015 14:55:07 UTC+1 schreef Dave Angel: > Define "beats." You might mean beats in simplicity, or in elegance, or > in clarity of code. But you probably mean in space efficiency, or > "compression." But that's meaningless without a target distribution of > values that y

Re: python implementation of a new integer encoding algorithm.

2015-02-18 Thread janhein . vanderburg
Op woensdag 18 februari 2015 17:47:49 UTC+1 schreef Dave Angel: > On 02/18/2015 03:59 AM, janhein.vanderb...@gmail.com wrote: > > > > encoding individual integers optimally without any assumptions about their > > values. > > > > Contradiction in terms. > > -- > DaveA Not. Jan-Hein. -- https

Re: python implementation of a new integer encoding algorithm.

2015-02-19 Thread janhein . vanderburg
On Wednesday, February 18, 2015 at 11:20:12 PM UTC+1, Dave Angel wrote: > I'm not necessarily doubting it, just challenging you to provide a data > sample that actually shows it. And of course, I'm not claiming that > 7bit is in any way optimal. You cannot define optimal without first > defini

Re: python implementation of a new integer encoding algorithm.

2015-02-19 Thread janhein . vanderburg
On Thursday, February 19, 2015 at 10:52:38 AM UTC+1, Jonas Wielicki wrote: > I read through the discussion, but until you said it directly, I did not > realize that you wanted feedback on your *python* code. Thanks for the tips Jonas. -- https://mail.python.org/mailman/listinfo/python-list

Re: python implementation of a new integer encoding algorithm.

2015-04-09 Thread janhein . vanderburg
Op donderdag 19 februari 2015 19:25:14 UTC+1 schreef Dave Angel: > I wrote the following pair of functions: > > def seven_code(n): > acc = bytearray() > if n == 0: > acc.append(0) > while n > 0: > quotient, remainder = divmod(n, 128) > acc.append(remainder

Re: python implementation of a new integer encoding algorithm.

2015-04-09 Thread janhein . vanderburg
Op donderdag 19 februari 2015 19:05:12 UTC+1 schreef Ian: > That stop-bit variant looks extremely inefficient (and wrong) to me. You are right; I was wrong. > encoding with just a small amount of binary at the end. This is what I > would expect a 2-bit stop-bit encoding to look like: > > 0: 00 >

Re: python implementation of a new integer encoding algorithm.

2015-04-12 Thread janhein . vanderburg
Op donderdag 9 april 2015 14:04:25 UTC+2 schreef Dave Angel: > I still don't see where you have anywhere declared what your goal is. Sorry that you didn't like the improvements to the stop bit encoding that I illustrated in http://optarbvalintenc.blogspot.nl/2015/04/the-new-proposal.html and the