Obama signs defence bill calling for space-based missile systems - <AUTHOR> http://www.scmp.com/news/world/united-states-canada/article/2057047/star-wars-ii-obama-signs-defence-bill-calling-space <comment><USER2> _Franks, asked whether the country could afford it, replied: "What is national security worth? It's priceless."_

So let's see, Congressman Franks, if you really believe that security is priceless. Do you wear a Kevlar vest at all times? Ride only in an armored Maybach? Keep a dozen bodyguards at your home? Line the walls of your house with depleted uranium? Scan every object entering your house with a T-wave explosives detector and a Geiger counter?

Of course not. Security is not "priceless"; it is subject to cost/benefit analysis like everything else. I can do no better at this point than to quote President Dwight Eisenhower:

 _Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children._ [0]

 _In the councils of government, we must guard against the acquisition of unwarranted influence, whether sought or unsought, by the military-industrial complex. The potential for the disastrous rise of misplaced power exists and will persist._ [1]

I think it's a safe bet that the big defense contractors like Lockheed Martin have been lobbying for a resumption of Star Wars ever since the Reagan years. Looks like they finally found a moment when we were all thinking about other things.

[0] [https://en.wikipedia.org/wiki/Chance_for_Peace_speech](https://en.wikipedia.org/wiki/Chance_for_Peace_speech)

[1] [http://mcadams.posc.mu.edu/ike.htm](http://mcadams.posc.mu.edu/ike.htm)

<comment><USER3> _" Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed."_

When was the last time an American Presidential candidate ran on feeding the hungry and clothing the cold? Such sentiments are more likely to be derided these days as "socialist".

<comment><USER2> Well, there was Bernie :-)

<comment><USER4> Bernie was very pro war. He wouldn't have gotten as far in the primaries if he hadn't been. He talked about arming the Jordanians and adding to the conflict, not stopping it:

[http://fightthefuture.org/articles/sanders-and-hillary- the-c...](http://fightthefuture.org/articles/sanders-and-hillary-the- continuation-of-the-american-dynasty/)

If he had been elected, he'd be a puppet

</comment></comment></comment></comment><comment><USER5> An interesting move. One that incoming Trump administration would find politically hard to neuter, and which is likely aimed to deteriorate Russian defence first and foremost.

Russia is not economically and technologically positioned to meet the challenge, but would unavoidably have to try anyway.

Could be the "appropriate answer" to the hacking Obama hinted before.

<comment><USER6> With their recent plane accident it seems that they indeed have technological quality problems to address already. I don't really hate the Russian government, and I'm not fond of other ones, but large countries in a pride escalation around military always worry me.

</comment></comment><comment><USER7> Why would a nation like Russia or the US give in to total nuclear disarmament without a missle shield like this? A nuke free future is impossible without a shield like this available to all. All countries serious about disarment should be jointly contributing to this effort.

<comment><USER8> Advances in offensive capabilities are spurred by advanced in defensive capabilities, and vice versa (going back to the time when the 'offensive' weapons were rocks and sticks, and the 'defensive' options were woven plant material).

The response to this sort of system is not "Oh, well, guess we can pack up the nukes now", it's "We need to invest in a nuclear delivery system that is capable of defeating this system", and the cycle starts all over again.

<comment><USER9> "Dang, they've developed an 'antivirus' program. Pack it up boys, viruses are obsolete now!"

</comment></comment></comment><comment><USER10> In such a globalized world, where economics are so linked that many countries, including the US, couldn't survive without the others, this type of stuff just sends society backwards. Not like we don't have enough guns pointed at the world, why not spend an exorbitant amount of money to point an even bigger one. You may be able to get someone to listen to you by pointing a gun at them, but never their respect.

<comment><USER11> I think you would find very disturbing that 1900's people used just the same argument to "prove" that world war I wasn't possible and would never happen.

<comment><USER12> I don't think WWI is a case of "if only we had armed ourselves more and more, we could have stopped it sooner."

</comment></comment></comment><comment><USER13> > _Leading defence scientists said the idea that a space-based system could > provide security against nuclear attack is a fantasy_

Does someone have more detail on this?

<comment><USER11> Space is too large, distances are too great. There is no suitable laser right now. Besides that, if you are garanteed to neutralize your enemy's arsenal, you force him to attack first while he can avoid his own total destruction.

<comment><USER13> > _There is no suitable laser right now_

This is a fine argument against _this_ concept. But the article frames the scientists as saying it's not just unfeasible now but generally impossible. That's what I'm struggling with.

</comment></comment></comment><comment><USER14> latest from the nobel peace prize winner...

<comment><USER15> Obama didn't ask for a nobel peace prize, AFAIK.

<comment><USER16> Jean-Paul Sartre, and Le Duc Tho declined the Nobel, Obama could as well if he did not believe in the purpose of the peace prize.

I have 7 words for anyone who wishes to down vote: Afghanistan, Iraq, Pakistan, Somalia, Yemen, Libya, Syria

<comment><USER17> Sartre was an independent, free spirited academic. Le Duc Tho was a revolutionary. Obama is a career politician who was just elected president. Why do you think he would or should have turned it down?

<comment><USER18> I agree that he had no obligation to turn it down, but I really don't follow your argument as to why Sartre or Le Did Tho did. Can you elaborate?

<comment><USER17> They did so mostly because they considered themselves academically/intellectually above the Nobel Prize and prizes in general. I'm not a mind reader.

</comment></comment></comment></comment></comment></comment><comment><USER3> What happened to no militarization of space?

</comment><comment> brian-armstrong Just a bit of a spoiler -- It doesn't get really good until IV ;)</comment>


Ask HN: Where do I go to buy a CREDIBLE web business worth $100k?  - <AUTHOR>

With some savings that I've done in last several years - I'm looking for a web business with six figure profit and which doesn't require lot of time to run it ...<p>People mostly suggest Flippa and similar but I dont find anything worth it after doing thorough due-diligence ... does anyone have any experience? any suggestions? <comment><USER2> I'm a little confused by your question. Are you looking to _spend_ $100K or to _generate_ $100K annually? If the latter, the company is probably "worth" 2 to 5 times $100K.

<comment><AUTHOR> either is okay as far as numbers are good and i dont have to spend lots of time ... if the purchase price is $100k then i expect it to make around $5k/month.

<comment><USER2> I hope this doesn't sound condescending because I'm very, very far from an expert in this field, but you might want to spend some time researching conventional methods of business valuation. I'm pretty sure your expectations are a little off here.

</comment></comment></comment><comment><USER3> [http://37signals.com/svn/posts/2899-sortfolio-deserves-a- bet...](http://37signals.com/svn/posts/2899-sortfolio-deserves-a-better-home- make-us-an-offer)

</comment><comment><USER4> You could try SitePoint as well, they have a marketplace for selling sites.

<http://sitepoint.com/></comment>


GhostBSD 20.01 - <AUTHOR> http://www.ghostbsd.org/20.01_release_announcement <comment><USER2> Glad to see that BSD is catching up with Linux a bit in terms of having lots of random distributions. ;-/

Is there any good reason why various differentiating features (e.g. booting from a USB drive, various GUI packages, codecs, better driver support, better installer, whatever...) can't or shouldn't be upstreamed into a mainline BSDs like FreeBSD?'

Perhaps FreeBSD should have multiple installer images such as live/server/desktop, a la Debian/Ubuntu?

On the other hand, perhaps the most popular (Free/Open/Net?)BSDs should take a stand against Linux-style fragmentation and adopt a standard desktop GUI, API, and application binary package format.

</comment><comment><USER3> I used FreeBSD on my last laptop.

Here are the things I liked: \- all applications that I needed to do my work on windows or mac or linux were available. \- native encryption of all the file systems even /boot and even /root and even / through geli on top of zfs. This is super easy to deploy through the installer. Seriously. \- it also offer native compression of file systems through zfs. /var/log, /home, etc \- there are tons of stuff like easy to compile custom kernels, rebuild the world, etc, but this is just me being a geek.

What I didn't like: \- there is just one thing that really turned me off. I was never able to properly configure a wireless interface with also the ethernet connection. What I'd like is that if both are connected that it prefers ethernet then switches to wifi if I disconnect. This should be done by default without fiddling around. I had to use some hacks and it turned me off.

I'm very tempted to try ghostbsd, but before I do so, I'd like to know whether it's possible to have dual network connections: ethernet + wifi with preference with ethernet and smooth transition when I unplug network.

Can anyone confirm whether dual network is flawless in ghostbsd?

</comment><comment><USER4> Anyone have experience switching from Ubuntu to GhostBSD? If so, what headaches/bumps did you encounter?

<comment><USER5> The biggest problem with any BSD - at least for me - is that I can't watch Netflix. I like watching crappy TV shows while I code and that only really works on Linux. I canceled my trial of Disney+ just for that reason.

<comment><USER6> I can understand BSD for servers, but what are some of the rationales for switching from Linux to BSD for a desktop?

<comment><USER3> Native full encryption through zfs. That was my main reason. Zfs is well integrated in BSD. Something that will not happen soon in linux based on Linus latest comments that zfs has legal issue with linux

<comment><USER7> It is there on Linux, and it has the encryption patches.

</comment></comment></comment></comment></comment><comment><USER8> >Glad to see that BSD is catching up with Linux a bit in terms of having lots of random distributions. ;-/

GhostBSD has been around for years, since 2010. It's actually the first and only BSD distro I tried, many years ago.</comment>


Cisco CEO Says 5G Won't Be a Reality for 2-3 Years - <AUTHOR> https://www.foxbusiness.com/technology/5g-will-become-reality-within-3-years <comment><USER2> Carriers have been on 4G LTE for what the last 15 years? That was because of the network investment they'd have to do. When we see 5G, I'd expect 5G LTE instead. AT&T tried to just fake it by changing the icon on the phone, they only do things minimally. We were all supposed to have Fiber to the home by 2004, which tax payers paid billions to telcos to do, but that hasn't happened, because they don't have to and they still get paid.</comment>


What's Wrong with Your Definition of "Hacker" - <AUTHOR> https://goel.io/whats-wrong-with-your-definitions-of-hacker/

<comment><USER2> Decent read.

I do disagree a bit with this point:

 _" What is useful, and what is core to the identity of a hacker, I think, is putting in extra effort to make sure the solution she came up with impacts most, if not all, those who experience that problem."_

It's nice but not necessary to put in that extra effort--in fact, the notion of a "clever hack" is typically hyper-specialized to the environment where it is deployed. For example, some of the numerical hacks and assembly hacks and whatnot are useless or downright troublesome outside of the context they were developed for.

I think the idea more core to hackerdom is that the solution is the result of play, and is almost always subversive--either subverting the assumptions of the system it is being used to adjust, or subverting assumptions of the people who are used to that system.

If there's no subversive element, I don't really think it's a hack, nor the person who makes it, a hacker. A good engineer, certainly--but not a hacker!</comment>


Thousands of Amazon workers receive food stamps - <AUTHOR> https://www.washingtonpost.com/business/2018/08/24/thousands-amazon-workers-receive-food-stamps-now-bernie-sanders-wants-amazon-pay-up/ <comment><USER2> > Amazon spokeswoman Melanie Etches said the figures were "misleading because > they include people who only worked for Amazon for a short period of time > and/or who chose to work part-time," she said in a statement. "We have > hundreds of full-time roles available, however, some prefer part-time for > the flexibility or other personal reasons."

It's possible that some of these part-time people only work so much because of the welfare gap. If they worked more, they wouldn't get food stamps, but wouldn't make enough to both offset the cost of food and the opportunity cost of the time they'll spend working.

A UBI would fix this issue if implemented correctly.

<comment><USER3> > If implemented correctly

Sadly the operative condition :(

I feel like businesses should never have been able to grow so large that they can essentially make government useless. What you have now is a government that offers welfare (as precarious as that is in the US) and a profit-driven corporation seeing that as basically an offset of responsibility. Fuck over your staff and let the government that hates welfare pick up the tab; be dependent upon a job that gets far more out of you than you get out of them.

In any sane world this is a gregarious abuse of corporate responsibility. In the more compassionate (i.e. socialist) places you do not get such a cut- throat attitude towards profit at any cost.

And this is not big business in the US, it's the damned American Dream. You go from rags to riches, all fame and splendour and a hell of a struggle to talk about at the end of it. So you get every mom-and-pop shop and every other sole trader digging for prosperity the same way: pinch every penny you can, avoid paying your staff as much as you can, treat them as expendable, nothing is lost in the pursuit of wealth. You work hard by making others work harder for you.

And everyone wants it because that's what greed is.

Welfare gaps are not unique in the world, and neither is corporate exploitation, but what you have in the US is just a smooth veneer atop the roots of slavery; it's all money and property. You don't have to look hard to see that the language has changed but the dynamic has not. Not for a lot of people.

<comment><USER2> Corporate abuse of state power is emergent from and proportional to the power of the state in the first place. Only be reducing the power and scope of government can we hope to make meaningful change.

The cronyists and politicians are part of a stable feedback loop to maintain the status quo. The state socializes risks and losses while the cronies keep the profits.

The state created limited liability and "intellectual property", giving out monopolies and absolving those responsible of any repercussions.

<comment><USER4> This narrative does not follow. Greed and corruption are a 2 way street, they don't disappear because of lack of governance, if anything they become more pronounced.

Greenspan and Co's systematic dismantling of regulations directly led to the financial crisis, fraud and a 4 trillion bailout. At the moment corporates lobby to get their way. Without state power and regulatory constraints they will and do whatever they want anyway.

Just like banking fraud does not discredit the idea of banks bad governance does not discredit the idea of governance that balances various interests and tempers greed .

<comment><USER2> > lack of governance

Lesser government power is not the same as lack of governance. Indeed, government having the power to pick and choose winners and losers is fundamentally unjust and violates the rights of the people.

> Greenspan and Co's systematic dismantling of regulations directly led to the > financial crisis, fraud and a 4 trillion bailout.

The "deregulation" narrative makes for a good story, but it's not that true. There are several examples of additional government intervention which played an important role:

\- Incentives for sub-prime mortgages. The government provided incentives for banks to provide mortgages to people who normally wouldn't have a good enough standing. This was done in the name of helping minorities buy houses.

\- Previous bailouts. The government bailed out banks multiple times in the past. When banks make risky loans and investments, fail, and then get bailed out by government because they're "too big to fail", this signals to the banks that they should keep being riskier and risker, because the government will cover their risk.

\- Housing incentives. The mortgage rebate on income tax is a direct incentive for people to buy expensive houses instead of renting or buying within their means.

\- Monetary policy. The Fed unnaturally driving inflation and interest rates distorts investment and development. This is covered extensively by Business Cycle Theory.

<comment><USER4> If your actions are motivated by greed then the problem is your greed and motivation not governance, is good or bad governance forcing corporates and businesses to act unethically? This is not a tenable position.

The myth floated by libertarians of the CRA causing the subprime crisis was thoroughly debunked as early as 2008, yet we are in 2018 and this continues to be repeated never mind the facts.

The crisis was a result of systematic and willful fraud by private players not subject to the CRA. $3 out of $4 dollars of subprime loans were not made under the CRA. [1] [2] [3]

[1] [http://www.slate.com/articles/business/moneybox/2008/10/subp...](http://www.slate.com/articles/business/moneybox/2008/10/subprime_suspects.html)

[2] [https://www.washingtonpost.com/news/wonk/wp/2013/02/13/no- ma...](https://www.washingtonpost.com/news/wonk/wp/2013/02/13/no-marco-rubio- government-did-not-cause-the-housing-crisis/?utm_term=.5410b1303725)

[3] [https://www.cbsnews.com/news/loans-to-low-income- households-...](https://www.cbsnews.com/news/loans-to-low-income-households- did-not-cause-the-financial-crisis/)

</comment></comment></comment></comment></comment></comment><comment><USER5> Food stamps are not intended as a subsidy for private industry to take advantage of so they can underpay their workers. Yet a casual observation of these conglomerates actions and policies clearly shows this is their strategy.

<comment><USER6> "Corporate welfare" is a real thing.

Something to keep in mind, the next time -- and every time -- a politician or partisan goes on about the "travesty" of (personal) welfare from an "economic" perspective.

And, this "corporate welfare" takes on many and many overlapping forms. For example, _many_ children in this country (the U.S.) have health insurance, health care, and dental care through Medicaid and government programs.

A lot of their parents are working.

Personally, I don't begrudge this -- not to those children -- in the least. Good health is the foundation of a good life. That also means a productive life that contributes to our shared society.

But, those jobs aren't paying those parents what it takes to support their families. Something that is arguably necessary for those people to be able to continue to work them.

(And many of those parents, themselves, do _not_ have health care coverage. Which, among many other things, also keeps them more vulnerable as a population.)

It's getting hard for me to _avoid_ using Amazon for some things. Local stores no longer carry them. And it sure is convenient (well, price/marketing manipulation and increasingly rough and unreliable shipping aside).

But it feels like we are being funneled into an increasingly inescapable form of this social abuse, at the same time.

<comment><USER5> Agreed it certainly does feel like we are on the highway to some kind of neo- feudalism. My words, not yours, of course. It does frustrate me to no end when these Free Market right-libertarians hark on about personal responsibility and demonize welfare. Like, do they realize the amount of public funding, safety nets, government contracts, and subsidies the private "free" market relies on? Then they have the audacity to call out poor folks asking to be able to go to the doctor, or reliably eat 3 meals a day every day. The cogitative dissonance is real as hell.

</comment></comment></comment><comment><USER7> Throw in recent stories about working conditions in Amazon's warehouse (making worker's pee into bottles because they won't let them leave work to use the bathrooms) is making Bezos' seem like a bit of a prick. Put another way, underpaying workers so that they have to use taxpayer-funded food stamps finances Jeff's dicking around with rockets.

</comment><comment><USER8> I'm on the "less government is best government" side of things and I'm having a hard time finding anything that's fundamentally wrong about the bill described in this article. Kind of funny how it takes an independent senator to propose a bill that has a purpose of reducing government waste.

<comment><USER9> Funny how people react differently to things. I read the description and thought it was of almost unparalleled stupidity. "Government invents XYZ welfare policy, and all large employers are 100 percent on the hook-- especially those who would dare employ people with few skills." Brazenly foolish.

 _I 'm on the "less government is best government" side of things_

You are most certainly not, and I don't think you should pretend to be so for the rhetorical advantage it might bring.

</comment></comment><comment><USER10> What would happen under this proposal if someone receiving food stamps works 5 hours/week at Amazon and 10 hours/week at Walmart? Do they both pay the tax?

<comment> m-p-3 I guess they'd split the cost between those two in proportion of the hours worked.

</comment></comment><comment><USER11> The the requirements for food stamp eligibility should be changed?

<comment><USER12> It means they are so underpaid they need food stamps. It means the taxpayer is subsidizing Amazon. It just another example of corporate welfare at the expense of the public.

<comment><USER2> These people could be just _not working at all_ , in which case they would be more of a tax burden.

What policy rules would you put in place that would stop "the taxpayer is subsidizing Amazon" while not hurting these employees?

<comment><USER13> You mean Amazon would get by without any employees at all?

</comment></comment></comment></comment><comment><USER14> This is not a failure, it's a success story that is being incorrectly twisted to attack BigCorp (because everyone hates BigCorp).

Following this crazy logic, the US may never move to a universal healthcare system, because then the workers will be receiving a 100% tax payer subsidy on healthcare.

In just about every other developed nation on earth, if you make very low wages you qualify for welfare state subsidies and programs. Your healthcare for example is entirely paid for by the welfare state if you make low wages, as you're not contributing very much back in and are absolutely not covering your cost on the system.

Why is it that when it comes to the US, these stories are bandied about as horrible corporate abuses, when in fact they're a success story from the continued expansion of the US social safety net?

Who is overwhelmingly paying for the SNAP program in the US? The rich, they pay an extraordinary share of the cost of these programs (the top 20% pay 87% of all income taxes). The US has one of the most progressive tax systems. Why would having the rich pay for worker SNAP benefits be a problem in any scenario - are we now trying to save the rich money on their taxes?

When someone earns the minimum wage in the UK, Spain, Canada, France etc do you think they're actually covering all of their own expenses? They're not. Those workers are all receiving welfare state benefits that subsidize the low pay from the corporations that employ them.

If you give these workers a boost via earned income tax credits for example (a vastly superior approach to increasing the minimum wage), you're doing the same exact thing you'd be doing with increased SNAP benefits.

<comment><USER15> > In just about every other developed nation on earth... Your healthcare for > example is entirely paid for by the welfare state if you make low wages...

In just about every other developer nation on earth, your access to basic healthcare is not dependent on your income or employment status at all.</comment></comment>


PS4: Homebrew and backups running on firmware 4.55, technical details coming soon - <AUTHOR> http://wololo.net/2017/10/16/ps4-homebrew-backups-running-firmware-4-55-details-coming-soon-theres-catch/ <comment><USER2> Current PS3 versions can't be hacked, at least without hardware mods. I wonder if that's because they are actually flawless, or just there is nobody trying (or people who do try don't publish what they find). It nevertheless sounds funny to me that the PS4 can be hacked while the PS3 can't.

<comment><USER3> No system is _actually flawless_. That's pretty much impossible. It's far more likely the latter.

Apart from what acomjean mentioned already (which is definitely an influence), the ROI on such a hack is pretty low. The PS4 was released 3-4 years ago and the PS3 was discontinued anywhere from 1-3 years ago, both depending on your region. In any case, it's an old system and people have moved on to newer and shinier consoles.

The PS3 has also had hardware-less exploits in the past, CFWs were all the rage. It's not like it's never been exploited or anything. The ECDSA private key used for signing software was released, even.

</comment></comment><comment><USER4> I really miss the old PSP homebrew/hacking "scene". Met some very cool people through it that I wouldn't have otherwise.

Would be super cool to see this blossom, but I'm guessing most if not all exploits nowadays will be kept hidden.

<comment><USER5> Indeed - that was one of the most vibrant, active homebrew scenes I've had the pleasure of participating in.

Ironically, I played more classic (SNES/PS1) and homebrew games than actual PSP games on my device. Nevertheless PSP "hacks" are what got me into exploring other types of hardware, and eventually jailbreaking iPhones when they were first released. I used to participate on an IRC channel frequented by George Hotz (geohot) and was present when the iPhone was finally jailbroken. For a device that had no app store or games at the time, this was a huge deal - and the homebrew scene quickly flourished.

I still get nostalgic thinking about how I'd spend my lunchtime in high school playing Tap Tap Revolution or SNES emulators on my iPhone...

<comment><USER6> For me it was crouching in the bushes in my front yard at 3am chatting on IRC with the PSP homebrew since I didn't have wifi, but my neighbors did. Very nostalgic time for me.

</comment></comment></comment><comment><USER7> I'd love to downgrade from 5. I use the web browser at times on my Pro, and since 5 it's gone from speedy to so laggy and slow it's almost unusable.</comment>


6 Reasons OnLive Could Be a Bust - <AUTHOR> http://tech.yahoo.com/news/pcworld/20090325/tc_pcworld/gdc096reasonsonlivecouldbeabust <comment><USER2> I still wonder about the responsiveness of their games. If there's more than 2 seconds of lag between pressing a button and seeing and hearing the game feedback, it will likely become too frustrating to play.</comment>


Xobni announces support for Pine - <AUTHOR> http://www.xobni.com/blog/2008/04/01/xobni-announces-support-for-pine-email-client/

<comment><USER2> This is one of the better jokes because it actually has something to do with the company. I mean, colonizing Mars? C'mon.

I can't wait for Xobni for Gmail.

</comment><comment><AUTHOR> Pine in flash: <http://www.xobni.com/?page_variant=pine_default>

</comment><comment><USER3> What is interesting is that the Pine interface and paradigm is not substantially different from Outlook's. Pine support MIME types for attachments and has the same paradigm of inbox and folders. This seems like an application area very ripe for real innovation. I agree with sant0sk1 that Xobni is really Kooltuo.

</comment><comment><USER4> Glad to see pine support, but I think elm support would make more sense

</comment><comment><USER5> thats funny, but seriously Thunderbird and Mail.app support would rock my freaking world.

For now I'll keep referring to Xobni as Kooltuo. That's not bitterness speaking, it's jealousy...

<comment><USER6> far as I know, they have no plans for Thunderbird support.

</comment></comment><comment><USER7> Finally! I was unable to use Xobni in its multi-color blur of confusion. Green, black, text, and search. All I need. Beautiful.

</comment><comment><USER8> One of the better April Fools joke.

</comment><comment><USER9> Well, at least you got your priorities straight. :)

</comment><comment><USER10> mutt or GTFO.

</comment><comment><USER11> and mutt?</comment>


Who Decides What Gets Sold In The Bookstore? (Apple rejects Seth Godin's ebook) - <AUTHOR> http://paidcontent.org/article/419-who-decides-what-gets-sold-in-the-bookstore/

<comment><USER2> Am I the only person who thinks Apple is doing nothing wrong? It's a business, and Amazon is a competitor.

It's like if Barnes & Noble refused to stock a book that included coupons for Borders. Does anybody think B&N would be out of line for refusing to stock that book?

<comment><USER3> Although the author is unhappy, I'm inclined to agree here. The central question is, is Apple doing anything anti-competitive? The answer is no, since Apple isn't preventing anyone from being Amazon's books. Apple wants people to remain in their ecosystem, which is perfectly understandable. People may not like it, but Apple is not being unreasonable by preventing authors from advertising other booksellers.</comment></comment>


Strengthening JavaScript - <AUTHOR> https://developers.google.com/v8/experiments <comment><USER2> This is dead on arrival:

        Some examples of strong mode changes we are aiming for are:
        accessing missing properties throws, arrays cannot have holes,
        all scoping errors are static, classes are immutable.

Specifically, "accessing missing properties throws" will undermine how developers use the language. Options objects require this as a feature. Immutable classes might also be an issue as language extensibility / monkey patching is another feature, enabling a whole swath of Aspect Oriented Programming solutions like New Relic's monitoring or the node.js async trycatch library.

I do wonder though, in fighting for its life against native, whether JavaScript will need to adopt optimizing solutions like "strong mode" to strengthen where it's weak.

EDIT: It's really unfortunate that I'm getting down voted so severely (from +3 to -3 in <10m). HN increasingly discourages discussion and debate. I don't think there's any question that my comment adds to the conversation. At most, I could have added, "In my opinion..." to the beginning of my comment.

<comment><USER3> > Specifically, "accessing missing properties throws" will undermine how > developers use the language.

I couldn't agree more; there are many times I access a property that may or may not exist and I plan on using the undefined that comes with it not existing. Requiring it to exist is trying to turn JavaScript into a more strict language without all of the language features to do so very easily.

<comment><USER4> I wonder if "SoundScript" will support optional properties. TypeScript also considers accessing missing properties a compile-time error, and I haven't noticed many problems with that as you can define some properties as optional.

<comment><USER5> That would work at "compile" time, but how do we know whether or not a property is missing at runtime without accessing it? Or resorting to an expensive and minifier-hostile call such as hasOwnProperty? The TypeScript approach won't work here.

Guaranteeing that optional properties have a default value would be one solution, another would be to use ES6 default parameters instead of options objects. But there has to be some sort of value to use at runtime if missing property access always throws.

</comment></comment></comment></comment><comment><USER6> JavaScript has been in the throes of an identity crisis since its inception, and IMO we're just now starting to get to a point where developers are leveraging its power and dynamism in its own right rather than trying to cram into a statically-typed, OOP box.

To that effect, it seems like strong mode and SoundScript are a step in the wrong direction. I noticed the very deliberate and self-aware FAQ entry "Are you turning JavaScript into Java?" along with the canned denial, but that still doesn't change the fact that strong mode and SoundScript aim to remove dynamic typing and prototypes from a dynamically-typed prototypal language.

<comment><USER7> > we're just now starting to get to a point where developers are leveraging > its power and dynamism in its own right

It's damning that you say it took 20 years for us to "start" to leverage JavaScript's power. Compare to C#, which appeared 15 years ago, or Go which is from 2009, or Swift, which hasn't even celebrated its first birthday yet.

Better comparisons might be Python and Ruby, which are both fully dynamic and have cool metaprogramming facilities like JavaScript does, but they'll both give you hard errors when you type the equivalent of [].lenght. And they give you proper stack traces and error messages, too: none of "undefined is not a function" which took until 2015 to get fixed in Chrome (try it). Working with Node.js will make you fall into despair when you realize that your program crashes, and it has stack traces, but none of the stack frames are in your code because everything has been threaded through callbacks. Python's major implementation has serious problems with concurrency (re: the GIL, global interpreter lock) and it too has dynamic types everywhere but it's still far easier to work with.

What I want is to be able to refactor a JavaScript project without feeling like I'm crossing the river Styx. Where are the call sites for this function... who knows? TypeScript seems to at least give me some of those tools, it's a shame that the tooling isn't really ready--the compiler takes ages to run (timed it at 2.0 seconds on a small project... I might as well be using C++ at those speeds).

And if Google has been using TypeScript as a basis, as they say, then you can keep using JavaScript the way you want and you don't even have to type anything in differently. Just let us add some type checking if we want it.

<comment><USER8> Before TypeScript (fall 2012), Zef Hemel then at c9.io did static analysis for JS IDE diagnostics (mid-2012?), Dmitry Vardoulakis then grad-student-interning at Mozilla Research did DoctorJS (spring 2010, I think). And don't forget the Closure compiler from Google, but I'm not sure when that really got serious about static analysis -- perhaps after Google hired Dmitry. So no more than 15 years, not 20. ;-)

What's damning is the stagnation under the IE (convicted in the US) monopoly from late '90s through 2009 when ES5 was published. It's not as if Python 1.3 or whatever, if frozen in Netscape 2 amber, would have fared better if forked.

<comment><USER9> > It's not as if Python 1.3 or whatever, if frozen in Netscape 2 amber, would > have fared better if forked.

Disagree. Python 1.3 was at least designed as a general-purpose programming language, with a variety of use cases, and took the best parts of existing languages (TCL and Perl) rather than having novel features that sorta-but-not- quite replace more conventional ones. It had its share of warts but nothing in Python 1.3 is as awkward as prototypal inheritance or javascript's scoping.

IMO the biggest tragedy is Mozilla's unwillingness to put other languages in the browser. Dart was developed in public, far more of an open standard than the original JS, fixed language design problems that ES6 still isn't addressing, had an adequate approach to running in JS-only browsers, and would have added much less complexity to browser implementation (the reason given for rejection) than many standards that Mozilla has been happy to support.

<comment><USER10> > IMO the biggest tragedy is Mozilla's unwillingness to put other languages in > the browser. Dart was developed in public, far more of an open standard than > the original JS, fixed language design problems that ES6 still isn't > addressing, had an adequate approach to running in JS-only browsers, and > would have added much less complexity to browser implementation (the reason > given for rejection) than many standards that Mozilla has been happy to > support.

It's also Google's failure to exploit their market position. Instead of using Dartium, they should've just integrated the Dart VM into mainline Chrome and began paying web developers to use Dart. Mozilla would then have no choice but to implement Dart or find their users complaining about not being able to access their favorite websites.

On a similar note, it's kind of a shame that IE's support for VBScript never took off. Not because VBScript was a good language, but because it would've laid down a precedent for the web being a multi-language environment. Browser vendors would have developed pluggable scripting architectures to compete. Imagine if, say, every browser on Windows could have allow scripts written in, for example, everything offered by Windows Script Host (and I'm sure some equivalent architecture would have been developed for Mac and Linux -- maybe even something as simple as "any script that can be interpreted via a shebang line").

<comment><USER8> See my reply just above. You ignore high costs of multiple engines, both intrinsic and inter-engine -- including, notably, a memory cycle collector of some sort, with its attendant write barrier costs. See Fil Pizlo on webkit-dev the other year:

[https://lists.webkit.org/pipermail/webkit- dev/2011-December/...](https://lists.webkit.org/pipermail/webkit- dev/2011-December/018811.html)

As for your lamenting the lack of Machiavellian market power abuse by Google, it really is not clear that even Google can force Dart down others' throats, or its own throat. Rewriting JS code in Dart is a net lose, as far as I can tell. No Google property yet uses Dart, even with dart2js (I welcome correction).

Ignoring the morality of such market-power shenanigans (hey, I was at Netscape, but I've paid my dues, and someone had to be "first" :-P), it is also not clear "Mozilla would then have no choice". Money AKA energy is not free; Mozilla can least afford follies; there is always an option to reject a neo-standard.

Microsoft could not make VBScript stick in the '90s. I say this is signal, yet again. Multiple and mandatory HTML scripting languages exact high direct and indirect costs. Lack of such an outcome is not a conspiracy or tragedy. It's economics and evolution in action.

Update: WSH, shebangs, wow. You forgot about security!

<comment><USER8> An example of a power-play and widely deployed de-facto standard that we resisted at Mozilla, wisely: ActiveX plugins. Independent companies emulated some of the ActiveX COM APIs, plus basic MS COM, on Unixen, in the '90s and into the noughties. Lack of spec and open source were not a barrier, and MS documented well.

Was MS abusing market power? The US v. Microsoft case said they were. They definitely caused plugin vendors to support ActiveX _en masse_. And they then dropped the old Netscape Plugin API, which led many such vendors to drop NPAPI too, leaving those plugins IE-only.

Yet we at Mozilla resisted ActiveX, successfully. We did not just hold the line, we restarted NPAPI incremental evolution via the plugin- firstname.lastname@example.com list I created, and meetings firstname.lastname@example.com and I convened with Apple, Opera, Real Networks, Dolby, and Macromedia.

Even a convicted monopolist couldn't ram ActiveX down other browser vendors' throats, when it could and did do so to plugin vendors and some web developers. Google with Chrome is not yet near MS IE's monopoly share. So again, I think you should be more skeptical of your own assertions and assumptions about "no choice".

<comment><USER11> _" An example of a power-play and widely deployed de-facto standard that we resisted at Mozilla, wisely: ActiveX plugins. Independent companies emulated some of the ActiveX COM APIs, plus basic MS COM, on Unixen, in the '90s"_

Thanks for doing this Brendan.

I was at a young startup at the time and an MS dev team gave us access to the IE Trident preview with ActiveX [0] and you could tell it was a pile of _horse_ , without even implementing it.

       '*you what?* create a plug-in, only works on IE,
        then everyone has to download it?'

Totally against the grain of how the web worked and still works.

[0] IE4 layout engine: [https://duckduckgo.com/l/?kh=-1&uddg=https%3A%2F%2Fen.wikipe...](https://duckduckgo.com/l/?kh=-1&uddg=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FTrident_\(layout_engine\))

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> Some of the suggestions seems reasonable, e.g. 'arrays cannot have holes', 'Length always in sync' and 'Sane Coercions'.

It's also a good gesture that they'll try to work with others to standardize. SPDY -> http/2 is great example of this!

I disagree with 'Accessing missing properties' and a few others. I don't want Javascript turned into Java.

Also sounds a bit like a hammer looking for nails, i.e. they've already optimized everything, so to optimize more they'll need to rewrite the language. Again, I think some ideas are good, but may be slightly misdirected.

</comment><comment><USER13> > Any program running "correctly" in strong mode should run unchanged as > ordinary JS. Thus, strong mode programs can be executed on all VMs that can > handle ES6, even ones that don't recognise the mode.

This worries me. If it's running "correctly", then sure, it will run elsewhere. But if it hits something that Strong Mode considers "incorrect", then things diverge, and other browsers will execute something different.

This can be avoided if Strong Mode just issues warnings, not errors. Which seems sufficient, if the goal is to inform people about stuff they should optimize.

For those that want more rigorous checking, browsers could add a developer mode, in which those warnings become errors. This way, there is no risk of production code working differently on different browsers.

We have seen "use strict" cause errors in production. Avoiding that with "use strong" seems like a safer path, with no significant downsides that I can see.

<comment><USER14> You should never use "use strict" or "use strong" in production, they're very useful during development but can really only hurt you in production.

<comment><USER15> Could you expand on how it could hurt you? All I was able to find was this [0]

> I found two opinions about using strict mode in production:

> > There is no reason to ship "use strict" in your production code. There is > no performance gain (verified with V8 team and Brendan a while ago) and I > don't need my users' VMs doing the extra checks as well. Keep it development > only, strip it out during build. This way you also avoid the concatenation > issue you reference.

> And:

> > There may not be a performance gain, but there's also not a performance > loss. In production, even more than in development, is where you want to be > sure you're noticing errors. Minimizing the changes between the development > and production versions of the code is key to being able to debug issues > quickly and efficiently. Yes it helps during development, but there's no > reason to pull it out of production code.

> The source is in the comments at the bottom [1]

> And of course those 12b weight of "use strict" won't change a thing.

[0] [http://stackoverflow.com/a/10986793/1072106](http://stackoverflow.com/a/10986793/1072106)

[1] [http://www.nczonline.net/blog/2012/03/13/its-time-to- start-u...](http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using- javascript-strict-mode/)

<comment><USER13> In practice there have definitely been perf losses from "use strict" (emscripten used to emit it until we noticed that). "use strict" sounds easier to optimize - it's stricter - but in practice, JS engines didn't get around to optimizing it, at least that was the case a few years ago.

There have also been breakage issues. "use strict" changes semantics. Before all browsers implemented "use strict", some had it and some didn't, which meant scripts with "use strict" ran differently in different browsers.

<comment><USER16> I remember when it was generally suggested to avoid "use strict", because there wasn't great browser support. You could write "strict" code that would work at the time (due to browsers not actually enforcing strict mode), but in the future the same code might break in conformant releases of those browsers.

That said, these days it's invaluable. Getting errors early saves time and prevents subtle bugs. It's become a widely accepted best practice, as noted by other posters.

I definitely share your concerns about mode switches, but as long as there's a conformant implementation to test against, it seems like strong mode could move the language forward without _too_ much of the "use strict" early adoption pain. Strict mode wasn't completely smooth sailing, but I think in the long run it helped.

</comment></comment></comment></comment></comment><comment><USER17> Pragmatically, how does subsetting matter? ES6 transpilation will be a requirement for many more years. Once you transpile, all the ES6 requirements blow up (eg. not extending prototypes).

A more particular criticism. How does forcing let statements on everyone improve performance?

All it does is force implicit (rather than explicit) scoping rules on JS developers because devs from other languages don't seem to be able to understand functional scoping or hoisting. It's a huge case of X language isn't like Y language that I already know, so let's change the unfamiliar language.

<comment><USER18> Not really. It's a way to enable increased performance by disallowing certain hard-to-optimise constructs.

<comment><USER19> Which ones specifically?

<comment><USER20> > [...] accessing missing properties throws, arrays cannot have holes, all > scoping errors are static, classes are immutable.

</comment></comment></comment></comment><comment><USER21> Conversion to TypeScript has been going inside Google for a year at least. Angular team started to do slides in TypeScript about year ago.

What I do find annoying is the constant rebranding the teams in Google tries to do to TypeScript. Angular team called TypeScript + runtime typechecking a "AtScript". Now this document calls something of similar a "SoundScript".

Can't the Google just admit it's using TypeScript? Adding a runtime checking doesn't change the fact it's just a TypeScript.

<comment><USER22> > Can't the Google just admit it's using TypeScript?

What makes you think they haven't "admitted" it yet?

> AtScript is TypeScript: We've been collaborating with the TypeScript team on > our proposed productivity [1]

They have been collaborating with Microsoft, and it's no secret[2]

1\. [http://angularjs.blogspot.com/2015/03/announcements-from- ng-...](http://angularjs.blogspot.com/2015/03/announcements-from-ng-conf- were.html)

2\. [http://blogs.msdn.com/b/typescript/archive/2015/03/05/angula...](http://blogs.msdn.com/b/typescript/archive/2015/03/05/angular-2-0-built- on-typescript.aspx)

<comment><USER21> It's good to know, it just didn't seem like that last year. I know that Hjelsberg went to meet Angular team after this lecture [https://www.youtube.com/watch?v=b69vwMIphic&t=3928](https://www.youtube.com/watch?v=b69vwMIphic&t=3928) (QA position 1:05:30)

As a little note about your references:

1\. was posted 23 hours ago. 2\. six days ago.

I'm actually not checking their plans daily.

</comment></comment></comment><comment><USER23> I don't really like this, or at least how it sounds.

1\. Google implements this 2\. Chrome becomes the fastest browser by a wide margin 3\. Other browsers die or become minor players 4\. Google leverages this to enforce their own changes into the HTML/Javascript domain, "for the better" of the web and maybe even into mobile. 5\. Web is broken unless you use Chrome

The pain developers suffered before dealing with IE4-6 will be nothing to the repercussions we face now if we have to continue being backwards compatible with some version of Chrome because website X is "Chrome only" in the future.

Hell it's already happened a bit with the new HTML5 features. Hell Korea is still paying for the mistakes of committing to go with IE.

Feel like it ends up being Google's version of EEE.

Also, keep in mind, this "SoundScript", even if its in the early stages, has not been declared as being open source, so it is closed source at the moment. This makes me feel that at best SoundScript will be open source like Android is open source. Release stuff but keep the latest version for Google to use.

<comment><USER24> Differences between IE and Chrome:

\- IE has fixed versions, IE 6, 7, 8, 9, 10, 11; Chrome autoupdates so there's only Chrome stable, Chrome beta, Chrome dev and Chrome canary.

No need to hardcode IE6-specific hacks.

\- IE is closed source; Chrome is more open source.

<comment><USER25> IE autoupdates since IE10, which is frankly a huge event for our industry that very rarely gets recognized.

<comment><USER26> Except for the fact that it still moves at a glacial pace compared to the competition. Incremental IE10 updates do not include new CSS or Javascript functionality, that's limited to version releases - which is measured in years. Compare that to Chrome or Firefox, where new functionality lands every couple of weeks in stable.

<comment><USER25> IE10, if left alone, will auto update to IE11 silently.

</comment></comment></comment></comment></comment><comment><USER27> Another +1 for TypeScript. Does anyone else see TypeScript as being a big player in the coming years?

<comment><USER15> I've largely ignored it so far. I'm not a huge fan of writing in something like Coffeescript/TypeScript/etc because when the underlying JS changes (Like ES5->ES6) it can cause big breakage and/or confusion (Will CS classes work like classes do in ES6?). I am a fan of Babel (formally 6to5) because writing JS in the new standard format and transpiling to ES5 seems a lot cleaner and it's all still just JS. Also ES6 is a MUCH easier sell to other developers (who might not use JS as much but still need to interact with it) than moving to CS/TS IMHO.

<comment><USER28> The breakage argument is valid for Coffeescript, but Typescript has always made it clear that it supports ES6. Am I missing something?

<comment><USER29> TS doesn't support ES6 today. It doesn't support generators, it doesn't support ES6 modules , quasis ... For that you need to wait For Microsoft to implement those features.

<comment><USER28> the website says it supports modules. Quasi literals also seem to be supported.

<comment><USER29> That's untrue read the spec. Typescript doesn't support ES6 modules , nor quasi literals. Typescript has its own module system which is incompatible with ES6 modules.

<comment><USER28> Fair enough. I haven't read the spec, just went to their website, and one of the first things they mention is modules and classes. Also, when I googled 'typescript template string' the first hit was [https://github.com/Microsoft/TypeScript/issues/13](https://github.com/Microsoft/TypeScript/issues/13), so I assumed they were supported.

</comment></comment></comment></comment></comment></comment></comment><comment><USER30> I'm only having a problem with default sealed classes on block level.

With perl, which has similar characteristics we decided to seal classes only from the main application, with "use oo :final", and modules, libraries, implementations of classes do not seal their classes. Thus you can easily allow duck-typing in the calling application for testing, or go fast and disallow adding or changing methods and properties.

So you cannot pre-compile modules per se, but js has no static block compiler anyway.

</comment><comment><USER31> So the V8 team doesn't want to add optimizations for the "use asm" subset of JS, but does want to add optimizations for the "use strong" subset of JS? I do see the difference: strong mode is an aid for web developers writing JS whereas asm.js is usually a compilation target for porting C++ code (and a competitor to Google's NaCl).

<comment><USER32> V8 _is_ adding optimizations for asm: [https://hacks.mozilla.org/2015/03/asm- speedups-everywhere/](https://hacks.mozilla.org/2015/03/asm-speedups- everywhere/)

Asm.js isn't a solution for JavaScript developers, it provides an efficient compilation target for porting C/C++ code-bases to JS by leveraging Emscriptem or Mandreel compilers.

But this doesn't benefit the 99+% of websites running normal JavaScript. Whereas the goal of StrongMode is to carve out a safer and faster "subset" of JavaScript that's less error prone and easier to optimize with more predictable performance.

Only SoundScript is proposing adding (TypeScript-compatible) optional typing that's built into V8. ES6 is source compatible with TypeScript which can be transpiled to strip its type annotations so it runs in ES5 JS VMs. Essentially this is an evolutionary enhancement to JS.

<comment><USER33> > But this doesn't benefit the 99+% of websites running normal JavaScript. > Whereas the goal of StrongMode is to carve out a safer and faster "subset" > of JavaScript

That still wont be used by 99%+ of the websites out there.

At least not unless they want to forgo standards, or forgo strict-mode in all browsers but Chrome, and last but not least: they will have to update the code which is already there, and IE6 told us how that works in practice.

Let's _not_ help Google forge the internet a new MSIE with Chrome.

</comment></comment></comment><comment><USER34> This just shows that the current state of Javascript is a confusing mess. Where do new developers start now when they are been fed ES6 transpilers and ReactJS.

I think Google (as usual) is getting ahead of this problem. But they shouldn't be alone in the fight for clarity.

<comment><USER35> If having more options "leads to a confusing mess", I fail to see how having an additional option gets "ahead of this problem."

<comment><USER36> Having a solution pushed forward by arguably the most influential implementation team is what pushes it forward, not the fact that it's "just another option". Regardless of what Chrome implements (whether it's this, or raw TypeScript, or CofeeScript), the fact that it works directly in V8 is what pushes that solution to the top of the stack.

<comment><USER19> Ehem, Dart.

</comment></comment></comment></comment><comment><USER37> Looking at the referenced strawman:

* Why is `delete` such a problem? * Closed objects (under "Dynamic Restrictions") seem like a really heavy change from current common JS usage. You basically can't use objects as a hash. This would break a ton of code. ES6 Weak Maps seem like an odd replacement. Especially because they are weak, that's semantically totally different than an object. * Not being able to add properties to Arrays I assume will cause quite a bit of problem, as that pattern is common. Or maybe subclassing Array will work fine? * Under Functions they seem to be disallowing traditional class definitions, so you can only use ES6 classes. So you can't write ES5 that is also StrongScript :( * Under Classes, it sounds like you can't call methods of this? I guess this is so you can't call methods on an object that is not entirely initialized. This will break a lot of code, or at least most classes I've written. I'd rather see all the possible instance attributes get pre-filled with undefined. * Both this proposal and ES6 seem to dislike non-method properties on prototypes. Why? * Disallowing `for in` is also annoying.

I like the concept, but I'm not excited by the proposal.

</comment><comment><USER38> This will be great for things like node-webkit or atom-shell (and node in general). There are many use cases where using an optimized subset is a big win, like atom.io or any cross-platform app with an embedded V8.

Granted, it won't speed up DOM operations much, but JS is being used in so many non-browser places... it's good to know that the language performance isn't stuck against a wall.

</comment><comment><USER39> I'm especially concerned about the loss of "var".

The web (as in HTML + JS) has always been about backward "interpretability" (meaning, a new feature won't break existing clients). The incompatibility of "var" and "strong mode" seems to be the most important break in this concept since JavaScript 1.1 and the introduction of the Array-constructor. (Some may remember the days, when we had to write two scripts, one for Netscape 2 and newer, and another one for older clients, each defining the same functions and producing comparable results. – Most of this was owed to features related to DOM-interaction. – Alas, the language-attribute ...)

Realistically, not everyone will have a fully updated (or even fairly current) browser, and this really shouldn't be an issue which necessarily breaks things. "strong mode" will thus limit access to only those clients with at least some support of ES6 (as in "let").

Please add some basic support of "var"!

<comment><USER39> And while we're at it, why not add a backward compatible type declaration, like a string "use type a: int, s: string;" immediately following any declaration or declaration list?

</comment></comment><comment><USER40> This is a bit of a tangent but sometimes I wish browsers would just open up some kind of standardized assembly language like interface to the vm and the dom. This would effectively make development for the browser virtually identical to the desktop; and also as a side effect, completely end this debate about "strengthening javascript."

<comment><USER18> They already do. The standardised assembly language is called "javascript".

<comment><USER40> Standardized? yes, assembly-like? No.

Essentially I am saying expose a layer even closer to the metal in the browser so that these optimization problems can be moved to front end development.

<comment><USER8> See past HN threads and posts that spawned them, e.g., this one:

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

Apart from syntax wins, you can't get much lower-level semantically and keep both safety and linear-time verifiability. Java bytecode with unrestricted goto and type confusion at join points makes for O(n^4) verification complexity. asm.js type checking is linear.

New and more concise syntax may come, but it's not a priority (gzip helps a lot), and doing it early makes two problem-kids to feed (JS as source language; new syntax for asm.js), which not only costs more but can make for divergence and can overconstrain either child. (This bit Java, pretty badly.)

/be

</comment></comment></comment></comment><comment><USER41> What's the point of all this? If you need more rigid language to feel safe just write your programs in this language and then compile to javascript.

Why extend javascript instead of treating it as VM for anything you like?

<comment><USER18> Because many legal constructs in javascript preclude various optimisations that could otherwise deliver near-native performance.

Compiling a more rigid language to JS doesn't help with this, because the runtime and JIT compiler has no way to know what the original constraints were, so it has to remain open to the possibility that this is plain old JS and any of those weird and unoptimisable -- but legal! -- constructs may occur.

Of course, you can write runtimes and JIT compilers with optimistic fast paths, that assume certain constraints apply and bail out to slower paths if they encounter something they can't handle. But this only gets you so far. It adds a lot of complexity to your implementation, and provides no clue to developers that they've violated a particular constraint and their code is running 10x slower than it could do. Furthermore, different runtime implementations from different vendors may have different heuristics and fast path behaviours.

Having a standardised subset of the language, marked by a backwards compatible pseudo-pragma (like 'use strong') lets developers opt in to explicit constraints that enable greater optimisation. These constraints are common across different runtimes, properly documented, and are enforced by fail-early checking. The latter gives clear feedback to developers when they violate a constraint, and means the fast-path code can work without escape hatches, because the code it's running is guaranteed not to violate the constraints.

<comment><USER41> You can compile to asm.js if you care about performance that much.

</comment></comment></comment><comment><USER42> What what, a javascript subset that runs in existing browsers instead of a new language that you have to transpile into a 5MB binary chunk you drop in for negligible performance improvements?

Mmm... yes please.

</comment><comment><USER43> Classes are not an improvement. See Crockford: [https://www.youtube.com/watch?v=bo36MrBfTk4](https://www.youtube.com/watch?v=bo36MrBfTk4)

<comment><USER44> it used to not be, but with the reversal of the `this` creation and addition and use of `target.new` in constructor functions we are now able to extend Exotic types like array.

<comment><USER8> `new.target` ;-).

/be

<comment><USER44> Thanks for the correction :)

</comment></comment></comment></comment><comment><USER45> Overall the proposal looks good.

BUT: please provide a way to construct _classes_ dynamically (or allow functions to have [[construct]]).

<comment><USER46> They seem to mention this at the end of the slides.

</comment></comment><comment><USER47> Can someone give me an example of TypeScript declaration that is not "sound"?

I thought that

"It guarantees that (1) an expression that has a static type T can never evaluate to a value that is not a T, and that (2) evaluation cannot run into unexpected runtime type errors."

is already supported in TypeScript.

<comment><USER9> Generics are bivariant in TypeScript and so unsound:

        class Base {}
        class Derived1 extends Base {}
        class Derived2 extends Base {}

        class Box<T> {
          constructor(public value: T) {}
        };

        var a: Derived1 = new Derived1();
        var b: Box<Base> = new Box<Base>(a);
        var c: Box<Derived2> = b;
        var d: Derived2 = c.value;

<comment><USER48> TypeScript is structurally typed; there's nothing in your example that suggests that Derived1 and Derived2 have different types, instances of each are the same type.

<comment><USER9> Point, but add a differently-named field to each and it will still compile.

</comment></comment></comment></comment><comment><USER49> I like most of what I see in the sane mode. I would even go further and make "" and 0 truthy in that mode.

I don't think I would use the type system. Maybe it should have its own proposal instead of being "bundled up" with sane mode. At least it is optional.

<comment><USER8> Making 0 and "" truthy is just asking for trouble, whatever your opinion of current JS semantics. The hope with sane mode (or whatever less able-ist name it should have) is to have no runtime semantic change if the mode directive is not recognized (as it won't be, if a quoted prologue directive aka useless string-literal expression-statement, in any downrev browser).

Doubling the testing load, making hidden time bombs for older browsers to find blowing up in their faces at later dates: Not Good.

Elsewhere here, both Alon Zakai I question the wisdom of using an erased "use sanity"; mode directive, given that runtime semantics will diverge for any code not in the new subset. The hope is that people will test fully with checks on, and find all code that doesn't follow the rules. I think TC39 will balk at this hope. Murphy was an optimist.

/be

<comment><USER49> Hi there, thanks for taking the time to comment.

> The hope with sane mode (or whatever less able-ist name it should have) is > to have no runtime semantic change if the mode directive is not recognized

From my limited understanding, old browsers can't handle 'let' anyway, which is supposed to be used exclusively on this mode (as there will be no 'var'). But you probably know more about this than me.

> making hidden time bombs for older browsers to find blowing up in their > faces at later dates: Not Good.

Doesn't that happen all the time? What I mean is: If ES6 becomes widely supported in browsers, pages written on it will make old browsers "blow up", too. Unless the people who program those make two versions, which defeats the point of using ES6 in the first place. The same when a new version of CSS comes out - use that, and the old browsers "blow up", too.

It seems to me it is the nature of the beast - new features make old browsers blow up.

<comment><USER8> It turns out `let` is usable in most browsers today, and in some older ones. The point is there's no extra opt in and no forked runtime semantics.

> Doesn't that happen all the time?

You're talking about new syntax bombing old browsers. That's not the issue. The issue is same syntax in old and new, works (for whatever value of "works") in old and new, but differs in meaning due to a "use sanity"; directive.

<comment><USER49> Fair enough. You have probably heard arguments similar to mine hundreds of times, thanks again for answering.

For what is worth, I never depend on the truthyness of falsyness of 0 and "", and always test for them explicitly, so it will not affect my code if in a distant future javascript starts treating them as truthy. Just, you know, in case you change your mind in the future.

Good night!

</comment></comment></comment></comment></comment><comment><USER50> This is starting to sound like what Google is doing to JavaScript as Facebook has done to PHP. Customize to meet their own needs based on performance.

This "testbed" could be good or bad, time will tell.

</comment><comment><USER51> This presentation makes me want to punch the next person I see [https://drive.google.com/file/d/0B1v38H64XQBNT1p2XzFGWWhCR1k...](https://drive.google.com/file/d/0B1v38H64XQBNT1p2XzFGWWhCR1k/view)

"let is the new var". No it's fucking not! "let" promotes procedural block scoped code. Moves people away from thinking properly about flow in their code. "var" has it's places, "let" can be a good addition is SOME circumstances. And calling code with "var" in it as insane, is itself insane.

<comment><USER8> What is "procedural block scoped code" and why do you think var as a binding construct (ignoring the initialiser) is control-flow sensitive? It's not.

/be

<comment><USER51> I mean people will widely use for, while, switch statements instead of maps, hashes, weak maps etc. They will be setting variables in parent scope, procedural step by step thinking, rather than passing functions, chaining things etc.

I personally don't like some of the ES6 additions, but this one is just a step too far. For us mere mortals that is.

<comment><USER8> let composes nicely with all the statement forms. You can even do `for (let x ...)` and have a proper let binding per iteration, for closures that capture x in the body.

/be

<comment><USER51> Yep and it's awesome to have that but I personally hardly ever use for loops.

</comment></comment></comment></comment></comment><comment><USER52> Why not just join the TypeScript project instead of subvert it with a fork?

</comment><comment><USER53> Dear google, don't you have anything better to do?

</comment><comment><USER54> Clickbaitier headline: "You won't believe what new color of lipstick V8 engineers have found to put on this pig!"</comment>


HH Dalai Lama: Countering Stress and Depression - <AUTHOR> http://www.dalailama.com/messages/articles/counter-stress <comment><USER2> I really like this message. It has a lot of similarities to a life-changing (for me) audiobook that I recently finished (Brian Tracy's The Psychology of Achievement).

Here's a short summary:

If the situation [can be remedied], then there is no need to worry about it. ... The appropriate action is to seek its solution. Then it is clearly more sensible to spend your energy focussing on the solution rather than worrying about the problem. Alternatively, if there is no solution ... then there is also no point in being worried about it, because you cannot do anything about it anyway.

If you are motivated by a wish to help on the basis of kindness, compassion, and respect, then you can carry on any kind of work ... and function more effectively with less fear or worry, not being afraid of what others think or whether you ultimately will be successful in reaching your goal. Even if you fail to achieve your goal, you can feel good about having made the effort. But with a bad motivation, people can praise you or you can achieve goals, but you still will not be happy.

[In order to not be overwhelmed by the difficulties,] it is vital that we make every effort to find a way of lifting our spirits. We can do this by recollecting our good fortune.

[Negative thoughts and emotions - such as hatred, anger, pride, lust, greed, envy] are thus the cause of our destructive behaviour both toward others and to ourselves.

There are many methods [to train the mind] ... It is this pattern of thought [focus on turning adversity to advantage].

... one of the mind's most marvellous qualities is that it can be transformed... [Those who attempt to transform their minds] will become more disciplined and positive.

<comment><USER3> The problem with the no reason to worry argument is that it is not my logical brain that worries - it's the lower emotional parts of my brain, which is sadly not going to be persuaded by logic.

<comment><USER4> that's why you should train your mind constantly (meditation basically means mind training) to not let your emotional parts take over the logical brain in an obsessive way.

The problem is not having a negative emotional thought, but obsessing over it and letting it overpower the other thoughts you have.

Most of the time the negative thoughts are just imaginations, histories that our mind creates and makes real. For example; it's late at night, your daughter or girlfriend hasn't returned home yet and their phone is off. You start to imagine the worst scenarios (accident, rape, cheating, whatever..) and your mind is stupid enough that it starts to believe them and making those scenarios real. You start to get worried, then anxious, then angry at them for not thinking of you and how worried you are. Maybe you are really angry when they get home and scream at them just to discover that they have been somewhere safe all night and just ran out of battery.

Being able to realize that those scenarios are just creations of your mind and snapping out of the obsessive loop of thoughts it's one of the most important things you can learn in life.

<comment><USER5> > Being able to realize that those scenarios are just creations of your mind > and snapping out of the obsessive loop of thoughts it's one of the most > important things you can learn in life.

Great. I'd like to add that even the person/individual or "I" is a creation of the mind, that upon observation melts away. This in my experience has been the single most important "event" in "my" life (the "my" itself not having any tangible meaning).

The key: mindfulness, or coming back to the present moment over and over again till silence becomes natural.

<comment><USER6> I'm learning about mindfullness for trying to beat my depression. I experienced a few days of utter relaxation out of the blue before christmas, so I know that it's a real thing that can be achieved.

I'm hoping that a combination of anti-depressants and learning to live in moment will be what allows me to finally beat this.

Edit: Thanks for the reading suggestions, I'll try them out and see what sticks :)

<comment><USER5> If you are in depression, do continue your regular treatment and anti- depressants till the docs allow you to stop. Once you are treated, then mindfulness/ being in the Now, can move you to happiness and freedom. I say this because no one (I've read) has said this cures depression. And the root of depression can be bio-chemical. However, in the long run, you would give up medication (hopefully in a year), and then the "present moment" is the key. The beauty is that is becomes easy and natural after a while. If you've suffered (been unhappy) then you have the motivation not to give up, to take this through to completion.

Go through Eckhart Tolle and Mooji (on youtube). "Power of Now" is good. Start this moment.

<comment><USER6> Thanks for the advice.

I've recently restarted on anti-depressants. I was on them previously and didn't realise they were helping because the effect was quite passive, I came off them suddenly when I moved house and the next few months went... badly. Luckily I don't suffer any bad side-effects from the one I'm on, so I don't have a problem with trying it long-term.

I'm interested in mindfullness and CBT because I want more constructive thought patterns to allow me to stop it getting so bad again in the future.

Will take a look at those videos.

<comment><USER5> The problem with medication long-term is that it may keep you in a drowsy state and not allow you to be alert and aware. If the medication is stimulating (like coffee), then it can result in too many thoughts so that the silence is not experienced.

Anyway, that's your call. Getting out of depression is the most important thing first. Keep practicing being in the present moment, and staying alert and thought-free as much as possible _alongside_.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> > If the situation or problem is such that it can be remedied, then there is > no need to worry about it. In other words, if there is a solution or a way > out of the difficulty, you do not need to be overwhelmed by it. The > appropriate action is to seek its solution. Then it is clearly more sensible > to spend your energy focussing on the solution rather than worrying about > the problem. Alternatively, if there is no solution, no possibility of > resolution, then there is also no point in being worried about it, because > you cannot do anything about it anyway.

This is all well and good, but what if you don't know there is a solution. Only "worrying"/thinking about it will you know if you can find one. And then the solution itself might be difficult to reach or people disagree with your solution etc leading to stress.

</comment><comment><USER8> It would be so cool if the Dalai Lama posted on Hacker News.

Just sayin'.

</comment><comment><USER9> Don't let your surroundings determine your mental state. The guys who survived the concentration camps in Germany were the ones who had found peace, meaning and value in their lives even in the worst condition imaginable. Practice being happy for no other reason then choosing to be happy. I'll add years to your life.

<comment><USER10> Who said that? Memoirs from survivors suggest that (as one would expect) the experience left them scarred for the rest of their lives.

<comment><USER11> Some. Memoirs from _some_ survivors suggest that. Memoirs from other survivors suggest otherwise. The long-term response to the trauma varied, widely.

<comment><USER10> Point to the memoirs from survivors that suggest otherwise...

<comment><USER11> Frankl is the canonical example. But also telling is the portion of Spiegelman's "Maus" which tells of his release from Auschwitz, entitled "And now my troubles began..."

<comment><USER12> Spiegelman's father, not him. Downvote all you want, but trying to find the positive side of of concentration camps, trying to find why you're world view is validated by anecdotes from those experiences, its really lame.

<comment><USER11> I know it is Spiegelman's father: it is a memoir of Spiegelman Sr's experiences, as told to Spiegelman, but that's neither here nor there.

The point is not that anyone is trying to find the _positive side of concentration camps_ , as if such a thing existed. The point is that some people managed to keep their spirits intact, and, in the words of the poster above, find _peace, meaning and value in their lives even in the worst condition imaginable._

Is it lame to remember that even when we can't control our external circumstances, we still have some ability to control our response to those circumstances?

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> Yes, if I had devout followers and full financial support and security myself, not to mention hollywood friends, I would not have much stress too...

<comment><USER6> If I had all those things, I would still stress. Primarily due to a feeling that I don't deserve what I have.

Just because the message comes from someone in a position of authority, it doesn't make it any less valid.

<comment><USER10> Well, if you were a self-entitled jackass like DL, you wouldn't.

(Let the politically correct downvoting begin...)

<comment><USER13> Ad hominem aside, it's been well documented that wealth and success don't make people happy, but there's a lot of evidence (and more coming out every day) that mindfulness and self-awareness actually _do_.

Your cynicism does you a disservice here.</comment></comment></comment></comment>