4 ms·
That's what I was thinking. Nevermind not having things like bit shifting, python can't even run on most micros, because there's no interpreter for them. Micro-
by r_smart 10y ago
That's what I was thinking. Nevermind not having things like bit shifting, python can't even run on most micros, because there's no interpreter for them. Micro-python is a thing that exists, but hasn't expanded yet and is probably a long way off.
Honestly, if we're talking about replacing C / C++, it would seem we should be comparing them to Rust or something, not a language whose use model isn't really intended for embedded systems.
I love Python, but this just doesn't seem like the place for it.
And by embedded, he probably meant Raspberry Pis running Debian or something like that.
- gtaylor 10y agoPython does have bit shifting, for what it's worth.
- r_smart 10y agoHmmmm...I don't remember what I was thinking then. I remember wanting to use something more typically low level, like bit shifting, and it either being way too much hassle or not supported. Either way, thanks for the correction.
- knicholes 10y ago>>> 1 << 4 16
- chocolatebunny 10y agoThe big problem I've had with Python and bit shifting has just been dealing with negative numbers. Python doesn't have a concept of unsigned ints, or even just 32bit numbers so I end up having to mask everything by 0xFFFFFFFF. Not really a big deal but maybe that's the issue you were running into?
- r_smart 10y agoThat sounds like it might have been the case. I probably got annoyed and just did it a different way. I'm not really sure though. It's one of those things where it happened awhile ago and made an impression on me, but the details have long since faded, leaving only my opinion :)
- stinos 10y agoit's written just micropython without the dash and is actually quite close to having all python3 syntax implemented https://github.com/micropython/micropython/ https://github.com/micropython/micropython/
- r_smart 10y agoThanks for the link. Cool to see that they're making progress getting it going on ARM.