Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85737 > unrolled thread

python implementation of a new integer encoding algorithm.

Started byjanhein.vanderburg@gmail.com
First post2015-02-17 03:22 -0800
Last post2015-02-20 00:58 -0800
Articles 13 on this page of 53 — 15 participants

Back to article view | Back to comp.lang.python


Contents

  python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-17 03:22 -0800
    Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-18 00:16 +1100
      Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 00:55 -0800
        Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-18 20:36 +1100
          Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 11:29 -0800
        Re: python implementation of a new integer encoding algorithm. Laura Creighton <lac@openend.se> - 2015-02-18 11:32 +0100
          Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 11:48 -0800
        People hated it for the same reasons I found them cool (was: python implementation of a new integer encoding algorithm.) Ben Finney <ben+python@benfinney.id.au> - 2015-02-18 21:57 +1100
    Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-17 09:12 -0500
      Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 00:59 -0800
        Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-18 11:46 -0500
          Re: python implementation of a new integer encoding algorithm. Grant Edwards <invalid@invalid.invalid> - 2015-02-18 17:30 +0000
            Re: python implementation of a new integer encoding algorithm. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-18 18:12 +0000
          Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 11:55 -0800
            Re: python implementation of a new integer encoding algorithm. Marko Rauhamaa <marko@pacujo.net> - 2015-02-18 23:54 +0200
              Re: python implementation of a new integer encoding algorithm. Marko Rauhamaa <marko@pacujo.net> - 2015-02-19 00:08 +0200
              Re: python implementation of a new integer encoding algorithm. Grant Edwards <invalid@invalid.invalid> - 2015-02-18 22:58 +0000
            Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-18 17:19 -0500
              Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-19 07:45 -0800
                Re: python implementation of a new integer encoding algorithm. Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-19 11:04 -0700
                Re: python implementation of a new integer encoding algorithm. Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-19 11:16 -0700
                Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-19 13:24 -0500
                Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-20 05:34 +1100
                Re: python implementation of a new integer encoding algorithm. Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-19 11:32 -0700
                Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-19 13:41 -0500
                Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-19 13:46 -0500
                Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-20 05:49 +1100
        Re: python implementation of a new integer encoding algorithm. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-18 17:00 +0000
    Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-18 01:34 +1100
      Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 01:04 -0800
        Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-18 08:54 -0500
          Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 11:52 -0800
        Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-19 01:16 +1100
    Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-17 09:50 -0500
    Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-18 01:58 +1100
    Re: python implementation of a new integer encoding algorithm. Dave Angel <davea@davea.name> - 2015-02-17 10:18 -0500
    Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-18 02:25 +1100
    Re: python implementation of a new integer encoding algorithm. Paul Rubin <no.email@nospam.invalid> - 2015-02-17 08:43 -0800
      Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-18 01:06 -0800
    Re: python implementation of a new integer encoding algorithm. Mario Figueiredo <marfig@gmail.com> - 2015-02-19 08:44 +0100
      Re: python implementation of a new integer encoding algorithm. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-19 08:06 +0000
        Re: python implementation of a new integer encoding algorithm. Marko Rauhamaa <marko@pacujo.net> - 2015-02-19 10:36 +0200
          Re: python implementation of a new integer encoding algorithm. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-19 09:33 +0000
          Re: python implementation of a new integer encoding algorithm. Terry Reedy <tjreedy@udel.edu> - 2015-02-19 14:50 -0500
            Re: python implementation of a new integer encoding algorithm. Marko Rauhamaa <marko@pacujo.net> - 2015-02-19 21:55 +0200
      Re: python implementation of a new integer encoding algorithm. Chris Angelico <rosuav@gmail.com> - 2015-02-19 19:36 +1100
      Re: python implementation of a new integer encoding algorithm. Mario Figueiredo <marfig@gmail.com> - 2015-02-19 10:42 +0100
      Re: python implementation of a new integer encoding algorithm. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-19 10:28 +0000
      Re: python implementation of a new integer encoding algorithm. Mario Figueiredo <marfig@gmail.com> - 2015-02-19 14:27 +0100
    Re: python implementation of a new integer encoding algorithm. Jonas Wielicki <jonas@wielicki.name> - 2015-02-19 09:38 +0100
      Re: python implementation of a new integer encoding algorithm. janhein.vanderburg@gmail.com - 2015-02-19 07:58 -0800
    Re: python implementation of a new integer encoding algorithm. Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-20 02:46 +0000
      Re: python implementation of a new integer encoding algorithm. wxjmfauth@gmail.com - 2015-02-20 00:58 -0800

Page 3 of 3 — ← Prev page 1 2 [3]


#85878

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-02-19 08:06 +0000
Message-ID<mailman.18869.1424333233.18130.python-list@python.org>
In reply to#85876
On 19/02/2015 07:44, Mario Figueiredo wrote:
> A lot of patronizing egos running around in these groups. This is a
> sad thread...
>
> What is being asked is for help, not whether this is useful or needed.
> Jan-Hein is after some directions, not whether your bloody opinion on
> how he should use his free time.
>
> If the interest and usability of a project would somehow become a
> problem, then boy, oh, boy; Most everyone in here, including the
> patronizing posters, would probably be left without anything to code.
>

The opinions being expressed seem to be along the lines of "reinventing 
round wheels is a waste of time.  Reinventing square or even triangular 
wheels is really pointless".

If you don't like the opinions expressed here by so called "patronizing 
posters" you are free to go away at any time you see fit.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#85881

FromMarko Rauhamaa <marko@pacujo.net>
Date2015-02-19 10:36 +0200
Message-ID<878ufub8mj.fsf@elektro.pacujo.net>
In reply to#85878
Mark Lawrence <breamoreboy@yahoo.co.uk>:

> The opinions being expressed seem to be along the lines of
> "reinventing round wheels is a waste of time. Reinventing square or
> even triangular wheels is really pointless".

I think it's even more pointless to mention the pointlessness of
someone's hobby.

Most pointless of all is mentioning the pointlessness of mentioning the
pointlessness of someone's hobby...


Marko

PS On the topic of pointlessness, why is top-posting the norm on
python-dev but shunned on python-list?

[toc] | [prev] | [next] | [standalone]


#85885

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-02-19 09:33 +0000
Message-ID<mailman.18872.1424338430.18130.python-list@python.org>
In reply to#85881
On 19/02/2015 08:36, Marko Rauhamaa wrote:
>
> PS On the topic of pointlessness, why is top-posting the norm on
> python-dev but shunned on python-list?
>

I don't know and I don't care provided top-posting remains the norm here.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#85926

FromTerry Reedy <tjreedy@udel.edu>
Date2015-02-19 14:50 -0500
Message-ID<mailman.18901.1424375436.18130.python-list@python.org>
In reply to#85881
On 2/19/2015 3:36 AM, Marko Rauhamaa wrote:

> PS On the topic of pointlessness, why is top-posting the norm on
> python-dev ... ?

It isn't, except that Guido gets a special pass and some of the posters 
travel a lot and read and reply on phones, which makes snipping and 
inline response difficult, and so they top post even though it makes 
their responsed *much* harder to understand.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#85927

FromMarko Rauhamaa <marko@pacujo.net>
Date2015-02-19 21:55 +0200
Message-ID<87oaopn0bp.fsf@elektro.pacujo.net>
In reply to#85926
Terry Reedy <tjreedy@udel.edu>:

> It isn't, except that Guido gets a special pass

Wusses...

Or, it's good to be king.


Marko

[toc] | [prev] | [next] | [standalone]


#85880

FromChris Angelico <rosuav@gmail.com>
Date2015-02-19 19:36 +1100
Message-ID<mailman.18870.1424334987.18130.python-list@python.org>
In reply to#85876
On Thu, Feb 19, 2015 at 7:06 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> On 19/02/2015 07:44, Mario Figueiredo wrote:
>>
>> A lot of patronizing egos running around in these groups. This is a
>> sad thread...
>>
>> What is being asked is for help, not whether this is useful or needed.
>> Jan-Hein is after some directions, not whether your bloody opinion on
>> how he should use his free time.
>
> The opinions being expressed seem to be along the lines of "reinventing
> round wheels is a waste of time.  Reinventing square or even triangular
> wheels is really pointless".

