Hacker Newsnew | comments | show | ask | jobs | submit | Lazare's comments login

I have to agree. I used Coffeescript on my last few projects, but on this one we're using babel/ES6 and honestly? It's pretty good.

And there's some real benefits to writing in actual Javascript, even if you're still transpiling it for production.

Ultimately, I feel like language choice is something of a bet. And while I like Coffeescript, the future of web development is going to be ES6 and ES7, not Coffeescript. That makes it a lot easier to justify spending time on (writing, learning, etc.).

Coffeescript is a dialect for (mostly) people who don't like brackets (also cool but controversial features like null swallowing with ?, implicit function calls, etc.), while babel is a transpiler to take es6 down to es5. Saying one is a substitute for the other is like saying ice-cream mud-cake is a substitute for steak and lobster at a restaurant - if it's Saturday night and or your cheat day, just eat both. That is, pipe the output of your coffeescript into the input of your es6 babel in your build step.

I personally use a ton of emberjs with ember-cli, and ember-cli-coffeescript actually just straight-up ships this build pipeline for you when you decide to use coffee.

P.S.: Sorry if I sound like Marie Antoinette saying "let them eat cake", yes, I realize I am lucky to not have tons of legacy code that prevents me from altering my build step, and that there are thousands of other less-lucky engineers who are stuck with build systems that are essentially unalterable voodoo.

Javascript. Mostly.

1) export and let are part of ES6 2) <button> is JSX, which is uses by Facebook's React but can also be used with Deku.

If you run that through babel, it turns it into valid ES5 Javascript which will run in any modern browser:

    "use strict";

    Object.defineProperty(exports, "__esModule", {
      value: true
    var Button = {
      render: function render(_ref) {
        var props = _ref.props;
        var state = _ref.state;
        return React.createElement(
    exports.Button = Button;
(Note: By default Babel translates JSX into React.createElement calls; the Deku docs cover the one line config changed needed to make it us Deku element calls instead.)

> The front-end system that Grooveshark built [...] is now jointly owned by the major labels. They cannot possibly be short-sighted enough just to throw that away.

Uhhh. I'm honestly confused. Is this sarcasm? Because if there's one thing that major labels have demonstrated, it's a willingness to be short-sighted.


Insolvent: Liabilities exceed assets.

Illiquid: Immediate demands for cash exceed liquid assets.

Fractional reserve banking: Short term deposits are lent out as long term loans.

Under normal conditions, a bank has capital (ie, its assets exceed its liabilities). The capital acts as a cushion, which means it is not insolvent, and not likely to become insolvent.

On the other hand, fractional reserve banks are prone to liquidity crises (aka, a bank run), because while the bank will pretty much always have enough assets to give all depositors their money back, it will pretty much never have enough to do so immediately. Which is why real banks have depositor insurance (and also why depositor insurance is affordable to provide).

The article is describing MtGox as being insolvent; and despite incorrectly using the term, it's not describing fractional reserve banking, and the two are not the same thing. MtGox didn't make long term loans (or any loans), and it did not suffer a liquidity crisis. It was insolvent because the money was stolen. It's a vastly different thing.


The sentence you quote is referring to antitrust. The laws about using a dominant position to compete unfairly are antitrust laws.

And it is pretty weird. It's really not very analogous to the old Microsoft/IE cases.

(Edit: Obviously, it's an EU case, brought under different laws entirely. There's no particular reason it would or should be analogous, but it does look very odd to US eyes, just because the legal principles are so different.)


It's talking about the use of a dominant position in search to muscle into other markets, not challenging search dominance directly.


The most popular[1] promises library (Bluebird) already has support for all of that, I think? .timeout() can be added to any promise chain to add a timeout, and there's .some(), .race(), .settle(), and .any(), etc. to handle various flavours of optionality.

[1]: Well, based on comments on HN and Reddit. Not sure about hard numbers, but it certainly gets talked about a lot.


I'm more interested in these sorts of features being in the ES6 Promises implementation. I expect that given a lot of new Web APIs are going to be using the native promises, these features being in the ECMAScript promises implementation is pretty important.


It doesn't matter at all what kind of promise flavor an API returns because promise implementations treat other implementations as interchangeable.

Even the ES6 Promises implementation supports this:

        then: function(r) {
    }]).then(function(result) {
Here the plain object with then could have been any promise implementation, even jQuery, and it still works.


I do understand that, but it'd be very nice to be able to do some things like timeouts and the like, without loading quite a few kilobytes of another promise implementation.


For good or ill, it's not going to happen. ES6 is meant to have a VERY small promises API (although you can use a library like Bluebird as a wrapper around the native implementation to provide a better API). A more full features promises API will be coming in ES7.

See, for example, the discussion about adding a .any() method to the ES6 promise spec: https://esdiscuss.org/topic/promise-any

The conclusion basically that yes it would be useful, but it'll have to be ES7 not ES6.


The good news is ES7 is actually named ES2016, and will come out in one year.

The bad news is nobody has actually stepped up to champion such an addition, so it's looking unlikely that such a feature would be implemented in 2 browsers by the mid-2016 deadline necessary for it to be part of ES2016.


ES2016? As far as I knew, the ES7 name was being kept, but the ECMAScript script would be updated yearly, as opposed to the 5 or 6 years between ES5 and ES6.


Well ES6 is so far down the editing path that any additions now are pretty much impossible, but with ES7 coming about a year after ES6 it wouldn't be a long wait for a bigger Promises API to end up in the ECMAScript spec.


I see you're getting downvoted, but no one is bothering to explain.

First, the market in general works in the exact opposite way. You can invest a million dollars a lot of places; with enough luck and skill you'll earn a great return. Keep doing that and soon you'll have, say, 500 million.

But 500 million is harder to invest; you might say "stock X is really undervalued; I'm going to go long!", but if stock X has a market cap of 10 billion, you'll struggle to find 500 million in shares to purchase on a whim, and in so doing, you'll push the price up, and now it's no longer undervalued. Many investments that work for the guy with 1m don't work for the guy with 500m.

But if you keep going and keep being lucky (or skilled) you might end up with billions or hundreds of billions. Now you're basically fucked. Most possible investments don't have the liquidity or capacity to absorb the money you're trying to place. At this scale you aren't picking companies; you're picking industrial sectors or countries. You'll never make a great return like that. Plus you're being watched constantly; the merest rumour that you're about to invest will end prices soaring or crashing before you can move. You can "push the market around", but only in ways that benefit smaller, nimble players, not you. At that scale, your ability to be clever is basically nil.

Which brings us to the second point: Vanguard is an index fund. They simply buy an even mix of the shares that make up an index. Their entire strategy/promise is that they won't "push the market around" (which is the reason they have $3t under management; people explicitly looking for people who won't try and be clever).

So your question is "couldn't Vanguard do the one thing they don't do, because it can't work"? And the answer is no, it can't work, which is why Vanguard exists and has those assets.


Thanks for your comment. I didn't ask if an index fund could move the market, I asked if an investor with so much couldn't move the market.

One guy bought 15% of the world's cocoa and now chocolate prices are high and manufacturers are trying to rip off consumers by filling thick plastic packages with more air and less chocolate bar.

If you had control of that sort of money it just seems you could be invisible. The cost of the entire coffee production of the world is only billions, buy any significant percentage and there's going to be companies who'll either pay or collapse?


> I asked if an investor with so much couldn't move the market.

Well yeah. Start to buy Apple shares, and the price rises, and you pay more than a smaller investor would. Try to sell them again, and the price crashes, and you receive less than a smaller investor would. As I already explained, you've got it backwards.

> One guy bought 15% of the world's cocoa

Yes, years ago. And it was 7%, not 15%. And like pretty much every cornering scheme, it didn't work. Armajaro ended up in trouble when cocoa prices dropped while they were still holding a large inventory, and they had to sell their commodities trading division off just to cover their losses, because of the same dynamics: The only way they could buy 7% of the worlds yearly cocoa production was by paying a premium—and the only way they could get rid of it was by offering it as a discount.

> If you had control of that sort of money it just seems you could be invisible.

The exact opposite of invisible, actually.

> The cost of the entire coffee production of the world is only billions, buy any significant percentage and there's going to be companies who'll either pay or collapse?

Not a good plan. :)


I'm going to challenge you for sources on Armajaro - the cocoa price vastly increased following his scheme and his commodities trading business has won incredible gains.

Armajaro did 2 major trades [I confused the two], the first in 2002 at 15% of the crop (http://www.theguardian.com/business/2013/dec/21/coffee-globa...) and the second in 2010 at when he took delivery of 7% (that you noted; IIRC he purchased more but took delivery of this portion??): http://www.tradingeconomics.com/embed/?s=cc1&d1=20000101&d2=... - notice in 2002 to 2007 the price ramps as it does 2010 to present.

Now the official story with Amajaro is that (eg http://www.ft.com/cms/s/0/8fb81fa0-5374-11e3-9250-00144feabd...) he lost "millions" but I've not been able to find specific details of this trade and the selling on of the cocoa. He purchased 7% of a crop that his CC+ fund bets on price changes of - the fund is making large gains (http://www.valuewalk.com/2014/06/anthony-ward-letters/), ~15% in 2010.

The above FT story reports that the problem with the trade was that customers expected extended credit and despite a $55M for 6% investment the company, doing many other deals, went under; reported as a credit issue. They sold for $1 to another commodities trade company [Ecom Agroindustrial Trading], FT reports Amajaro Trading was valued at $200M-$300M in 2012. I'm skeptical as to whether Amajaro made a personal loss in any of that, whether it's possible that the price was artificially lowered to sell on a lot of commodities for $1 and avoid tax? Does that seem at all possible?

As a complete novice to the field, could you explain why it's not a good plan in general to seize large proportions of a commodity, for example in these two positions with an increasing price and a stable retail demand for the end products?


I'm not really sure what you're asking.

Armajaro trading arm bought something like 240,100 tonnes of cocoa for around £650 million, or ~£2,700 per tonne, in July 2010. They then sold the cocoa beans "later that year".

Unfortunately, July 2010 was the peak of the market (it's almost as if trying to buy 7% of global production drives prices up), and they were paying above the odds even then. And prices immediately tumbled off a cliff, dropping to a low of ~£1,8200 in November 2010 (it's almost as if trying to sell 7% of global production drives prices down!), before rallying briefly in 2011, then proceeding to briskly tumble to a low of ~£1,330 per tonne in 2012. (They've since recovered, but they've yet to break £2,000.)

So yeah, obviously Armajaro lost a bunch of money on that trade, precisely because of the volume they were working with. By actually taking delivery, they were relying on prices going up, but prices went down, right as they were needing to sell. Except that because they were buying and selling hundreds of millions of pounds of cocoa, they themselves were a leading cause of the markets moving against them. The same thing happened in other famous market corners, for example when the Hunt brothers tried corner the global silver market (and lost a staggering amount of money). It's no accident that there are no famous successful market corners.

Incidentally, I'm not sure what the graph you linked is meant to be, but here's a good graph of cocoa prices over the relevant period: http://www.indexmundi.com/commodities/?commodity=cocoa-beans...

> whether it's possible that the price was artificially lowered to sell on a lot of commodities for $1 and avoid tax? Does that seem at all possible?

Not following. If you're asking if it's possible if Anthony Ward sold a key part of his trading empire to a hated rival for $1 not because he'd lost a ton of money trading cocoa and the thing was basically worthless, but because he'd made a ton of money and it was actually hugely valuable? Then the answer is no, of course not.

> As a complete novice to the field, could you explain why it's not a good plan in general to seize large proportions of a commodity, for example in these two positions with an increasing price and a stable retail demand for the end products?

First, cocoa doesn't have a steadily increasing price, and while retail demand might be stable, the supply situation is very volatile due to political and economic instability in the growing regions. Cocoa prices were bouncing around like crazy, and while volatility is good for smart traders trying to make bets about price directions, it's bad for people trying to deal in the physical commodity, because what happens if you get stuck with 240 thousand tonnes of cocoa purchased when the price crashes?

Second, even if cocoa was a safe commodity with stable supply, demand, and price, you can't "seize large proportions of a commodity"; what you can do is start buying it. And the more you buy it, the less stable the price is going to be, because the demand is no longer stable due to some wannabe Bond villain is buying up huge amounts of it. The price will skyrocket. So when you ask:

> why it's not a good plan in general to seize large proportions of a commodity

Because you'll pay a large premium over the fundamental market price. Like, by definition. And buying anything for a large premium over the market price is never a good idea, unless you value it well over the market price. But Armajaro wasn't a producer; all they could do with the cocoa is sell it. Which, inevitably, they'll do at some discount to the market price. Nor would this trade have made sense if Armajaro had known that prices were going to spike due to an external shock; then they should have bought options, not actual physical cocoa.

Bottom line: Buying very large amounts of a physical commodity in order to profit from price movements is a terrible idea.

Edit: The largest purchase of cocoa ever was done in 1996 by...Anthony Ward, working for Phibro at the time. He bought 300,000 tonnes, but Phibro lost money on the deal when prices moved against him. Shocking! Although he is reported to have made money on his 2002 trade. Then again, the 2002 trade was only 5% of the market, or 200,000 tonnes, smaller than the other two. (The Guardian says 15%, but you can't trust the Guardian with numbers, and multiple other reports confirm the lower figure.) Or in other words, Ward has demonstrated the ability to make money on small trades, but lose them on bigger ones.


Thanks for your insight and continued patient responses.

>"Armajaro trading arm bought something like 240,100 tonnes of cocoa for around £650 million, or ~£2,700 per tonne, in July 2010." (Lazare) //

>"Then the answer is no, of course not." (ibid) //

The ICCO [1] has an interesting section at paragraph 31 on page 10 where it discusses this tonnage [at arms length] and says a group of interested parties made appeals that unfair trading was attempting to manipulate the futures market. This suggests that those companies were thinking something along the lines of what I was suggesting: that this purchase was trying to manipulate prices, so the money made would not be from the trade directly.

>"[...] This price development on the London market led 16 cocoa companies and trade associations to send a letter to NYSE Liffe to complain that “a manipulation of the contract” was “bringing the London market into disrepute”. Many market commentators argued that this backwardation was fuelled by a squeeze, which is a trader or a group of traders deliberately disrupting the supply of physical cocoa to artificially increase the price of cocoa futures contracts which are about to expire, and hence to profit from it while other traders find themselves struggling to fulfil their obligations. In response to this allegation, NYSE Liffe advised that it did not find any evidence of abusive trading behaviour on the cocoa market." (ICCO report [1]) //

You said the price "tumbled off a cliff, dropping to a low of ~£1,8200 in November 2010". According to the chart you linked a tonne of cocoa averaged [?] £2.11k [in London?] in July 2010 when Amajaro made the trade. So why would companies be complaining about backwardation then? [2] Says the price was pushed up and rose by 0.7% after the purchase.

Presumably then those with warehoused stock that's accessible can undercut Amajaro in order to bring down the price? But if there are sufficient goods for this then the "other traders find themselves struggling to fulfil their obligations" from [1] makes no sense.

Also seemingly there was a major issue with Ivory Coast [aka Cote d'Ivoire] being under a flood warning, that previous years had returned deficits in terms of the global demand vs. the global harvest. Was this the issue that broke Ward: There were various embargoes and shenanigans around the Ivory Coast's presidential elections and when they eventually shipped the harvest proved excellent and there were massive excesses [1].

>So yeah, obviously Armajaro lost a bunch of money on that trade, precisely because of the volume they were working with. //

Looks like a top estimate for that is -£72M based on the July to November price change for 240k tonnes.

>* Nor would this trade have made sense if Armajaro had known that prices were going to spike due to an external shock; then they should have bought options, not actual physical cocoa.* //

Correct me if I'm wrong but you can't corner the market that way because the seller can default; moreover a future glut can come in and wipe out your position and/or movement of goods can alleviate the local shortfall [it's something like 3-4 weeks to ship cocoa from US warehouses to European buyers]. Thus it wouldn't create a clamour in the market to ensure that delivery of the commodity can continue, as was apparently the case here?

- - -

Couple of figures that are pertinent:

* Re your edit [3] puts a figure of £40M on the 2002 trade, Wikipedia reports a £58M gain.

* Ward's CC+ fund made 15% in 2010, not exactly sure how much that is but it seems to have been £25M based on some other figures (all Amajaro funds passing £1B, CC+ being 20%, working backwards from [4]).

[1] http://www.icco.org/about-us/international-cocoa-agreements/...

[2] http://www.telegraph.co.uk/finance/markets/7895242/Mystery-t...

[3] http://www.telegraph.co.uk/foodanddrink/foodanddrinknews/789...

[4] http://www.valuewalk.com/2014/06/anthony-ward-letters/


s/invisible/invincible, sorry.


However there are strategies available to active investors with billions - being an "activist investor".

If you buy significant stakes in companies - which might be only a percentage point or two, but still putting you in the top individual shareholders, then you have the ability to change the strategy of the company.

The step up from that is into Berkshire Hathaway / private equity territory where you just buy companies, or very significant stakes and run them as you want to.


> So, best case scenario I get market returns?

Yes. Note: This is a surprisingly accurate description of reality. Aggregate hedge fund returns are goddamn terrible.

> Then why not just invest in an index fund?

Well, you should, if you're trying to maximise your expected outcome. Of course, not everyone is trying to do that.

In particular, what if you run a pension fund which is currently underfunded, but for political reasons is claiming to be adequately funded through the expedient of assuming that future returns will exceed any reasonable expectation of market returns?

If you invest in an index fund you'll get market returns; since that's not enough this means you will miss your targets, and be unable to pay promised pensions, at which point you'll be fired. But if you give all the funds cash to a hedge fund, or engage in some crazy snowball derivative[1], then you'll probably do even worse than an index fund, be able to pay an even lower percentage of the promised pensions, and you'll be fired. Which is actually no worse for you. But you MIGHT do really well, and actually be able to pay the promised pensions. Not likely, but if it works you avoid you getting fired, and if it doesn't you were going to be fired anyhow, so why not give it a shot?

All of why is completely hypothetical. The fact that many US pensions funds are horribly underfunded using any plausible actuarial projects and are simultaneously investing heavily in exotic asset classes is just a funny coincidence.

[1]: http://www.bloombergview.com/articles/2014-05-02/portuguese-...


If the guy generating alpha keeps most/all of his above-market alpha, then that means there's none for me to get or keep, right? I can't see how that's attractive at all.


That's the point. An ability to reliably beat the market is like having a goose that lays golden eggs.

If the ability exists at all, it's certainly very rare. And if you are one of the people who has it, why would you hire that ability out to other people? The guy who owns the golden goose is going to sell the eggs, not rent the goose out. Or if he did rent the goose, it would be for an amount no lower than the expected value of the eggs because otherwise he's losing money.

But given these dynamics, that means that there's no reason to think that if you see some guy offering to rent a golden goose it would be a great deal for you. I mean, he's actively trying to price it so it's not, and it's his goose, so he's probably right.


According to the headline (and also economic theory and extensive empirical evidence), rent control hurts renters. On the other hand, Prop 13 does not.

Your argument is that renters shouldn't give up something that hurts them, until another group gives up something unrelated?

Can you articulate why you think that negotiating strategy might lead to optimum outcomes for renters?


> According to the headline (and also economic theory and extensive empirical evidence), rent control hurts renters. On the other hand, Prop 13 does not.

I think (guessing a bit here) is that the argument goes like this: repealing Prop 13 would drive down house prices, allowing some renters to instead buy/mortgage, therefore reducing the demand for rentals, driving rents down.


repealing Prop 13 would drive down house prices

By increasing supply, I would imagine, at the expense of older, retired home owners. In my community, there are a lot of old people that wouldn't be able to afford a fraction of my property tax. Many would be forced to sell and there would be a glut on the market of new homes, which would likely drive prices down.

I hate paying the property tax rate I do, but I would also hate to drive all the old people of my community to cheap, depressed housing stock in some remote place.

What's the way out of this? I really don't know.


If the intent of Prop 13 is to keep Grandma in her home then let's ammend it only to apply to Grandmas primary residence.

Prop 13 as it stands is simply a way to allow commercial landlords to avoid paying property tax at market rates.


You're mistaken in your mechanism: it reduces demand. Repealing prop 13 should drive down prices by increasing the total cost of ownership. Suppose you can afford to pay $3000/mo for housing. If your tax bill is $500, that leaves $2500 for a mortgage payment. Higher taxes, less is leftover for a mortgage. With a $500/mo tax your maximum mortgage is $530k. If it rises to $700/mo, your maximum mortgage falls to $486k. The whole pool of people with a $3000/mo reserve have been pushed down the curve.


Those people could use the equity they've amassed in their property to pay the property tax, such as through a reverse mortgage. Although "house poor", don't forget they are still quite wealthy.

It would make sense for governments to formalize this arrangement and allow deferring of property tax payments until the house is sold.


"Swedish economist (and socialist) Assar Lindbeck asserted, 'In many cases rent control appears to be the most efficient technique presently known to destroy a city—except for bombing.'"

Rent control is one of the small number of policies that economists on the left and right are essentially unanimous (93% in a survey of US economists; 95% in a survey of Canadian ones) in agreeing are always harmful, because they reduce both the quality and quantity of housing available.

It's not even some vague hypothetical either: In the linked story, the rent control laws have resulted in the conversion of a multi-tenant building into a single-family dwelling, which is a reduction in the number of housing units in the city. A reduction in the quantity supplied will, of course, lead to an increase in the equalibrium price. And the high equilibrium price is both why Follingstad's eviction is so painful, and why they were (effectively) evicted in the first place.

It's a textbook example of Why Rent Control Hurts Everyone, in one compact little story.


Indeed, even Paul Krugman thinks rent control is a bad idea: http://www.nytimes.com/2000/06/07/opinion/reckonings-a-rent-...


It seems likely that the owners will "change their mind" and decide to convert the "storage area" back into an apartment once the tenant is gone and they can rent at market rate again.


Actually, no.

Remember, according to the link, the landlord has gone through some efforts to make this hard to challenge, including legally changing the status of the building to single-family. That's a very difficult process[1], but the reverse is even harder. (If converting single family dwellings into multi-tenant units was easy, San Francisco wouldn't have much of a housing crisis.)

Given the huge legal obstacles, plus the fact they already removed the bathroom and kitchen (not cheap), plus given the already strong trend of multi-unit dwellings being converted into single-unit dwellings to fuel demand from the rich, it seems unlikely that this building is going to be multi-tenant any time in the foreseeable future.

(Unless the landlord screwed up and didn't get the paperwork done. In which case they won't be able to raise the rent. But that doesn't seem to be the case.)

[1]: http://www.quora.com/How-hard-is-it-to-get-a-duplex-or-set-o...



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact