Better HN
topnewbestaskshowjobs
Log inSign up

slashdev

17,493 karma · joined May 14, 2013 (13y ago) · 5,497 submissions

Founder of revscope.co

Revenue focused web analytics to help you quickly identify where to focus your effort to best increase revenue.

And embersofvictory.com

Retro turn-based strategy game.

Submissions

comment 10y ago · link · parent

I should have been clearer that the other Pythons don't use reference counting. Preserving the C API can be done, see Ironclad[1] which allows using C extensions in IronPython.

But assuming threadsafe collections is still a problem - that will never match single-threaded GIL Python running in multiple processes unless some efficient way can be found to optimistically make the collections not threadsafe and only pay the synchronization costs when they're really shared between threads. I think that's a solvable problem, but not with the STM approach PyPy took. Still performance will likely lag the mutli-process solution which doesn't have that cost.

I would rather see a Python that introduces a way to allocate PyObjects in shared memory and with no thread safety. Since it's a new system, that can be done without breaking compatibility. Then sharing between processes could be as easy as sharing between threads and just as efficient. The GIL could stay in that case and the C API could be left unchanged.

[1] https://github.com/IronLanguages/ironclad

comment 10y ago · link · parent

This is not true - it is intrinsic to Python - not just CPython. Part of it is the garbage collector, reference counting is expensive to do without the GIL - but that can be changed. IronPython, Jython, some translations of PyPy all attest to that. The other part is C methods, which includes all operations on Python collections like lists and dicts, are atomic, making those collections safe to share and modify across threads. Most python code in the wild that utilizes threads makes use of those guarantees. So you either use fine-grained locking, or lock-free data structures, or STM, etc to protect ALL collection instances, or you've basically made a Python 3000 that breaks compatibility with all existing Python code. So every Python implementation that removes the GIL chooses to go the first route of pessimistically making everything threadsafe - which was tried in Java way back when and was and is a miserable failure. You give up too much performance for it to be worthwhile.

So the problem in Python will never be fixed in my opinion - the problem is Python and there's no saving it. Without breaking backwards compatibility it will always be better to use processes instead of threads and keep the GIL.

comment 10y ago · link · parent

Probably they figure they have to dumb it down for people to understand it. Which is hugely patronizing, and underestimates people I think. I wish the media would take their jobs more seriously in general, because, while there are scattered exceptions, by and large they distort facts, twist things, and misrepresent things to the point where it's nearly impossible to get an accurate view of the reality. Which is a complete shame, because they really have a powerful effect on people's views and those people go on to vote for idiot politicians and just plain wrong policies. I know in politics everyone has an opinion, but that doesn't mean all opinions are equally valid. More often than not the popular opinions are so off base with reality that it's sad, or scary, or both.

And if you think it's bad in the US - look at Venezuela - a prime example of an ignorant and poor populace supporting bone-headed policies and politics until the country is reduced to a shambles. Democracy can only be as good as the voters, unfortunately - and the media bears a heavy responsibility there.

comment 10y ago · link · parent

One also saw this in the developing world where many countries, lacking the existing telecommunications infrastructure based on landlines, skipped a step and jumped straight to mobile infrastructure. For a while some developing countries had mobile infrastructure and coverage that surpassed developed nations (one could argue that some still do, with no equivalent to M-PESA in developed countries.)

comment 10y ago · link · parent

Despite the examples you give, I don't think it's fair to lump Facebook and Google in with 50onRed. The former two are mostly above board, with some occasional exceptions, while the latter is completely, morally, underwater.

comment 10y ago · link · parent

Brazil is somewhat more... I want to say civilized but that seems overly mean. It's more modern in many respects than the rest of south and central america.

comment 10y ago · link · parent

In a way, this is like Uber or Airbnb, you can't ask permission or you'd be out of business before you managed to change the laws. Asking forgiveness is not only easier than asking permission, sometimes it's the only viable route.

They may lose money, they may make some. But it's a grand experiment of a kind that's never been tried before and I'm curious to see the results.

comment 10y ago · link · parent

In Latin America too. And worse yet almost everyone grows up thinking you treat a cold with antibiotics. Doctors prescribe antibiotics, knowing full well it does no good, but they have to justify their fee. I tried in vain many a time to convince a person that antibiotics are pointless against a virus, and the common cold is a virus, ergo don't buy antibiotics. But the behavior was too ingrained to sway anyone.

comment 10y ago · link · parent

Why would people would consider electric for airplanes? You want maximum energy density for weight. Jet fuel is pretty damn good when scored like that. We can make synthetic jet fuel from green electricity - if the process uses carbon from the atmosphere it's carbon neutral. Granted it would be expensive, but that's neither here nor there until fossil fuels surpass that price point.

I suspect well-meaning people like the idea of an electric airplane because it's greener, but FYI we live in a market economy. We will continue to extract and burn fossil fuels until it is uneconomic to do so. No matter how many people shout, no matter how much damage it does to the Earth, even if it kills us all. Markets don't care. If you have a problem with that, as I do, the only practical solution is to make fossil fuels not a cost effective alternative. Electric airplanes could be part of a solution - but only if they can compete on cost. I personally like the idea of taxing fossil fuels to factor in the negative externalities - but given the political makeup of the world as a bunch of competing nation-states, it seems unlikely. Game theory tells us there is too much incentive to be the nation state that doesn't support the agreement. Instead what I think will happen is that we'll innovate our way out of the mess by making green technologies more cost effective than fossil fuels.

comment 10y ago · link · parent

Exactly. And time invested in developing your skills, like any other education is a real investment. It accumulates over time and has real value down the road. A developer who spends a couple hours a day coding for fun is at an advantage over the others, but by the time he's been doing that for 10 years he/she will be on a completely different level to someone who hasn't.

As another example, drinking, smoking marijuana, vegging out in front of the TV, insert whatever "vice" you want here that wastes time/energy, might not hurt you much every now and then - but to excess it's going to accumulate into a serious competitive disadvantage overtime.

There are hard tradeoffs to be made between work-life balance and career success - and the results of those tradeoffs don't really become very obvious for a long time.

comment 10y ago · link · parent

Tower 7 had serious damage. Does this look like "no damage"?

http://www.911myths.com/html/wtc7_damage.html

There was a giant ragged hole 20 stories high!

comment 10y ago · link · parent

Your math is off. At $13.338/hour you're looking at just shy of 10 grand per month ($9763 for a month of 30.5 days.)

It looks like one of these bad boys would set you back about $40000. So you'd break even at 4 months. If you're going to go for the 3 year reserved instance, with $100K upfront, you'd be way better off on capex and opex just buying and colocating the thing (not considering other expenses.)

The bigger you grow the more the balance tips towards do it yourself because your costs for colocation, managing hardware, etc amortize out better with scale. AWS gets a little better with scale but not nearly as quickly.

comment 10y ago · link · parent

Not everything is a giant conspiracy theory. If society changed to the point where drugs didn't have such a stigma against them, then the politicians would legalize them. They excel at doing things that are popular - be it good or bad things. Case in point Canada with their goal of legalizing marijuana.

It's harder to do that in the US because you have more conservative people who see drugs as morally repugnant. My prediction is blue states will continue legalizing and red states will be the last holdout.

comment 10y ago · link · parent

Maybe, maybe not. I'm sure nobody saw Larry and Sergey coming either. Just because you don't see how it can be done, doesn't mean it can't be.

But either way, that's not causing Google to break any anti-trust laws. They don't have to make it easy for competitors, just not unfairly use their power to stomp on them.

One could even make the argument that the reason Google has done such a good job at search over the years is because Larry and Sergey are very afraid of being disrupted by another Larry and Sergey. They have to stay on their toes and they know it.

comment 10y ago · link · parent

Monopolies are not illegal. Abusing a monopoly position to unfairly crush the competition is. I don't see Google doing that.

The market is open to competition, and Google is very disruptable, if somehow you think you can do a better job than they do. If another Larry and Sergey came along with a search engine that was significantly better, they'd disrupt Google just as easily as the original Larry and Sergey did to whatever was popular before them (I don't even remember.) Do they have the vast majority of the market share? Yes. But they also have plenty of competitors and there's no lock in for people searching, nor a high pain threshold for people to switch search engines. The reason Google holds such a dominant position is simply that their search results are best. If that weren't the case, I'd switch today, and so would you.

comment 10y ago · link · parent

Well I wonder if could be used near a river mouth? Since that water is going to be "thrown away" into the ocean anyway.

comment 10y ago · link · parent

That seems to make a lot of sense, an we already know pumped hydro is one of the most efficient "batteries" for renewables. But then the tradeoff is how far do you have to pump the water from the ocean to get it up to a reservoir above 2000 feet? You might lose all benefits (if there were any) of the technique if you don't have a handy mountain nearby.

comment 10y ago · link · parent

What I don't get is why they don't just run the desalinization process at "full speed" when the sun is shining, and store the freshwater. Then you don't need any batteries. Maybe the process is not amenable to scaling up and down with a variable power supply. You could possibly use giant capacitors to smooth the power supply, but maybe the economics still favor smaller facilities that run 24/7, even though they need batteries.

comment 10y ago · link · parent

You have a point. What about CSS? At first I think it would just render funny, but some javascript actually interacts with the CSS, e.g. jQuery selectors based on style classes or something. So it has the same problem really.

Images would be safe.

Or an alternate plan, start rendering, but do not run the javascript until the resource checks for css+js files return. It would slow things down some more, but not as much as waiting for everything.

comment 10y ago · link · parent

Nonsense. You have the css and javascripts. You just aren't certain that they're the most recent version. So you go ahead and render the page using either the version you have, or requesting it from the server, still doing everything in order. Then you validate your assumptions in the background about the stale versions you used still being the most current. If your assumptions are right (and mostly they will be) nothing happens. If they're wrong, you re-render the page, again all in order.

comment 10y ago · link · parent

I apologize if someone already mentioned this, but there's a way to eliminate the penalty to the user without changing HTTP at all. Browsers can simply check all the non-expired resources after all the rest. Now the latency is the same, but we still do the checks, just after everything else and we're already rendering the page. Only if one of those resources did actually change then we re-render the page.

The immutable solution is cleaner, and doesn't load the server as much, but it's not backward compatible and requires the people who run the server to know what they're doing. Maybe the two solutions could be combined?

The biggest potential drawback I see is that maybe most resources, including the html don't expire, so every page will be rendered and re-rendered. Giving little benefit and making the rendering choppier. Some of that maybe could be mitigated by starting the rendering in the background and not displaying it until a certain percentage of requests return, or special casing the "page" itself as opposed to page resources.

comment 10y ago · link · parent

Nice, I wasn't aware of those! BTW, the Go one looks broken on the example when using 6g (gccgo seems to work.)

comment 10y ago · link · parent

Please somebody elaborate on this - it's not an easy concept for a layperson to grasp.

comment 10y ago · link · parent

Missed that, I withdraw my complaint. The snark is not necessary though, not everyone has time to read the entire article, I read the top and skimmed the rest.

comment 10y ago · link · parent

Yes, that's what a lay reading gets you - and why I was disappointed with the article. Is the author just clueless or are they trying to make one of Intel's competitors look better? Everyone who follows these things knows that the other guy's 14nm node is more comparable to Intel's 22nm node. Apparently a nanometer is not always a nanometer...

comment 10y ago · link · parent

Probably because the societies that developed hierarchies, taxation, and military conquered their neighbors and grew stronger and more influential in the ancient world.

comment 10y ago · link · parent

While I appreciate the logic behind this, and agree in principle, it's an overly simplistic picture.

If you decrease your calorie intake your body compensates by lowering your metabolism. Between this and the decreased metabolic burden of carrying less fat and muscle, this is why many dieters find that their weight loss plateaus after a while of making progress.

As far as low-carb diets in particular, there are also additional factors. If you get the carbs down under about 20 carbs a day you can go into ketosis, which is a wasteful metabolism. You literally piss away some 10-20% of your calories.

But the biggest benefit of low-carb is you don't have those blasted carbs (and especially sugar!) adding calories to your diet without triggering the satiated response in your brain - you just eat less on a low-carb diet, without feeling hungry.

comment 10y ago · link · parent

Better, if you read the article.

comment 10y ago · link · parent

I hope Stripe borrows this idea, I think it's a great win-win for all parties.

comment 10y ago · link · parent

Every now and then one sees something on HN that makes you think "why didn't I think of that?" This is one of those ideas executed very well. My prediction is this guy makes millions and is eventually bought by Microsoft for a ridiculous sum of money.

I think he'd be a shoe-in for YC, but I also think that'd be a waste now - with a product like this he can easily show it off to investors and raise money, if needed, or just bootstrap off his own revenue. $120K for 7% is not a good deal with a polished product like this - I think it would be easy to beat.

1
167168169
184