That's basically what modern JS frontend frameworks do as well. I suppose as soon as something becomes too complex, keeping track of all interactions is just too complicated and rerendering the entire world efficiently looks like an easier problem to deal with.
I like the current trend of going back to renderless components as well. This way you separate the state changes from the way it looks like. Feels like each component is a miniature MVC framework with front and a back.
> I suppose as soon as something becomes too complex, keeping track of all interactions is just too complicated and rerendering the entire world efficiently looks like an easier problem to deal with.
In fact, it can actually be less work, since you're coalescing changes into a single update() call rather than sprinkling them across observer callbacks. Also, if your update function starts running too slowly, you can always make it more precise by keeping track of which states have changed internally to the view. For example, if setting the background color takes a long time for whatever reason, you can do something like this:
def View.update():
if self.lightWasTurnedOn != model.lightTurnedOn:
if model.lightTurnedOn:
self.backgroundColor = red
else:
self.backgroundColor = ibmGray
self.lightWasTurnedOn = model.lightTurnedOn
Now backgroundColor will only be set if lightTurnedOn actually changed since the last update.
Google has earned billions thanks to techs like python, and never contributed much to it compared to what it gained.
Then suddenly this.
Now I'm wondering if MS hiring Guido triggered some reaction to not loose control of what is currently one of the most popular language in the world. Or something else I don't know about.
I really want to rejoice. My favorite language gets $ 350k.
Yet I can't help but be suspicious of philanthropy coming from big players. I'm getting cynical and always look for a PR, strategic investments or counter attacks.
The Python Software Foundation ordinarily raises funds via PyCon sponsorship, but PyCon was online last year and this year and who knows about next year, so in-person booths are much less valuable. Therefore, the PSF has been trying to switch to direct sponsorship. Google has been sponsoring PyCon at a high level for a long time.
Also, Google uses Python heavily and employs at least one Python core dev off the top of my head (almost certainly quite a few more), so there are engineers there with a sense of the PSF's finances and enough seniority to influence folks who decide on donations.
That's the most obvious angle to explain this. It's a strategic investment - Google cares about Python and they know the PSF needs money.
They probably get their logo on the python.org website somewhere, and $350k isn't a ton of money. p
The reason is PR. Still, good for the python foundation to have a program that allows it to harvest some of the PR budget out there.
I normally think overanalyzing where organizations spend their money is misguided, but I was surprised that the largest dollar amount on the infographic was spent "strengthening trademarks".
Here's what I found under the details link. Does anyone understand what this actually means?
> One major component of the PSF’s mission is protecting Python-related intellectual property. To strengthen the PSF’s trademarks and copyrights for Python, PyCon, and PyPI, the PSF spent over $198,000 USD in 2019 and $77,000 through October 2020.
Everyone uses Python it is probably the most used language ever.
I think it is really nice that Google gave the organisation some cash.
If Google are trying to buy some goodwill in the developer community it is working.
Not sure what is so "downvotable" about the parent comment. It merely states a calculation result. Is it factually wrong or something? Anyone care to explain? Personally I would have gone further and called it "peanuts" for Google.
If the browser supports JS, maybe you can quickly generate uuid based on the same pattern, load the favicon as data url and with onload, check if it's in cache. This would make it significantly faster.
Not that it makes fast minification (which I don't care that much about, I minify only on deploy, and it's a small % of the time it takes), but it does allow for a very fast workflow in dev mode: auto reload seems almost instant even with heavy transpiling.
I only mention it because I assume people look at this articles and think about their dev process speed as well.
If you haven't, give it a try: it's from the Vue author, so it's really clean, but works with react as well.
Things like httpie, jupyter, etc should be provided as pyz and binaries as well, not just pip installable, but python devs don't do that really often.
It's a shame, because cli tools should be black boxes, people should not have to think about the implementation. I regularly see cli python tools that output stack traces on errors, and it should not happen.
Anyway, if you want those tools to be always around, I really encourage you to grap a usb stick, and put them on there as pyz and binaries. It's always nice to have them at hand.
Here is an example procedure for both (run them in a venv).
For pyz files:
python -m pip install shiv --user # (Yes, I realize how ironic this is).
Then:
python -m shiv httpie -o http.pyz -c http
(download httpie, and creates a http.pyz file that will contains httpie and all it's dependancies, plus code to trigger the http command when called)
This will let you do "python http.pyz" anywhere you have a modern python and enjoy httpie without the need to pip install it.
For an exe (this is an example on linux, the commands are a bit different for windows and mac):
python -m pip install nuitka httpie --user
You need to have a C compiler and python headers around as well (gcc on linux will do, E.G: sudo apt install build-essential python3-dev on ubuntu).
Now you have a nice stand alone AppImage you can call with ./http.bin to be used on any linux system, and not care if Python is installed to play with httpie.
Here are the resulting files (available for 5 days) so you can see what it looks like:
My first attempt, and I get "AttributeError: module 'toml.decoder' has no attribute 'TomlPreserveCommentDecoder'"
So careful, far from stable.
I reported it (https://github.com/frostming/pdm/issues/247) because the project is great and I want it to succeed, but I won't put it in prod any time soon. I prefer my package manager to be stable than fancy.
It's also why I don't use poetry and so on in training. There is always some bug that students will encounter later because there are so many config combinations they can encounter, but recent tools have not been as battle tested as we think: the enterprise world is a wild beast.
True, bugs can't be exposed by a few users. People have vastly different environment setup for their Python development. System python, in-venv, pyenv, asdf, homebrew, etc. So I post it here to seek for help testing.
The sematic versioning may be a bit misleading, it is just because there was a big breaking change to support PEP 621, and I marked it as "Alpha" stage.
The main concern is about intercepting messages between 2 parties or mass exploiting the history stored by the provider.
Sure, for some case, it can be important, but that's a much more difficult and rare threat model to address.