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

Would GIT affect how Python runs across multiple Python processes?

I'm asking because I encountered a weird phenomenon before.

I use a simple Python lib called "schedule" which is to run some tasks periodically (not precise). And I often run a script multiple times (with different arguments) to monitor something say, every 30 seconds. So they're in three separate Python Interpreter processes.

What I've noticed is that while when I initiated them, they were something like 5 seconds apart, they eventually will end up running in sync. Probably not related to GIL at all, but I guess do no harm to ask.


The GIL is per interpreter/process, so this wouldn't be related as far as I know.

The GIL only really kicks in if you use threads in a single process. Then, the GIL will only let one single thread do actual work at a time, and will trade off which thread gets to do work. The other threads can wait on IO stuff (web requests, the file system, etc) but they can't do number crunching or data processing at the same time.

That's a really interesting observation though, I wonder what _is_ causing your separate processes to sync up?


I’ve seen this before! Indeed it has nothing to do with Python or the GIL.

The OS scheduler has to execute M threads on N cpu cores, while also balancing competing priorities like latency and power usage.

Because each separate process uses a naive timer, the timings will drift slowly due to imprecision and small process scheduling delays etc.

After enough drift the timers will sync up by chance (harmonics), at which point OS scheduler incentives can lead the timings to “stick” together seemingly.

This may be a bit tangential, but I find it fascinating that there seems to be a mechanical version of this phenomenon with ancient roots - lookup spontaneous synchronization of pendulums.


Thank you for your insight!

By the way, I asked about it previously on their repo before, if you're interested.

No replies yet though, since the development of the lib isn't very active to begin with.

https://github.com/dbader/schedule/issues/614


He copied OP's idea, not their code AFAIK.


Even if they copied OP's code, depending on the FOSS license it might not be illegal.

As someone who grew up in India, this practice is actually quite common and not exactly frowned up. When you have multiple products that perform similar functions, whoever can sell them the best will gain market dominance.

OP did not pursue the monetization path chosen by his competitor and lost out only on potential income, this might be a good lesson in entrepreneurship and IP management.


