Login
You're viewing the dmv.community public feed.
  • Sep 22, 2026, 3:51 AM

    Hmm, I was gonna use C++, but should I code my low-power embedded project with micropython?

    No. No, I should not.

    Good lord, Python sucks.

    "It's good for learning."

    No, *BASIC* is good for learning, Python is good for... um... things that are slightly too complex for a shell script?

    Math? No, use R or Octave.

    Can anyone explain what Python is good for that something else isn't *significantly* better for? Maybe it could be good as a replacement for Javascript?

    #Programming #Python

    💬 1🔄 0⭐ 0

Replies

  • Sep 22, 2026, 3:57 AM

    @StarkRG Having a massive community? It's amazing how many choices to use a less-great product are dictated by the fact that one would have zero problem finding help.

    This still doesn't explain Perl, of course...

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:05 AM

    @jpaskaruk I guess that's valid. Still, doesn't C++ have at least as big a community? It's not a centralised community, granted, but then centralisation is generally a bad thing.

    My "shortcut" is going to be using Arduino libraries, at least for the mock-up. I suspect that it'll be good enough to get the low power operation I want. (It's a thermostat so I'm gonna try running it off a super capacitor that'll be trickle charged off the thermostat wires coming from the heater)

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:11 AM

    @StarkRG That is a cool idea. I think Arduino & C++ is your best bet also, or possibly an ESP? I think there's some newish versions that are designed specifically to run on ulta-low power... but it's foggy. Either way, you're gonna get more for your electrons with C++ I think.

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:18 AM

    @jpaskaruk Yeah, it's an ESP-32, I'm just using the Arduino IDE and libraries. I was gonna go for the full espressif IDE (based on Eclipse), but the Arduino libraries have good documentation and it wouldn't take much to rewrite it without the Arduino hand-holding. Apparently the C3 version has the lowest power draw in sleep of all the hobbyist-oriented MCUs as well as the best compute-per-watt, but I don't have any of those so it'll be an S2 for now. Again, should be easy to adapt if I change it

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:23 AM

    @StarkRG I think, though, that Python probably has a much larger community of active users with a "deep" understanding of the language, owing to the fact that Python is just that much easier to learn, and therefore, will have that many more users.

    "Deep" in quotes cause the whole point of Python is to not make you think too deeply at first, or ever, if you don't want to. C/C++ you need to do some understanding in order to make good use of em.

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:29 AM

    @jpaskaruk I've dipped my toe into python. I wrote a script to plot a bunch of data points (I ended up learning R to do all the heavy lifting and just used python to generate the visual). My experience was less than stellar. I know there's no accounting for taste and all, but it just really didn't feel all that friendly to me. I kept thinking that I should be learning something else instead. Like maybe Rust.

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:33 AM

    @StarkRG I used it on a job, had learned it via an online course for a lark, and then found myself running ragged chasing crashed blade servers, but aware that I had two Python APIs and a way to kick them via SSH, and after a bit of very basic scripting, suddenly I had hours and hours of free time, in which I built out some web UI tooling to allow others to manage those blades with ease.

    For the right jobs, it's just extremely useful. I feel like I should mention Perl again here for some reason. 😜

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:39 AM

    @jpaskaruk Yeah, Perl sucks too. It's definitely an unfriendly language, but I think, based on my limited experience of both, I'd still choose Perl over Python. I probably remember more Python than I do Perl, but I don't remember getting quite as frustrated at it (which is different from the normal frustrations involved with coding, it's like when a game has a terrible interface and you feel like you're fighting the controls more than playing the game).

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 5:55 AM

    @StarkRG I have once or twice looked at Perl, but never actually used it lol

    BUT, I grew up with an uncle who "did computers" and had a roomful of em in the 80s, gave me my first 1200 baud modem when that cost a fair amount still, I just noticed it on his shelf, unused, and he could clearly see that I was dazzled, and just sent me on home with it. And I remember him going off about Perl, while also openly admitting to using it. Hanging out with him I was around people from the local U, but I was far too ADHD'd and my family took too long to buy me a computer, to take advantage of that privilege, at the time.

    So I have grown up with an impression of it as kinda like programmer's duct tape, cause everyone else talks about it like he does, like the ancient jackknife you prefer to use for making kindling, even though it's mostly dull af, because it was handed to you by a departed ancestor...

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 7:33 AM

    @jpaskaruk I learned it around the late 90s/early 2000s because it was "the thing" for doing server-side scripting. As it turned out, though, you could use literally any executable, not just scripts, as long as it could take HTTP POSTs as input and produce HTML (or, really, anything the browser can understand, like images) as output. Then PHP came around and was significantly easier to deal with. At least until that ballooned into an unmanageable mess.

    💬 0🔄 0⭐ 0
  • Sep 22, 2026, 4:29 AM

    @StarkRG Is this a real request, or just complaining? I mean, from the tone of your post it kind of sounds like you're not going to accept any answer you might get. (Which is fine; it just means a lot of the people who might otherwise give you a real answer, like me, will pass this one by.)

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 4:35 AM

    @diazona A bit of both, I guess.

    *I* can't see a reason for me to learn more of it than I have, but that doesn't mean there isn't one. Maybe I'll one day find myself in a position where knowing where Python excels will make me choose it over something else. As it stands, I'm more likely to devote time into learning Rust than more Python. *But* it would also be nice to know enough python to be able to modify the many, *many* projects that use it. (like Klipper, the 3D printing software)

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 6:59 AM

    @StarkRG Honestly, as someone who does a ton of work in Python and enjoys it, I'd readily admit that maybe you don't have a good reason to learn it. It probably depends on just how much you want to modify software written in Python; if that's not currently a motivation you find compelling, then I'm pretty sure you have better things to do with your time. As long as you're not out there deciding on other people's behalf that Python sucks *for them*, it's all good.

    If you want, I'd be happy to share some of the things *I* like about Python. My guess is they're not really going to change your mind, since I suspect we have different approaches to programming and different preferences, but that's okay.

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 7:21 AM

    @diazona Sure, hit me with it, maybe there'll be something that entices me. Doing something because it's what everyone else is doing was pretty well drilled out of me in school (though I suspect I'd have ended up with that opinion anyway). So, while I would like to be able to interact with projects using python, that alone isn't enough of a motivation. It needs to be something specific about the language, not the people using it.

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 7:22 AM

    @diazona And I'm definitely not telling anyone else not to use it, even though I'd definitely appreciate it if they didn't so I could participate. Or, at least, that they don't dismiss my ideas because I'm not fluent in python and can't implement it myself. Like, there's a 3D printing project (won't name names) that doesn't officially support my kind of printer (with a circular print bed), and it was kind of working until they rewrote it and hard coded it to only support rectangular beds.

    (2/3)

    💬 0🔄 0⭐ 0
  • Sep 22, 2026, 7:24 AM

    @diazona I looked over the code and figured out roughly what needed to be added and where. The reply was something along the lines of "thank you for the thorough feature request, but we can't test it because none of us have round beds." I even offered to be the test subject, but got nothing. So either I need to learn python, then get familiar with their code base, both things they already know, and do it all myself, or I'm completely out of luck.

    (3/4)

    💬 0🔄 0⭐ 0
  • Sep 22, 2026, 7:24 AM

    @diazona Round beds are implemented as square, and then just ignore everything that's not in the circle. That's all they needed to do.

    (4/4) (whoops, that got away from me a bit 😂)

    💬 0🔄 0⭐ 0
  • Sep 22, 2026, 7:48 AM

    @StarkRG 😂 haha relatable. Sorry about that experience. I know sometimes open-source maintainers can be kind of brusque, but I also understand the perspective of being asked to fix something on a platform you don't have access to, and sometimes it really just isn't feasible, as unfortunate as that is.

    💬 1🔄 0⭐ 0
  • Sep 22, 2026, 7:48 AM

    @StarkRG Anyway, back to the topic at hand: I think one of the main things I like about Python is its flexibility and "scalability", in the sense that the complexity of writing a program scales well with the complexity of the program. For simple scripts you don't even need functions, you can just write loops and if statements and print()s in a file and run it and it does the thing. But then when you need functions, you have them; when you need objects, you have them; when you need threads, you have them; when you need project metadata and test runners and third-party packages and all that stuff, they're there. That means beginners don't have to deal with Java-like boilerplate or complex project setup, but advanced users still have access to the advanced features they want - not necessarily perfect, but certainly good enough to write a lot of useful programs in.

    Another thing that I like is the package registry (PyPI) and the package distribution system in general. Once one learns a few basic things about how to use virtual environments, any random functionality you want is pretty much a `pip install` away. And that includes bindings to other languages, which often makes up for the fact that Python itself is not very fast. There are a ton of packages that implement something computationally intensive in C or Rust or whatever and wrap it in a layer of Python to make it easy to use interactively.

    I should also mention to be fair that a lot of useful stuff is included in Python's standard library, and sometimes as relatively high-level abstractions which are reasonably easy to use. So there's a lot of stuff you can do in Python without ever having to use an external package.

    And another thing I've come to appreciate more recently is that the Python has learned pretty well (IMO) how to maintain and evolve the language. Everything is defined by standards, and there are clear processes for modifying the standards. So things about the language generally don't change, at least not in any drastic way, and when they do change, you can be fairly confident that the change has been "audited" and often tested by a lot of people. It gives a pretty good sense of stability - certainly not unique among languages, but relatively speaking, there are not that many programming language communities with this level of maturity.

    (All just my personal opinion, of course)

    #Python

    💬 0🔄 0⭐ 0