When I gave the above title I was warned The question you're asking appears subjective and is likely to be closed. Still I believe this is very much relevant and have posted this. For example a discussion, How many of you have completely switched to Linux ??? and why ? is up and running for over ...
I found a guide somewhere, but unfortunately, somewhere in the middle it says "then just add the widget as you normally would", so it's completely useless
@JorgeCastro "We need to dynamically support SE's as they are added, so that we don't have to update the lens for @scifi or whatever new stack is around" → this works already, the list is updated automatically
It just has every single one of them; downloads the list on startup
Oh right, before I forget this again: @KenVanDine if I want to add files to the lens, is it enough to add them to the MANIFEST and setup.py, or do you have to change the packaging branch?
I've just written this little server thing as an exercise, the idea was to build a web-server that serves PNG images from base64 encoded LaTex in the url, and it works so that you can add another server when ever you want, with automatic load balancing. I.e. Buy a box, copy a script, run it and add it's IP address to the load balancers config. I could get 50 of them running before noticing any sort of slow-down, on this rather old laptop
this is what I came up with from reading the docs, no idea if it's correct
hang on....
I've implemented a web-server from TCPServer(), not at all what you want. Sorry :-)
@GeorgeEdison I think this is the relevant part:
> For example, for the request method SPAM, the do_SPAM() method will be called with no arguments. All of the relevant information is stored in instance variables of the handler.
If you have a thread that reads gigabytes of data from the hard disk, it will probably release the GIL and work in the background like it should, but if you have two threads calculating primes, only one at a time will execute
You can get round this by using a multiprocessing.Process instead of a threading.Thread, they even have the same API. Or in this case, the ForkingMixIn rather than ThreadingMixIn
You can also use Jython instead of CPython. Jython gives you 'real' threads
If your threads are computationally intensive, you can get something called thrashing, this is when the interpreter starts context-switching so much that barely any work gets done. It happens rather quickly. But on the other hand, processes are heavy and take a few milliseconds to create. So use them only when you have no choice.
@GeorgeEdison you have a bunch of choices, you can use threading.Lock or threading.RLock, you can use Linux's locks with fcntl.lockf(), or you can write your own
@GeorgeEdison Assuming the request takes some amount of calculation to return something, yes. The whole interpreter is locked when ever you do anything on the CPU (pretty much)
Also, python plays very nicely with C and C++. When you encounter something that's better done in C++, you can do that as well. Just import your C++ module like you would any other module.
I should have stuck with Python years ago when I started programming as a hobby :P
I started with Python, then went to C, then C++ - studied C++ at college (was bored) - and now I'm back to considering Python and I feel like a noob :P
Well, if you take some time, it shouldn't be too difficult for you to learn python. Python is very very similar to C, so you know most of it already. Just have to learn the syntax and stdlib
oh wow, this has b-rated all over it... Alien vs Ninja - When a strange fireball crashes near their village, a mighty ninja clan goes to investigate and winds up in serious danger. Flanked by lightning-quick alien creatures, the ninjas struggle to find their enemies' weakness before they're all killed.