Andreessen Horowitz's Returns Trail Venture-Capital Elite - <AUTHOR> http://www.wsj.com/articles/andreessen-horowitzs-returns-trail-venture-capital-elite-1472722381 <comment><USER2> To my eye, the story here is how awful VC is as an asset class.

Like, this is as good as it gets, guys. This is it. Even with these returns being kinda so-so (relative to the lack of liquidity, ten year return cycle, et cetera), these guys are _easily in the top five percent of VC firms_.

Dumb old index funds are going to roughly double your money in ten years with reinvestment of dividends. If a VC can't hit 3x, the numbers don't really add up to make it worth your while to write a big check and just park it for a decade.

The point of the article is that _even the best of the best can miss those numbers and still be in the top fifth percentile_.

Yikes.

<comment><USER3> Can you point me to some materials about how to invest in index funds? I'm an engineer looking to start making wise choices on where to invest my money.

<comment><USER4> Do your due diligence, but here are the cliffnotes:

All stocks in the US: FSTVX, VTSAX

All bonds in the US: FTBFX, VBTLX

Step 1: Put {your_age}% in one of the bond funds, and the rest in the stock fund.

Step 2: Religiously invest a portion of your salary every month.

Step 3: Don't look at your savings more than once every quarter or so.

Step 3.5: Don't let your spending grow out of control as your career progresses and your salary grows.

Step 4: Retire a multi-millionaire in inflation adjusted dollars after 20-30 years or so.

<comment><USER5> Guidance on the portion of salary to invest?

<comment><USER4> Save until it hurts just a little bit, and then a little bit more.

My wife and I did 50% of our nominal takehome every month in a high COL area. It was fine.

The more you save, the faster you get to Stage 4.

</comment></comment></comment></comment></comment><comment><USER6> The AH model isn't venture in the sense of betting on very early stage companies.

AH seems to invest huge amounts in much later stage companies. The idea is that some of these companies would be public in the old days and all the growth is happening on the private side. (This is based on things @pmarca has said many times in many different forums).

One could argue that the relevant comparison would be very volatile tech stocks.

Comparing it with the few VC funds (the one VC fund?) that hit the great firms two funds in a row is not really fair.

Edit: To put it yet another way, the volatility of the returns should be lower so we should be happier with a lower expected return.

<comment><USER7> _> The AH model isn't venture in the sense of betting on very early stage companies. AH seems to invest huge amounts in much later stage companies. _

But that funding at later stages may have been happenstance rather than deliberate strategy.

For example, a16z looked at AirBnb during the Series A fundraising. But they decided to pass on it, partly because Marc Andreesen didn't believe AirBnb's trust model for strangers in personal homes would work. When a16z looked at AirBnb again during their Series B fundraising, they invested. Marc has been on record saying they regret missing the earlier Series A round because it would have made them a lot more money.

a16z also made a late 2010 investment in Facebook but some observers thought they did it for "logo shopping". In other words, observers said it wasn't a late investment timing on purpose -- it was because they were a new firm (2009) and they wanted to add immediate credibility to their portfolio.

It seems they do want to catch companies early if they can.[1] On the other hand, I remember Ben Horowitz saying they deliberately held back on an Oculus Rift and let another VC take the lead (the risk). They later invested in the subsequent round.

It doesn't seem like there's any rigid single strategy there with regards to timing.

