Ask HN: Canada for tech jobs? - <AUTHOR> Is now a good time to move to Canada for tech-related jobs, data science/analytics in particular? What parts of Canada should one consider? <comment><USER4> I'm a Canadian software that moved from Victoria, BC to San Francisco, CA to begin my career two years ago. My top earning friends in Canada of the same experience level earn 2 - 4 times less than me and my peers here. I'm saving significantly more here than them too even after a much higher cost of living. The quality of life here is worse though in some ways. Most of all I miss the politeness and generally less hostile demeanor of Canadians.

<comment><USER5> > My top earning friends in Canada of the same experience level earn 2 - <USER2> > times less than me and my peers here

2 is possible, 4 seems like a big stretch. Are you really comparing apples to apples? Or are you working for Google and comparing against someone working for a random consultancy firm in Victoria? In Montréal, top software developers salaries are around 200K CAD, a bit more if you go at Google, and Montreal pays less than other cities.

<comment><USER6> 200K CAD is basically unheard in Montreal for the IC. I know only one person with total compensation like that and she is kind of tech manager. 135K Cad is very high in Montreal for IC, median for the senior developer is around 90k, 100K considered very good.

<comment><USER5> It's high but not unheard of (I am talking about total comp, not base salary). I know plenty of IC making that and more. Of course I am biased, since I work for an employer that does pay that kind of salary, so of course I know a lot of my colleagues. This might only be achievable if you work for one the top AI companies in the city however (Google Brain, Facebook Lab, Microsoft etc.). I don't really know how it's like outside of my bubble.

And I agree that this is not common at all but OP was talking about "top earning" friends.

However, even taking your median figure of 100k, I doubt the median salary in the bay for a senior software engineer is 300K USD (4 times more).

<comment><USER6> Facebook Lab is how many employees in Montreal? 10? Microsoft doesn't pay 200k CAD in Montreal in total comp to IC not even close to that.

<comment><USER5> > Microsoft doesn't pay 200k CAD in Montreal in total comp to IC not even > close to that.

You might want to get more up to date info on that.

</comment></comment></comment></comment></comment></comment><comment><USER7> Vancouver and Toronto are developing rather robust local economies. Vancouvers is more satellite offices for large American companies like Amazon (15k). Shopify announced prior to Covid that they were opening an office with 1000 people. A large portion of the jobs here have traditionally been as a visa clearing house prior to having people move to the main campus but there are lots of locals.

The biggest challenge in tech in Canada is salaries. Youre paid less and then youre paid in CAD which is around 70% of USD. Then you factor in high house prices in both Toronto and Vancouver and things arent so great.

If youre willing to live outside these areas then there are lots of opportunities. Canada as a country in general is great, but it has its own set of issues. Namely a lame resource extraction based economy and a hyper willingness to sell all its assets - information economy and otherwise - <USER3> discount prices to boost jobs.

<comment><USER8> The biggest issue in Canada is a lack of imagination and risk taking by the capitalist class. They would rather stick to what they know, digging rocks and sand out of the ground.

<comment><USER9> That's harsh and put in a flamebaity rather than interest-furthering way (which, please don't on HN!) but I think it's true that Canada is more risk- averse than the US. If you think about it, that can be traced straight back to the founding of the two countries. The two populations even self-selected for risk tolerance to some extent. (I'm talking about English-speaking Canada.)

</comment></comment></comment><comment><USER10> Canadian salaries are quite a bit lower, but I'll be honest in saying I was happier with the quality of life in Vancouver than in the Bay, despite earning twice as much here.

There is a growing tech community in Vancouver. There are more traditional tech companies like Microsoft, Amazon and Apple. There's also film and games companies like Industrial Light and Magic, Sony Pictures Imageworks and more... It's definitely no Bay Area in terms of number of gigs or pay, and the cost of living is almost as high, but again, I felt much happier there. It's obviously subjective and unquantifiable, but something to research and consider too.

</comment><comment><USER11> Salaries are a different story in Canada compared to the USA.

They are far less in Canada, a $200K CAD ($150K USD) tech job is rare, actually, $150K CAD ($112K USD) are also uncommon.

Best job opportunities are in high COL locations (Vancouver, Toronto), followed by Montreal. But unlike the USA the compensation (for MOST employees) in those markets is only moderately higher than lower COL locations. (Calgary, Edmonton, Winnipeg...etc).

<comment><USER12> On top of the lower base salaries, the compensation you receive in the form of stocks is also a good bit lower.

<comment><USER13> Exactly - don't expect hundreds of thousands of dollars of option grants. The equities markets are really very different here and without good exits, there won't be good options and equities grants.

</comment></comment></comment><comment><USER14> I'm Canadian that works in QA, specially in Alberta. If the US is an option, go to work in the US or for a US based company remotely.

Base salary is much higher in the US. To give you an idea: at year 8 of my career my salary is technically $52,000 Canadian per year. I've had people in the Seattle telling me that number should be nearer to $100,000 USD. And my $51,000 Canadian translates to $34,000 USD when the conversation rate is considered. The difference grows when you consider that the US typically has a lower tax rate then Canada and that many US employers are usually willing to provides benefits that would cover services that normally the government would be paying for.

That said, I'm only speaking as someone that works in QA and the city I live in does not have as strong a tech industry as those in British Columbia, Ontario, or Quebec.

</comment><comment><USER15> I think it depends what country are your from?

Lots of Canadians here will suggest to move to the United States for higher pay and better opportunitites.

But if you are from a developing country, then moving to the USA is very convulted and not an easy option for you like it is for Canadians.

So, If you that is your situation, then Canada is an exciting option and you might be able to work for a lot of US companies that have Canadian options.

<comment><USER16> This describes me perfectly. I'm from Brazil and I want to leave for another country with better life quality.

The US is a nightmare regarding immigration. The Canadian system is straight forward for qualified people.

</comment></comment><comment><USER17> Yes.

Been working here for a decade and the tech economy is the best it's ever been.

Big cos like Amazon, Microsoft have set up shop in Vancouver and are here to stay. They provide a nice fallback option to any sort of smaller startups that don't pan out.

The games industry has bounced back in a big way too. The multi thousand capacity EA Games studio in Burnaby is full and they've had to get off site offices.

Add on the standard benefits of Canada:

* free universal healthcare means being an entrepeneur is easy.

* reasonable gun regulations (no concealed carry nonsense)

* generally more progressive governments than USA.

</comment><comment><USER18> I work in Victoria, BC earning $200k+ CAD working remote for a big US tech company. It's the best of both, live in a wonderful place and get paid well.

<comment><USER19> livin' the dream. I also live in Victoria and used to work in the US for much higher salary. I've thought about this... I do love it here!

</comment></comment><comment><USER20> Apart from the fact that Canada has closed its border with the US because of COVID, of course.

Pay on average is lower, but comes with a higher degree of social security and stability. Of course, Canada is not without its own racist past or present, but it's not quite as "on display" as the US. Our previous prime minister tried to have a "barbaric cultural practices" hotline which was essentially a dogwhistle to more Islamophobic elements of the Conservative party base.

That being said, I'm thankful that our police aren't tear gassing protesters in Ottawa so that Trudeau can have a photoshoot.

The tech industry in general isn't as large as the US, but does carry a lot of talent. Places to note are Kitchener-Waterloo, Toronto, Ottawa, Vancouver, Montreal and...maybe Calgary? I'm not so sure about the data science field myself, but I do know that most large tech firms around here do carry an analytics team.

Edit to add: like others have noted, COL is high in Toronto and Vancouver. That being said, I absolutely loved living in Vancouver and would move back there from Waterloo in a heartbeat. If you're able to land a job and afford living there (or more likely in another Lower Mainland city), I would recommend it.

<comment><USER21> > Apart from the fact that Canada has closed its border with the US because of > COVID, of course.

I believe it's still open for work, it is in the other direction.

<comment><USER22> I think you'll find it is closed, unless you have an urgent need to cross (e.g., sick parent). If you do cross, you will have to self quarantine for 2 weeks (which kind of defeats the purpose of trying to help your sick relative). Last we heard, it will be June 21 before we can visit our parents in Vancouver.

</comment></comment></comment><comment><USER23> What's your visa situation?

I am from India - getting a US visa/green card is too much trouble. I started at a tech company in Canada at 70K Cad annually in 2008. The salary went up to 120k by 2016.

In these 8 years - I went from a work permit to Canadian citizen. Also started a family with kids.

I moved to Bay Area in 2016 for a non-Faang company at 200K USD annual total compensation. Moved to Faang in 2018 and comp is 400k USD.

Will move back to Canada by 2020/21 and am counting on my company allowing remote due to covid. Yes it will be a salary cut but that's fine. I want to raise my kids in Canada.

Bay Area experience is worth it - financially and technical too

Long term it depends on you

</comment><comment><USER24> If you're considering Montréal, do your research before. French language is not a requirement to get by day-to-day in the city (though elsewhere in the province is another story). We have a decent tech sector with some big companies like CAE, Mindgeek, and Hopper. There is also a respectable AI research scene and an incresing amount of startups in the city. If you're open to learning French (a good chunk of jobs require it) and have any data centre credibility, you might be on a good trajectory. Québec has super low electricity costs and data centres are interested for that reason.

The city has a low cost of living, high provincial taxes, but a top notch cultural scene, bar scene, festival scene, etc.

If not Montréal, Toronto or Vancouver have their callings but most tech folks I studied with headed off to the states for higher wages - but I imagine many of them will return with stacked savings accounts at some point. As someone else pointed out, Waterloo is a special case and might be worth looking at, too.

<comment><USER25> What would you say are the wages for different types of tech roles and seniority in Montreal? And how accessible are those to non-native French speakers?

<comment><USER26> Your salary is probably going to be lower in Montreal, but it's much cheaper city to live in than Vancouver or Toronto. There are high paying jobs if you know where to find them, but it seems to me like a lot of the software engineers I've come across here are a little less "ambitious" and don't mind settling for a smaller salary if it means more stability. It's also very taboo here to talk about your salary (sometimes even to your SO?) but that's changing and I think it's not unique to Quebec at all.

In my experience, and purely anecdotally, I've really witnessed a 2 speeds system where some people are very highly paid (120k+, keep in mind you can buy a condo in the middle of downtown for 300k) and some are getting very (40-50k) low salaries for the same amount of experience, same alma matter and probably even the same skill . How you sell yourself is always a huge factor in how much you get paid, sure, but the difference is particularly striking in Montreal imo.

As for seniority, most of the teams I've seen are very young with very dynamic leads. The industry is booming right now ( or was booming before march, I'm not sure now).

<comment><USER25> Thanks for the detailed info!

<comment><USER27> Agree with the OP.

To add on to this, from someone who is actually living in Montreal.. Quebec has the highest tax rates in Canada.

To give you an idea, the majority of software engineers here make between: 70k-95k.

This means you should be ready live with around 4-6k/mo after taxes.

The rent is still cheap, but not as cheap as you think, a descent apartment will cost you ~1,200$/mo.

The healthcare is (almost) free, you still have to pay the government ~200-400$ year if you're not on a private plan. But it's nowhere near the US.

Also French really is a requirement, especially when dealing with the government.

</comment></comment></comment></comment></comment><comment><USER28> Seeing a lot of comments about low salaries in Canada, is there anywhere outside US that salaries are that good in tech?

London, I know is about half of US if you look at FAANG comps and you have higher taxation compared to a city like Seattle.

Zurich, is about 70% with lower tax but a very high CoL

</comment><comment><USER29> If I were doing data science, I would be in Toronto, Ottawa, or Waterloo. Given the customers with enough data for that in Canada are almost all institutional, and that's where they are. You could go to Victoria, which is the capital city of BC where it's mainly government driven work, but there isn't going to be a big growth story there.

You can make a living and have a comfortable lifestyle in Canada, but it is not the best place to create or build wealth. It's where to be if you bring it with you.

Given the small and dispersed distribution of the population, startup level growth mainly comes from access to the US market. Access to the US market tends to mean being HQ'd there, so you get quite a few "offshored," engineering and development shops to take advantage of the currency, SRED tax credits, COL and salary differences, where the US HQ handles the revenue, product management, marketing, equity, M&A and other business decisions.

The two main markets for enterprise products and dev are Toronto and Ottawa. There are only five notable banks with offices across the country and around the world, who share a largely homogeneous enterprise tech culture. Health care is a public sector business, and there is lots of opportunity to make a living in health care tech, but it is managed as a sprawling enterprise centralized economy that acts as a ceiling on growth. There are some notable examples, but they use Canada as a proving ground before going to market in the US.

The way most entrepreneurial money appears to be made in Canada is by operating "recruiting and consulting firms," which provide institutions with arms length contractors that they can add and remove at will instead of dealing with the challenges of employees.

Quality of life compared to american cities in decline is incomparably better. The hard part is affording it. Owning a an actual house near a metropolitan area is out of reach for first time home buyers, and places with affordable housing are outside commuting distance from anywhere that does software development. Short term rentals have sent rents skyrocketing everywhere within a 90-minute drive to Toronto.

If you are already on the property ladder where you are, using that as leverage to buy a place here is the best way to do it. If you are not, it's smarter to get the capital from selling your first house as a downpayment to get you into something in Canada, as real estate is basically the only way for working people to build wealth.

</comment><comment><USER30> I'd personally wait 8-12 months and assess the situation then.

The reason I say this is because Canada's tech scene is largely comprised of US companies near-shoring operations for cost reductions and with remote work on the rise my view is that Canada's tech scene is now in a super fragile state.

There's a significant incentive for Canadian tech workers to work remotely for US companies and similarly there's a massive incentive for US companies to hire Canadians on Canadian salaries remotely.

Uber, Facebook, Google, Amazon etc. had expansion in Canada planned but I wouldn't be surprised if this changes radically in the coming months. Shopify already announced it was going fully remote and then offered what were previously Canadian-only jobs out to the Americas entirely. It's not unfathomable that other Canadian companies will do the same.

If remote succeeds, I cannot see what incentive would drive the further expansion of the local tech scene in Vancouver, Toronto, Montreal etc. Meetups and similar only worked because people were forced to be in the city, they were held directly after work and usually offered some sort of food/beverages as a substitute to having to sort out dinner. If the requirement to be in the city falls or is removed entirely, I cannot see what will incentivize locals to get together in a common location at anywhere near the same frequency as before.

I'd recommend seeing how the rest of the year / start of next year plays out before planning anything concrete.

</comment><comment><USER31> Tons of opportunities in Vancouver and Toronto at both small companies and large multinationals. But salaries are low (compared to the US) and cost of living is high.

The quality of life in Canada is wonderful if you can make the numbers work. Vancouver and Toronto offer different things so I'd research which one suits you better. They're both amazing in their own way.

I can't speak for Montreal which has its own unique culture unfamiliar to me, but I believe it's comparable to Vancouver and Toronto, and cost of living is better. It's a very distinct place.

Smaller, more affordable cities you could consider are Ottawa, Waterloo, and Victoria. They each come with their own trade-offs but have decent tech industries. Victoria is only really affordable compared to Vancouver/Toronto but it's a very idyllic small city if that's what you're after.

</comment><comment><USER32> I work remotely out of Kitchener for a SF company. Don't get paid the san fran dollars obviously but the quality of life and cost of living is great

</comment><comment><USER33> From where and what is your visa status?

Is now a good time for anything? If you go through temp work permit or immigration route, these things were not fast before, they sure are even slower now.

If you do move, Toronto, Waterloo, Vancouver, Ottawa are good places in that order. Do not know much about Montreal, but outside of those you will be having a hard time finding anything.

Data science - I cannot speak much about it, but if you want to do that, governement and healthcare is probably your best bet.

</comment><comment><USER34> Depends where you're moving from. Seems like most of the comments are comparing to the USA tech scene in a FAANG company and only the financial aspect ... nothing will compare to it if it is what you're looking for.

However not everyone is looking to work in a FAANG or to live in the USA.

Canadá has a thriving tech scene and you will have a better quality of life and pay than about everywhere else in the world that isn't a FAANG in the USA

</comment><comment><USER35> My impression as a citizen of the US is that the social welfare in Canada is more robust, but salaries are lower on average. For some folks the peace of mind of knowing your healthcare isn't tethered to your job is worth the reduction in income; for others, they can make so much in the states that they feel it's worth it to try to build a career there. Just my highly anecdotal 2 cents.

</comment><comment><USER36> My business partner for one of his other ventures, hired a kid who finished a degree from University of Waterloo in NANO Technology Eng as a lab tech for a starting salary of 48k.

It seems like his prospects were very limited. I'm not sure if it's his career choice or if it's related to the high levels of underemployment in the Toronto tech industry in general.

<comment><USER37> Traditional engineering, especially academic, is not very well paid compared to software engineering jobs.

Source: I skipped out on a Mechanical engineering PhD to join industry for better $$, I then skipped out on Mechanical engineering industry for better w/l balance and $$ working from home in a tech role.

</comment></comment><comment><USER38> I'm sharing from Product Management perspective.

\- Director and above level PM can earn above: $140K CAD and beyond in major cities like Toronto.

\- Sr. PM can earn: above $100K CAD easily but harder to be above $150K CAD.

\- Bay Area - based on the current conversations I have: \- Sr. PM or PM in a FAANG type company or startup: around $170K USD \- Director level PM can be above $200K USD

<comment> I-M-S I'm also a PM in Toronto and looking for opportunities in post-Covid world. I'd love to connect - my contact info is under my profile

</comment></comment><comment><USER39> Compensation is lower, but if you have a family it's probably worth it. It's education, health care, and access to parks and such are generally easy to come by, cheap/free and good; particularly in Metro Vancouver. Those things make a world of difference when raising kids.

<comment><USER40> Vancouver real estate is ridiculously high, especially given how low the salaries are

<comment><USER39> Metro Vancouver isn't just the CoV; I know folks who live in Maple Ridge, Pitt Meadows, and Mission who commute into the CoV to work. The West Coast Express makes this a pleasant, painless and relatively swift commute.

</comment></comment></comment><comment><USER41> Can someone knowledgeable about this issue comment about legal / tax feasibility of getting a remote job with a US company and living in Canada or elsewhere abroad?

<comment><USER39> I work for an American company and live in Metro Vancouver. In fact, around half the team lives here.

We own shares in the American company and are paid through a Canadian subsidiary. That compensation scheme avoids burdening the employees with the difficulty of declaring foreign earnings come tax time.

So for the most part it's the same as working for a Canadian company, but the pay is better.

<comment><USER42> Awesome! That's like the ideal situation right there. I'm an American that moved to Canada back in 2002 and worked as a contractor for my US employer for more than 4 years. The yearly tax stuff drove me insane.

<comment><USER39> It's not so much ideal as a nice compromise. I'm still earning much less than I would with similar experience doing similar work in _Seattle_, but I get to stay in Canada and earn more than I could easily manage working for a local company.

</comment></comment></comment></comment><comment><USER43> Salaries working domestically in Canada are quite a bit lower, but CoL can also be good. Shopify for instance pays ~150 for senior devs but in Ottawa or Waterloo houses are pretty affordable.

I've had some luck working remotely in Canada for US companies - tax treatment of stock options is worse and they typically have few or no benefits for Canadians. On the other hand, you can have a significantly higher take home if you find the right employer.

</comment><comment><USER44> Waterloo, Ontario

</comment><comment><USER45> As many others said salary is about 1.5x-2x lower. Taxes are about 7-10% higher. Cost of living in metro Toronto or Vancouver is pretty high, around the same as Seattle or DC. Housing prices are outrageous in both the metro areas. Vancouver over 1.5M for detached and Toronto around 1M.

</comment><comment><USER46> Depends on where you're coming from. Vancouver has a pretty healthy scene and is a killer location.

</comment><comment><USER47> Past how robust the tech scene is in your desired location, you also have to ask how the pandemic will affect your time outside of work. ie: Montréal will be just as boring as Ottawa in terms of the nightlife scene for a while.

</comment><comment><USER48> Toronto without question. There are some company's in Waterloo as well, Google has a presence there for example, because of the University of Waterloo. But it is not as bustling as it was when RIM was still a big thing.

<comment><USER49> Not just a presence - it is their Canadian head office with more employees than they have in the rest of the country combined. K-W is easily 2-3x more bustling today than it was when RIM was booming. RIM sucked talent to the suburbs where it diffused outward and failed to seed any amenity concentration. That talent is all in the core now and has led to a massive resurgence including dozens of bars and restaurants and other amenities.

<comment><USER48> So glad to hear that!

</comment></comment></comment><comment><USER50> Related discussion on an unrelated thread about a week ago: [https://news.ycombinator.com/item?id=23329537](https://news.ycombinator.com/item?id=23329537)

</comment><comment><USER51> I am currently looking for a job opening, FullStack, or Mobile(Flutter or Ionic) in Canada or the US... I really don't mind the location.. any suggestions/recommendations?

</comment><comment><USER52> I'm considering moving to Toronto or Vancouver through FSW, and my company's fully remote so hopefully I avoid the salary cliff. You might look into a similar setup.

</comment><comment><USER53> It could be a good place where you can network a find a way to transfer to the US. But staying in Canada permanently working in Tech is a bad idea salary wise.

</comment><comment><USER54> You can do data science at banking institutions in Toronto, though the pay will probably be much lower than elsewhere

</comment><comment><USER55> Yes

</comment><comment><USER56> Expect the pay to be half or less, but you get better overall benefits, a higher standard of living, in exchange for long winters and a mostly car-based society.

<comment><USER39> > a mostly car-based society.

I haven't commuted by car in ... 17 years.

I work in the Metro Vancouver area.

<comment><USER57> Yeah I think Vancouver is an exception to the parent's comment. It's certainly true in Calgary, Toronto, Montreal etc (IMHO).

<comment><USER58> Its certainly an exception on the winter front.

How walkable cities are are going to vary by city. Vancouver is very walkable. Also if you live somewhere up north, its not going to be that walkable even with a great bus system, because waiting for the bus in -30 sucks.

<comment><USER39> Eh, it's a dry cold. I've a good friend working in Nunavut right now and she walks to work. The trick is that her rental is nestled in the center of town; and the town is so small that there's no need for a car.

</comment></comment></comment></comment></comment><comment><USER59> No. Don't do it.</comment>


Dark web dealers voluntarily ban deadly fentanyl - <AUTHOR> https://www.theguardian.com/society/2018/dec/01/dark-web-dealers-voluntary-ban-deadly-fentanyl <comment><USER3> I'm seeing a lot of nonsense in this thread and I'd just like to point out a few things that seem to be commonly misunderstood and misrepresented by the media:

\- Fentanyl is only more dangerous than heroin because it is not properly prepared. This means the dilution is not homogeneous, and users unexpectedly come across a stronger dose or batch.

\- If properly prepared, fentanyl is safer than heroin. Its therapeutic index is 400 vs 70 for heroin (this measures the ratio between active dose and toxic dose). Proper preparation means diluting it so that users can take a dose similar to heroin for the same effects. With correctly diluted fentanyl, users have a wider margin of error before an overdose. Dilution is never done as a last step by the user, it's done in labs that prepare large amounts of the drug.

\- For addicts, the ritual is the same for both drugs. The feeling is mostly the same, but lasts a little shorter for fentanyl. The addiction potential being higher for one or the other is disputable.

\- Once again, it having a lower active dose ("stronger") does not make it inherently more dangerous. It just makes dilution more technical, and this is where the problem comes from.

 _Edit: Of course, I am in no way defending recreational use of the drug. Like all opioids, it 's very addictive and can easily lead to a self-destructive habit. And with recreational users, overdoses will probably happen even with a perfectly diluted batch._

<comment><USER4> Indeed. Fentanyl is used thousands of times per day in the medical setting because it is a safe drug.

I do agree that the potency makes preparation difficult. Few dealers have the equipment to either accurately weigh it out or dilute it such that the product is homogenous. When you move up to even more potent opioids like carfentanyl or sufentanyl, the risk is even higher. Who has the ability to accurately weigh out 0.030 mg?

That said, dying of a "hot dose" of heroin is not exactly uncommon either.

Interestingly, opioids are toxic at high doses as they depress the breathing response to blood CO2 levels. If someone overdosed and you breath for them (CPR or ventilator), you can just wait for the effects to wear off and they'll be none the worse for wear. I've read case reports where a users friends maintain CPR for an hour plus until they started breathing on their own.

<comment><USER5> > Fentanyl is used thousands of times per day in the medical setting because > it is a safe drug.

Fentanyl is not a safe drug. Period. It is a powerful and dangerous drug with dangerous and potentially lethal side effects and classified as such. It's also and incredibly useful drug, potentially of great benefit to people in severe pain - benefit that must be balanced against the danger and risk.

In controlled settings (e.g. in a hospital bed with physiological monitoring) many dangerous drugs can be used in a safe way, Fentanyl included. But that doesn't make Fentanyl a safe drug, just a drug that can be used safely.

In the same way TNT and rockets can both be used safely - neither are sensibly intrinsically safe.

> If someone overdosed and you breath for them (CPR or ventilator), you can > just wait for the effects to wear off and they'll be none the worse for > wear.

I think this is too complacent. Aspiration is a real risk, they could choke, pneumonia can be life threatening. If somebody has overdosed, get professional medical care - management of the compromised airway is no DIY project.

<comment><USER6> I think the point was it's not any more dangerous than heroin and morphine, and can be safe when properly administered in a medical setting.

<comment><USER7> I have no idea why we're talking about it in a medical setting when this is clearly meant to show how dangerous it is in the hands of the public. Fentanyl is dangerous on the streets and safer in the hospital sheets, of course, but that basically has no bearing on how it's used by addicts and cartels.

<comment><USER5> Have you ever seen a HN thread that stayed strictly on topic?

</comment></comment></comment></comment></comment></comment><comment><USER8> > Vince O'Brien, one of the NCA's leads on drugs, told the Observer that dark > web marketplace operators appeared to have made a commercial decision, > because selling a drug that could lead to fatalities was more likely to > prompt attention from police.

Way to save face Vince, so the good old police still works to the benefit of society, but in a convoluted fashion where the underworld avoids making the public too angry and force the police to do it's job.

How about the idea that, like high explosives, nukes and child porn, the people involved recolonize them as inherently immoral and refuse to partake? Unlike, say, the ban on recreational drugs itself - which is the whole reason poisons like fentanyl became available.

<comment><USER9> Dunno - I kind of buy the idea of the drug dealers being profit motivated and dropping fentanyl because they think they'll get banged up. The police have limited resources and so will go after the worst stuff like fentynal rather than people smoking joints which they don't bother with at all these days in the UK.

<comment><USER10> > rather than people smoking joints which they don't bother with at all these > days in the UK.

Police regularly arrest people with small amounts of cannabis, and the range of options they have include criminal prosecution which still happens.

</comment></comment></comment><comment><USER11> Why would an addict use heroin over fentanyl if they both produce the same euphoric effects but fentanyl is cheaper / stronger?

I almost always hear about fentanyl in the context of "...the heroin was cut with with fentanyl". I read that statement like "...the heroin was cut with ultra-pure-super-heroin". Why wouldn't the addict cut out the "middle-man" and just use fentanyl? Legitimately trying to understand.

<comment><USER12> From the addict's perspective, it's because it's better to use something that's cheap and only might kill you, versus something that is only slightly cheaper and probably will kill you due to difficulty in dosing.

The only reason fent exists on the black market is it's stupidly easy to smuggle compared to heroin, a tiny thimbleful of it could be cut into something like a thousand doses. This works out for dealer economics, it's not to benefit the addict.

<comment><USER13> >This works out for dealer economics, it's not to benefit the addict.

there were some articles/research that the harsher the Prohibition enforcement the more trafficking shifts into the higher potent stuff.

<comment><USER6> Illegality also encroaches users to use drugs in a way that maximizes their effect, such as injection, insufflation or smoking. Cocaine is, for instance, active orally, but few people take it that way these days.

<comment><USER6> I meant 'encourages'.

</comment></comment></comment></comment></comment><comment><USER14> _Suppliers, fearing police crackdown, decide opioid is too high-risk to trade_

No evidence is offered to support this byline -- no interviews with suppliers, no surveys, no web forum transcripts.

<comment><USER15> Around the time of your comment China announced a massive crackdown on fentynal production as a gesture of good will towards the US. I suspect that has something to do with this

<comment><USER16> The US-China trade deal has 100% to do with this. It's too big of a coincidence that just as China agrees to designate fentanyl as a controlled substance, the dealers voluntarily (as a whole) decide it's too risky to trade.

<comment><USER17> It's a win-win for China beyond the trade war.

China gets:

1\. Positive sentiment from US.

2\. Crackdown on drug producers in China (which furthers the objective of having strict control on drugs with steep penalties, and making examples out of drugs dealers for CCTV).

3\. To hand a blow to Chinese Triads exporting drugs and laundering money outside of China (e.g. bringing cash out of China): [https://globalnews.ca/news/4149818/vancouver-cautionary- tale...](https://globalnews.ca/news/4149818/vancouver-cautionary-tale-money- laundering-drugs/)

4\. Tighter government oversight/control on the prescription pharmaceuticals market.

</comment></comment></comment></comment><comment><USER18> I remember when this happened on Hansa because the dutch feds took it over.

<comment><USER19> During their time as black market administrators, the Dutch police only banned one product on Hansa: the highly dangerous opioid Fentanyl.

[https://www.wired.com/story/hansa-dutch-police-sting- operati...](https://www.wired.com/story/hansa-dutch-police-sting-operation/)

</comment></comment><comment><USER15> The timing of this is interesting, particularly that minutes ago China announced, as a gesture of good will towards the US, illegal fentanyl production/ distribution would carry the highest punishment (death)

<comment><USER20> > as a gesture of good will towards the US

"Let me remove this gun from your temple. Thank me, now."

</comment></comment><comment><USER21> When pirates react faster than government you should think.

</comment><comment><USER22> Makes sense. Can't make money when customers are ending up dead. Selling pot is one thing, can't die from an overdose, but if I were a drug dealer I'd leave my paws off of heroin, fenta and friends.

<comment><USER23> It always confuses me when I hear of kids dying to OD'ing on this stuff; why cut your product with _so much_ of something that would kill your customers?

<comment><USER24> It's accidental. The problem with fentanyl is that it's so ridiculously strong.

So you're selling heroin and figure "hey, I'll cut it and make more money". You add something inert and then add a tiny bit of a fentanyl and oops you added too much, now it's poisonous for users to take a "normal" dose.

<comment><USER25> Just wait until Dsuvia hits the black market. Reportedly 10x stronger than Fentanyl. [https://www.fda.gov/NewsEvents/Newsroom/PressAnnouncements/u...](https://www.fda.gov/NewsEvents/Newsroom/PressAnnouncements/ucm624968.htm)

<comment><USER4> Sufentanil is already available on the black market. It's been seized in Canada a few times.

It is ridiculously potent. We're talking a normal dose of 10's of micrograms.

However. I would argue diversion of Dsuvia will likely _reduce_ overdoses as the quality control means you know exactly how much you're taking.

</comment></comment></comment></comment></comment><comment><USER26> If people move to end-to-end encrypted communication, how would third parties know what to ban? Wouldn't any kind of information be possible - <USER2> marketplaces?

<comment><USER27> I assume because markets offer escrow and direct sales do not

</comment></comment><comment><USER28> See! Whatever is actually deadly (even if it's not by its nature but because of too people doing it wrong like in this particular case) people will stop it themselves. People buy and sell psychedelics because these are, unlike strong opioids, not deadly and there is little if any reason to ban them yet governments all over the world do and insist it is more important than education, violent crime prevention and everything (in many countries possession of some doses of LSD is enough to put you in prison for much longer than a murder).

<comment><USER29> Psychedelics (particularly tabs) are not as safe anymore because of increased availability of cheap designer drugs that have similar effects to LSD, but are much less safe. The NBOMEs and bromo dragonfly are two examples of such drugs that have been implicated in accidental deaths. I was reminded of this recently when an old acquaintance of mine who was a heroin addict died. I assumed it must have been the usual H + fentanyl OD, but he actually had a heart attack after taking some psychedelic tabs

<comment><USER28> Nice point. Nevertheless there is much less sense in taking these if better options are available (opiate addicts are usually forced to take whatever they can find by their urge) and the information is well-available (e.g. the second link on Google to bromo dragonfly leads to PsychonautWiki wich immediately shows you an honest warning banner: "Bromo-DragonFLY is linked to an unusually large number of hospitalizations and deaths", it also says "it produces unusually long effects which reportedly can last up to several days" \- I doubt many people are brave enough to go this deep, even and especially if I were an opiate addict I wouldn't dare), people have all it takes to make up their minds so the mere fact of availability is not a death sentence.

There indeed is, however, a problem of dishonest or ignorant dealers selling really dangerous substances like that to ignorant or naïve people telling them just that's acid or kind of but I believe this problem would be much less widespread if people could get safe psychedelics legally or even if the black market itself was allowed to develop healthier so dealers had to establish reputation and care about the customers experience. Also, as far as I understand, the major reason for this kind of drugs to be developed and marketed is because classic psychedelics are too hard to produce for underground labs so they have to consider cheaper and easier alternatives.

</comment></comment></comment><comment><USER30> damn

</comment><comment><USER31> A lot of fearmongering here, drug manufacturing & trafficking in small amounts is punishable by death in China, if you are making narcotics in China, you don't fear the Chinese govt or the Chinese army and you basically have nothing to lose.

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

It's like saying you're gonna stop all the drug dealers in US to stop selling drugs, its very hard for China to stop all narcotics.

Heres an official report by the US-China Economic & Security Review Commission on Chinese Fentanyl Production: [https://www.uscc.gov/sites/default/files/Research/USCC%20Sta...](https://www.uscc.gov/sites/default/files/Research/USCC%20Staff%20Report_Fentanyl- China%E2%80%99s%20Deadly%20Export%20to%20the%20United%20States020117.pdf)

and I quote: "China is a global source of illicit fentanyl and other NPS because the country's vast chemical and pharmaceutical industries are weakly regulated and poorly monitored...Chinese law enforcement and drug investigators are unable to effectively regulate the high volume of drugs and chemicals the country produces.In many cases, the chemicals used to produce fentanyl and fentanyl-like products are illegally diverted from legitimate pharmaceutical uses, with criminals taking advantage of inadequate enforcement protocols to produce unregulated chemicals and NPS. Until 2014, a regulatory loophole allowed Chinese chemical companies to operate in a gray area of oversight, freeing them from inspection requirements and other certification systems. That loophole was closed in 2014 when China's State Administration of Work Safety implemented new regulations on chemical production to improve management of nonpharmaceutical businesses, including enforcing stricter licensing requirements. Even under the new regulations, Chinese pharmaceutical and chemical companies continue to divert chemicals from legitimate pharmaceutical uses and adulterate legitimate pharmaceuticals during production.This makes drug enforcement within China difficult, as many manufacturers of fentanyl and other NPS are legitimate companies legally producing chemicals. Although some of these chemical manufacturers knowingly ship their products to the United States for illicit purposes, Chinese chemical and pharmaceutical exporters continue to operate with little oversight"

Do not get me wrong, I've seen the impact of Fentanyl and I want China to step up on crushing its production.

<comment><USER32> It's closer to outright jingoistic hatred than fearmongering. People have managed to convince themselves that it's a Chinese government plot with conspiracy theories being upvoted left and right.

It's actually a pretty good example of situations where the fringe right and fringe left come together and hold hands.

<comment><USER4> The conspiracy theories are pretty ridiculous.

However, the fact that fentanyl wasn't illegal in China until recently and mail shipped from China is cheap, really opened up the flood gates until the authorities cracked down.

</comment></comment></comment><comment><USER33> Fentanyl only exists on the dark web because of the Chinese labs pumping it out. Wake up! The Chinese government policy is to look the other way if you aren't selling the drugs inside China. They see this as just revenge for the British selling opium in China. This is directly responsible for thousands of deaths in the US. Execute the scum bringing this into our countries!

What can we do about this? Direct trade punishments for allowing this to happen. Hit them the only place they care, in the bank account and this would stop Quickly!

<comment><USER34> China (to be clear, we are talking about the PRC/Jinping regime, not the Chinese people) is a menace to freedom and stability in the free world. They steal our IP, infiltrate our companies, and place their population in concentration camps in the world's largest police state--meanwhile, our companies like Google and Microsoft continue to work hand in hand with the CCP regime to develop products customized to suit regime needs and rules.

The map in this article should scare anyone who cares about a Soviet-style dictatorship taking over nearly every continent: [https://www.nytimes.com/interactive/2018/11/18/world/asia/wo...](https://www.nytimes.com/interactive/2018/11/18/world/asia/world- built-by-china.html)

<comment><USER35> America (to be clear, we are talking about the US Trump/Bush/Clinton/Obama regime, not the American people) is a menace to freedom and stability in the whole world. They steal our oil, infiltrate our companies, and place children in cages, and their minority and poor population incarcerated. Suspects are held without being charged indefinitely at black prison sites and tortured. They are the world's largest police state--meanwhile, our companies continue to work hand in hand with the US/Trump regime to develop products customized to suit regime needs and rules.

<comment><USER36> You can't do this kind of flamewar on HN, and we ban accounts that won't stop, so please stop.

Your account seems to have taken a heavy turn into using HN for political battle. That's not ok, and we ban accounts that do it. Please review [https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html) and use the site as intended.

The rest of the world may be radicalizing and polarizing, but HN's mandate hasn't changed and isn't going to, therefore we have to ban accounts that are destructive of it. First among those are the accounts seeking to use HN as a battlefield, which (if allowed to) would turn this place into scorched earth.

<comment><USER35> alright Daniel. No problem. My point was to mirror the comment from OP and make him/her see how ridiculous and one-sided it sounds. But I agree it isn't constructive and I do understand your points. I'll promise to stop all comments that might be considered offensive or political (off-topic) regardless of how I might feel about it. And I'm sincerely sorry if I've hurt or upset anyone.

I have witnessed the killing and burning of bodies from 120 Tamils in Sri Lanka, which went unreported in Western media. I have witnessed a guy stabbing another guy in the neck within a _parang_ (coconut knife) as my first experience when globe-trotting (I just turned 19) during a religious dispute in Banda Aceh. I have seen dead bodies of Burmese fishermen while teaching an Open Water Scuba class in Thailand (they are used as slaves by the Thai and then thrown overboard). All this happened a long time ago but it has shaped me in a way that made me more angry. I'm not an academic and I'm not a native English speaker but nor am I an arm-chair philosopher. I do still suffer from PTSD of my experiences, but it's no excuse to make political comments here probably.

Again this isn't an excuse for myself, but I hope it gives context on why I feel more strongly and said the things I did. I'm happy to continue lurking and promise to cut political motivated arguments out in future.

<comment><USER36> Sorry I didn't see this earlier. I am touched by your description of your experiences and glad that you felt able and willing to share them here, given how difficult they were. Issues of moderation don't exist on that level—the only thing that matters is contact. But I'm grateful for your receptivity to what I posted, even though it's trivial by comparison.

</comment></comment></comment></comment></comment></comment><comment><USER37> If dealers pull drugs that cause deaths, could we make progress in the War on Drugs by having government agents sneak poison into the illegal drug supply?

The idea here is that dealers would stop selling drug after drug as the death toll mounts. If they chose to keep selling, the deaths would presumably make the drugs easier to trace.

I'm not sure if it would be legal or ethical for the government to do this. But they did it to alcohol during Prohibition.

<comment><USER38> In general, you can write off pretty much any idea that involves poisoning children as unethical. That death tolls from the [opioid crisis]([https://en.wikipedia.org/wiki/Opioid_epidemic](https://en.wikipedia.org/wiki/Opioid_epidemic)) have been rising is a problem that people've been trying to mitigate, not further.

It is a bit strange to consider that we still do poison alcohol to prevent, say, people from drinking mouthwash ([https://en.wikipedia.org/wiki/Denatured_alcohol](https://en.wikipedia.org/wiki/Denatured_alcohol)):

> Denatured alcohol, also called methylated spirit (in Australia, New Zealand, > South Africa and the United Kingdom) or denatured rectified spirit, is > ethanol that has additives to make it poisonous, bad-tasting, foul-smelling, > or nauseating to discourage recreational consumption.

Unfortunately, despite a widespread cultural understanding that it's dangerous to consume denatured alcohols like mouthwash, some folks still do ([https://en.wikipedia.org/wiki/Surrogate_alcohol](https://en.wikipedia.org/wiki/Surrogate_alcohol)):

> Surrogate alcohol is a term for any substance containing ethanol that is > intentionally consumed by humans but is not meant for human consumption. > [...] Most people turn to these as a last resort either out of desperation, > being underaged or being unable to afford consumable alcoholic beverages > (with homeless alcoholics) or due to lack of access to drinking ethanol (for > example with prison inmates and individuals in psychiatric wards).</comment></comment>


Outlaw Chinese Steel - <AUTHOR> http://www.huffingtonpost.com/leo-w-gerard/outlaw-chinese-steel_b_9817034.html?utm_hp_ref=world&ir=World <comment><USER2> The article is presenting allegations as facts. US Steel has asked the US International Trade Commission to investigate, but Baosteel strenuously denies all these allegations.

[http://www.baosteel.com/group_en/contents/2863/81262.html](http://www.baosteel.com/group_en/contents/2863/81262.html)

There is a strong element of hypocrisy. Last year, US Steel was one of several American steel companies who were ruled against in a $103m class action suit for price fixing.

[http://business.cch.com/ald/StandardIronWorksArcelormittal10...](http://business.cch.com/ald/StandardIronWorksArcelormittal10202015.pdf)

<comment><USER3> >The article is presenting allegations as facts

I only needed to read the domain name to know that would be the case.

</comment></comment><comment><USER4> Steel in china is produced by SOEs, by definition an SOE is not capitalistic it is communist. If a communist entity wants to export subsidized steel at or below cost why should the US stop them? buy all their steel and then laugh when you sell back luxury cars to them made from that cheap steel they gave you. Germany seems do be doing this well buying cheap cheap household goods and commodities and selling back high end goods the chinese can not reliably produce

<comment><USER5> Because you've then lost your local steel industry, put out of business by those dumping. Steel could be considered a strategic commodity, unless you want to be beholden to China for your future steel needs.

EDIT: You might be okay overpaying for steel for buildings, but would you be satisfied if China said you couldn't have steel for warships? Because they're entitled to not sell you a product if they don't want to.

When we needed titanium for the SR-71, we had to purchase it from Russia through shell corporations:

[http://www.mining.com/bbc-future-sr-71-blackbird-the-cold- wa...](http://www.mining.com/bbc-future-sr-71-blackbird-the-cold-wars- ultimate-spy-plane-11725/)

</comment></comment><comment><USER6> By Leo W. Gerard International President, United Steelworkers..

<comment><USER7> If you want to say "this would be a very good thing for US manufacturing employees", then yes, that would be true.

And frankly, his arguments are true to some extent. We all know this : outlawing Chinese steel imports would make a lot of buildings and bridges and even cars in the US safer. And somewhat more expensive.

By contrast, not doing this essentially dooms a few million relatively unskilled and highly paid Americans to unemployment, at least in the short term.

Caveat: highly paid is compared to the average, not what an SV'er would consider highly paid.

</comment></comment><comment><USER8> Instead of the US limiting Chinese steel imports, the US Government should buy it on mass, and simply store it.

If the Chinese government are in fact subsidizing it, that's just free money into the US Government's pocket, and once steel prices inevitably rises once more the USG could just sell that same steel back to China.

It is win/win/win. US steel wins because Chinese steel goes up in price due to demand, it is a win for the USG because they make money, and it is a win for the international community as it stabilises steel prices.

<comment><USER9> Is there large environmental impact from mining steel ores, like there is from say fracking?

<comment><USER10> It's the smelting that causes most of the environmental impact.

</comment></comment></comment><comment><USER11> American companies are all for free trade when it suits them.

</comment><comment><USER12> For anyone who favors free trade as a standard reaction, but who gets an uneasy feeling, this interview had some pretty good arguments about why China is different. I can't say I've figured out what to think on the issue, but it's a good thought exercise if you have a commute to kill.

[http://www.econtalk.org/archives/2016/03/david_autor_on_1.ht...](http://www.econtalk.org/archives/2016/03/david_autor_on_1.html)

The host is quite libertarian, but he's also a challenging interviewer who has a knack for asking the right questions.

</comment><comment><USER13> Good old protectionism.

</comment><comment><USER14> Huffington Post begins to sound like Trump supporters?

<comment><USER15> huffington post is probably as far left as you can get in an online publication

<comment><USER16> Some of Trump's ideas are pretty far left also.

For example, he proposed taxing vehicles imported from Mexico by semi-American companies like Ford. That's not exactly the free trade GOP party line.

[http://www.detroitnews.com/story/news/politics/elections/201...](http://www.detroitnews.com/story/news/politics/elections/2015/06/16/trump- press-ford-cancel-mexican-plant/28816173/)

<comment><USER17> Protectionism is neither "left" nor "right", its essentially an orthogonal axis. There are dissenters from the broad neoliberal trade consensus across the left/right spectrum. (Generally, the main dissent on the left _favors_ international trade agreements, but favors stronger common labor, human rights, and environmental protections that are common in the current international regime, with tariffs as a fallback if they can't get these kinds of deals; the dissent on the right is more likely -- like Trump -- to see tariffs as a tool more directly to deal with trade imbalance, to see it about a weapon for "winning" trade.)

Not everything that disagrees with the dominant position of the Republican Party is "far left".</comment></comment></comment></comment>


Open-Sourcing Vespa, Yahoo's Data Processing and Serving Engine - <AUTHOR> https://www.oath.com/press/open-sourcing-vespa-yahoo-s-big-data-processing-and-serving-eng/ <comment><USER2> Yahoo time and again releases open source software which is super super helpful to the community at large. But it always makes me wonder why an org with such an amazing engg culture (multiple anecdotes from friends who were at Yahoo, plus the amazing experiences at Yahoo OpenHack each year as a testament to this) could be run into the ground.

Really goes to show that engg != business and unless you have a firm business model and growth, an amazing engg team can only get you so far.

I know I'm just stating the obvious, but just putting it out there!

Vespa looks super interesting (more so since I'm in a company that provides ecommerce search APIs as a product) and I'm sure I'll play with it more. Thanks Yahoo! :)

<comment><USER3> The Register did a good job describing the dichotomy between the product business and the tech side of the business here, related to a previous open source project Yahoo published (disclaimer, I run the open source process at Yahoo) [https://www.theregister.co.uk/2017/03/23/yahoo_tensorflow_on...](https://www.theregister.co.uk/2017/03/23/yahoo_tensorflow_on_spark/)

"Over the decades Yahoo! has contributed substantially to the greater good, publishing its own code as open source.

Arguably Yahoo!'s greatest legacy once it is a division of Verizon will be big data, after one of its engineers – Doug Cutting – wrote an open-source implementation of Google's MapReduce that became Hadoop. What followed was an entire ecosystem of startups and projects crunching data at scale – Cloudera, Hortonworks, MapR to name three in a market some calculate will be worth $50bn by 2020."

<comment><USER4> What do you mean you run the Open Source process at yahoo?

Hopefully Verizon's open source legacy will become even bigger and make it easier for these kinds of innovations to happen.

We've had some success a few cities over in Verizon Labs... [https://verizon.github.io/](https://verizon.github.io/)

<comment><USER3> My job is to manage the open source process for Oath (which is essentially Yahoo + AOL). That includes helping ensure we can publish code like this and the hundreds of other projects we publish too. I'm the one who cares about open source licenses, patent clauses, github permissions, etc. Many large tech companies have someone in a comparable role and some of us work together in the todogroup to help manage the way we do opensource. I'm beginning to meet the people in Verizon who do the same. I hope their open source legacy grows too. Heck I celebrate when Google, Amazon, and Comcast publish great code too. It's good for us all. But Vespa is a real treat. It's really really special to Yahoo and we are very hopeful that the Big Data community sees how many things they can do with this, at scale, the way we have.

<comment><USER5> Here's some info if you're interested in starting your own open source program c/o the TODO Group: [https://github.com/todogroup/guides](https://github.com/todogroup/guides)

</comment></comment></comment></comment></comment><comment><USER6> At Flickr, we worked closely with the Vespa team from 2011 through 2016 on a wide range of advancements:

       * partial document refeeding (i.e. expedite indexing a new field to 20+ billion documents without refeeding everything and staying online handling 100M+ free text queries a day)
       * visual similarity search - check out the tensor ranking features [1] [2]
       * online elasticity - add/remove replicas / shards online. A must when it could take weeks+ to re-feed from scratch. This is non-trivial to make work smoothly at scale.
       * latency / tail-latency on complex queries. p90 reduction from 3,000 to 30 ms.

This is a major gift to the open-source community of a battle-tested search engine that works reliably without babysitting with very large datasets, and simultaneous high query / high feed volumes. Huge debt of gratitude to the team in Trondheim and Verizon/Oath/Yahoo legal & management teams for making this happen. :+1:

[1] [http://docs.vespa.ai/documentation/tensor- intro.html](http://docs.vespa.ai/documentation/tensor-intro.html) [2] [http://docs.vespa.ai/documentation/tensor-user- guide.html](http://docs.vespa.ai/documentation/tensor-user-guide.html)

</comment><comment><USER7>
      $ cloc-git https://github.com/vespa-engine/vespa.git
      http://cloc.sourceforge.net v 1.60  T=64.10 s (224.5 files/s, 28276.3 lines/s)
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--
      Language                      files          blank        comment           code
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--
      Java                           6573         106215         102720         537097
      C++                            3209          76542          19178         504855
      C/C++ Header                   2985          42731          57087         158388
      XML                             389            705            550         139626
      Maven                           141            133            244          14096
      CMake                           450            254            560           8452
      Perl                             57           1124            762           7649
      Bourne Shell                    196           1257            734           6918
      Scala                            95           1685            617           6378
      Teamcenter def                  234           1474           3490           2468
      Lisp                              4            231            403           2118
      HTML                             16            211             29           1950
      C                                 7            288            198           1432
      Python                            6            132             66            556
      Ruby                              9             39              9            294
      Bourne Again Shell                3             35             12            182
      Pig Latin                         9             39             52             54
      make                              2             22              8             39
      Ant                               1              9             17             36
      YAML                              1              9              1             22
      DTD                               2              6              6             10
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--
      SUM:                          14389         233141         186743        1392620
      </comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--

<comment><USER8> As an ex-employee, there could not be a better description of Yahoo! development than this.

<comment><USER9> Hey, there is no yinst/buildyblocks stuff here. That's kind of a must-have.

<comment><USER8> > yinst

[FLASHBACKS]

To be fair, yinst was the least worst part of the systems I was working on (Yahoo!Europe backend feeds stuff.)

</comment></comment></comment></comment><comment><USER10> This is really cool. Vespa was probably first described in this 2007 paper: [https://brage.bibsys.no/xmlui/bitstream/handle/11250/251199/...](https://brage.bibsys.no/xmlui/bitstream/handle/11250/251199/348506_FULLTEXT01.pdf)

Next up, I would really like to see Sherpa/PNUTS (their NoSQL operational database) and Everest (their petabyte-scale Postgres data warehouse) open sourced :)

<comment><USER11> May I ask some stupid questions? :/

I don't quite get the diagram of the Vespa Architecture. Is Vespa a middleware between database engine and query parser? This is what puzzles me.

If so, are there other such middlewares available for ie. PostgresSQL that allow hooking "Query Templating Models" (that is it?) generated via Machine- Learning Models? Is it way more complicated than that, or did they overengineer the problem into a monolith? EDIT: Looking at [https://github.com/vespa-engine/vespa](https://github.com/vespa-engine/vespa) it seems that it is overengineered, or maybe it consists of individual micro- components like node.js, hmm more questions :(

Is GraphQL such middleware or lower-level?

Does Vespa replace custom Glue-Code between Backend and Frontend that generates such query-sets for content ranking/positioning?

Or what exactly does Vespa solve? I'm sorry, I've read the article, but can't say, yep that's what it is!

EDIT: How else could you solve what Vespa does using Rust, Go, or C/C++ libraries? A very simple or general direction would be immensely useful to understand Vespa =) The project makes the simultanous impression of an immense engineering feat and at the same time a huge code debt.

<comment><USER11> > How else could you solve what Vespa does using Rust, Go, or C/C++ libraries?

Let me try myself answering my own question, I hope someone hops in and tells me where I'm wrong or how else to improve :)

         1) Get PostgresSQL exntensions via "package manager" pgxnclient
         1.1) pg_bouncer - For connetion pooling
         1.2) yoke - As a high-availability cluster manager with auto-failover and automated cluster recovery
         1.3) prestodb.io - Distributed SQL query engine for pgsql
         1.4) pglogical - Logical streaming replication for using a publish/subscribe model
         1.5) pg_lambda - To create your own AWS (meta) Lambda
         1.6) pg_strom - To offload tasks to the GPU
         1.7) zombodb - To utilize full-text searching via indexes backed by Elasticsearch
         2) Put all together with pglogical and presto to seperate GPU/CPU intensive tasks.
         2.1) "Build Missing Middleware" - To design/fuse a query visually that combines multiple backends
         2.1.1) Create a binary data-stream by integrating pg_lambda, pg_strom, presto and zombodb
         2.1.2) "Build Missing Middleware" - A tensor processing extension to use ML Model evaluations
         2.1.3) "Use Missing Middleware" - For data-processing via Machine-Learning models
         2.1.4) "Use Missing Middleware"- To output ML processed results into the database
         2.2) Partition these queries using "pg_lambda + middleware" to create accelerated and fused query results

So what's missing to create a Vespa alternative using existing technologies is everything in Point 2) if I'm not mistaken. Torrent based replication isn't exactly neccessary, except at Twitter/Facebook scale, but if you reach that stage you can hire a libtorrent author.

<comment><USER11> I thik basing this on PostgresSQL was wrong now and believe that a meaningful approach at creating a Vespa alternative yourself is basing this on a Content- Adressable-Storage[1] and adding a DB-Layer ontop (ie. using AUFS).

It would have following properties: decentralized, distributed, resilient, highly-available, software-defined storage & retrieval system.

According to [http://vespa.ai/#featurematrix](http://vespa.ai/#featurematrix):

            FEATURE	                    VESPA	ELASTIC SEARCH	RELATIONAL DATABASES
            ACID transactions			                •••
            Optimized for analytics		        •••	        ••
            Optimized for serving	    •••	        •	        ••
            Scalable	            •••	        ••	        •
            Easy to operate at scale    ••	                        •
            Text search	            •••	        ••	        •
            Machine learned ranking	    •••	        •               2.1.2) - 2.1.4)
            Middleware logic container  •••		                1.4)
            Live reconfiguration	    •••	                        1.2)

And yet I've to admit that even if the Github repository looks quite chaotic, making an alternative, even using existing technologies would be big feat.

Initially I would've chosen PostgresSQL as a base, but the "HA-Layer" is something that shouldn't be decoupled and not a later thought. That's why CAS is a much better form of integration. Also integrating the PostgresSQL Engine into a zfs kernel extension ie. would be a mess. And integrating the database engine into a a distributed p2p algorithm would only add compatability issues an no real advantages.

[1] [https://en.wikipedia.org/wiki/Content- addressable_storage#Op...](https://en.wikipedia.org/wiki/Content- addressable_storage#Open-source_implementations)

PS: Clever aquisition by Docker! "Infinit.sh is a content-addressable and decentralized (peer-to-peer) storage platform that was acquired by Docker Inc." And in my eyes one of the best implementations and easiest targets that allow adding a database-layer ontop.

</comment></comment></comment></comment><comment><USER3> "Vespa is the single greatest piece of software Yahoo ever built. It's like ElasticSearch but a hundred times better. I am so happy." Laurie Voss Co- founder/COO of @npmjs [https://twitter.com/seldo/status/912876700542787585](https://twitter.com/seldo/status/912876700542787585)

</comment><comment> 076ae80a-3c97-4 "When machines are lost or new ones added, data is automatically redistributed over the machines, while continuing serving and accepting writes to the data. Changes to configuration and Java components can be made while serving by deploying a changed application package - no down time or restarts required." That sounds pretty impressive.

<comment><USER12> Looks impressive!

</comment></comment><comment><USER13> Wow this project is humongous!

[https://github.com/vespa-engine/vespa](https://github.com/vespa-engine/vespa)

I'm really curious how it compares to Lucene/ElasticSearch/ELK, which is currently my tool of choice for (faceted) search and recommendation.

<comment><USER14> I think that's actually the broadest root folder I've ever seen on a project! It's _really_ hard to know where to start looking. Is anyone familiar with the internals?

<comment><USER15> Sorry about that - we haven't really optimized the module structure for newcomer comprehension. If you tell me what you want to are looking for I can point you to the right place.

</comment></comment></comment><comment><USER16> Wow...

I'm guessing (hoping) their lawyers made sure to go over their old agreements with a very fine comb to make sure their license for the software allowed them to open source this.

Don't get me wrong, they've added a lot to it, but there's a lot of code in there that could only have come from their purchase of Overture, who had purchased AllTheWeb from FAST (which was itself purchased by Microsoft).

<comment><USER17> If they purchased it, then they would own the copyright, so they can relicense it any way they want can't they?

</comment></comment><comment><USER18> Vespa, using its own malloc: [https://github.com/vespa- engine/vespa/tree/master/vespamallo...](https://github.com/vespa- engine/vespa/tree/master/vespamalloc)

<comment><USER19> The reason is simply, for performance. To avoid having to go to the kernel every time we need to allocate memory for a query, and avoid having to clear memory on free/reuse. It is made for Vespa, but also used for other programs.

Similar in purpose to Google's TCMalloc: [http://goog- perftools.sourceforge.net/doc/tcmalloc.html](http://goog- perftools.sourceforge.net/doc/tcmalloc.html)

<comment><USER18> How is it better than TCMalloc? (If it isn't, it probably should be replaced by TCMalloc.)

<comment><USER19> In our tests, vespamalloc has simply been faster. I don't know how in-depth the analysis has been as to why, but obviously vespamalloc is written and tuned for Vespa so that is a likely factor.

</comment></comment></comment></comment><comment><USER20> If anyone wants the kind of machine learning based rerabking in Elasticsearch, we've been working with the wikimedia foundation on an Elasticsearch learning to Rank plugin:

[http://github.com/o19s/elasticsearch-learning-to- rank](http://github.com/o19s/elasticsearch-learning-to-rank)

</comment><comment><USER21> I see it has tensor processing built in - [http://docs.vespa.ai/documentation/tensor- intro.html](http://docs.vespa.ai/documentation/tensor-intro.html)

Can this be used as a spark+tensorflow replacement ?

<comment><USER3> Note: TFoS is also a Yahoo open source project. The teams work together. [https://github.com/yahoo/TensorFlowOnSpark](https://github.com/yahoo/TensorFlowOnSpark)

<comment><USER21> is tfos production-ready right now ? because i thought it was still experimental.

is it used inside Yahoo - because Vespa comes with its own tensor processing engine. I wondered who would use one over the other.

<comment><USER15> TensorFlow on Spark is for learning, Vespa is for serving. Where Vespa excels is in evaluating a learned model very quickly over lots of documents. We're working on providing support for running models learned with TensorFlow directly. For now people make the translation on their own.

<comment><USER22> I don't want to trigger any bot detection by voting all your comments up in a short amount of time. So, I will say thank you and mention that is is contributions from people like you that keep me coming back.

</comment></comment></comment></comment></comment><comment><USER23> Here is a snippet to decodeURIComponent for all the yql examples in the documentation. Makes it a bit easier to see the yql syntax.

      $('pre:contains("yql=")').each((i, el) => { el.innerText = el.innerText.replace(/\+/g, ' ').replace(/yql=(.+%3B)/, (m, p1) => 'yql=' + decodeURIComponent(p1)) })

</comment><comment><USER24> The quickstart doesn't seem to work, at lease on macOS. I raised a ticket:

[https://github.com/vespa-engine/vespa/issues/3560](https://github.com/vespa- engine/vespa/issues/3560)

<comment><USER25> I just checked the issue, and it seems it was caused by human error. It is closed now.

</comment></comment><comment><USER26> How well does vespa handle time series data, compared to, say, elasticsearch?

</comment><comment><USER27> Say I'm using ELK for log aggregation. Would Vespa be a good replacement? One pain point is ingest rate. How many "average" log lines per second can Vespa do per node?

<comment><USER19> It could be a replacement for the 'E', but the APIs are different enough that there's no drop-in replacement for the 'L' and 'K' and creating or making those compatible would be a significant effort. Would be great if someone did though :-)

<comment><USER27> Gotcha. On the ingest front, do you have any numbers around that? I see some benchmarks that focus on other (important) aspects like QPS but didn't catch anything on ingest.

<comment><USER15> Write speed (add or update) is typically between a few thousand to a few tens of thousands operations per second per node sustained, depending on sizeof data etc.

Sustaining throughput over long time is important and often overlooked mentioned in benchmarks.

</comment></comment></comment></comment><comment><USER28> Big open source news in recent times.

How is the storage layer designed ? disk format ? Can you extend the layer to support different models such as Property graph ?

</comment><comment><USER29> Now, if Yahoo would just open source the yinst/opsdb/rolesdb/igor/etc ecosystem. I miss that elegant tooling so fricking much.

</comment><comment><USER30> I don't understand how such a move is profitable for a business. Can someone please point me to some articles that discuss this?

<comment><USER31> [https://www.joelonsoftware.com/2002/06/12/strategy- letter-v/](https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/)

The point of Joel's article is that "Smart companies try to commoditize their products' complements."

For what I understand, Yahoo is a media company, and as so it may try to commoditize a natural complement of today's media companies, which is data search.

<comment><USER32> That article is a classic but I don't really understand how it applies in this case.

Smart companies commoditize their products' complements (something that needs to be bought with the product) so that whoever wants buy their product has a large variety of offerings to select from. For instance, MS-DOS's ability to run on any standard PC architecture machine commoditized the PC.

It's not clear how commoditizing data search makes selling media to consumers easier, because consumers of media don't buy data search. In fact they expect it to come for free from the media company.

Might it not have the opposite effect instead? That is, it makes starting up a media company cheaper and allows competitors to spend more money on acquiring media?

<comment><USER22> Yahoo! gets code improvements back and, by being the originals and having the most experts familiar with the entire code base - and it is huge, they retain their competitive advantage. They also do this while fostering good will and, potentially, reducing the number of bugs, improving security, and increasing efficiency.

It's brilliant, in a way. There are risks, but they are small and mitigated. They may even end up selling support and customizations, or enabling that market. The upside potentials are many and the downsides are few and only risk small impacts.

Hell, you can get RedHat for the low cost of nothing, just by signing up for it. On top of that, they will give you every single last line of code you want. They'll give you all of the code, and do it for free.

Yet, they are a successful for-profit company. They don't even accept financial donations, as far as I know. They aren't the wealthiest company, but they are doing quite well and not suffering financially.

Open source doesn't mean no profit. It just means additional rights for the source code and/or user. (Different licenses prioritize different liberties and have different goals.)

</comment></comment></comment></comment><comment><USER33> i wonder if this is able to squeeze something useful out of Yahoo Answers.

<comment><USER22> I am not trying to be snarky when I say this, so I'll make it longer than a single word.

No.

That is, Y! Answers was/is a great idea with terrible results. I'm not sure if it should have been moderated better, or if it should have been marketed better. Hell, maybe it should have had a basic literacy test prior to being allowed to post and answer?

I could actually come up with a few hundred ways to have made it better. We know the question and answer format works. It does on many, many sites. It failed there and, largely, that's because of the users. I'm not sure which was worse, the questions or the answers.

I'd love to be given that project and tasked with improving it. It's a great idea, but horribly implemented. I'd like to fix it because I'm fond of trying the impossible and like fixing broken things.

Improving search for it is absolutely not going to help it. No, that's not going to help in the slightest.

<comment><USER3> FWIW, there was a research team at Yahoo who would actually get insights about the way people used language (relevant for contextual search) from Yahoo Answers. They were more active during the earlier years when the content quality was much higher. I don't know if they used Vespa in their mining process, but it would not surprise me if they did. Vespa is used in many projects because it's just that good. So if you are thinking of using it -- for Yahoo Answers, for Quora, whatever, go for it. I know a cancer researcher/engineer who wants to use Vespa for serving clinical reports and trial outcomes.

As for the current Answers site, well, we'll see what happens. I know the PM, a delightful person. I don't know the plan. But if there is a plan to make something useful from it, apply. It apparently makes money (otherwise it would have been killed long ago), and that means there's something to work with. When I started at Yahoo I was hoping to get onto the Groups team for the same reason -- a huge challenge to fix something that could be made cool again.

</comment></comment></comment><comment><USER34> Maybe this can be merged with the discussion from yesterday: [https://news.ycombinator.com/item?id=15339851](https://news.ycombinator.com/item?id=15339851)

</comment><comment><USER35> I observe that it was written in Java: [https://github.com/vespa- engine/vespa](https://github.com/vespa-engine/vespa)

<comment><USER34> The serving and admin/config layers are Java, while the content cluster is C++. Please see the architecture diagram on [http://vespa.ai/](http://vespa.ai/).

<comment><USER35> yeah, seen :)</comment></comment></comment>


Russians suspected in hack of New York Times, other U.S. media - <AUTHOR> http://www.reuters.com/article/us-usa-cyber-media-idUSKCN10Y21I <comment><USER2> CNN reported on Tuesday, citing unnamed U.S. officials.

...

The FBI declined to comment, and representatives for the U.S. Secret Service, which has a role in protecting the country from cyber crime, did not immediately reply to a request for comment. ...

It was PUTIN see?

<comment><USER2> Meanwhile: [https://www.theguardian.com/uk-news/2015/jan/19/gchq- interce...](https://www.theguardian.com/uk-news/2015/jan/19/gchq-intercepted- emails-journalists-ny-times-bbc-guardian-le-monde-reuters-nbc-washington-post)

I'm still struggling to figure the lesser of all evils here... Should I just go for the most competent of evils? The most well spoken?

</comment></comment><comment><USER3> Setting up the stage for the October surprise...</comment>


'Q for Mortals' Version 3 book available online - <AUTHOR> http://code.kx.com/q4m3/ <comment><USER2> I tried to learn Q/KDB+ more than once with only online resources and I think this book is definitely something needed. The available wiki was always a bit spare and some parts didn't work in the free package you can download for personal use.

KDB is very interesting and I always had the feeling, if you stare long enough at the code you kinda learn a different way to express algorithms and a different view for how to write code. APL and its successors are probably one of those things that Alan Perlis talked about when he said that you should only learn a programming language that changes your way of thinking.

On the other hand:

I don't know why but it somehow bothers me that KDB+ is not open source. I'm not even someone that demands for anything to be open source and I don't actually use KDB besides thinking about learning it every now and then but it really keeps me off.

</comment><comment><USER3> For production software I program in Python, C#, Java, PHP, HTML5/JS but to keep my language skills and curiosity happy, I play around with different Lisps (including Clojure/Shen), APLs (including Q), Forths and languages made for formal verification (Idris/Coq). It is very interesting what people do with these languages and I like playing with most of them, but besides niche jobs, I don't cannot use them for production. It is simply not sellable to companies who are not used to them.

I have a copy of the first Q for Mortals (I bought it a while ago); thanks for this one for free.

<comment><USER4> KDB might be niche, but that niche is finance and there are a decent number of open KDB positions. I get a couple of unsolicited emails a week for them. And they pay very well.

<comment><USER3> Yes, Clojure (that Lisp variety) as well. Forth for embedded as well. But they are niche; it depends where you live etc on which opportunities there are for each of those. But yes, you are right; Kdb (and Clojure btw) are good in some parts of finance and pay well.

Edit: what i'm basically saying is that practicing any of these languages will help you in potentially more than one way; it will open your mind to interesting paradigms and constructs as well as give you job opportunities you would not think of possibly later on.

Edit2: [https://github.com/JohnEarnest/ok](https://github.com/JohnEarnest/ok) is interesting for playing around by the way

</comment></comment></comment><comment><USER4> This is a great way to get to know KDB. As a language it will definitely make you think about problems differently in a functional array context, and as a development platform it will give you some unique perspective on databases as it is much different than many others. And the simplicity of the system will be refreshing.

Probably most importantly it will raise you potential salary :) KDB are really interesting and a door to the finance industry if that interests you.

</comment><comment><USER5> In 1.6:

> _Dynamic typing combined with mutable variables is flexible but also > dangerous. You can unintentionally change the type of a variable with a > wayward assignment that might crash your program much later. Or you can > inadvertently reuse a variable name and wipe out any data in the variable. > An undetected typo can result in data being sent to a black hole._

That is not a characteristic of dynamic typing, but of a spartan interpreter implementation and possibly language design aspects not related to dynamic typing.

If a language doesn't distinguish variable binding from assignment, that is a poor design choice which interferes with the ability to trap an assignment to a nonexistent variable and promotes the silly variable re-use alluded above.

If binding is distinct from assignment, we can diagnose the situation when a symbol is assigned that was not instantiated previously by binding.

Moreover, we can use lexical binding to introduce new variables wherever we need them, rather than re-using. We can still choose to write long functions in which variables are re-used for different purposes in different sections, but the language isn't foisting this bad design on us.</comment>


Editing Julia code with Emacs - <AUTHOR> http://www.wilfred.me.uk/blog/2014/11/16/editing-julia-code-with-emacs/

<comment><USER2> Thank you for working on this!

Naive question: since Julia exposes the parser interface (as explained in [https://www.youtube.com/watch?v=osdeT- tWjzk](https://www.youtube.com/watch?v=osdeT-tWjzk)), wouldn't it be easier (and more reliable) give it the code and extract the information from the parse tree, rather than using regexes?

<comment><USER3> I believe I read that the reason one doesn't do that is that syntax highlighting should work even when you haven't finished typing or your code isn't entirely correct. It also should be quite fast. Being 100% accurate isn't that important with syntax highliting.

</comment></comment><comment><USER4> You sir (the author) are a gentleman.

This is really enabling and a generous act of open-sourcing.

Thank you!

<comment><USER5> Wow, I wasn't expecting to see this on HN.

Thanks for the kind words :)

<comment><USER6> One thing that confused me about your article, for a moment, was a matter of terminology, as applied to lexical tokens in most programming languages:

[]: these things are square brackets, or brackets for short

(): these things are parentheses

{}: these things are curly braces, or braces for short

</comment></comment></comment><comment><USER7> Can this be made to work with the ESS julia mode?

<comment><USER5> ESS includes a fork of julia-mode. I'm hoping to replace this with a dependcy on julia-mode, so ESS benefits from all the highlighting improvements we're doing. See [https://github.com/emacs- ess/ESS/issues/119](https://github.com/emacs-ess/ESS/issues/119)

</comment></comment><comment><USER8> I need a language that can produce standalone binary executables. Regrettably, Julia will never get there. It's a lab hack tool for some efficiency glue between two Python scripts. As it is, we need a bury-it-where-nobody-can-find- it shovel and not syntax highlighting. But if anything can get this done, it's emacs.

<comment><USER3> How do you know that. I am pretty sure I've seen the Julia creators talk about generating binaries. Anyway neither Python nor Ruby does this either and yet that hasn't stopped them from being successful.</comment></comment>


What motivates programmers? - <AUTHOR> http://www.nickhalstead.com/2007/07/11/what-motivates-programmers/

<comment><USER2> "Technical people are motivated by interesting work. They will put up with abominable working conditions if they get to work on something that interests them. I've managed people who had to be sent home at night. But technical people without interesting work are very difficult to manage. Their active minds tend to get them into trouble." -- From Judy McKay, author of "Managing the Test People" (<http://tinyurl.com/3a9m69>)

What is interesting work? That determination is up to the hacker's mind.

</comment><comment><USER3> I've managed programmers for 10 years, and what I've found is that money is often not the most important motivator. Good hackers are artists, and they want (1) freedom, and (2) appreciation. When they ask for more money, it's often really their spouse who wants it. Granted, that's a good reason, and many spouses play an important role in not letting their hackers be exploited.

</comment><comment><USER4> Sex</comment>