Re: Working with unsigned/signed types

Discussion in 'Python' started by Guest, Dec 20, 2006.

  1. Guest

    Guest Guest

    That seems like it'll do the trick quite well.

    As far as the future generations go, there's no question as to whether it would
    last if it were on my site - there are always changes being made to it and I'm
    not expecting it to be very stable over the course of time, especially since it
    would confuse the heck out of a bride trying to find her pictures if she stumbled
    on it... Is there a repository of some sort available for this sort of thing
    anywhere?

    Thanks!
    -Brian


    On Tue Dec 19 22:07 , Ben Finney <> sent:


    >> writes:
    >

    >> The first part of the question is fairly basic - in C, working with
    >> signed integers, the MSB (is that still the right term?) is used to
    >> denote positive and negative, and the following bits increase
    >> towards positive infinity, correct? Such that in C, adding one to
    >> 0x7fffffff would cause the number to go around to -0x7fffffff (or
    >> whatever that is), giving -1 for 0xffffffff?
    >>
    >> Secondly, (and this is my weak point as a programmer) to re-insert
    >> the data after, what would be the most efficient way to pull
    >> everything back apart into individual characters for putting it all
    >> back into the files? I could probably figure out something that
    >> would work, but I wouldn't be so sure as to its reliability.

    >
    >I think, from the above, that you want to read about the 'struct'
    >module in the standard library.
    >
    > http://docs.python.org/lib/module-struct.html>
    >

    >> Third, being a photographer now rather than a coder, I'd like to
    >> give back the modules I'm writing to the community (it looks like
    >> very little of the sort exists), but would rather not worry about
    >> them in the future... Is there a good way to go about this?

    >
    >Ideally, find someone who will actively maintain the code into the
    >foreseeable future; maybe a user of the code with more interest in
    >programming than you.
    >
    >Failing that, find a place to put it online for the foreseeable
    >future, and notify repositories like Freshmeat
    >http://freshmeat.net/> of its existence and location.
    >
    >The most important thing to do is to explicitly license the rights to
    >modify and redistribute freely for all people who receive the code, so
    >they never have to try to track you down for permission.
    >
    >Choose a permissive license like the Expat license
    >http://www.jclark.com/xml/copying.txt> if you want to allow
    >people to do just about anything except claim you didn't write it;
    >choose a copyleft like the GNU General Public License
    >http://www.gnu.org/copyleft/gpl.html> if you want to ensure
    >nobody can redistribute under more restrictive terms in future.
    >
    >Make each file clearly marked so that the grant of license is clear,
    >and include the text of the license terms in an obvious file in the
    >source code package. See the addendum of the GNU GPL for how this is
    >best done, even if you end up not choosing that particular license.
    >
    >Thanks for thinking of the future hackers :)
    >
    >--
    > \ "...one of the main causes of the fall of the Roman Empire was |
    > `\ that, lacking zero, they had no way to indicate successful |
    >_o__) termination of their C programs." -- Robert Firth |
    >Ben Finney
    >
    >--
    >http://mail.python.org/mailman/listinfo/python-list
    >
     
    Guest, Dec 20, 2006
    #1
    1. Advertising

  2. Guest

    Ant Guest

    On Dec 20, 6:25 am, <> wrote:
    > That seems like it'll do the trick quite well.
    >
    > As far as the future generations go, there's no question as to whether it would
    > last if it were on my site - there are always changes being made to it and I'm
    > not expecting it to be very stable over the course of time, especially since it
    > would confuse the heck out of a bride trying to find her pictures if she stumbled
    > on it... Is there a repository of some sort available for this sort of thing
    > anywhere?


    Sourceforge host open source projects for free:
    http://sourceforge.net/
     
    Ant, Dec 20, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Heyes
    Replies:
    2
    Views:
    600
    Jason Heyes
    Feb 14, 2005
  2. Guest
    Replies:
    0
    Views:
    379
    Guest
    Dec 20, 2006
  3. Ben Finney
    Replies:
    11
    Views:
    506
    Dan Bishop
    Dec 24, 2006
  4. Sriniv

    Unsigned and signed char types

    Sriniv, Jun 12, 2005, in forum: C Programming
    Replies:
    4
    Views:
    303
    William Ahern
    Jun 13, 2005
  5. pozz
    Replies:
    12
    Views:
    793
    Tim Rentsch
    Mar 20, 2011
Loading...

Share This Page