Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

I don't think most users expect their chat app to be protected if the police seize their phone.

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.


Love this app. Recently, it became less and less usable, with deal breaker bugs like mails not sending reliably or at all.

So I'm going to donate, because this app is fantastic and I really want it to keep existing.


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.


It's probably "now" because it's the sponsorship program got revamped, see https://www.python.org/psf/sponsorship-new/

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.


Right. It's a good thing for the psf and it doesn't look like there a string attached.


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.


It's probably mostly money paid to lawyers (to do various legal tasks associated with maintaining the trademarks).


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.


They earned billions and gave $350k? Actually it says $150k for Visionary.

If it was 2 billion then they contributed less than 1/500th of what they received.


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.


Currently you have 2 options:

- https://beeware.org/

- https://kivy.org/

I doubt Google is going to sponsor any though.


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.


Great idea but favicons used in meta-tags does not support the onload event! I've found a workaround for this but it's only working in chrome. ~jonas


Some httpie tricks:

Use --offline to see the request but not perform it:

    http --offline get google.com
    GET   / HTTP/1.1
    Accept: application/json, */*;q=0.5
    Accept-Encoding: gzip, deflate
    Connection: keep-alive
    Content-Length: 5
    Content-Type: application/json
    Host: google.com
    User-Agent: HTTPie/2.4.0
Pipe stuff to httpie to put it in the payload:

    echo "Hello HN" | http --offline get google.com
    GET / HTTP/1.1
    Accept: application/json, */*;q=0.5
    Accept-Encoding: gzip, deflate
    Connection: keep-alive
    Content-Length: 13
    Content-Type: application/json
    Host: google.com
    User-Agent: HTTPie/2.4.0

    Hello HN
And use http-prompt, because it's awesome: https://github.com/httpie/http-prompt


Not exactly apples to apples, but I'd like to plug in Vite: https://github.com/vitejs/vite

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.


From a first look this seems very similar to Snowpack. I'll have to check it out more to see how they actually compare.


> auto reload seems almost instant even with heavy transpiling

Because transpilation is done by esbuild


It's really a matter of culture.

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).

Then:

    python -m nuitka $(which http) --onefile --linux-onefile-icon /usr/share/pixmaps/python3.xpm --follow-imports    --assume-yes-for-downloads

Wait quite a bit.

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:

https://drop.chapril.org/download/a335a8e92f98ee02/#fHC1SvOw...


Is this better than using pex?


Pyz works with windows but not pex.

Nuitka produces a standalone exe so no need to install python.


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.


> So careful, far from stable.

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.


I have a lot of respect for the way you react to this comment, and how quickly you fixed the bug.

Thank you for working on such a useful project, and so seriously.

I immediately encountered a second different error, and I'll also take the time to craft a good bug report for it.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: