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

I discovered a similar trick few years ago: https://stackoverflow.com/questions/35660899/reduce-memory-f...

The idea is to tweak when `mmap` or `malloc` are used by the Python interpreter. One allows memory to be released to the OS right away, whereas the other is not.

It is a useful trick if your application is generating lots of small objects.


Keep in mind that’s from Python 2.5. Modern Python uses arenas that always use mmap.


I developed that tweak for Python 2.7 and I am running in production with Python 3.6. I tested with later Python versions, too.

Do you have some pointers about arenas always using mmap? I'd like to know how that trick can work if that was the case.


It doesn't work, that's their point. With modern python versions those env variables do next to nothing. It won't crash your python but it also won't help you.


My point is that it does work. I tested with Python 2.7 and Python 3.6+.


That's a neat trick and even simpler than what I wrote about.


Chessbrah is also a very fun channel. https://www.youtube.com/user/chessbrah


Because underwater there is less oxygen, less light and nice fine muddy floors.


To watch Netflix for instance.


Netflix is able to detect you're using a VPN, and advices to switch back to enjoy its services, I'm sure. At least I got that alert recently. So is there another bypass?


Just throwing it out there - are you sure there isn't a session cookie tied to your login still on your machine? Or, am I completely wrong and you're just limited to the country's offerings by your location on registration?


they block known vpn and vps ip spaces, it's been a cat and mouse game for the past few years between vpn providers and netflix

currently working providers can be usually found on /r/NetflixByProxy/


You're not limited by registration. I've travelled and found that I had a different library in different countries.


Can they detect I'm using bittorrent?


I didn't realize people had ripped Netflix original content.


Everything on Netflix is available on Bittorrent.


i get your point, but connecting to a random country won't be of much help though.


> Automatically connect you to a random VPN in a country of your choice.

Country wouldn't be random in this case


You choose the country, it just selects a random VPN within that country.


You can choose the country by passing -c argument.

Example: easyvpn -c JP


oh, my bad, didn't notice that


What's up with those latency numbers? Seem huge to me.


Who measures average latency? Nearly meaningless.


I'm curious. Why is it meaningless? What would you measure?


You almost never want to use average as your metric when dealing with time. For time, the 95 or 99 percentile latency is going to be measure of how many requests out of a hundred a less than your metric. Esp when the thing you are measuring is a piece of larger system, which is the crux, because of how a resource in turn requests k-more resources. Each request has an equal chance of being over the latency percentile. Even at 10 requests, only 90% of sessions will be under the 99% latency.

See also, Gil Tene https://www.youtube.com/watch?v=lJ8ydIuPFeU

A nice overview, http://bravenewgeek.com/everything-you-know-about-latency-is...

See also, http://highscalability.com/blog/2015/10/5/your-load-generato...



Actually, one could argue that something is "artistic" if it has the unique property that nobody at all finds it "artistic"...

I recommend the works by Arthur Danto (https://en.wikipedia.org/wiki/Arthur_Danto) for very interesting definitions of "art".


Actually, "cogito ergo sum" comes from "Discourse on the Method".



Yeah, I would agree that head, as it is, looks like a mistake. Instead of:

  head :: [a] -> a
I would code it as:

  head :: [a] -> Maybe a
returning Nothing for empty lists. Same applies to tail.

But others have very good reasons to disagree: http://stackoverflow.com/questions/6364409/why-does-haskells...


I don't see that answer arguing that `safeHead` is bad. Russell O'Connor just seems to be arguing that it'd not be possible for `head :: [a] -> a` to have a sentinel value `uhOh :: forall a . a` which you could pattern match on when `head []` is called... but `safeHead :: [a] -> Maybe a` is just fine since it has a different free theorem.

In the comments on Real World Haskell people (Alex Stangl and Paul Johnson in particular) are talking about added complexity of deferring invariant errors, but since these are type-declared via `Maybe` it really helps to add safety. I personally have written many, many functions with partial types because I had forgotten about some assumed invariants and had them fixed by use of `safeHead`.

NonEmptyList is pretty good for pre-handling all of the failure modes.


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

Search: