<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/obj.c, branch 6.1.0-beta.2</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.0-beta.2</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.0-beta.2'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-11-19T22:18:52+00:00</updated>
<entry>
<title>Always use preprocessor for MICROPY_ERROR_REPORTING</title>
<updated>2020-11-19T22:18:52+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-11-19T22:18:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b2b8520880e9d458adbd279a34b831f8d6b68d40'/>
<id>urn:sha1:b2b8520880e9d458adbd279a34b831f8d6b68d40</id>
<content type='text'>
This ensures that only the translate("") alternative that will be used
is seen after preprocessing.  Improves the quality of the Huffman encoding
and reduces binary size slightly.

Also makes one "enhanced" error message only occur when ERROR_REPORTING_DETAILED:
Instead of the word-for-word python3 error message
"Type object has no attribute '%q'", the message will be
"'type' object has no attribute '%q'".  Also reduces binary size.
(that's rolled into this commit as it was right next to a change to
use the preprocessor for MICROPY_ERROR_REPORTING)

Note that the odd semicolon after "value_error:" in parsenum.c is necessary
due to a detail of the C grammar, in which a declaration cannot follow
a label directly.
</content>
</entry>
<entry>
<title>Prevent exceptions from accumulating in REPL</title>
<updated>2020-11-16T16:36:05+00:00</updated>
<author>
<name>root</name>
<email>siehputz@gmail.com</email>
</author>
<published>2020-11-16T16:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0cd951fb73198f5c3dd03ea0463382edac0d3d4d'/>
<id>urn:sha1:0cd951fb73198f5c3dd03ea0463382edac0d3d4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mp_obj_print_helper: Handle a ctrl-c that comes in during printing</title>
<updated>2020-08-25T16:47:50+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@unpythonic.net</email>
</author>
<published>2020-08-25T16:46:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c0753c1afb09dab873da02e6f98a492cb913f0e9'/>
<id>urn:sha1:c0753c1afb09dab873da02e6f98a492cb913f0e9</id>
<content type='text'>
In #2689, hitting ctrl-c during the printing of an object with a lot of sub-objects could cause the screen to stop updating (without showing a KeyboardInterrupt).  This makes the printing of such objects acutally interruptable, and also correctly handles the KeyboardInterrupt:

```
&gt;&gt;&gt; l = ["a" * 100] * 200
&gt;&gt;&gt; l
['aaaaaaaaaaaaaaaaaaaaaa...aaaaaaaaaaa', Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
KeyboardInterrupt:
&gt;&gt;&gt;
```
</content>
</entry>
<entry>
<title>py: mp_obj_get_type_qstr as macro saves 24 bytes</title>
<updated>2020-08-04T19:45:45+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-04T19:05:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=65e26f4a068129662c9793fd070530a35cc568b1'/>
<id>urn:sha1:65e26f4a068129662c9793fd070530a35cc568b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Combine some "can't convert" messages</title>
<updated>2020-08-04T19:45:45+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-04T16:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=024c8da57869b2aa49004f091520aaf5dacb26e6'/>
<id>urn:sha1:024c8da57869b2aa49004f091520aaf5dacb26e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>various: Use mp_obj_get_type_qstr more widely</title>
<updated>2020-08-04T19:45:45+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-04T16:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=89797fd3f9d36cd7e2e7a125dbbe02f598874060'/>
<id>urn:sha1:89797fd3f9d36cd7e2e7a125dbbe02f598874060</id>
<content type='text'>
This removes runtime allocations of the cstring version of the qstring.

It is not a size improvement
</content>
</entry>
<entry>
<title>Use qstrs to save an additional 4 bytes</title>
<updated>2020-08-04T19:45:45+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-04T15:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c37a25f0e5d1c877909855f6a3294e43b854bbbd'/>
<id>urn:sha1:c37a25f0e5d1c877909855f6a3294e43b854bbbd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Combine similar strings to reduce size of translations</title>
<updated>2020-08-04T18:34:29+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-01T17:14:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dddd25a776fb0d9c002c1b6b039e24bb3048e6ff'/>
<id>urn:sha1:dddd25a776fb0d9c002c1b6b039e24bb3048e6ff</id>
<content type='text'>
This is a slight trade-off with code size, in places where a "_varg"
mp_raise variant is now used.  The net savings on trinket_m0 is
just 32 bytes.

It also means that the translation will include the original English
text, and cannot be translated.  These are usually names of Python
types such as int, set, or dict or special values such as "inf" or
"Nan".
</content>
</entry>
<entry>
<title>Add license to some obvious files.</title>
<updated>2020-07-06T18:16:25+00:00</updated>
<author>
<name>Diego Elio Pettenò</name>
<email>flameeyes@flameeyes.com</email>
</author>
<published>2020-06-03T22:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=34b4993d63a6b576f29d624385c681f679b4124c'/>
<id>urn:sha1:34b4993d63a6b576f29d624385c681f679b4124c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>string compression: save a few bits per string</title>
<updated>2020-05-28T13:36:08+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-05-28T12:40:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=fe3e8d1589e54de999cccc775f269a39443c82d6'/>
<id>urn:sha1:fe3e8d1589e54de999cccc775f269a39443c82d6</id>
<content type='text'>
Length was stored as a 16-bit number always.  Most translations have
a max length far less.  For example, US English translation lengths
always fit in just 8 bits.  probably all languages fit in 9 bits.

This also has the side effect of reducing the alignment of
compressed_string_t from 2 bytes to 1.

testing performed: ran in german and english on pyruler, printed messages
looked right.

Firmware size, en_US
Before: 3044 bytes free in flash
After: 3408 bytes free in flash

Firmware size, de_DE (with #2967 merged to restore translations)
Before: 1236 bytes free in flash
After: 1600 bytes free in flash
</content>
</entry>
</feed>
