<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/mpconfig.h, branch v1.4.6</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.6</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.6'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-09-15T20:59:20+00:00</updated>
<entry>
<title>py/objslice: Make slice attributes (start/stop/step) readable.</title>
<updated>2015-09-15T20:59:20+00:00</updated>
<author>
<name>Tom Soulanille</name>
<email>soul@prama.com</email>
</author>
<published>2015-09-11T21:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=aeb62f9ae3169d789800591eea390e020c7532bf'/>
<id>urn:sha1:aeb62f9ae3169d789800591eea390e020c7532bf</id>
<content type='text'>
Configurable with MICROPY_PY_BUILTINS_SLICE_ATTRS.  Disabled by default.
</content>
</entry>
<entry>
<title>lib/mp-readline: Add auto-indent support.</title>
<updated>2015-09-12T21:07:23+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-08-20T09:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0af73014cc61a05bcf53558d7c2d554d98da4419'/>
<id>urn:sha1:0af73014cc61a05bcf53558d7c2d554d98da4419</id>
<content type='text'>
4 spaces are added at start of line to match previous indent, and if
previous line ended in colon.

Backspace deletes 4 space if only spaces begin a line.

Configurable via MICROPY_REPL_AUTO_INDENT.  Disabled by default.
</content>
</entry>
<entry>
<title>py: Add MICROPY_PY_BUILTINS_FILTER, disable for minimal ports.</title>
<updated>2015-08-19T22:05:11+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-08-19T22:01:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=22ff397fb11fac323607ef2e51d81a4ed96c2c50'/>
<id>urn:sha1:22ff397fb11fac323607ef2e51d81a4ed96c2c50</id>
<content type='text'>
Saves 320 bytes on x86.
</content>
</entry>
<entry>
<title>unix-cpy: Remove unix-cpy.  It's no longer needed.</title>
<updated>2015-08-17T11:51:26+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-08-14T11:24:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=65dc960e3b22a8426e369607e47c19b380ce30ea'/>
<id>urn:sha1:65dc960e3b22a8426e369607e47c19b380ce30ea</id>
<content type='text'>
unix-cpy was originally written to get semantic equivalent with CPython
without writing functional tests.  When writing the initial
implementation of uPy it was a long way between lexer and functional
tests, so the half-way test was to make sure that the bytecode was
correct.  The idea was that if the uPy bytecode matched CPython 1-1 then
uPy would be proper Python if the bytecodes acted correctly.  And having
matching bytecode meant that it was less likely to miss some deep
subtlety in the Python semantics that would require an architectural
change later on.

But that is all history and it no longer makes sense to retain the
ability to output CPython bytecode, because:

1. It outputs CPython 3.3 compatible bytecode.  CPython's bytecode
changes from version to version, and seems to have changed quite a bit
in 3.5.  There's no point in changing the bytecode output to match
CPython anymore.

2. uPy and CPy do different optimisations to the bytecode which makes it
harder to match.

3. The bytecode tests are not run.  They were never part of Travis and
are not run locally anymore.

4. The EMIT_CPYTHON option needs a lot of extra source code which adds
heaps of noise, especially in compile.c.

5. Now that there is an extensive test suite (which tests functionality)
there is no need to match the bytecode.  Some very subtle behaviour is
tested with the test suite and passing these tests is a much better
way to stay Python-language compliant, rather than trying to match
CPy bytecode.
</content>
</entry>
<entry>
<title>py: Disable REPL EMACS key bindings by default.</title>
<updated>2015-07-26T14:49:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-07-26T14:49:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d8a7f8bff2978a158203fec31f270b616f444047'/>
<id>urn:sha1:d8a7f8bff2978a158203fec31f270b616f444047</id>
<content type='text'>
</content>
</entry>
<entry>
<title>lib/mp-readline: Add emacs-style control characters for cursor movement.</title>
<updated>2015-07-26T14:22:13+00:00</updated>
<author>
<name>Tom Soulanille</name>
<email>soul@prama.com</email>
</author>
<published>2015-07-09T23:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7d588b0c7c9698d23b1e5e7b54e0e2094ad8f464'/>
<id>urn:sha1:7d588b0c7c9698d23b1e5e7b54e0e2094ad8f464</id>
<content type='text'>
Disabled by default.  Adds 108 bytes to Thumb2 arch when enabled.
</content>
</entry>
<entry>
<title>py: Make qstr hash size configurable, defaults to 2 bytes.</title>
<updated>2015-07-20T11:03:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-07-20T11:03:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c3bd9415cc8e6ba3619fe4b7a2bdac20260b0236'/>
<id>urn:sha1:c3bd9415cc8e6ba3619fe4b7a2bdac20260b0236</id>
<content type='text'>
This patch makes configurable, via MICROPY_QSTR_BYTES_IN_HASH, the
number of bytes used for a qstr hash.  It was originally fixed at 2
bytes, and now defaults to 2 bytes.  Setting it to 1 byte will save
ROM and RAM at a small expense of hash collisions.
</content>
</entry>
<entry>
<title>py: Improve allocation policy of qstr data.</title>
<updated>2015-07-14T21:56:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-13T20:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ade9a052365247be5ed4ce8b53c2164a576a4a05'/>
<id>urn:sha1:ade9a052365247be5ed4ce8b53c2164a576a4a05</id>
<content type='text'>
Previous to this patch all interned strings lived in their own malloc'd
chunk.  On average this wastes N/2 bytes per interned string, where N is
the number-of-bytes for a quanta of the memory allocator (16 bytes on 32
bit archs).

With this patch interned strings are concatenated into the same malloc'd
chunk when possible.  Such chunks are enlarged inplace when possible,
and shrunk to fit when a new chunk is needed.

RAM savings with this patch are highly varied, but should always show an
improvement (unless only 3 or 4 strings are interned).  New version
typically uses about 70% of previous memory for the qstr data, and can
lead to savings of around 10% of total memory footprint of a running
script.

Costs about 120 bytes code size on Thumb2 archs (depends on how many
calls to gc_realloc are made).
</content>
</entry>
<entry>
<title>py: Add TimeoutError exception subclassed from OSError.</title>
<updated>2015-07-02T09:53:08+00:00</updated>
<author>
<name>Daniel Campora</name>
<email>daniel@wipy.io</email>
</author>
<published>2015-06-29T20:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=077812b2abe3f5e5325194f9694dad7eb38186dd'/>
<id>urn:sha1:077812b2abe3f5e5325194f9694dad7eb38186dd</id>
<content type='text'>
The TimeoutError is useful for some modules, specially the the
socket module. TimeoutError can then be alised to socket.timeout
and then Python code can differentiate between socket.error and
socket.timeout.
</content>
</entry>
<entry>
<title>py: Use a wrapper to explicitly check self argument of builtin methods.</title>
<updated>2015-06-20T15:39:39+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-19T12:49:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=06593fb0f23dfc12f482561fbec1717dca0d4db4'/>
<id>urn:sha1:06593fb0f23dfc12f482561fbec1717dca0d4db4</id>
<content type='text'>
Previous to this patch a call such as list.append(1, 2) would lead to a
seg fault.  This is because list.append is a builtin method and the first
argument to such methods is always assumed to have the correct type.

Now, when a builtin method is extracted like this it is wrapped in a
checker object which checks the the type of the first argument before
calling the builtin function.

This feature is contrelled by MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG and
is enabled by default.

See issue #1216.
</content>
</entry>
</feed>
