<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py, branch 6.0.0-alpha.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.0-alpha.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.0.0-alpha.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-08-26T02:01:33+00:00</updated>
<entry>
<title>Merge pull request #3318 from jepler/interrupt-serial-rx</title>
<updated>2020-08-26T02:01:33+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jeff@adafruit.com</email>
</author>
<published>2020-08-26T02:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2e0a10933116e69d6dacc67d3180ea52ca32509d'/>
<id>urn:sha1:2e0a10933116e69d6dacc67d3180ea52ca32509d</id>
<content type='text'>
supervisor: check for interrupt during rx_chr</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>Split pulseio.PWMOut into pwmio</title>
<updated>2020-08-18T20:08:33+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-08-18T20:08:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6857f984269149b46d1cd4283506420f341b2601'/>
<id>urn:sha1:6857f984269149b46d1cd4283506420f341b2601</id>
<content type='text'>
This gives us better granularity when implementing new ports because
PWMOut is commonly implemented before PulseIn and PulseOut.

Fixes #3211
</content>
</entry>
<entry>
<title>Merge pull request #3295 from tannewt/turn_off_terminalio</title>
<updated>2020-08-18T19:10:31+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@adafruit.com</email>
</author>
<published>2020-08-18T19:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=24ca5c021879221b8935d643c9942515902d6bed'/>
<id>urn:sha1:24ca5c021879221b8935d643c9942515902d6bed</id>
<content type='text'>
Turn off terminalio for ja and ko</content>
</entry>
<entry>
<title>Calculate the Huffman codebook without MP_QSTRs</title>
<updated>2020-08-18T14:21:14+00:00</updated>
<author>
<name>Taku Fukada</name>
<email>naninunenor@gmail.com</email>
</author>
<published>2020-08-18T14:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=79a3796b1cd74b376e091e63c1b3a2426ec3187c'/>
<id>urn:sha1:79a3796b1cd74b376e091e63c1b3a2426ec3187c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Turn off terminalio for ja and ko</title>
<updated>2020-08-18T00:17:59+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2020-08-18T00:17:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d01f5dc0bdb3ea98d4cf234b7c08c8cc36694c1a'/>
<id>urn:sha1:d01f5dc0bdb3ea98d4cf234b7c08c8cc36694c1a</id>
<content type='text'>
The font is missing many characters and the build needs the space.
We can optimize font storage when we get a good font.

The serial output will work as usual.
</content>
</entry>
<entry>
<title>makeqstrdata: don't print "compression incrased length" messages</title>
<updated>2020-08-17T01:50:48+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-17T01:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=08ed09acc6c73bae5475735e6e39b10ccd951d36'/>
<id>urn:sha1:08ed09acc6c73bae5475735e6e39b10ccd951d36</id>
<content type='text'>
This check as implemented is misleading, because it compares the
compressed size in bytes (including the length indication) with the source
string length in Unicode code points.  For English this is approximately
fair, but for Japanese this is quite unfair and produces an excess of
"increased length" messages.

This message might have existed for one of two reasons:
 * to alert to an improperly function huffman compression
 * to call attention to a need for a "string is stored uncompressed" case
We know by now that the huffman compression is functioning as designed and
effective in general.

Just to be on the safe side, I did some back-of-the-envelope estimates.
I considered these three replacements for "the true source string size, in bytes":
+    decompressed_len_utf8 = len(decompressed.encode('utf-8'))
+    decompressed_len_utf16 = len(decompressed.encode('utf-16be'))
+    decompressed_len_bitsize = ((1+len(decompressed)) * math.ceil(math.log(1+len(values), 2)) + 7) // 8

The third counts how many bits each character requires (fewer than 128
characters in the source character set = 7, fewer than 256 = 8, fewer than 512
= 9, etc, adding a string-terminating value) and is in some way representative
of the best way we would be able to store "uncompressed strings".  The Japanese
translation (largest as of writing) has just a few strings which increase by
this metric.  However, the amount of loss due to expansion in those cases is
outweighed by the cost of adding 1 bit per string to indicate whether it's
compressed or not.  For instance, in the BOARD=trinket_m0 TRANSLATION=ja build
the loss is 47 bytes over 300 strings.  Adding 1 bit to each of 300 strings will
cost about 37 bytes, leaving just 5 Thumb instructions to implement the code to
check and decode "uncompressed" strings in order to break even.
</content>
</entry>
<entry>
<title>Don't define SHARPDISPLAY when !DISPLAYIO</title>
<updated>2020-08-12T12:39:28+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-12T12:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cff448205f165dfd5ec40cc5b336decff045d4cd'/>
<id>urn:sha1:cff448205f165dfd5ec40cc5b336decff045d4cd</id>
<content type='text'>
.. even if FULL_BUILD
</content>
</entry>
<entry>
<title>sharpmemory: Implement support for Sharp Memory Displays in framebufferio</title>
<updated>2020-08-12T12:32:18+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-06T21:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c1400bae9bbdd55f650ddfe24edf6778f08c35b8'/>
<id>urn:sha1:c1400bae9bbdd55f650ddfe24edf6778f08c35b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>"pop from empty %q"</title>
<updated>2020-08-04T23:42:09+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2020-08-04T23:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93b373d617ff7a99eb936628d50d954f5db53f43'/>
<id>urn:sha1:93b373d617ff7a99eb936628d50d954f5db53f43</id>
<content type='text'>
Saves 12 bytes code on trinket m0
</content>
</entry>
</feed>
