Search found 96 matches

by martincho
Wed Jun 29, 2022 6:57 pm
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 25657

Re: bits to bytes

Well, ASR33. OK, you win. I did use teletypes at university for a very short time (maybe one term). I remember a really interesting one that used spark discharge to print on the paper (how many people know that, at some point in time, terminals actually used paper and did not have a display?). It us...
by martincho
Wed Jun 29, 2022 2:53 am
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 25657

Re: bits to bytes

I can appreciate that. I go back to real VT-100 terminals. I get it.
by martincho
Tue Jun 28, 2022 4:34 pm
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 25657

Re: bits to bytes

So no easy way to get b'40 80' ? Seems to me python is being as slippery with octal/hex here as it sometimes is with types? When debugging I always do something like this: [hex(n) for n in bytes_or_bytearray_variable] <Rant mode on> I can't stand some aspects of the Python bytes and bytearray imple...
by martincho
Mon Jun 27, 2022 7:14 pm
Forum: General Discussion and Questions
Topic: Any zlib.DecompIO examples?
Replies: 1
Views: 974

Re: Any zlib.DecompIO examples?

Well, it was easier than I thought. Here is it for the benefit of others who might need to figure this out: import zlib compressed_text = b'\xf3LS\xa8\xcc/U\xc8*-.Q(O\xcc+Q(\xc9W(JMLQ\xc8/R(/\xca,IUHTH\xcb\xccI\x05\x00' uncompressed_text = b'If you just want to read or write a file' # Create file wi...
by martincho
Mon Jun 27, 2022 5:18 pm
Forum: General Discussion and Questions
Topic: Any zlib.DecompIO examples?
Replies: 1
Views: 974

Any zlib.DecompIO examples?

Trying to understand various ways to use this class. Anyone know of any nice examples out there? Google has failed me. One of the things I am trying to figure out is how to decompress a large compressed chunk of data without using very large buffers. I can seek to the compressed data in the file...a...
by martincho
Wed Jun 22, 2022 6:19 pm
Forum: Development of MicroPython
Topic: Access to UART ring buffers
Replies: 4
Views: 28619

Re: Access to UART ring buffers

Just putting a byte into the ringbuffer does not mean it will be sent. Unless sending is already active, the send process has to be initiated. So what you need is a lightweight version of uart_write(). That has as well to cater for the case that the ringbuffer is full. True. That's pretty much what...
by martincho
Wed Jun 22, 2022 7:36 am
Forum: Development of MicroPython
Topic: Access to UART ring buffers
Replies: 4
Views: 28619

Re: Access to UART ring buffers

But... this sounds like it would be a lot easier to fix in machine_uart.c (i.e. add a helper method that does what you need). I think this is likely where I am headed. It will be a couple of months before I can take this path though. My preference would be to try and contribute something potentiall...
by martincho
Mon Jun 20, 2022 8:39 am
Forum: General Discussion and Questions
Topic: How does _SOME_CONSTANT = const(2) work in a class?
Replies: 4
Views: 1189

Re: How does _SOME_CONSTANT = const(2) work in a class?

I get it. It's just that "unclean" feeling of not having everything inside the class definition. Not an issue at all.
by martincho
Mon Jun 20, 2022 8:35 am
Forum: General Discussion and Questions
Topic: Is this a bug or a feature?
Replies: 5
Views: 3708

Re: Is this a bug or a feature?

I thought I reported it on github. The last few weeks have been a blur. I'll put it back on my list.

Thanks.