<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/mpconfig.h, branch esp-extra-scripts</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=esp-extra-scripts</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=esp-extra-scripts'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-08-07T19:36:05+00:00</updated>
<entry>
<title>py/mpconfig.h: Define MP_ALWAYSINLINE for reuse.</title>
<updated>2016-08-07T19:36:05+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-08-07T19:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1bc2911174aa975bbcb15cd70dd2dabfc7c8c535'/>
<id>urn:sha1:1bc2911174aa975bbcb15cd70dd2dabfc7c8c535</id>
<content type='text'>
Similar to existing MP_NOINLINE.
</content>
</entry>
<entry>
<title>py/objstr: Make .partition()/.rpartition() methods configurable.</title>
<updated>2016-08-07T03:46:55+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-08-07T03:46:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=56eb25f04928132f9921a1163684e626256e2a2c'/>
<id>urn:sha1:56eb25f04928132f9921a1163684e626256e2a2c</id>
<content type='text'>
Default is disabled, enabled for unix port. Saves 600 bytes on x86.
</content>
</entry>
<entry>
<title>py/mpconfig.h: Add MICROPY_STREAMS_POSIX_API setting.</title>
<updated>2016-07-30T17:05:56+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-30T17:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=61e77a4e88c4b6971fd997191de01e5ab08e46c5'/>
<id>urn:sha1:61e77a4e88c4b6971fd997191de01e5ab08e46c5</id>
<content type='text'>
To filter out even prototypes of mp_stream_posix_*() functions, which
require POSIX types like ssize_t &amp; off_t, which may be not available in
some ports.
</content>
</entry>
<entry>
<title>py/mpconfig.h: Fix description for MICROPY_PY_STR_BYTES_CMP_WARN.</title>
<updated>2016-07-21T21:46:24+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-21T21:46:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a1b442bc07798afb774acaaef391443d76104543'/>
<id>urn:sha1:a1b442bc07798afb774acaaef391443d76104543</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/obj: Issue a warning when str and bytes objects are compared.</title>
<updated>2016-07-21T21:34:34+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-21T21:34:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=707cae749424104660cd24e7c1f1e16d67b99b0f'/>
<id>urn:sha1:707cae749424104660cd24e7c1f1e16d67b99b0f</id>
<content type='text'>
Something like:

if foo == "bar":

will be always false if foo is b"bar". In CPython, warning is issued if
interpreter is started as "python3 -b". In MicroPython,
MICROPY_PY_STR_BYTES_CMP_WARN setting controls it.
</content>
</entry>
<entry>
<title>py/gc: Implement GC running by allocation threshold.</title>
<updated>2016-07-20T21:37:30+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-20T21:37:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93e353e3844f7116088a1a105ba588cade0e6783'/>
<id>urn:sha1:93e353e3844f7116088a1a105ba588cade0e6783</id>
<content type='text'>
Currently, MicroPython runs GC when it could not allocate a block of memory,
which happens when heap is exhausted. However, that policy can't work well
with "inifinity" heaps, e.g. backed by a virtual memory - there will be a
lot of swap thrashing long before VM will be exhausted. Instead, in such
cases "allocation threshold" policy is used: a GC is run after some number of
allocations have been made. Details vary, for example, number or total amount
of allocations can be used, threshold may be self-adjusting based on GC
outcome, etc.

This change implements a simple variant of such policy for MicroPython. Amount
of allocated memory so far is used for threshold, to make it useful to typical
finite-size, and small, heaps as used with MicroPython ports. And such GC policy
is indeed useful for such types of heaps too, as it allows to better control
fragmentation. For example, if a threshold is set to half size of heap, then
for an application which usually makes big number of small allocations, that
will (try to) keep half of heap memory in a nice defragmented state for an
occasional large allocation.

For an application which doesn't exhibit such behavior, there won't be any
visible effects, except for GC running more frequently, which however may
affect performance. To address this, the GC threshold is configurable, and
by default is off so far. It's configured with gc.threshold(amount_in_bytes)
call (can be queries without an argument).
</content>
</entry>
<entry>
<title>py/mpconfig.h: Mention MICROPY_PY_BTREE config option.</title>
<updated>2016-07-02T11:57:42+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-02T11:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=737bd9c3144a57673db8b02217114b7f7f63387d'/>
<id>urn:sha1:737bd9c3144a57673db8b02217114b7f7f63387d</id>
<content type='text'>
However, as it requires linking with external libraries, it actually
should be ste on Makefile level.
</content>
</entry>
<entry>
<title>py: Implement a simple global interpreter lock.</title>
<updated>2016-06-28T10:28:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-26T10:42:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4cec63a9dbed86c4332b9e7fcd56d092046193e4'/>
<id>urn:sha1:4cec63a9dbed86c4332b9e7fcd56d092046193e4</id>
<content type='text'>
This makes the VM/runtime thread safe, at the cost of not being able to
run code in parallel.
</content>
</entry>
<entry>
<title>py: Add basic _thread module, with ability to start a new thread.</title>
<updated>2016-06-28T10:28:48+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-22T22:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=27cc07721b3c3c2d0b9c8678c8a3ddc7fe96cd97'/>
<id>urn:sha1:27cc07721b3c3c2d0b9c8678c8a3ddc7fe96cd97</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/mpconfig.h: MP_NOINLINE is universally useful, move from unix port.</title>
<updated>2016-06-15T20:52:00+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-06-15T20:52:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0f5bf1aafe0ca073d958f271bd96addc6da8fe10'/>
<id>urn:sha1:0f5bf1aafe0ca073d958f271bd96addc6da8fe10</id>
<content type='text'>
</content>
</entry>
</feed>
