<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/smallint.h, branch type_hints</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=type_hints</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=type_hints'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-12-11T11:39:12+00:00</updated>
<entry>
<title>py: Extend nan-boxing config to have 47-bit small integers.</title>
<updated>2017-12-11T11:39:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-12-11T11:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2759bec8587b0c0b7da1fa3a013e4f1b1530ad27'/>
<id>urn:sha1:2759bec8587b0c0b7da1fa3a013e4f1b1530ad27</id>
<content type='text'>
The nan-boxing representation has an extra 16-bits of space to store
small-int values, and making use of it allows to create and manipulate full
32-bit positive integers (ie up to 0xffffffff) without using the heap.
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>all: Unify header guard usage.</title>
<updated>2017-07-18T01:57:39+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-29T21:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=299bc625864b9e624ed599c94a5f95870516139a'/>
<id>urn:sha1:299bc625864b9e624ed599c94a5f95870516139a</id>
<content type='text'>
The code conventions suggest using header guards, but do not define how
those should look like and instead point to existing files. However, not
all existing files follow the same scheme, sometimes omitting header guards
altogether, sometimes using non-standard names, making it easy to
accidentally pick a "wrong" example.

This commit ensures that all header files of the MicroPython project (that
were not simply copied from somewhere else) follow the same pattern, that
was already present in the majority of files, especially in the py folder.

The rules are as follows.

Naming convention:
* start with the words MICROPY_INCLUDED
* contain the full path to the file
* replace special characters with _

In addition, there are no empty lines before #ifndef, between #ifndef and
one empty line before #endif. #endif is followed by a comment containing
the name of the guard macro.

py/grammar.h cannot use header guards by design, since it has to be
included multiple times in a single C file. Several other files also do not
need header guards as they are only used internally and guaranteed to be
included only once:
* MICROPY_MPHALPORT_H
* mpconfigboard.h
* mpconfigport.h
* mpthreadport.h
* pin_defs_*.h
* qstrdefs*.h
</content>
</entry>
<entry>
<title>py/smallint: Allow to override MP_SMALL_INT_MIN et al.</title>
<updated>2016-01-08T13:43:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-08T13:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c1c57eafac684f961923f601162bce1b19237003'/>
<id>urn:sha1:c1c57eafac684f961923f601162bce1b19237003</id>
<content type='text'>
This allows a port to specify exactly how many bits are in a small
int (eg for a uPy bytecode cross compiler).
</content>
</entry>
<entry>
<title>py: Add support for 64-bit NaN-boxing object model, on 32-bit machine.</title>
<updated>2015-11-29T14:25:36+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T17:09:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b8cfb0d7b2c91ea1e17f6caeabfc9cb23166cdc1'/>
<id>urn:sha1:b8cfb0d7b2c91ea1e17f6caeabfc9cb23166cdc1</id>
<content type='text'>
To use, put the following in mpconfigport.h:

    #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_D)
    #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
    typedef int64_t mp_int_t;
    typedef uint64_t mp_uint_t;
    #define UINT_FMT "%llu"
    #define INT_FMT "%lld"

Currently does not work with native emitter enabled.
</content>
</entry>
<entry>
<title>py: Add object repr "C", where 30-bit floats are stuffed in obj word.</title>
<updated>2015-10-20T11:38:54+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-10-17T22:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=183edefddd8c08dd989fa7bec2d33d8b4130e1dc'/>
<id>urn:sha1:183edefddd8c08dd989fa7bec2d33d8b4130e1dc</id>
<content type='text'>
This new object representation puts floats into the object word instead
of on the heap, at the expense of reducing their precision to 30 bits.
It only makes sense when the word size is 32-bits.
</content>
</entry>
<entry>
<title>unix/modtime: Implement ticks_ms(), ticks_us() and ticks_diff().</title>
<updated>2015-10-19T14:48:27+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-10-17T12:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8ee153f23429b63878d740168695cde3fb2a1497'/>
<id>urn:sha1:8ee153f23429b63878d740168695cde3fb2a1497</id>
<content type='text'>
All of these functions return positive small int, thus range is 2 bits less
than word size (30 bit on 32-bit systems, 62 bit on 64-bit systems).
</content>
</entry>
<entry>
<title>py: Allow configurable object representation, with 2 different options.</title>
<updated>2015-04-03T13:11:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-29T13:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=567184e21e9a6a37fd71153a43874dec7a3f5e0c'/>
<id>urn:sha1:567184e21e9a6a37fd71153a43874dec7a3f5e0c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Move to guarded includes, everywhere in py/ core.</title>
<updated>2015-01-01T20:32:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T20:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=51dfcb4bb7613ed164952712d9a5235a7b833cde'/>
<id>urn:sha1:51dfcb4bb7613ed164952712d9a5235a7b833cde</id>
<content type='text'>
Addresses issue #1022.
</content>
</entry>
<entry>
<title>Rename machine_(u)int_t to mp_(u)int_t.</title>
<updated>2014-07-03T12:25:24+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-07-03T12:25:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=40f3c026823f8951a2fa04e9c7fc93c75bc27bec'/>
<id>urn:sha1:40f3c026823f8951a2fa04e9c7fc93c75bc27bec</id>
<content type='text'>
See discussion in issue #50.
</content>
</entry>
</feed>
