3 ms·
I read this as "embeds anywhere." The context is an analogy to Common Lisp versus Scheme. Common Lisp was a massive programming system. Scheme is simple enough
by murgindrag 6y ago
I read this as "embeds anywhere."
The context is an analogy to Common Lisp versus Scheme. Common Lisp was a massive programming system. Scheme is simple enough that one could embed into anything, and many systems did just that.
I don't think you'd use Pycopy to write a desktop or cloud application (CPython would be the tool for that). You would add it to an existing desktop application to e.g. allow it to be scripted.
Disclaimer: I'm intentionally muddling languages, implementations, etc. to keep this at six understandable sentences, rather than an essay. Yes, I'm aware that emacs used Common Lisp for scripting, that MIT Scheme is super-high performance, and so on. That's not the point of this post.
- stinos 6y agoI read this as "embeds anywhere. ... I don't think you'd use Pycopy to write a desktop application That's pretty much it in my opinion. There's a huge difference in available libraries. Yet for simple things and special cases there still might be reasons to choose MicroPython over CPython even on desktop platforms. CPython startup time is a multiple of MicroPython startup time for instance (ok, not a lot of chance that matters, but you never know) and some things are more performant (but others arent; due to optimizing for size). I initially got to know it when looking for an embeddable scripting language working on unix/windows and intime which is a real-time extension for Windows, and of all major and less major implementations I checked MicroPython was the only one which only needed a small amount of extra code to make it compile, because it was written from the start with the idea to use C99 and make no assumptions about availability of libraries. CPython on the other hand was pretty messy (and LUA, and ...) E.g. if CPython sees an msvc compiler it automatically assumes it's running on Windows and has access to the complete CRT. Of which intime is the prime example where that is not the case. So, not easy to workaround and moreover it assumes e.g. it has registry access and that's not something which can be disabled with PP directives. And so on. I'm not really blaming anyone for that, makes sense from a certain point of view, but it's not too ideal. MicroPython on the other hand has like a hundred PP directives making a lot of features configurable, even language features so it can be made really minimal. Also MicroPython's source code overall is really nicely written, very readable, again in contradiction to some of CPython's source I've seen. And some parts like interpreter and compiler are pretty genius.
- pfalcon 6y ago> I don't think you'd use Pycopy to write a desktop or cloud application Believe it or not, but that's one of the messages the Pycopy project tries to convey: Software can be simple. And understandable. And you really can write a useful (at least to yourself) application which can run both on your desktop, on your router with 2MB memory, on a microcontroller board, or in a cloud. Some more info about this "human-scale computing" idea is here: https://www.blog.pythonlibrary.org/2020/02/10/pydev-of-the-week-paul-sokolovsky/ https://www.blog.pythonlibrary.org/2020/02/10/pydev-of-the-w... .