If you come to a group of architects and builders and ask them,
"What's the best way to build the steps up to my garage?", and show
them this picture...

http://cheezburger.com/6665198848

... do you expect advice to switch from concrete to wood, or to scrap
the whole idea?

ChrisA

[toc] | [prev] | [next] | [standalone]


#85890

FromMario Figueiredo <marfig@gmail.com>
Date2015-02-19 10:42 +0100
Message-ID<mailman.18875.1424339554.18130.python-list@python.org>
In reply to#85876

[Multipart message — attachments visible in raw view] — view raw

On Thu, Feb 19, 2015 at 9:06 AM, Mark Lawrence <breamoreboy@yahoo.co.uk>
wrote
>
>
> The opinions being expressed seem to be along the lines of "reinventing
> round wheels is a waste of time.  Reinventing square or even triangular
> wheels is really pointless".
>

You obviously don't value the word 'exercise'.


> If you don't like the opinions expressed here by so called "patronizing
> posters" you are free to go away at any time you see fit.
>
>
If you don't like the opinions on the opinions of patronizing posters, you
are free to go away any time you see fit.

[toc] | [prev] | [next] | [standalone]


#85893

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-02-19 10:28 +0000
Message-ID<mailman.18878.1424341729.18130.python-list@python.org>
In reply to#85876
On 19/02/2015 09:42, Mario Figueiredo wrote:
> On Thu, Feb 19, 2015 at 9:06 AM, Mark Lawrence <breamoreboy@yahoo.co.uk
> <mailto:breamoreboy@yahoo.co.uk>> wrote
>
>
>     The opinions being expressed seem to be along the lines of
>     "reinventing round wheels is a waste of time.  Reinventing square or
>     even triangular wheels is really pointless".
>
>
> You obviously don't value the word 'exercise'.
>
>
>     If you don't like the opinions expressed here by so called
>     "patronizing posters" you are free to go away at any time you see fit.
>
>
> If you don't like the opinions on the opinions of patronizing posters,
> you are free to go away any time you see fit.
>

No thanks as I won't be able to find any more candidates for my dream team.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#85909

FromMario Figueiredo <marfig@gmail.com>
Date2015-02-19 14:27 +0100
Message-ID<mailman.18888.1424360415.18130.python-list@python.org>
In reply to#85876

[Multipart message — attachments visible in raw view] — view raw

On Thu, Feb 19, 2015 at 11:28 AM, Mark Lawrence <breamoreboy@yahoo.co.uk>
wrote:

>
> No thanks as I won't be able to find any more candidates for my dream team.
>
>
I'm glad you like me here.

[toc] | [prev] | [next] | [standalone]


#85889

FromJonas Wielicki <jonas@wielicki.name>
Date2015-02-19 09:38 +0100
Message-ID<mailman.18874.1424339543.18130.python-list@python.org>
In reply to#85737

[Multipart message — attachments visible in raw view] — view raw

Dear Jan-Hein,

I read through the discussion, but until you said it directly, I did not
realize that you wanted feedback on your *python* code.

In that case, let me note a few things which make it unlikely that you
will get (usable) feedback:

1. The code on your website is not formatted and highlighted properly.
This makes it hard to read. Of course, people can copy-paste it into
their favourite highlighter, but that poses a hurdle some (including me)
do not want to take, because of ...

2. ... we don’t exactly know how the algorithm is supposed to work.
Unfortunately (and I’m quite sure that this is not due to the fact that
you’re not native english, because I was able to follow your mails
without issues), your description of the algorithm on your blog is full
of typos and incomplete or ambiguous grammar. It could also use some
mathematical typesetting to make it more readable.


I propose that you reformat both your description of the algorithm and
your implementation to get a better review on it. In fact, I am quite
curious about it (having implemented a MIDI-ish format I stole from
Matroska without knowing, for my pet binary storage format, where I need
small (less than 8 bit) at a number of occasions), but currently I don’t
have the time to dig through it if it doesn’t read fluently (there are
exams over here). I assume that many other people also have much other
stuff to do.


Another idea to make it more attractive for people to review your code
(if you are not after a functional review) would be to go to, e.g.,
<https://codereview.stackexchange.com>. I am not quite sure whether it
would be "on-topic" there -- it would probably require a concise
description of the algorithm so that people can make their own
mind-model about how the algorithm is *supposed* to work and how your
code works, to compare and see potential for optimization, code wise.

best regards,
jwi

p.s.:

On your website:
> The natural character size is 2 bits, and that will eventually become
> the standard.

What is it with that statement? That bugged me when I visited the page
for the first time. Just marketing-wise, I believe you should not
confront people with a controversial statement, taking it for granted,
on the first glance. It would be better to state that this is your
implementation of Algorithm A (link to concise description included) and
you would like to get feedback on your implementation or whatever.

[toc] | [prev] | [next] | [standalone]


#85911

Fromjanhein.vanderburg@gmail.com
Date2015-02-19 07:58 -0800
Message-ID<02ef99cc-8d3d-46ad-a20a-7aa0aacf17d7@googlegroups.com>
In reply to#85889
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.

[toc] | [prev] | [next] | [standalone]


#85940

FromDenis McMahon <denismfmcmahon@gmail.com>
Date2015-02-20 02:46 +0000
Message-ID<mc6761$a3f$4@dont-email.me>
In reply to#85737
On Tue, 17 Feb 2015 03:22:47 -0800, janhein.vanderburg wrote:

> In http://optarbvalintenc.blogspot.nl/ I propose a new way to encode
> arbitrarily valued integers

I'm not quite sure I understand the problem that you're trying to solve 
with this.

If I want to transmit some arbitrarily huge integer value between two 
systems there are several ways to do it:

Numeric text - roughly 24 bits are used to carry 10 bits of value

Alphanumeric text - 8 bits are used to carry every 4 bits of value

A bit sequence of length n bits where 2^n > the value I wish to convey, 
providing that there is some mechanism by which the sender can tell the 
receiver "the next n bits represent a binary integer." It might be 
desirable to pad the bit stream to a byte boundary. Assuming an 8 bit 
clean transmission path and a maximum padding of 7 bits, this is 
increasingly efficient as the integer being transmitted gets larger.

The thing is, for all practical purposes, any integer that is capable of 
being processed as an integer by a computer is probably already being 
stored in a binary format in a storage space of n bytes, where n is a 
power of 2. Very little additional processing should be needed to 
packetize those n bytes and transmit them.

Additionally, you're talking about efficiency and the need to optimise, 
but you're using a scripted language. If you need a highly efficient 
protocol to transfer binary numbers between two systems with minimum 
wasted bits and maximum cpu and memory efficiency, python really isn't 
the language in which to solve your problem.

Perhaps it's time to take a step back and redefine the problem a bit more 
clearly, because at the moment I'm not sure you're solution will ever 
solve anything that needs solving.

-- 
Denis McMahon, denismfmcmahon@gmail.com

[toc] | [prev] | [next] | [standalone]


#85958

Fromwxjmfauth@gmail.com
Date2015-02-20 00:58 -0800
Message-ID<e06060d5-5491-4206-96a4-7339c721af7e@googlegroups.com>
In reply to#85940
Le vendredi 20 février 2015 03:47:18 UTC+1, Denis McMahon a écrit :
> 
> Perhaps it's time to take a step back and redefine the problem a bit more 
> clearly, because at the moment I'm not sure you're solution will ever 
> solve anything that needs solving.
> 


Ditto for the Flexible String Representation and the
general unicode handling.
In one word: a shame.

jmf

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.lang.python


csiph-web