[1] scan for their "Seed" and "Series A" investments: [https://www.crunchbase.com/organization/andreessen- horowitz/...](https://www.crunchbase.com/organization/andreessen- horowitz/investments)

<comment><USER6> You raise an interesting point, but I think the data actually makes my point.

Firstly, I think you should count the "majority" of their investments as where the majority of their money goes. If they had one fund with a billion dollars, and $400 million went into Uber and $400 million went into a Facebook, but $200 million went into 90 tiny companies, I would argue that they are 80% (800/1000) late stage and not 2.2% (2/90) late stage.

Secondly, what they call the round is kind of arbitrary. Consider that many (most? traditionally?) VC funds earmark around $5 million for all rounds in a company.

They may put in $100k pre-product, $1 million after market fit and so on.

AH put $25 million in Clinkle's "seed" round. Imagine how valuable Clinkle must have been at that point.

Nonetheless, I think this shows that they are making much larger, much later investments than the "traditional" VC, and for reasons that Marc has talked about in public.

Of course he wishes he had got into successful companies even earlier. Everyone wishes that. I wish I had got into AirBnB in the Series A. So do you, presumably.

He fully concedes he is not as good as Peter Thiel (a, who is?, and b, this is his example) at going for the really early stage company and prefers to go in later. Its just really hard to tell which of 1500 companies is going to make it big, but it is much easier to guess that most of 20 big companies are going to get bigger.

<comment><USER7> _> Of course he wishes he had got into successful companies even earlier. Everyone wishes that._

Unfortunately, I made it sound like MA's thoughts about Airbnb was a generic "invest earlier means more money" cliche. I intended to show how AirBnb contrasted with Oculus VR. They passed on the early rounds for those 2 companies for different reasons.

For AirBnb Series A, Andreesen didn't understand the value. It was a gap in knowledge/imagination about what AirBnb could be. It was _not_ because of a _" we're a late-stage not Series A investor so come back when others have already invested in you"._

For Oculus Rift Series A, a16z got the value of it, but they weren't sure about it gaining traction while the company was trying to solve the motion sickness issues. They let the other VCs take on that risk and they knew ahead of time they'd pay more to get in on the next fundraising round.

Based on their actions and interviews, it's possible that AH's primary investment thesis is Series B or later but I'm not sure you can beat Sequoia and Benchmark with wait-&-see late-round investing at sky high valuations. Those other VCs hunt aggressively to get in on Series A. Part of the prestige for a VC firm is to be seen as a leader and not a follower.

<comment><USER6> I will just re-iterate that the letter of the round is not as important as the valuation, and the amount invested, in determining what "stage" the investment is.

I accept that they passed on the two different Series A rounds for two different reasons, although I am not sure what lesson I can draw from that.

In terms of your last comment, yes they absolutely cannot beat the returns of the early stage investors (whatever Series that may be), but presumably they're compensated by lower risk, which is the main point I was trying to make.

</comment></comment></comment></comment></comment><comment><USER8> The most promising (low risk) startups get their pick of investors, so most who can choose will prefer a top-tier VC.

If you are a VC the only way to differentiate yourself is to take on risk that you perceive to be less risky than the herd does, and to build your portfolio on the basis of such decisions.

Since there is no reason to believe all VC firms share the same time horizon for realizing their investment returns, it does not make sense to compare firms on the basis of returns published this way.

A more sensible approach would be to remove the outliers (good and bad) from their portfolios and evaluate how well they picked on average.

Or, if you only care about highly successful outliers, the way to compare firms is to look at how much and how early they invested in the _same_ unicorn.

<comment><USER9> The outliers are the whole point of VC.

<comment><USER10> But not the point of startups.

Also, not what's better for founders.

You're better off with a %50 chance of being worth $200M after 7 years than a %1 chance of being worth $1B after 3.

VCs place many bets, you only get to place one.

At this point if I were to ever take VC again, I might take it from A16Z. They would be top of my list. All those "top tier" guys would have to give me terms I believe they are not inclined to give me.

Fortunately things are radically different than they were even 10 years ago, and VCs have a lot less power.

Unless you're building another Uber. Don't build another Uber. Build a github.

<comment><USER8> This is a good point. I think it's fair to say that the tiny subset of businesses VCs are interested in investing in are the ones where a well-timed influx of capital has a chance of allowing massive growth.

Any novel business that appears to have those characteristics is ripe for such a speculative investment, but most of the valuations are based on the assumption of massive growth.

As soon as the growth trajectory turns out to be less impressive, the valuation goes through the floor, and usually results in a loss for investors (even if the company can be sold).

But this is by design, since the investment was highly leveraged on the upside, it is also leveraged on the downside and the firm will often simply fail.

Doing a typical startup (less than two years from seed round to massive growth or failure) is a lot more like flipping a house than like starting a business with a proven business model.

This is why there is so much trendiness and so many me-too companies... They are like real estate developers who saw that McMansions sold for 2x investment a mile away and decide to rapidly build nearly identical ones hoping for the quick profit. The goal is entirely in the short term and the long term is irrelevant.

Google found a very powerful way to sell ads, and once it built the infrastructure to do so it was able to massively broaden its product offering and appear to be almost a modern conglomerate. But the fact remains that ad revenue is the vast majority of Google's income, and most of the rest of its businesses are (in comparison) failures that would never have continued to be funded by VC-style investors. Alphabet reflects the investors' realization of this and is a compromise resulting from Sergey and Larry having a lot more control than typical founders.

Github is interesting. I wish I could see its financials! I had hoped for a lot more in the product arena from Github, but who knows, maybe they still have most of the $100M.

</comment></comment></comment></comment><comment><USER11> So basically their 2 earliest funds are just over half way to maturity and already closing in on the 3X benchmark Andreessen promised to his LPs?

It's hard to 3X a billion. That makes Sequoia and Benchmark even more impressive, but doesn't reflect badly on A16Z. Michael Jordan once came in 3rd in the MVP voting—does that diminish his legacy? [http://www.basketball- reference.com/awards/awards_1993.html](http://www.basketball- reference.com/awards/awards_1993.html)

It's a good reminder that press attention doesn't equal results, but A16Z still seems like they're a force to be reckoned with.

</comment><comment><USER12> It feels a little unfair to compare fund groups from 2003 and 2006 to those that must be after 2009, when A16Z was founded. Give it a few years and we can have an article like this...

<comment><USER13> Good point. Also, I wonder if the mark-to-market policies of the various funds are really comparable.

When you have a public market price reference it's pretty much irrelevant, but with the majority of the portfolio in non-listed assets, mark-to-market policies could have a large impact on your paper returns.

<comment><USER13> Official response from AH: [http://a16z.com/2016/09/01/marks- offmark/](http://a16z.com/2016/09/01/marks-offmark/)

</comment></comment></comment><comment><USER14> They're still doing quite well all things considered--really well in fact relative to most people trying to manage other people's money.

Personally I don't place much value in comparing short term returns as it applies to saying who's a better manager. The same thing happens with hedge funds. A firm can have a great year but the real test is how they perform over years or even decades. How many hedge funds can outperform someone like a Warren Buffet over the long term? Not many. In fact sadly many fail to even beat index funds. One great year makes a headline, consistent great years makes a great investor.

</comment><comment><USER15> Am I misunderstanding or am I the only one calling bullshit on all these firms for talking about making money where there's no liquidity event. These are mostly paper gains. Shenanigans.

<comment><USER16> Most of the world's investable assets (real estate, oil wells, corner ice cream parlor, a Taco Bell franchise) have not had a liquidity event but are valued nonetheless.

<comment><USER17> Don't all those example assets change hands for cash (or equivalents) pretty regularly?

<comment><USER16> Valuation by comparables is an acceptable model if both parties agree on it.

However, it's still far from a done deal as each transaction has its own minuscule details, and in commercial property, e.g., one party might value such things as location, quantity/quality of parking spots, proximity to traffic flows, quality of neighbors, recently incurred maintenance, etc. differently from the other.

With that said, a 409a valuation firm (or potential acquirer) is likely to look at the peers, current and historic ones, to at least start at some ballpark figure.

</comment></comment></comment></comment><comment><USER18> _Facebook bought the photo-sharing app for $1 billion in 2012, the firm said it made $78 million on a $250,000 investment._

damn....and had Instagram not sold to facebook it would probably be worth $1-1.5 billion

</comment><comment><USER19> Almost a hit piece on AH. Their returns are definitely top-tier, but WSJ presents it a failure that returns are not the very best. Seriously? It's statistical noise at that tier.</comment>


Show HN:PhotoChron - A daily timelapse app I wrote to record my son growing up - <AUTHOR>

I wanted to track my son growing up so I built an Android app to let me take regular photos and build them into a timelapse video. I thought HN readers (especially parents & narcissists!) might be interested in it.
The result is PhotoChron ( http://http://play.google.com/store/apps/details?id=com.photochron ) and I've been using it for the past year or so to track my son growing up - http://www.youtube.com/watch?v=X_Nr7pw-I0g
As I've been using it I've added more features, which include reminders, face detection for photo alignment & importing photos from your phone gallery. It's a free app compatible with Gingerbread and upwards.
Feedback and comments welcome. <comment><USER2> Link: <http://play.google.com/store/apps/details?id=com.photochron></comment>


Music from very short programs [video] - <AUTHOR> https://www.youtube.com/watch?v=tCRPUv8V22o <comment><USER2> Reminds me of listening to a wobbly industrial fan laying down some funky beats.

</comment><comment><USER3> This looks fun! Has anyone experimented with trying to avoid aliasing?

I would guess it would not make the programs _much_ longer, and could drastically 'improve' the output quality. I put improve in quotes because the gnarly artifact-y nature of this does provide some of the charm.

</comment><comment><USER4> Related: "Making music with a C compiler [SIGINT13]", [https://www.youtube.com/watch?v=vCEUyx- SxPw](https://www.youtube.com/watch?v=vCEUyx-SxPw)

</comment><comment><USER5> I love experimenting with Ibniz however insufficient documentation and huge gaps in my skills, make the progress painfully slow.

Did anyone here have any success in creating something musical with it?</comment>


Much of the Greenland ice sheet appears to have melted about a million years ago - <AUTHOR> http://gizmodo.com/the-greenland-ice-sheet-may-be-far-less-stable-than-we-1789771526 <comment><USER2> The title is rather misleading.

Looks like they were going for clickbait :(

</comment><comment><USER3> ... so this is supposed to make us feel better about the current situation?

<comment><USER4> Maybe? If it melted before and the climate recovered to its non-warm cold state, what ever mechanism activated before may activate again.

<comment><USER5> Who cares if the earth cools down 100000 years after the ice caps melt.

<comment><USER4> People who differentiate between the end of the world and the end of humanity on the world.

There are two philosophical approaches to climate change, one is to ignore it and die, and one is to accept the change and plan around it.

"Ignore it" in this case means operate under the misperception that humans have the ability to _control_ planetary climate (effect it sure, but control is elusive).

If you're in the build your way out of it mode you can be confident that over the millenia there will be times when it is easy to walk around, and times when that is hard. If you're in the ignore it camp you can be confident that the new species that emerge after humans are gone will also have large periods where the climate the evolved to is present before it changes again.

You you see? Hopeful, the world will continue with us or without us.

</comment></comment></comment></comment><comment><USER6> Clickbait headline, as usual. "Most of Greenland Melted about a Million Years Ago" is much more accurate, but probably failed A/B testing. To add some perspective: we've had an ice age about every 100,000 years during the last million years.

<comment><USER7> Well, maybe so. But the point is that it wasn't much warmer when much of Greenland's ice melted than it is now. Will I live long enough to see Greenland melt off? It's hard to say. But it's a fair bet that some of you, or some of your kids, will. So maybe don't buy on the coast ;)

<comment><USER8> ... or just make sure to buy somewhere like Dover [1].

1\. [https://en.m.wikipedia.org/wiki/White_Cliffs_of_Dover](https://en.m.wikipedia.org/wiki/White_Cliffs_of_Dover)

<comment><USER9> You probably still want to be a couple of kilometres inland.

> The cliff face continues to weather at an average rate of 1 centimetre (0.4 > in) per year, although occasionally large pieces will fall. This occurred in > 2001, when a large chunk of the edge, as large as a football pitch, fell > into the Channel.

<comment><USER8> Yes you probably want to build on a cliff made from something more resistant to coastal erosion than chalk.

</comment></comment></comment></comment></comment><comment><USER10> "recent past" means something different for scientists than it means for the rest of us...

</comment><comment><USER11> Sometimes I get the feeling that those who control industries that profit from climate-altering human behavior believe that it's okay to alter the climate, because whatever they have caused, they will assuredly be able to override, and undo, through similar force of will.

Too hot? Cooling something is easy! Block out the sun, somehow, until things cool off!

Too cold? Simple! Pump up those greenhouse gases again! Earth has a thermostat, and it's easy to mess with!

I think this is why there's so much willful ignorance and obfuscation, deliberately muddying the waters. They want control, and no one else must tamper or meddle with such grand designs.

Of course, the world is larger than they are. And what if they aren't around to help fix what they've ruined.

It seems their answer is:

      If *WE'RE* dead, who fucking cares about the rest?

<comment><USER12> I'm going to take a very unpopular position in the name of rational discussion in the hopes that this forum can hear the message.

For the record, I am of the opinion that anthropogenic warming is real. However, I think it's wise and even scientific to be skeptical of solutions implemented primarily because "we have to do something" in the absence of diligent logical and cost-benefit analysis, which I'm not sure has always been communicated to the public.

Here are the assumptions you must accept in order to go from "hey, it appears the Earth is warming and it looks like it's mankind's fault" (a statement I think most everyone can agree with) to "here is the plan for action."

Some of these assumptions are fairly solid, others maybe not so much. Some are quite controversial, intentionally, to stimulate discussion. I will reiterate my intent here is not to be a denialist but to present the argument of a stone-cold realist.

1\. Assumption: we can accurately measure whether the earth is getting warmer or not.

This requires us to accept that the proxy data (ice core samples, tree rings, etc.) are sufficiently reliable to provide a good baseline for comparison on geologic scales, and that the timeline of climate change data that these sources provide is adequately large to be meaningful. (1,000 years versus 1 billion, for example)

I think most people here will agree that the proxy data are good.

Now that you've proven that the Earth is in fact getting warmer, we have to ask if

2\. We can accurately assess the cost and benefit of global warming

Perhaps global warming produces net long term benefits to humankind. Humans tend to alwayss adopt a "change is bad" posture - however, with climate, "change is inevitable."

I know this is a very controversial hypothesis - most people wouldn't dare to ask the question - but we must. Why should we assume that the current global temperature is optimal for life on Earth or even human habitability? We might find that a warmer planet is quite beneficial. If so, we need not bother with solutions, as there is no problem. It's my opinion that the science to date seems content with "any change is bad" but in my opinion that is weak science.

But that's not my axe to grind. Let's assume the analysis is correct, and that global warming produces a net cost to society in general. Now, we need to determine if

3\. We can accurately assess man's contributions to global warming

Here is a significant problem for science to solve. It is likely that at least some of the warming we are experiencing is due to non-anthropogenic forces. Should policies be put into place that try to offset these as well as the anthropogenic sources of warming? We ought to have at least some good idea _by how much_ is mankind warming the planet before we put in place policies to offset it.

I'm not sure we really understand that, but let's say we do. Now the question becomes how well...

4\. We can accurately model and predict how changes to man's behavior will affect the warming trend

Many changes have been proposed with obvious economic and social consequences. How will those changes affect global warming? Is it conceivable that we might overshoot? Or perhaps the combined effect of available changes is completely negligible. If we don't know the impact of a particular change, then we're really just shooting in the dark.

Let's assume we can, in fact, measure the impact of particular changes on the climate. Now, we must presume

5\. That we can meaningfully lower man's impact on the climate through a coordinated global effort

Perhaps we discover a few changes that, if made, would reduce or eliminate man's effect on the climate. Could these changes be implemented globally? It is unlikely that a few local changes would have significant impact, and global changes are very hard to implement.

Let's assume #1 through #5 are demonstrable. We have now demonstrated that global warming is real, that it is bad, that man is causing it, that there are a set of changes which will result in a meaningful solution, and that these changes are globally feasible. I don't think we know all of those things, and that's a problem, but let's say we do know them.

Now we need to demonstrate to some degree of satisfaction:

6\. That the global efforts at combating anthropogenic global warming have a net quality of life and economic benefit around the globe. In other words, _the costs of remediation are outweighed by the benefits._

It is entirely possible that humanity could embark on a set of policy changes that would have very bad consequences for humanity while having negligible consequences on climate change. This possibility is greatly increased by a "we have to do something!" mentality.

Again - my argument is not intended to present a denialist story. I actually think that anthropogenic warming is real, I personally support some of the policies to combat it, and I personally try to minimize my impact on the planet in my own small way. My argument is only intended to provoke discussion about the difficulty in _responsibly_ getting from "we have a problem" to "here is the solution."

<comment><USER13> > Perhaps global warming produces net long term benefits to humankind.

we know the costs of sea level rise: mass displacement of hundreds of millions of people and the destruction of the world's most productive economic centers. there is already a drying trend in the central plains and other large areas of arable land; more warming will lead to mass starvation. The overall consequence is the destruction of most of the world's wealth. but sure, maybe after all that, everything will be better. by the same token maybe a nuclear war will improve things?

<comment><USER12> It's entirely possible that everything you say is true, however, the jeering tone and sweeping generalizations are the opposite of the sort of polite, rational discourse that seems to be constantly missing in these discussions.

<comment><USER13> i don't see what's irrational about it. as for polite, excuse me, whether we're warming the earth is an issue that has been discussed quietly and politely for 30 years and evidence for disaster piles up and up. when polio was raging we did not need polite discussion of whether the germ theory of disease is true, the evidence is in and let's get on with it. but mysteriously on this issue where there are powerful economic interests invested in denial, people just want to discuss and discuss and (by the way) do nothing until discussion is over.

</comment></comment></comment></comment></comment><comment><USER14> million years ago == "recent past"?

To me, "recent past" means maybe 5 or 10 years ago tops.</comment>


New live feed from Ecuador embassy (Wikileaks) - <AUTHOR> http://www.ustream.tv/channel/occupynewsnetwork

<comment><USER2> Does anyone else hate these livestream things? I feel like a lot of the people who do them are purposefully antagonistic rather than reasonable. It's all re/action with very little result... or am I missing something?</comment>


Google cracking down on illegitimate "unlimited" Drive accounts - <AUTHOR> https://www.reddit.com/r/DataHoarder/comments/6cr1bw/google_drive_appear_to_be_removing_accounts/ <comment><USER2> people act surprised... its a direct vio of TOS</comment>


10 ways to best enjoy a vacation after a project completion - <AUTHOR> http://akshar.co.in/blog/archives/394

<comment><USER2> 11\. Run anywhere between 4-10 miles (depending on fitness), shower in hot water, then drink black tea with sugar whilst under a blanket in an armchair watching a crappy sitcom.

12\. Laser Tag. Play it.

13\. Go to church and make fun of stupid people.

14\. Motorcycle. Ride it. At illegal speeds. At night.

15\. DXM (I use it several times a year, when my brain gets overflown from either work or just natural depression).

<comment><AUTHOR> You are of my Race/Caste/Religion buddy.

My fav in the list is "Go to church and make fun of stupid people", I got the point.

BTW whats DXM ?

<comment><USER2> <http://en.wikipedia.org/wiki/Dextromethorphan>

It's very easily lethal, so also: <http://www.erowid.org/chemicals/dxm/faq/>

<comment><AUTHOR> OMG drugs? Thanks! For me even tea is a form of addictive drug I need to keep in control :)</comment></comment></comment></comment>


Budlocker: The smell proof lockbox with a detachable rolling tray lid - <AUTHOR> https://www.indiegogo.com/projects/budlocker-the-smokers-lockbox-marijuana/ <comment><AUTHOR> For transparency purposes, this is one of my pet projects.</comment>


HN sharable links generator, 50%+ accuracy, extensible - <AUTHOR> http://www.google.ie/search?q=%22why|how%22+%26+%22i|we%22+%26+%22switched|moved|earned|learned%22+%26+%22android|mac|iphone|emacs|unix|vim|ios|ec2|rack|cloud|apps|appengine|algorithms|python|ruby|js|jquery|node%22&hl=en&biw=1854&bih=965&prmd=iv&ei=aVkGTf6OFtC7hAee1qTuBw&start=0&sa=N

<comment><AUTHOR> the idea derived from some plain observation..</comment>


Ask HN: How to add multilanguage support to a flash webapp? - <AUTHOR>

I'd been developing this flash application (http://apps.facebook.com/captionmashup/) and now the beta version is out.
I'm planning to add multilanguage support but I really don't have any ideas about how to implement multilanguage library for user interface.
Should I embed and hardcode all dictionary definitions into different classes?
Should I create text files and import and create language files dynamically at runtime?
I'd appreciate if you can give me some tips. <comment><USER2> I would recommend using a gettext library like this one:

<http://code.google.com/p/actionscript3gettext/>

<comment><AUTHOR> wow that is awesome! thank you very much.</comment></comment>


Firm fat-fingered G Suite and deleted data, escalates support ticket to lawsuit - <AUTHOR> https://www.theregister.co.uk/2019/07/05/musey_v_google_lawsuit/ <comment><USER2> So let me get this straight: they deleted their own account and because they didn't have any backups (because why would they) they're suing Google now. That's gonna end well.</comment>


Matter.js – A 2D rigid body physics engine for the web - <AUTHOR> http://brm.io/matter-js/ <comment><USER2> This is very impressive! The most advanced JS 2d rigid body physics engine to date! You can do a lot of optimization though, probably double the speed. Tip: V8 loves objects and hates parsing strings.

Your functional spaghetti style is a bit weird though. I hate using the "find in file" function in my editor. I wanted to "rip" some of the functionality, but it's so entangled I would probably need all your other functions too to make it work. But maybe that's intended :P

Many people, me included, would be willing to pay for an engine like this. I tried your "Game physics for beginners" but I'm too stupid to understand all the articles from math professors. I could probably learn, but I rather pay someone who understands.

But for me to use your engine, the API needs to be much easier! Something like this:

      var box1 = new Body(size, position);
      var world = new World({gravity: 9.8});
      world.add(box1);
      world.render();

      console.log('New position: ' + box1.position);

<comment><USER3> It is more advanced than Box2D [0]? What makes you say that?

[http://blog.sethladd.com/2011/09/box2d-javascript-example- wa...](http://blog.sethladd.com/2011/09/box2d-javascript-example- walkthrough.html)

<comment><USER2> Box2D is ported from C++ to Flash and then from ActionScript to JavaScript. So it might be slow to get updates and bug fixes.

But it looks usable and seems to have the same features as Matter.js

</comment></comment></comment><comment><USER4> This person has produced some pretty incredible things with HTML/JS/CSS (including Matter.js).

[http://brm.io/work/](http://brm.io/work/)

</comment><comment><USER5> I'm especially impressed by the time scaling. Back when I fiddled around with physics collision/physics libraries years ago (ODE), have a fixed timestep was a fundamental design decision and changing that led to weird and unpredictable behaviour.

Things have come quite a long way :)

Edit: still has problems with squishiness of stacked solid objects though :\

</comment><comment><USER6> When I was evaluating engines for Hype Pro's [1] physics system, I compared based on file size, commit/project activity, how easy it would be to modify and integrate, and the license (for obvious reasons). I looked at Matter.js, Verlet, PhysicsJS, p2.js, JPE, Newton, and box2d-js. While many have their respective strengths, overall Matter.js stood a notch above the rest. The code has been easy to work with and Liam has also been responsive in fixing bugs or accepting patches. It is truly a gem of a project.

[1] [http://tumult.com/hype-pro/](http://tumult.com/hype-pro/)

</comment><comment><USER7> I am familiar with P2 JS, looked through PhysicsJS and the two very basic arcade engines grown within Phaser JS. Matter JS seems to have the exact same feature set like any other library. I haven't seen any 2D web engine, besides the JS ports of Box2D, which supports continuous collision detection (CCD), which would prevent a lot of tunneling, especially on slower mobile phones.

Why is that? CCD doesn't look more complex in theory than any other concept in a 2d physics engine.

P2JS: [https://github.com/schteppe/p2.js](https://github.com/schteppe/p2.js) PhysicsJS: [http://wellcaffeinated.net/PhysicsJS/](http://wellcaffeinated.net/PhysicsJS/) Phaser: [http://phaser.io/](http://phaser.io/)

</comment><comment><USER8> Pros: The samples play well, look fun, and it looks like a great solution to small physics demos in JS. Great job!

Cons: Playing with the Stress demos (especially #2) really shows the slowdowns and downsides to using a JS based engine. At 450 boxes (+ 4 bounding walls), it runs at 20fps on my Macbook and thats with a lot of jitter and overlap. Not as fun.

Edit: Significantly better w/ WebGL render, @32fps, and with sleeping+WebGL render @34fps.

I wish I could see a physics engine using WebGL and GPU acceleration for the web. This one is a great start if the author were to take it further and implement some of the logic with shaders.

<comment><USER9> How does it compare to, say, Box2D ported to JS using Emscripten?

[http://kripken.github.io/box2d.js/webgl_demo/box2d.html](http://kripken.github.io/box2d.js/webgl_demo/box2d.html)

<comment><USER10> Good question. I also wonder how it compares to other popular 2D js physics engines:

p2.js: [http://schteppe.github.io/p2.js/](http://schteppe.github.io/p2.js/)

PhysicsJS: [http://wellcaffeinated.net/PhysicsJS/](http://wellcaffeinated.net/PhysicsJS/)

</comment></comment></comment><comment><USER11> Was it written from scratch or inspired by Box 2D?

</comment><comment><USER12> This would have to start talking about the problems with previous attempts (box2d...)

</comment><comment><USER13> There are some bugs with "enable sleeping" turned on. Occasionally an object that is sleeping seems to fail to have external forces act upon it. For example, you can end up with a sleeping object sitting on top of another object, and when the object falls out from under it, the sleeping object stays stuck in midair. I can reliably make this happen by toggling "enable sleeping" on and off (example: load up "wrecking ball", stop the wrecking ball before it hits the pile, turn on "enable sleeping", wait for all the blocks in the pile to go to sleep, then turn "enable sleeping" back off and you now have a stack of immovable blocks which the wrecking ball bounces off of, and which will hover if you remove the bricks below them), but I saw the bug occur even when I wasn't flipping this setting back and forth.

<comment><USER14> Enabling sleeping is a difficult thing to actually do, especially in a stack of bodies. You have to enforce a minimum movement threshold over a series of frames usually, and group bodies together to go to sleep, and also wake the same group up when there's motion. It's not always easy to do

</comment></comment><comment><USER15> I've used this a lot in the past few weeks. It's really amazing. It has some trouble with triangles. But having a physics engine completely written in Javascript from the ground up using good JS principles is refreshing. One of the coolest features is mobile demo. Buttery smooth on my iPhone.

</comment><comment><USER16> I wonder how it compares with P2.js. Another nice pure JavaScript 2D physics library. [https://schteppe.github.io/p2.js/](https://schteppe.github.io/p2.js/)

<comment><USER17> I spent a good deal of last week comparing these two for a side project. I found that while p2.js supports a bit more that I need (specifically compound objects) It was harder to get going since you have to handle your own rendering. Whereas matter.js has it's own swappable rendering engine.

</comment></comment><comment><USER18> Why all those "physics engines" are so jittery? Are there no ways to solve such a system with perceptually exact accurancy in realtime?

Those kinds of approximations are the source of some of the most hilarious bugs in games over last deacade or so.

Please don't read this as a critique of this particular project which is pretty good at what it's trying to do.

I just wonder why AAA games use pretty much the same math? Are there no better math?

I mean CAD systems obviously do something better... Is that the same thing as with drawing triangles vs. raytracing?

<comment><USER19> Animation is an illusion of motion caused by a sequence of still images. The way a physics engine works is by computing those still images -- the frames -- for each iteration in a mathematical model (the physics you want.)

If you want 60 frames per second for a smooth animation, you have to compute the whole frame less than 1/60th of a second. The more complicated your physics model is, the harder it is to do this.

>I just wonder why AAA games use pretty much the same math? Are there no better math?

The math they use is just standard physics, often using some simplifications or optimizations to speed up the calculation. "Better math" is a curious term. If you want more accuracy, you have to give up speed. You can't have both. You either get jittery/jerky motion or you get unrealistic effects. Of course, running on a faster machine or finding a better optimization will help, but that also requires a ton of expertise and is sometimes plain infeasible.

>I mean CAD systems obviously do something better... Is that the same thing as with drawing triangles vs. raytracing?

CAD systems with physics engines do the same thing as above, and they have to make the same kinds of decisions. Usually, CAD software is meant for design, so it would opt for higher precision. This isn't suitable for games except on very high-end machines, which would exclude a lot of people from buying your game.

As for ray tracing vs rasterization: Yes, it is the same kind of trade-off. Ray tracing can be made very accurate and do some amazing things, but the frame rate is usually so low that you have to pre-render the whole animation beforehand. That is, if you want high quality.

Rasterization gives medium-low quality at very high framerates. It is very common because it is 'good enough looking' for most purposes, where an equivalent quality ray tracer would be very slow. Of course, a physics engine is independent of your rendering method: you will have to compute physics for your scene whether you use ray tracing or rasterization, so you have to take both into account for determining how jittery your animation will look.

<comment><USER20> The math is not just standard physics. That undermines the essences of the difficulties of doing physical simulations. Many of the design choices have to do with numerics, discretization of time, collision detection, etc.

Physics doesn't concern itself, for example, with how to represent polyhedral shapes, or how to compute their intersections. In the world of computer simulation, there are surely more algorithmic developments to be made. Even if the physics hasn't changed (much) for the last 300 years, there are new ways to precondition systems, and solve them, and so on. I think that's what is meant by "better math".

I think you make a good point about the trade-off difference between CAD and games. In addition to requiring that games be simulated in real-time, you also want the simulation to be causal. In a CAD tool, you can take advantage of being able to do "multiple passes" through time to refine your simulation. In a game, once you've computed the quantities pertinent to a frame, you don't get to go back and recompute those quantities and present them.

</comment></comment></comment><comment><USER21> [http://i.imgur.com/QcKoWLj.png](http://i.imgur.com/QcKoWLj.png)

Doesn't seem to render correctly on Chrome 39. Works fine on latest Firefox.

<comment><USER22> Same for me (chrome 39.0.2171.99, win 7) But it seems to work using webgl renderer !

<comment><USER23> Indeed, changing that makes it work for me too, using canvas is broken. ( In the settings to the right, Renderer -> renderer )

</comment></comment></comment><comment><USER24> demo request:

I want a demo where the user can control a soft body ball such that the ball is comprised of chain segments, connected with string constant k. The pressure of the ball would be calculated depending on the area enclosed by the chain's polygon and would be applied to each segment equally, to the outwards side. Controls would be left/right as a simple added force to all segments of the ball. Jump would be increased air amount (target surface area) and crouch would be decreased k. In my imagination, the ball would be low friction and would grow throughout the game, to take on bigger adversaries.

(Sharing it here cause I didn't get to code it in years but I would really love to see if the control would work.)

<comment><USER25> Sounds like Gish! [http://www.chroniclogic.com/gish.htm](http://www.chroniclogic.com/gish.htm)

<comment><USER24> When I saw Gish for the first time, I thought the same but I bet they fake a lot of physics.

</comment></comment></comment><comment><USER26> This is really impressive! Just a small bug report:

[http://brm.io/matter-js-demo/#bridge](http://brm.io/matter-js-demo/#bridge) somehow had some things fall through to the ground the first time in loaded.

</comment><comment><USER27> Pretty slick. I think I might be using this at Global Game Jam this weekend.

On a side note though, it seems that there are some issues if you get things moving fast enough. I was consistently able to fling shapes through the walls on the first demo.

</comment><comment><USER28> Impressive - on the face of it, it seems both versatile and stable.

</comment><comment><USER29> Really nice, noticed a few jitter issues on the bridge example, that's possibly one of the hardest thing to do in a physics engine (that and fast moving objects).

</comment><comment><USER30> Very nice. But strange things happen in the "car" demo if you put one car on top of the other: they try to throw off each other like horses.

</comment><comment><USER31> Nice work. As someone who built physics engines years ago, it makes me kind of happy that solving stacking is still no trivial task.

</comment><comment><USER32> It looks simply great. The efforts put together for creating this library are commendable.

</comment><comment><USER23> Does not seem to work good in Chrome or Opera for me, all movement leaves trails.

</comment><comment><USER33> How is the cloth demo done? Is it with partial differential equations

<comment><USER34> another cloth using verlet integration:

[http://subprotocol.com/system/cloth.html](http://subprotocol.com/system/cloth.html)

repo: [https://github.com/subprotocol/verlet- js](https://github.com/subprotocol/verlet-js)

</comment></comment><comment><USER35> Very cool, love the variety of demos. :)

</comment><comment><USER36> This is amazing!

</comment><comment><USER37> Fun!

</comment><comment><USER38> Physics and collision detection in JS. One can only imagine the horror.

<comment><USER39> lol</comment></comment>


What cool personal project you worked on and that got you a job? - <AUTHOR> I am trying to transition from web development to mobile application development and I think flutter is the future. So I am learning flutter and made a small savings app, where user will set a goal for a year and will update how much money he has saved. App will show you your goal. A pretty graph etc. <comment><USER2> Have you deployed your app to production yet and is it downloadable/purchasable from the App store or play store? Companies love hearing about live applications and how you've maintained them to meet client needs or responded to a production level bug fast. That will also give you metrics to show off more than just here are a few play apps that I made and have sitting in localhost.

Also it will show future interviewers that you know how to deploy a Cordova app which will raise your marketability even more; at least from what I've heard deploying to Apple is a pain in the butt. More so than to Google since that's the wild west.</comment>


Paul Piff: Does money make you mean? - <AUTHOR> https://www.ted.com/talks/paul_piff_does_money_make_you_mean/transcript?language=en

<comment><USER2> Interesting. imo TED talks are much better in text format like this.</comment>


A Picture Emerges - Ex-Sun CEO, Jonathan Schwartz' next move - <AUTHOR> http://jonathanischwartz.wordpress.com/2010/09/09/pictoh/

<comment><USER2> According to the web site PictureofHealth.com,

"Most places on Earth, the internet is more accessible than electricity, clean water, or basic sanitation."

I have a hard time believing that statement. May be so, but not to the people who lack electricity, clean water or basic sanitation.

<comment><USER3> You need to visit rural India in 2010 :)

<comment><USER2> I am Indian and grew up in rural india. Have not seen it in 2010 but I still doubt that the people who lack electricity and sanitation are cruising the internets.

<comment><USER3> This picture speaks a lot:

[http://3.bp.blogspot.com/_v1GqsZFRxAc/R_qvwM4GdKI/AAAAAAAAAD...](http://3.bp.blogspot.com/_v1GqsZFRxAc/R_qvwM4GdKI/AAAAAAAAADg/CD2wMLZE9Ow/s320/2008-03-20-india- trip-081-sm.jpg)

And here is my experience from a visit in 2008:

[http://thapz.blogspot.com/2008/04/cell-phones-leapfrog- drink...](http://thapz.blogspot.com/2008/04/cell-phones-leapfrog-drinking- water.html)

In 2010 you can expect smart phones too, I guess. And there you have -- internet access in rural India, where there is no water and electricity.

</comment></comment></comment></comment><comment><USER4> If it concerns the third world then it sounds like it'll be addressing infrastructure and survival. I hope this succeeds where others have failed.

</comment><comment><USER5> Scott McNeally was the funny one.

I would love if he decided to start a company solely dedicated to making fun of Microsoft.

</comment><comment><USER6> Why is the orange heart the same nasty orange color as the Sun logo?</comment>


Is support for TitanDB available, alternative graph layer - <AUTHOR>

Is support for TitanDB available, Is it usable in prod. any other alternative graph layer which supports persistence to cassandra or HBase. <comment><AUTHOR> I'm planning to use titan as graph persistence layer for current data structure.</comment>


Show HN: A simple YouTube experience   - <AUTHOR>

Please comment..  http://videowatchr.com <comment><USER3> Looks good, I guess. I guess I struggle with things like this. Was this just a weekend project to learn a new x, y, or z? If so, cool - good job. If not, then I just have to ask, "Why?"

The page says, "About: VideoWatchr lets you watch and share YouTube videos and channels."

But I don't need some misspelled website to do that - YouTube lets me do that just fine. I can sort, filter, etc all on YouTube. So I don't get the point, I guess.

I do like the "Please comment." style - it says, "Here's what it is - <USER2> in any way you wish." Some people prefer to try to focus the comments ("Please tell me if you think this is needed", for example) and that's fine too. You just get different types of comments with each style.

<comment><AUTHOR> Thank you for the comment. The site's been around for 2+ yrs already and has undergone a lot of revisions. The site is missing a lot of usability features (the previous version got a playlist feature but I got no time at the moment to improve it).

The site is evolving and I may add other video sources and more features at some point. For now, the site offers a simple and straightforward way to watch the videos.

The big Q is why? - Yes, at some point, I have asked myself that question too.. I made the site as a side project and has been attached to it ever since.. Tweaking and improving it.. At some point, I told myself to stop because it's getting nowhere. Now, I realized the site helped me learn new things on every revision. New concepts and techniques. I guess the site will continue to evolve with me and be part of my journey. As for the name, the one with the correct spelling was already taken.</comment></comment>


Show HN: Youtubio.com – The Greatest Youtube Downloader – Totally Free - <AUTHOR> http://youtubio.com/

<comment><USER2> Could you please explain why this is the greatest? Or how it compares to the other youtube downloaders?

Does it allow selection of resolution ? Does it allow downloading only audio ?

Thanks.

<comment><AUTHOR> Yes, it does, sir! :) You can give it a shot! ;)

</comment></comment><comment><USER3> It would make you the greatest (at least for me personally) if you'd support bulk playlist downloads.

</comment><comment><AUTHOR> Any suggestion to make it better is welcome! :)

<comment><USER4> from a UX pov, some pictures in the home-landing page esp. the logo of YouTube or something similar to download would help new users to understand what it is.

<comment><AUTHOR> Thanks for your suggestion. We will have a better landing page and a list of supported sites as well.</comment></comment></comment>


Tesla Solar Roof:  9.85kW for $50k - <AUTHOR> https://www.inverse.com/article/44778-tesla-solar-roof-8-things-to-know <comment><AUTHOR> > Tesla does not suggest ordering an all-solar roof. Solar tiles cost $42 per > square foot, while non-solar costs $11 per square foot. Tesla recommends > $21.85 per square foot, based on 35 percent solar tiles. The design of the > tiles, patented recently, mean the two appear the same to the untrained eye > to create a single roof.

>Tobler bought a roof of around 2,000 square foot, with 40 percent of installed tiles solar. That costs around $50,000 once the federal solar Investment Tax Credit is factored in, and it produces around 9.85 kilowatts of power — which Tesla told Tobler was "the biggest system we have available."

</comment><comment><USER2> Can anyone familiar with the market compare that price to a "normal" roof solar installation? Seems quite expensive at first glance, but I'm not sure I have a good reference point when pricing everything in (warranty, powerwall, ...)

<comment><USER3> It's ~3.3X the price. It seems like an introductory price for early adopters.

<comment><USER4> aren't early adopters supposed to get a better deal, not worse?

<comment><USER2> If they are enthusiastic enough, they pay extra for the privilege of getting the cool stuff early and/or taking part in it getting finalized.</comment></comment></comment></comment>


State-by-State Polls Compared to Economic Indicators - <AUTHOR> http://blogs.wsj.com/economics/2008/11/01/state-by-state-polls-compared-to-economic-indicators/ <comment><USER2> For those to lazy to think about it too much...

(In general) Obama does better in states that are doing poorly economically.

<comment><USER3> Uhm, no. California, Oregon and Washinton (to name a few) are not in dire srtraights, yet are all pro-Obama.

<comment><USER2> Fine, "in general". There are more mccain states in places where income has gone up, and so on.

Actually, I just graphed it, and correlation is super weak. <http://img91.imageshack.us/my.php?image=blahvs9.gif> (Stupid Google Docs wouldn't play nice with the graph, so I had to use Excel. Sorry Web 2.0)

</comment></comment></comment><comment><USER4> its pretty simple really. Those people for whom trickle down economics didn't work are looking to vote out those people responsible.

<comment><USER5> Or, if we wanted to avoid simplistic partisan rhetoric, we might say that poor economic conditions tend to cause voters to favor the non-incumbent party.

<comment><USER4> well yes, voters are holding the incumbent party responsible</comment></comment></comment>


Show HN: pigeonal.com, a read-only email app - <AUTHOR>

Appcoast is a small collective of entrepreneurs and engineers, working on extensions for eBay and bespoke work for Mozilla by day, and working on The Next Big Thing by night. This week we launched our first commercial iOS app.
Pigeonal is an email client for iPhone. Its purpose is to quickly archive (and occasionally mark for follow-up) emails which only need a casual glance, or a quick check, before you file them away (examples: receipts, notifications, reminders).
The app scans your inbox for (currently) 207 different services and displays the results using icons in pigeonholes (a wood texture cupboard).
Q: Why only Gmail and MobileMe/iCloud? A: We'll roll out general support for IMAP, but it takes a lot of testing. IMAP is hairy.
Q: Can I flag/star an email for follow-up? A: That will be possible in the next version, flagged email is currently moved to a Follow-Up folder (which also works great, both in Gmail and MobileMe, but some people prefer flagging/starring).
Q: Are you crazy? Asking money for a read-only email client? A: The read-only feature is a deliberate design choice: it prevents you from being sucked into an email conversation. We ask money for the app because we think it provides value for some people.
Q: Are you storing my email credentials on your servers? A: No, your email account credentials are only stored on your phone using iOS keychain and are only sent to Gmail or MobileMe/iCloud.
http://www.pigeonal.com/ <comment><USER2> I think you're on to something here, but I would pivot just slightly. Let me explain.

The problem with email today is that it has many uses which we try to manage through a single client that has gone mostly unchanged for 20 years. You've brilliantly picked up on this. Having a separate app for managing notifications seems obvious now that I've seen your product, don't know why I never thought of it before this.

However being able to delete notifications is absolutely essential. Diving into a separate tool (not built for notifications) would be unfortunate.

<comment><AUTHOR> Thank you for the kind words, to be honest we're quite confident we'll have to pivot because we feel there's more to be gained from what this version is trying to achieve. We have many more ideas but we're unsure whether they fit inside Pigeonal, or even whether the current features remain 'as is'.

@ delete notifications - can you elaborate a bit on this please? I don't quite know what you mean by this.

</comment></comment><comment><USER3> <http://www.pigeonal.com/></comment>


The Secret of Effective Motivation - <AUTHOR> http://www.nytimes.com/2014/07/06/opinion/sunday/the-secret-of-effective-motivation.html <comment><USER2> My summary:

* There are 2 types of motivation- intrinsic (curiosity) and extrinsic (desire for recognition)

* It's often assumed that intrinsic + extrinsic is better than just intrinsic.

* But it seems to be that introducing extrinsic motivations can actually weaken intrinsic ones.

My takeaway: make sure you focus on the intrinsic and avoid letting extrinsic things override your intrinsic ones.

This is consistent with Dan Pink's talk (and book) about Drive, and how financial/monetary incentives change the way people approach things altogether. Not really a secret anymore, is it? But this hasn't yet fully seeped into conventional wisdom, I think.</comment>


Why should I commit frequently? - <AUTHOR> https://devenbhooshan.wordpress.com/2020/08/08/why-should-i-commit-frequently/ <comment><AUTHOR> Importance of committing frequently ?

\- Having periodic checkpoints because of small commits helps in debugging and makes the history cleaner

\- Small commits make collaboration better. If you commit and push the changes frequently, your team-mates will be able to integrate with your codebase frequently(sometimes even prevent merge conflicts)

\- Small commits encourages us to think iteratively</comment>


Ask HN: Employer can't send me salary from US - <AUTHOR> My employer is trying to send me my salary via wire transfer to lebanon,
but he can't because OFAC
http://www.wm.edu/offices/techtransfer/ExportControls/Regulations/OFAC/
We are considering Western Union as an option, but does OFAC apply to all money platforms in the US?
How can I recieve my salary from my employer? <comment><USER2> It may be illegal for the employer to send any money to you if you live in a sanctioned country. It may have also been illegal for them to allow you to do any paid work for them. You should talk with an attorney in your country for further guidance on what can legally be done, unfortunately they may not be able to pay you until sanctions have been lifted.

They would have to check with their lawyers to see what they can legally do, if they disregard sanctions they can be imprisoned, fined and have their business immediately dissolved by the U.S. Government.

<comment><USER3> "Depending on the country, OFAC programs may freeze assets of embargoed countries, prohibit payment of funds to individuals and countries on the embargo list, or prohibit provision of services to countries subject to US sanctions."

It looks like it's legal to provision services FROM the sanctioned country to the US, only payments to it are embargoed - so the OP can receive payments in another country?

</comment></comment><comment><USER3> Moneygram is cheap service too.

Can you open a bank account in a non-sanctioned country, and ask your employer to send your salary there? What about family or relatives overseas? If you play your cards right maybe you can domicile at a non-sanctioned country, "work from home", and work "while travelling" through Lebanon.

</comment><comment><USER4> If you wanted it under the table, you could try a digital coin of some kind.

<comment><AUTHOR> but switching it to cash would require some hard work here, unless I use some exchange service but that would make me lose some money...

<comment><USER4> Well you either get your money, or you dont, its your choice if its too much work for you then I suggest you find a new job.</comment></comment></comment>


Luau: Augmenting Lua's Syntax with Types - <AUTHOR> https://medium.com/roblox-tech-blog/how-to-plan-a-luau-augmenting-luas-syntax-with-types-7751a790f0d8 <comment><USER4> Related HN discussion on Aug 5 of the Luau github page [1]: "Luau A fast small, safe gradually typed scripting language derived from Lua" [2]

[1] [https://roblox.github.io/luau/](https://roblox.github.io/luau/)

[2] [https://news.ycombinator.com/item?id=24059432](https://news.ycombinator.com/item?id=24059432)

</comment><comment><USER5> Is it possible to run it outside of Roblox?

It seems silly to be concerned about parse time given that Luau uses a multi- pass optimizing compiler to generate bytecode.

Edit: see also teal[0] (newish) and typedlua[1] (dead?)

[0] [https://github.com/teal-language/tl](https://github.com/teal-language/tl)

[1] [https://github.com/andremm/typedlua](https://github.com/andremm/typedlua)

<comment><USER6> It does not seem to be possible to run this outside the Roblox Engine:

From the site: [https://roblox.github.io/luau/](https://roblox.github.io/luau/)

"Luau is currently only runnable from the context of the Roblox engine, which exposes a large API surface documented on Roblox developer portal."

</comment></comment><comment><USER7> Under 'Type arguments in function calls', they say C# and TypeScript can afford some cycles to disambiguate the following code:

        return someFunction<A, B>(x)

This is actually a case where TypeScript's promise:

> All valid JavaScript code is also TypeScript code. You might get type- > checking errors, but that won't stop you from running the resulting > JavaScript.

...is broken. The following JavaScript is perfectly valid:

        function f(something, other) {
            const A = 1;
            const B = 2;
            return something < A, B > (other + 1);
        }
        console.log(f(0, 0), f(2, 2));

If you run it in your browser you get 'true false' as output. Passing it through the TypeScript compiler produces the following:

        function f(something, other) {
            const A = 1;
            const B = 2;
            return something(other + 1);
        }
        console.log(f(0, 0), f(2, 2));

Trying to run that produces the error 'something is not a function'.

TypeScript can get away with things like this because such expressions are weird, rare, and mostly pointless.

The equivalent function in Lua would not be nearly as weird. It would simply return two booleans. There is no clear argument to be made here that the user actually meant a generic function call.

<comment><USER8> Strictly speaking, it doesn't "stop you from running the resulting JavaScript". The result isn't the same as if you'd run the JS directly, but it doesn't fail to output.

</comment></comment><comment><USER9> I don't understand the performance concerns of backtracking in case of the "as" operator. Backtracking should only occur when the parser was wrong (i.e. when it expected "x as y" but found "x as (" ), which is very rare and thus shouldn't impact the performance much.

<comment><USER10> I think they could just announce the deprecation and replace 'as' functions with 'as_' in user code (I mean, it wasn't many customers, maybe only one)

</comment></comment><comment><USER11> If you want to progressively add static types to Lua, decent IDE support, and not worry about transpilation; then you may be interested in my little project:

[https://github.com/Benjamin-Dobell/IntelliJ- Luanalysis/](https://github.com/Benjamin-Dobell/IntelliJ-Luanalysis/)

[https://plugins.jetbrains.com/plugin/14698-luanalysis](https://plugins.jetbrains.com/plugin/14698-luanalysis)

It's essentially Flow for Lua. It's not at all trying to be its own language, but rather been built out of my own needs to write maintainable code in environments that only run Lua.

</comment><comment><USER12> > We want to be able to traverse the AST for deeper analysis, so we need a > parser to produce that syntax tree. From there, we're free to perform any > operations we wish to do on that AST.

Sounds to me like they are trying to reinvent python3 in lua. Why not embed python anyway?

<comment><USER13> What had that quote got to do with Python3? In any case, Python is harder to embed and much slower.

<comment><USER12> Python has its own AST generator, type annotations and is embeddable easily via some helpers. Civilization 4 had it, so it isn't that uncommon. Not sure how fast it needs to perform once embedded, apparently you know.

<comment><USER7> > [Python] is embeddable easily via some helpers

You can embed Python, but making it safe to run untrusted code written by users will take enormous effort. Roblox is a platform for easily creating games and playing other people's games. They can't allow those games to pose a security risk to players' computers.

> Not sure how fast it needs to perform once embedded, apparently you know.

You're commenting this on a post that talks explicitly about wanting a faster interpreter than Lua 5.1. Nobody is switching from Lua to Python and getting better performance out of it.

</comment></comment></comment></comment><comment><USER14> Why would they create their own obscure solution? I imagine LUA is very easy to run sandboxed, but I can't shake the feeling roblox would be better off integrating scripting with JS. It would come with powerful typing via typescript, a great tooling (along with a type checker), and a lot of resources available online.

<comment><USER15> That's a popular opinion among people who have only used Javascript.

Few who have used both would give it a second thought.

Roblox is immensely popular, has a wide install base and thousands of developers with code in Lua already.

Why throw all of that away for an inferior language?

<comment><USER16> > That's a popular opinion among people who have only used Javascript. Few who > have used both would give it a second thought.

I have extensively used both languages for years and you haven't adequately answered my previous criticism [1].

> Why throw all of that away for an inferior language?

As if Lua (either the language, the implementation or the ecosystem) is not inferior.

> Roblox is immensely popular, has a wide install base and thousands of > developers with code in Lua already.

This is probably the only reason to justify Luau, and shows yet another problem with the Lua ecosystem: they don't (or rather, _can 't_) share their creations to each other. JavaScript is not a perfect language but the JS ecosystem has successfully converged into a single widespread set of solutions including TypeScript.

[1] [https://news.ycombinator.com/item?id=24067362](https://news.ycombinator.com/item?id=24067362)

<comment><USER15> Alright, if I must:

I still have no idea what your stubborn bug is.

Asking someone else to debug your code is obnoxious; insisting on it, doubly so.

I've never encountered it in the wild, and it sounds like a 'you' problem. Please don't bring it up again.

Or if you simply must, _explain yourself_. This isn't a tech interview; you're not paying me to solve puzzles, or even promising to.

<comment><USER16> string.gsub receives at most three arguments where the final optional argument is the maximum number of replacements, and returns two values where the second value is the number of replacements made. Therefore if the arguments do not have escape sequences the outer string.gsub receives 0 and `<arguments>` doesn't get replaced.

I intentionally asked you to find this bug out because you can acknowledge the particular class of bugs only after biten by that bug, and you didn't seem to even know what _might_ be problematic. In the other words, by now you can't get away by saying "you should give all function calls a name" posthumously.

It's a frequent novice mistake to write `if (a = b)` in C/C++, but any good enough C/C++ programmer will point it out (and modern compilers will flag a warning). Eventually people get used with this problem and the cycle repeats, this time with less novices falling into the trap, so this class of bugs is--- while problematic---not considered a huge deal. Given your reaction though, I doubt this is the case for Lua and that's yet, _yet_ another reason to avoid Lua.

<comment><USER15> Edit: ah, I just realized what you're actually complaining about.

Being able to drop two arguments into a function call is great! It's one of the better things about Lua.

But when you don't want it, wrap the call:

        f(a(b,c)) -- this will call f(r1,r2) with two returns
        -- vs
        f((a(b,c)) -- this will always call f(r1)

And now you know how to prevent this class of bug. Catching it in an intermediate variable is possible but by no means necessary.

Original reply follows:

Alright, yeah, that kinda sucks.

Here's another dumb one: table.insert, if you give it two values, it's table.insert(tab, val) and it inserts at #tab + 1.

If you give it three values, it's table.insert(tab, index, val), and that's bad enough: but if you pass it (tab, val, nil), it interprets val as index.

Which is surprising! you'd think f(a,b) and f(a,b,nil) would be the same thing, and usually, they are. But not in this one case.

But to be fair, here's an example of Lua done well:

        local L = require "lpeg"

        local end_str_P = L.P "]" * L.P "="^0 * L.P "]"

        local function _disp(first, last)
           return last - first - <USER3>
        end

        -- capture an array containing the number of equals signs in each matching
        -- long-string close, e.g. "aa]]bbb]=]ccc]==]" returns {0, 1, 2}

        local find_str = L.Ct(((-end_str_P * 1)^0
                              * (L.Cp() * end_str_P * L.Cp()) / _disp)^1)

I'll let you reason about what it does, and why it would be such a pain in the butt with regular expressions.

<comment><USER16> > But when you don't want it, wrap the call: [...] And now you know how to > prevent this class of bug. Catching it in an intermediate variable is > possible but by no means necessary.

Well, I knew that; in fact what I've linked in the past discussion was the exact code to handle this case in my type checker. It is seriously confusing that a seemingly excess parenthesis affects the code anyway, and you can't exactly know whether the parenthesis is necessary or not without using a type checker.

There are some other languages that have multiple returns and can pass multiple arguments for nested calls, notably Go, but Go only does that when the inner call is the sole argument to the outer call. And Go does have a type system. Tons of other languages including JavaScript have an explicit "spread" operator which mostly retains the usability and avoids such problems.

> Which is surprising! you'd think f(a,b) and f(a,b,nil) would be the same > thing, and usually, they are. But not in this one case.

Or any C function relying on lua_gettop. Seriously, nil should have eliminated in that stack.

> I'll let you reason about what it does, and why it would be such a pain in > the butt with regular expressions.

I don't like a quirky EDSL alternative to the regular expression (or what it matters, parsing expression grammars) either. I prefer lpeg.re in that regard.

        local re = require "re"
        local long_str = re.compile(
            [[
                end_str <- ']' '='* ']'
                long_str <- {| ((!end_str .)+ ({} end_str {}) -> disp)+ |}
            ]],
            {
                disp = function (first, last)
                    return last - first - <USER3>
                end,
            })

Lpeg itself is a fine library, but its use of 1 as anything or -1 as the end of string is annoying (at the very least `lpeg.P(-1)` should have been `lpeg.Eos` instead). I would still use lpeg proper for constructing patterns programatically.

But you can't give lpeg as an answer to string.gsub and so on. First, the standard library still remains problematic and people will get tripped up (if you have no room for implementing `|`, one can require that `|` is escaped, m'kay?). Second, it's not a default, or at least not what you can easily `require`. The Lua ecosystem is fragmented primarily by not having a universally usable package system (I stress that LuaRocks is not) thus an external library is not always an option.

By the way I don't know why you would want to give that obscure example to brag about Lua. Your code is in fact slightly incorrect: `(L.Cp() ...) / _disp` looks like that the capture is applied only to that parenthesis but it's not, thanks to the operator precedence. The main problem of regular expressions is an inability to refactor and you haven't correctly demonstrated that.

<comment><USER15> > _Well, I knew that_

So a deficiency in your code, you chose to blame the language.

That's a you problem.

> _I don 't like a quirky EDSL_

A you problem

> _I prefer lpeg.re_

So Lua offers two superior ways to process strings over one? and you're still mad? Sounds like a

> _But you can 't give lpeg as an answer_

Ah but I did. You just don't like it, which is, you guessed it, a _you_ problem.

Ierusalimchy wrote lpeg specifically to address known deficiencies in the pattern library.

Sure, you can't always use it. Just like you might be stuck on an obsolete version of JS in an embedded system.

But this is neither Lua's problem, nor my problem. It might be _your_ problem. I'm beginning to detect a pattern!

> _Your code is in fact slightly incorrect_

It is, in fact, not.

I recognize the trope here. Happily, I'm in a position to fire people who show it, and have.

In your case, I'll have to be content with never interacting with you again.

<comment><USER16> (I'm pretty sure that this won't get a reply, but I'll leave the final post for others.)

> So a deficiency in your code, you chose to blame the language.

The language is to blame if it encourages a deficiency. I've linked to the type checker code to show that this kind of bug is virtually invisible, not like the aforementioned `if (a = b)` case, even to who knew enough to write a type checker.

> So Lua offers two superior ways to process strings over one? and you're > still mad?

Lua doesn't offer two superior ways, it's lpeg that offers. And what lpeg offers (first-class PEG) is irrelevant to my problem (Lua the language lets you to accidentally put unintended arguments) anyway.

> Ierusalimchy wrote lpeg specifically to address known deficiencies in the > pattern library.

And yet he left the faulty version in the standard library.

> Sure, you can't always use it. Just like you might be stuck on an obsolete > version of JS in an embedded system.

You don't need the embedded system to show that you can't always use the JS package system. Web browsers some years ago didn't support that. As a result webpack (among others) happened and we are now comfortable to compile JS down to the bundle. Does Lua have any equivalent?

When I raise the issue with Lua the language you point to Lua the ecosystem and sideskip the fact that Lua the ecosystem itself is fragmented thanks to Lua the implementation. My issue with Lua (either the language, the implementation and the ecosystem) is multitude and pretty much every issue is connected to each other.

> It is, in fact, not.

Your code is different to the following (which is what I consider more readable):

        -- [end_str_P and _disp omitted]

        -- returns 0 for [[, 1 for [=[, 2 for [==[, and so on
        local end_str_len_P = (L.Cp() * end_str_P * L.Cp()) / _disp

        local find_str = L.Ct(((-end_str_P * 1)^0 * end_str_len_P)^1)

Your code unintentionally groupped `(-end_str_P * 1)^0 * (L.Cp() * end_str_P * L.Cp())`, as `a * b / c` would be `(a * b) / c` instead of `a * (b / c)`. It is not "incorrect" as the former doesn't contain any capture, but has enough potential to become incorrect. That's what I want to avoid by not using a "quirky EDSL".</comment></comment></comment></comment></comment></comment></comment></comment></comment>


Not Really 'Made in China' - <AUTHOR> http://online.wsj.com/article/SB10001424052748704828104576021142902413796.html <comment><USER2> If an American firm pays for manufacturing for a Chinese firm to make something and ship it to America, and an American firm to distribute, only the price they pay for manufacturing and shipping count towards the trade. So the manufacture does not artificially inflate the total trade deficit.

I think that all the article proposes changing is the way the total trade deficit is divided up between trading partners. However, looking at the balance of trade between a pair of countries rather than between one country and all other countries is pointless anyway.

Consider the following simplified situation: there are only three countries in the world, A, B, and C, equally affluent, and they all use one currency, $. A has a trade deficit of $1 billion to B, B has a trade deficit of $1 billion to C, and C has a trade deficit of $1 billion to A.

In the simplified scenario, there is no net transfer of wealth out of A, B, or C, because each has perfectly balanced trade - so there is nothing wrong with that picture.

In summary, the proper solution is to look at total balance of trade per country, not to get too hung up on balances of trade between pairs of countries. The article is trying to solve a non-existent problem.

</comment><comment><USER3> But Foxconn wholesale buying components from Japan, Germany, Taiwan, still should reflect in Chinese trade balance as imports though. So it can be argued the old system is more transparent and easier to account than this contraption designed to make U.S. trade figures nicer.

<comment><USER4> True. All that this is saying is that the bilaterial trade deficit numbers can be deceptive. Net imports - exports for a country do not change.

<comment><USER5> Almost all trade deficits are deceptive. in general imports are very carefully monitored - since they are taxed - while exports, especially invisible earnings, are very approximate.

Until recently the US measured exports purely in tonnage and then averaged their prices. So a ton of wheat = a ton of Windows DVDs

</comment></comment></comment><comment><USER6> It's actually not clear that trade deficits between nations are meaningful. Suppose country A sells 100 seashells worth of foo to country B and B sells 100 seashells worth of bar to C and C sells 100 seashells worth of baz to A. None of the countries have a trade deficit on the whole, but A has a 100 seashell trade deficit to C. So yes, the trade deficit exists in this example but that doesn't imply directly that A needs to take action to fix it.

I think most outside observers of this three way arrangement would think it sounds fine, where the issues creep up is when foo production requires little labor and baz production is very labor intensive.

</comment><comment><USER7> Only $6.50 added by Foxconn's assembly step? I'd have expected much more.

Here's the question I emailed to firstname.lastname@example.com last week:

Subject: Made in the US iPhone?

Hiya. I love my iPhone. I'd be willing to pay more than the $200 that I paid to AT&T if it were assembled in the US.

Do you think enough of the market would embrace a "Made in the US" iPhone version with a $100 (?) premium? Would that be enough of an increase to offset higher labor costs?

Cheers,

Sanjay

</comment><comment><USER8> tldr: The article argues that it is fairer to look at where the value is added instead of just gross numbers when looking at trade balances.

<comment><USER9> But thing is,

While the article plausibly argues that the cost of the iPhone should not be credited entirely to China, it still shows the iPhone as adding to the deficit - the cost should just be creditted to Japan, S. Korea, German and "others" instead of China.

Which isn't an indication that the US trade deficit is an illusion or anything...

<comment><USER10> It didn't say it was - it was talking just about China.

</comment></comment></comment><comment><USER11> This goes for the same in the United States I did some work for a light manufacturing company and the motors, electronics, and small misc parts in the product came from China, the metal base of the product from Mexico, The part that was made in the USA was the assembly.

</comment><comment><USER12> How exactly has free trade benefitted the majority of the population of the U.S. again?

I see the microeconomic benefits to individual companies: lower costs equals higher margins. Lower prices? You, mister CEO, are fired! Every econ freshman knows to calculate marginal profit times units sold to find the best price in terms of total profit, and the cost of the inputs often has little to do with it, except when elasticity of demand is very high. By and large, you charge what the market will bear, and pass the savings along to the shareowners (and the board and execs, of course)

Having _every_ company outsource and import destroys "the commons" of a nation. Regardless of which _other_ nation the money is going to.

<comment><USER6> You're talking from the perspective of a pseudo-monopolist, which makes sense when we're talking about iPhones, but all it takes is one entrant charging lower prices and your "best price in terms of total profit" calculation goes down the tubes as consumers switch over to the cheaper alternative.

So you're right, a monopolist does not care at all what the costs of the inputs are but with competition the result is cheaper consumer goods (which has its own vices but that's a different issue...)

Think about it; would you really want to live in a U.S. where every good was made in house? Your cashews would be very, very, very expensive.

</comment></comment><comment><USER13> According to my iphone, it wasn't MADE in china. It was just ASSEMBLED there...</comment>


Starting Feb 1, new apps and app updates must be optimized for iOS 7 - <AUTHOR> https://developer.apple.com/news/index.php?id=12172013a#top <comment><USER2> iOS 7 is the first Apple system where I felt royally screwed. My iPhone 4 became so slow as to be nearly unusable. Everything now takes seconds, swipes are being missed, even audio gets chopped up when I play back podcasts over bluetooth.

There are two reasons for me to be angry about this:

* Apple should never have released iOS 7 for iPhone 4 devices. iPhone 4 should have been listed as "unsupported". But had they done that, they would have ended up with a fragmented ecosystem, and unable to brag about how so-and-so-many percent of users upgraded to the latest iOS.

* There is _no good reason_ for iOS 7 to be slower than iOS 6. The "it requires more processing power for animations" reason is bogus, because there are very few animated effects, and I switched off whatever I could anyway. The only reason every iOS release is slower than the previous one is because Apple does not care about optimizations. They can afford not to care because every new hardware device is much faster than the previous one. But that means some users get royally screwed.

I should have stayed with iOS 6 (there is no going back now), but more importantly, Apple should not have claimed that iOS 7 is supported on my device. For all practical purposes, it isn't — the experience is really bad. I've just compared it to an iPhone 3G running iOS 4.2.1, it's more responsive than iOS 7 on iPhone 4.

So, this forced migration to iOS 7 is something that makes me angry, because I'm that part of the userbase than is being dragged into it kicking and screaming.

<comment><USER3> Agreed, with reservations. iPhone 4 itself was a grossly mis-executed product, though it wasn't obvious at the time.

The core issue is that the iPhone 4's CPU and GPU performance are only marginally better than the 3GS it replaced, but it pushes 4x the number of pixels around.

At the time we weren't really pushing the performance envelope, so everything appeared fine. Now we are - it's trivially easy to hit the upper bound of iPhone 4's performance envelope, whereas the 4S (and the 5, 5S) have a lot more wiggle room.

More critically for app and OS developers, the GPU performance on iPhone 4 was woefully inadequate for the number of pixels it's tasked to render. IIRC the iPhone 4's GPU has a fillrate (i.e., max pixels rendered per second) that's about 13% higher than the total number of pixels it has. This is to say, if you draw even a trivial amount of stuff in the background, you're going to start dropping frames.

For the 4S, 5, and 5S, the lack of CPU performance can often be made up by moving things to the GPU judiciously. On the 4 we don't even have that.

Here's where I disagree:

> _" There is no good reason for iOS 7 to be slower than iOS 6. The "it > requires more processing power for animations" reason is bogus"_

Of course it is, but no one stated that the slowness is due to animations. A large part of the slowness comes from the "blur everything!" design of iOS7, which is inherently GPU-heavy, and thus performs _very_ poorly on the iPhone 4 and its shittastic GPU.

The blur is _everywhere_ , even (especially?) the stock apps where every tool bar and navigation bar blurs items behind itself. You may want to try turning the blur off: [http://www.redmondpie.com/how-to-turn-off-ios-7-blur- effects...](http://www.redmondpie.com/how-to-turn-off-ios-7-blur-effects/)

This really has little to do with optimization - iOS is on the whole a pretty performant OS and platform. This has everything to do with Apple deciding to include features that are beyond the performance envelope of a targeted device (or conversely, failing to drop support for a device when features move past its performance envelope).

<comment><USER2> I disagree with this reasoning. The number of pixels to be pushed around did not change from iOS 6 to iOS 7. It's still the same. The fancy graphics effects are reduced already by default, and you can reduce them even further. My phone doesn't do visibly anything different from what it did under iOS 6. And yet it is much, much slower.

I already did everything that the article you quoted suggests. My phone runs in high-contrast, super-accessibility, no-fx-please mode. And performance still sucks.

To give you an example: I sometimes press power-on, nothing happens for a second or two. Then I press the home button and after another two-three seconds I get… a screenshot, just as if both buttons were pressed simultaneously. Number of pixels, blur, seriously? We haven't even gotten to displaying the lock screen yet!

I still believe there is lots that can be optimized, but Apple chose not to do it. It wasn't laziness, it was a business decision — their time is better spent implementing new stuff — but that is a decision I disagree with. Or, more precisely — I disagree with this decision given that they called iPhone 4 "supported".

<comment><USER4> > _I sometimes press power-on, nothing happens for a second or two. Then I > press the home button and after another two-three seconds I get… a > screenshot, just as if both buttons were pressed simultaneously._

Sounds like your phone's borked in some way.

That happens to me sometimes (1 in 10?) when bringing in legacy settings on to a new device.

I've helped upgrade several 4 (not 4s) users and they're happy. On all of them I turned off motion, turned off blur, turned off background updates, turned off auto music/app/updates downloads.

If a phone still has slowness, it's usually a bad setting brought forward. Seems to usually be in email or network settings.

I delete email accounts, reset network settings, and recreate email accounts, leaving iCloud as Push and all others as Fetch, Manual.

If that doesn't fix, I try again, this time "Erase all settings". (Not Content and settings.)

These are the same steps I use to get back battery life losses. Something goes wrong, runs in background, kills batt and slows phone.

Finally, one friend has Downcaster and always ends up with a full phone. Below a level of free memory the device definitely slows drastically. Touch and wait kind of slow, less than 2GB on 64GB device is noticeable, less than 500MB get to be a real problem.

</comment></comment></comment></comment><comment><USER5> The original ipad can only be upgraded to iOS 5.1.1, I think.

There are a couple implications. First of all schools (like where my kids go) that bit the apple and deployed ipads to all the kids can't install or upgrade software after February. So if you're selling apps to kids, get your profits while you can. After february if they spend all their budget on upgrading ipads to the latest hardware so they could eventually install apps, they're not going to have any money to spend on apps, so that is a double whammy on sales. Something tells me no one told the accountants and administrators that the depreciation period was so short; much like elementary schools reuse textbooks for 20 years I think they were a wee bit optimistic about ipad usable lifespan.

Another implication is if you have a use case for app-less (web based) ipads, the market is probably going to absolutely flood in a couple months with cheap ipads that can't run modern native apps. So if you're trying to develop an ipad app for cheap people, the wise choice at this time would be web based not native. Also a web based solution could be sold to android users or desktop users or whatever.

The TLDR is native iOS apps are going to die pretty soon. Which is too bad, it was an interesting technological idea.

<comment><USER6> App optimized for iOS 7 != App only runs on iOS 7

In most cases, the developer just has to recompile the app and include iOS 7. Of course it get's a lot more tricky if one wants to start using new APIs introduced in iOS 7, and that's why most devs will drop support for older versions.

<comment><USER7> This needs to be highlighted more here.

Support for iOS 7 can complicate things, but for -- I'd estimate -- 75%+ of developers it's simply tweaking a few things and then releasing an app that continues to support v5.0 and up at the very least.

This isn't as dramatic an announcement as some are making it out to be. Though maybe it should be, as the way to encourage both consumers and developers to stay up-to-date is to force them into it with limited support.

<comment><USER8> Agreed. It takes a while to figure out what iOS7 breaks in your app, but there are plenty of resources out there that tell you exactly how to fix all of the problems. Sliding content under the top menu was the big one for me, but it's a one line fix. (Or three if you like your if statements on multiple lines.) Turning off the bright colors for links and buttons is another one liner. It was probably less than 20 lines of code and a day's work to update my apps.

There are a bunch of new features that I'm adding. I especially like the ability to speak text with a Siri-like voice.

I think my interfaces fit into the iOS7 ecosystem, but until they start enforcing the policy on Feb 1, I won't really know. Figuring out what the rules really mean is always a big unknown in the app review process.

</comment></comment></comment></comment><comment><USER9> A few things people might be missing from this announcement.

1) Simply recompiling an application with iOS 7 SDK unlocks a different set of view metrics and subtle behaviors that are non-trivial to address. Developers need to make sure views lay out properly (accounting for the status bar, etc.) in both iOS 7 and iOS 5/6.

2) If you're a game company, chances are you can set your target device to iOS 5 and after making sure you account for the metrics changes you should be fine.

3) Clang/LLVM changes might cause a new crash when run on iPad 1, for example, because Apple won't be testing it anymore. You'll need to have this hardware around to verify everything runs if you want to support that device.

4) If the application is rarely updated or barely maintained, chances are it will be abandoned at this point. What used to be a simple bug fix here and there will now become a massive project.

5) Last and most important point, most software that IS maintained, or at least downloaded enough to warrant concern, I promise you that Apple's developer relations has a point person on top of it. All of your games and important tool makers are well aware of their need to transition to the new SDK if they haven't already. Perhaps a bug in 7.0 that will be fixed in 7.1 was keeping them from releasing an update.

5.1) If you have a game that is used on iPad 1, speak up and let the developer know so that they can make a decision to keep supporting it. OpenGL ES has been quite stable API-wise for quite some time so I suspect most games will continue to support iOS 5 for the foreseeable future.

</comment><comment><USER10> Worth noting that first generation iPad, the current model until March 2011, will only run iOS 5.1.1 and has essentially been obsoleted by now.

Yes, it is theoretically possible to support earlier versions but Apple makes it practically very awkward: around half of the top apps don't support iOS 5. Apple's own apps apparently don't support iOS 6.

<comment><USER11> Which makes it odd that 2011's iPad 2 is not only still supported, but still on sale.

<comment><USER12> There are two reasons. First, the original iPad was somewhat underpowered. There is a reason the iPad 2 felt _so much faster_.

The second reason is because of the iPad mini. The non-retina Mini __is __an iPad 2, just in a smaller package.

I know some developers were complaining after the retina Mini was announced because Apple didn't update the non-retina version to the A7, so the effectively still have to support the iPad 2.

</comment></comment></comment><comment><USER13> Doesn't requiring the new build pipeline plus 'optimized for iOS 7', mean you can't support most older iOS devices anymore? I know that is how the build pipeline stuff worked for desktop OS X apps - they tended to deprecate the ability to build for older OS versions when you installed the latest rev of XCode.

If so, how far back does it go? Like, if I compile an iOS7 optimized app, will it work on iOS6 devices? What about iOS5? Do they schedule the support deprecation based on lifetime (i.e. all devices released in last 2yrs will work) or is it just based on software versions?

<comment><USER14> I'm also interested in the answer to this. Building for Android allows you to target a wide range of versions even if your build target is the latest; is there any analogue to this in the iOS world?

<comment> grey-area You can build for ios 7 at the same time as ios 6. They tend to assume you'll only want to target the latest, but it can be done without much trouble, esp. if you already have a tested older project and are willing to put more time in to testing. I'm supporting an app which supports ios 5-7 at present but we tend to test only on 6-7, and have changed some of the UI to match better with ios7.

The issues tend to be with matching chrome if you have custom controls, but if you don't have many custom controls, you'd probably be fine. I imagine it's not very different from the story for Android.

</comment></comment></comment><comment><USER15> What does that mean for third party applications? Like those built using Adobe Air, which as far as I'm concerned, does not use Xcode. Will an application that complies with the iOS 7 guideline be rejected just because it was not compiled under Xcode?

<comment><USER16> These tools will have to be updated to emit binaries with load commands that link against iOS 7 versions of UIKit in order to be in compliance. This is similar to the regulation change in March 2013 that mandated support for iPhone 5's larger display dimensions.

</comment></comment><comment><USER17> I think the lack of definition of "iOS 7 optimized" is what is confusing to those of us who haven't developed apps on iOS.

<comment><USER18> Yeah, I was thinking that as a web/java developer I don't understand what this means.

Does this mean that, essentially, we only build for iOS 7 onwards?

<comment><USER19> "iOS 7 Optimized" is Apple's way of saying "built with the iOS 7 SDK".

Apps that are built for iOS 7 get the new shiny keyboard and some different behaviour when run on iOS 7, but can still run fine on older versions of iOS if the app developer is willing to support older versions of iOS. This is done by setting an option called "deployment target" to an older iOS version when building in Xcode (and testing a ton on older versions of iOS, and not calling newer APIs on versions of iOS that don't support them).

So this announcement means Apple is dropping support for older versions of Xcode (with older iOS SDKs), but older versions of iOS are still technically supported as long as you're building with the iOS 7 SDK.

<comment><USER18> Ah OK – thanks for the information!

</comment></comment></comment></comment><comment><USER20> Does this affect Phonegap and Ximian?</comment>


Ask HN: How to handle content of a flat-file CMS in Docker images? - <AUTHOR> Hi HN Community,
I currently work on a project that runs with Kirby, a flat file CMS. Means: all content is saved in files inside the project structure. The project should be built as a Docker image and deployed to the server afterwards.
I would like to know how a good solution could look like that handles the changing content files inside the Docker containers?
Current evaluated solutions:
- save them in shared folders outside of the Docker containers, via volumes.
- handle them via Git and store them in a submodule, changes are commited with the Autogit Kirby plugin.
What are your thoughts? :) <comment><USER2> How are you running the Docker containers in production? e.g., Docker Compose on a single server, Kubernetes, something else, etc

For prod, if you are trying to keep runtime simple, I would bake the content into the Docker containers and keep the containers immutable as others have suggested. This works especially well if you're deploying on a FaaS platform like Zeit Now. Baking the content into the image makes scaling effortless if you need it.

For local dev, I would just use a docker volume or bind mount.

</comment><comment><USER3> Keep the container immutable.

So more likely solution 2, the important thing is that you regenerate the container image every time you deploy changes. If you care about faster builds, keep the cmd to pull content towards the end of your Dockerfile.

Immutable containers can be relaunched even when your data is not available, and new images can't be built. It's rare, for sure, but even s3 goes down.

Edit: of course for development it's easier to mount a volume.

</comment><comment><USER4> volume solution sounds good because that's state which should be kept outside. Think of a Kirby-Runtime-image providing your site from docker volume. Share the volume between kirby container and utility container pulling the git bits into the volume for devision of concerns (keeps git and credentials in separate container).

</comment><comment><USER5> Just rebuild your container each time you change one bit.

And get gitlab-ci to redeploy it automatically to a kubernetes cluster each time it changes.

<comment><AUTHOR> This wouldn't work as content is also changed while the site is running. That means content is changed inside the container but won't be pushed everywhere then so the next build would override the changes made.

<comment><USER6> I think you have to fight pretty hard to justify using Docker. If you don't know why you would need it or how you would use it, then it's possible that you aren't ready for it yet.

Keep in mind that development Docker and production Docker are two different worlds. There are things which Docker brings to the table in both worlds and the way you use it is different in both. It's quite possible that it's really helpful for development but not yet needed for production.

In your case, you would probably be better off outsourcing the plumbing of your hosting to a service such as Netlify or Heroku.

If you still have questions, a better place to check would be one of the StackExchange sites. Post your question there or find a similar question which has already been answered.

<comment><AUTHOR> Unfortunately, it was neither my decision to use that CMS nor to use Docker for deployments. But thank you for the input.</comment></comment></comment></comment>