I like to file bugs about any software or service I use, too. Just did a quick check, under my current email I have 101 bugs filed for Chromium and 91 for Firefox (which I no longer use extensively, so they're mostly years old). Since I'm more of a power user than dev (I don't work in software or CS field) my "hit rate" isn't as high as the author, but I'm still proud about it.

One unfortunate thing is that browsers are probably one of the only remaining major services/applications (that are not directly developer-oriented) which you can report bugs and actually get some tractions, or even get them fixed.

Try to report a bug about MS Word. Or Spotify. Or Google Maps. I've tried all of them and it's safe to say nothing happens no matter how obvious the bug is or how easy it would be fixed. I don't even know if the "feedbacks" I sent ever reached the developers.

For example, recently Google Sheets has a bug that if you input data in the formula bar (instead of directly in the cell) and then press Enter, it somehow enters the edit mode of the next cell, instead of just highlights it like if you edit in the cell. This is driving me crazy and I've filed multiple feedbacks about it, but I have no hope to see it getting fixed any time soon.


> MS Word. Or Spotify. Or Google Maps

It can't be a coincidence that the three apps you mention are all closed source, while both Firefox and Chromium are (at least nominally) open source.

I'd go further than that and say that it's not just not a coincidence, but that I've had the opposite experience in that the vast majority of user-facing programs I've reported bugs against have gotten better responses than anything I've ever submitted to Firefox. The difference is, of course, that every single program on the computer I'm typing this from right now is libre / open source software.


No, It's not a coincidence.

Unfortunately, majority of "large" user-facing programs or services are not open source.


Software doesn’t have to be open source in order to provide good “customer support” with tracking and responding to issues.

However, most non-source available projects don’t make it possible to publicly track issues at a code level.


I can't reproduce your google sheets bug, it always highlights the next cell for me (not in edit mode) regardless of whether I input data into the formula bar or the cell. Are you sure it's not an extension or something?


Oh God, after reading your post, it suddenly struck me that maybe I should try using a different Google account, even though I don't really have anything special in my main account.

I registered a new account, and voilà, it suddenly worked!

I compared all the options and couldn't find anything that would cause this until I discovered that my main account's Tools > Accessibility Settings had "Turn on screen reader support" enabled, for which I have no idea why.

I turned it back off, and the issue immediately disappeared.

To be fair, I think enabling this accessibility option shouldn't cause such a bug; but for now, I can finally use it again.

Again, thank you for taking the time to test it!


I can reproduce it with Chrome, Firefox, both with no extension.

On three computers.

In case it was not clear, here is the full STR.

1. Click on a cell. 2. Click on the formula bar. 3. Type something, Press enter (you can even directly press Enter).

Expected: the next cell is highlighted but not in edit mode. So you can use arrow keys to move highlight around.

Observed: the next cell is in edit mode; you cannot move arrow around.

To make it worse, sometimes (but not always), if you press enter AGAIN, it would go to the next (the third one) and STILL in edit mode; you need to press enter AGAIN, which makes the highlight move to the fourth cell, only then it properly exists edit mode.

The bug is also reproducible with Esc (cancel change):

1. Click on a cell; 2. Click on the formula bar; 3. Directly press Esc.

Expected: exit edit mode

Observed: you are still in edit mode. You have to press Esc again.

A gif demo: https://i.imgur.com/KV6rRP6.gif


Try to report a bug or request a feature on the LLVM issue tracker. It is like shouting into the void. They have so many open issues GitHub apparently refuses to count them, it just shows "5k+". They have nearly two thousand pull requests waiting for their review. It's insane.


Same here. If anyone can kindly share an invitation, my email address is in my profile.

Edit: got one (two actually), thanks forks!


Send me an email.


In general, I don't find any noticeable performance issues using ubo on Chrome, but again I'm the "install it and forget it" type.

I do encountered a weird specific performance bug that is when cosmetic filtering is enabled, some heavy sites become very lagging, even affecting typing [1][2]. It also happens with other ad blockers. Unfortunately the author was unable to reproduce it.

[1] https://github.com/uBlockOrigin/uBlock-issues/issues/1687

[2] https://bugs.chromium.org/p/chromium/issues/detail?id=129245...


From https://github.com/babel/babel/graphs/contributors it looks that Henry did work on the project heavily after the creator left/went inactive, but stopped being active himself after 2019.

There probably is more, but not going to speculate.


I buy from Amazon purely for 30-day return policy which is quick and painless to process (single click, drop it to UPS store, done. Don't even need printer, tape or box if the original package it still intact.)

Can't say I have the same experience from other ecommerce websites, brand ones or aggregated ones like BB or Newegg.


I don't know. I do like their statement since it's direct and not vague as you said.

However, I've seen multiple times on Internet that a company made an apology which looked fair to me as a bystander, while people who were affected screamed "sorry but not sorry".

I think it makes a big difference emotionally depending on if you're involved or not.


Sure, but at what point does a genuine apology look identical to one that is "fake"., and at what point will people just be unhappy with any response they give? I mean, losing bank access is pretty ridiculous, so it's not exactly uncalled for, but then the response to their message shouldn't be "this is unauthentic" but rather something along the lines of "this does not give me my bank access back" since no response would satisfy them.


My favorite response is the standard: “At [Company] we take [X] very seriously.” Where [X] is what recently catastrophically failed because they didn’t take it seriously at all.


'Sure, but at what point does a genuine apology look identical to one that is "fake"., and at what point will people just be unhappy with any response they give?'

It's about what they're apologising for. For instance, if (hypothetically) they stole everyone's money and spent it all on hookers and blow, then their apology for dropping web access is completely besides the point.

The main problem IMO with fake apologies is that they're a shitty attempt at pretending to be reasonable to those who aren't aware of the situation (and by extension, portraying people who are still mad and ignore the 'apology' as being unreasonable), without actually acknowledging the real problem or committing to fixing it.

AFAICT Simple is giving a genuine apology, btw, I'm just speaking generally here.


Just in case I wasn't clear, I think we both agree that message being unauthentic is a different matter from the incident itself. Just that angry people often can't/wont distinguish the two.

I pointed this out because GP seems to not be affected, so his view won't be obscured by this; but the phenomenon should be noted.


Oh whoops we agree! sorry for making it sound like I disagree lol


Glad someone talked from the employee's angle, that's something I have been wondering for a while too.

I can't even remember the last time being a customer of "local businesses" other than restaurants, and don't see a reason to do so, morally or financially.


Just a heads up, you should use higher quality (or better, just use PNG) for the output.

The default Image.save quality is very low to a point that the JPEG artifact is more prominent than the line art themselves.

L91 @ data.py: image_pil.save(image_path, format='PNG')


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

Search: