The MLM Epidemic in 13 Maps - <AUTHOR> https://myradvocate.com/new-blog/the-mlm-epidemic-in-13-jaw-dropping-maps-2019-11-8 <comment><USER2> This article doesn't dig into the details, but these companies are really vicious. They aggressively recruit at my college and I've seen them to convince students to take what they would have spent on next semesters tuition and use it to buy "inventory" (i.e. more products than they'll ever be able to resell) instead. These things ruin people's lives

<comment><USER3> How do you craft a law to make this illegal though? And then how do you enforce the law? How do you bring these companies to justice?

A fool and his money are easily parted. If those students didn't blow their tuition on MLM garbage, they'd have blown it on something else. I'm sure there's a kid somewhere who blew his tuition making ridiculous option trades based on something he read on r/wallstreetbets.

<comment><USER4> Simple, if you receive income that is a royalty from the sale of products you sold to the person who ultimately sold them, it's taxed at 100%.

<comment><USER5> If that were the law, then the MLM's simple workaround would be to pay you a recruiting fee based on the success of the people you recruit. If the people you recruit sell a lot, you get a bigger fee because you did a better job at recruiting.

I imagine it'll be tough to craft a law to target MLMs because if it's too broad it'll hit many kinds of legitimate business and if too narrow they'll creatively bypass the rules.

<comment><USER6> The IRS deals with people trying to exploit loopholes like that all the time. The law isn't a programming language.

</comment></comment></comment></comment></comment><comment><USER7> When I worked retail sales in the 90s there was an Amway cult meeting nearby. Every few weeks, they would drop in after a pep-rally type thing and try to waste your time looking at the most expensive thing and talk about their amazing business. Then they'd drop the pitch (at the time it was about their e-commerce business).

Once you ran into them, you could spot them. It was a mix of desperate mid- life crisis guys looking for cash, clean-cut naive younger people, and diligent moms starting a business. Really sad.

<comment><USER8> Fun Fact: the current secretary of education is a multi-billionaire because her family runs Amway.

<comment><USER9> And her brother founded Blackwater Security. He tried to broker a backchannel with Russia after the election ([https://www.washingtonpost.com/world/national- security/black...](https://www.washingtonpost.com/world/national- security/blackwater-founder-held-secret-seychelles-meeting-to-establish-trump- putin-back- channel/2017/04/03/95908a08-1648-11e7-ada0-1489b735b3a3_story.html))

</comment></comment></comment><comment><USER10> I found « The Dream » podcast to be pretty good on the topic.

[https://www.stitcher.com/podcast/stitcher/the- dream](https://www.stitcher.com/podcast/stitcher/the-dream)

<comment><USER11> Agreed. I'm not usually a huge podcast person, but this was a really interesting look at the history through today of MLMs

</comment></comment><comment><USER12> I wrote and deleted a long response. The short version is that they can be broken into two groups:

1\. Distributors are paying well over wholesale and their margins are much closer to referral fees that really don't support the full retail effort.

2\. Distributors are paying closer to wholesale but are buying junk that nobody actually wants. This is more like a ponzi scheme with items that theoretically hold value.

</comment><comment><USER13> I wonder why MLM's are so rampant in the mountain west. I know "mormons" and "sales experience from missionary work" but the analysis can go deeper. From personal, anecdotal experience, a lot of these MLM people I've seen are moms. Could it be that that area is so sales heavy that stay-at-home moms want to run their own thing so they get into MLM on the side?

<comment><USER14> Having been raised Mormon, it ain't surprising in the slightest that so many of these are concentrated in and around Utah/Idaho.

There are a multitude of factors at play here:

\- Like you mentioned, door-to-door proselytism translates well to door-to- door sales.

\- Mormon communities tend to be very tight-knit and immediately trusting of fellow Mormons, so once you have a critical mass of LDS followers selling your "inverted funnel", it's gonna spread like wildfire.

\- The Church of Jesus Christ of Latter-Day Saints actively discourages any sort of rational individual thought, instead encouraging its members to "doubt your doubts" and follow the Church without question. This ends up serving MLM marketers well. The Church is America's longest-running and most-successful MLM scheme; to your average Mormon, this is all very "normal".

\- The Church does its best to railroad women into being faithful wives to their husbands and mothers to their children, which (as you touched on) translates to emphasizing stay-at-home parenting over holding a full-time job. This keeps Mormon women busy for a few years, but once those kids are in school (and even moreso when those kids grow up and move out), there ain't a whole lot to do at home. Mormon women - being human beings with free wills, contrary to what the Church would want us to believe - are thus inclined to take up part-time jobs, especially ones that they can do without compromising the Mormon ideal of women-as-domestic-servants-to-their-husbands. MLM schemes tick all the boxes, or at least so their marketing claims.

\- Middle America already has a strong predisposition toward distrusting modern medicine/science, so appeals to "traditional" medicine tend to be somewhat more effective.

<comment><USER15> > The Church of Jesus Christ of Latter-Day Saints actively discourages any > sort of rational individual thought

As an active member, I can say that this comment is untrue. The Church actively encourages education. A simple example is the amount of money it pours into the BYU education system. There is a big emphasis on acquiring knowledge and wisdom.

I actually think that the first two factors are more important and more relate to the culture of the state of Utah than of the Church as a whole.

<comment><USER16> The church does emphasize (careful) secular education. But I think the original comment was referring more to doctrinal education, which the church actively discourages. Also, if doctrinal education ever conflicts with secular education, then doctrine trumps everything.

The example of the money the church pumps into BYU does more to hurt your counter-argument than to help it. The church pumps so much money into BYU so that it can provide formal education to its members, while controlling the education experience. The purpose of BYU is exactly to further the controlled church experience and controlled education of the world.

In fact, the Church is incredibly smart in how they operate. The most personal interaction you have with the church is between the ages of 18 - 25. These are the most malleable ages for a young adult, since this is the time that they naturally seek direction and purpose in their life. The church is top of mind for members during this time, and so the church has created a system where they can control these important years to mold future faithful followers and spread the religion.

The day you turn 18 they start "preparing you for a mission". Then they send you to the temple where you are told that you have now entered into covenants that, if broken, will now fuck you up for eternity. With the fear of your eternal salvation in the balance, they then send you off for 2 years to a church obedience boot camp (usually referred to by the euphemism of "a mission") where they literally control everything you say, think, or do for 2 full years. They pull you away from the environment you once knew, even frequently to another country. They control who you associate during these years, and try to build habits towards being a good future member. As soon as you graduate from the 2 year boot camp, they promise a sex-deprived 21 year old that they can now get laid by going to BYU and finding a beautiful mormon virgin who has been waiting for them their entire life. Then at BYU they can again control the narrative of your life. Curriculums meet national standards for accreditation here, but are also taught by other members who are committed to controlling the narrative of the Church. Now that you are married, you are encouraged to start having kids. Most BYU grads will already have kids by the time of their graduation. Once you have kids, now the emphasis is to raise them within the church. They will now begin primary school (as you once did) and continue the cycle that you just completed. By the time the church "lets go" of you during this important part of your life, you are 25 or 26 years old, already have several kids, and you don't want to ruin their lives by questioning church teachings. You final job as a 26 year old member is to "endure to the end". Quite possibly the saddest, most depressing stage of Mormonism. I hate when my Grandma tells me she is "enduring to the end". During this stage (between ~30 -> death) your goal is to "endure". Not enjoy, but endure.

During the endurance stage you are told to: go get a job so you can pay for your kids and pay your 10% of your pre-tax income as "tithing". Go to church every sunday. Take your kids to church every wednesday. Go to the temple for further doctrine reinforcement on Saturday. Don't drink coffee, tea, alcohol. Don't think impure thoughts. Just rinse and repeat. Just "endure", until you have the pleasure of dying.

BYU is very important to the Church's membership and tithing dollars. They aren't running that church from the bottom of their hearts. It all controls their members. If you remove BYU from the church's plan (as outlined above), they would lose MANY MANY members during those important ages of 18-25. They have created an effective algorithm/strategy that creates a cycle of promises and control mechanisms to keep you in the hamster wheel. BYU is critical to that strategy. That is also why BYU Idaho exists. It allowed them to broaden their net to even more young adults.

This is mostly the controlled experience that a man would experience within Mormonism. Unfortunately a woman's experience is even more depressing and controlled. But follows a similar outline.

So back to the original point. Yes, I would argue that in fact, "The Church of Jesus Christ of Latter-Day Saints actively discourages any sort of rational individual thought".

<comment><USER17> This echos what the Islamic state does with it's youth also. These are systems of control built to perpetuate collective egos.

</comment></comment></comment></comment></comment><comment><USER18> This is my favorite article on MLMs, how they basically consume and destroy female friendships for a quick buck. [https://www.washingtonpost.com/outlook/2019/01/21/how- mlms-a...](https://www.washingtonpost.com/outlook/2019/01/21/how-mlms-are- hurting-female-friendships/)

</comment><comment><USER19> ASEA also stands for Alaska State Employees Association, which explains dark green Alaska

</comment><comment><USER20> I'm a little concerned that at no point in the article does the author use the term "pyramid scheme."

<comment><USER21> Like it's co-opting this soft language that the industry is pushing to distance itself from a pyramid scheme, which is very much is?

</comment></comment><comment><USER22> I'm not sure what the purpose of the article is. It mentions a bunch of companies I've never heard of and has maps apparently of which states people search for their company name on Google, each year from 2008 to 2018. I suppose they are showing growth of interest in each company name. But there's not much commentary in the article. Just maps and a paragraph description of what the company is selling and a brief history.

The first on the list claims is an oil and gas company popular in Texas that somehow sells oil and gas using a multi-level marketing scheme?!? Whaaaat? The article doesn't even explain how that works or what they are really selling. Do random independent distributors buy gas tanker trucks and make deliveries to farm houses then try to recruit the farmer to sell to his neighbors? They could have tried to explain what this company is about. But instead it's just these maps and cryptic descriptions.

Another one says a MLM company sold leggings that became popular, then lowered in quality, which resulted in lawsuits. But no mention of lawsuits about what.

Not sure the article is useful or the title "epidemic" is justified. There probably is a MLM epidemic, but the article doesn't really support that. Just lists some random companies with spartan facts and some maps derived from Google search data.

</comment><comment><USER23> I'm guessing the 13 companies here are the long tail of MLM compared to Amway and Herbalife, but I'm curious just how big the difference is.

<comment><USER24> From the wording in the article, I'm guessing this is just using Google Trends data. You can search and compare for yourself: [https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F0dg...](https://trends.google.com/trends/explore?geo=US&q=%2Fm%2F0dgsq8m,%2Fm%2F038f_t)

</comment></comment><comment><USER25> These MLM "companies" are a scourge on many desperate and under-educated people. They prey on the desperate and it's unbelievably unfortunate that it's still actually legal.

</comment><comment><USER26> I'm always amazed by how well MLMs inoculate their sellers to criticism. Questioning the merits of the product or the distribution system usually results in conflict. A lot of people selling these things think they've discovered something special and that they're clever to have picked it up and run with it. Once they're at that point there is no stopping ego.

</comment><comment><USER27> Read the classics, too!

[http://www.vandruff.com/mlm.html](http://www.vandruff.com/mlm.html)

</comment><comment><USER28> There is a great podcast called The Dream about MLMs. I feel sorry for anyone that gets wrapped up in these things.

</comment><comment><USER29> What if all the businesses were MLM?

What if MLM schemes were also designed to re-distribute rewards so all the wealth wouldn't concentrate in the the top members' pockets?

<comment><USER30> They wouldn't be MLMs in any recognizable sense?

<comment><USER29> I mean what if there were no centralized retailers, everybody would be encouraged to re-sell, everybody would be rewarded for distributing to other active re-sellers, people receiving abnormally high passive income from their networks because of their high position in the distribution hierarchy would be taxed to reward active minors.

At the same time businesses producing goods (rather than distributing tem) and services (incl. storage, logistics and quality control) would remain the classic way, MLM is just about the sales.

Just imagine buying all your groceries and gadgets from neighbors and friends rather than from Walmart/etc. Wouldn't that be nice?

<comment><USER30> Oh, I see what you mean. Then my answer (not facetious) would be "because that would suck". I don't want to be a micro-distributor, I don't know a lot of people outside of sale that would think that's awesome, and if there's anything MLM has proven is that buying exclusively from your friends/acquaintances/neighbors is a good way to ruin relationships.

Sure...there's a more equitable scheme to equalize distribution of wealth, but please don't let this be it.

</comment></comment></comment></comment><comment><USER31> They left out graduate education ;P

</comment><comment><USER32> Over the past 15 years, I've had the opportunity to work with more than a dozen MLM companies in the UK. This won't be a popular opinion, however I believe great quality products and a self-regulating industry can create businesses that are far from being a Ponzi scheme but are legitimate companies with ethics, great support and opportunity to earn decent money.

<comment><USER33> At the core of it, MLM is a legitimate business strategy to get a relatively unknown product distributed through a network effect.

I create a meal replacement smoothie. Some friends want to try it, so I hook them up. Then friends-of-friends ask about this smoothie that isn't available, so I let them sell the product to other people in exchange for a cut. I quickly realize that I don't have the capital for to materials. Product is moving too fast, so I ask them to pay up front for some of the materials.

The problem is that this benign relationship that helps both of us can be easily made predatory.</comment></comment>


Marco Rubio Pushes to Block Low-Cost, High-Speed Broadband - <AUTHOR> https://theintercept.com/2015/12/14/marco-rubio-pushes-to-block-low-cost-high-speed-broadband/?comments=1#comments <comment><USER2> This is actually an interesting case study. government closest to the people (municipalities) want to provide a public service. States decide they want to help defend the Telecom Industry and use state power to block such efforts. The FCC issues a rule trying to prevent the states from killing the municipal programs. Who is right?

</comment><comment><USER3> Are there cases where muni-broadband would depend on commercial carrier interconnects, making this a complicated issue?

Or is this simply the lobby dollars at work?</comment>


All the funding is over here - <AUTHOR> http://www.smbc-comics.com/index.php?db=comics&id=2866#comic <comment><AUTHOR> Mouse over the red button below the panel for the title.</comment>


White men to women and minorities in tech: We just DGAF - <AUTHOR> https://pando.com/2017/02/14/white-men-women-and-minorities-tech-we-just-dgaf/ceba19a45685d33b6f9cb161593d0fc5a9353144/?src=twttr <comment><USER2> Cor blimey. That is one heck of a whinge. What's the quote? _Spotting problems without offering a solution is not criticism. It 's called whinging_? The parenthesised argumentative additions to every wrong or right conclusion drawn is just perposterous and utterly childish.

As to the actual meat of the article, the whole thing seems to be yet another "us" "them" hit piece, another partisan hate-brew in a long line of clickbait...

I don't really understand why the writer disagrees with "white men" belief that it's pipeline issues rather than anything else. I mean, they offer zero counter other than essentially "women don' believe in themselves enough and it's the white man's fault". That's a pretty thin and tired counterpoint. What does the writer want (since there's a clear bias here)? Companies to not hire based on merit?

Isn't that discrimination in itself?</comment>


Ten arrested in Hong Kong over baby milk formula curbs - <AUTHOR> http://www.bbc.co.uk/news/world-asia-china-21628147

<comment><AUTHOR> Hong Kong baby formula law enters into force.

The regulations stop people from taking more than 1.8 kilograms of formula across the border, in a bid to crack down on the so-called "parallel traders" who sell the milk powder at a profit in China. A Customs and Excise Department statement says offenders will face a fine of up to $65,000 and a maximum two- year prison sentence.

<comment><AUTHOR> [http://www.radioaustralia.net.au/international/2013-03-01/ho...](http://www.radioaustralia.net.au/international/2013-03-01/hong- kong-baby-formula-law-enters-into-force/1095808)</comment></comment>


Ask HN: How do you find a software development company for your startup idea? - <AUTHOR> I'm looking at getting an MVP built for a startup idea, but I'm a non-technical founder, so I want to hire a software development company to build it, but I don't know how I go about finding the right company for the job, for example do I look for companies that specifically build MVPs?<p>Any help or advice greatly appreciated. <comment><USER2> you don't hire a company, you build a team. you bring on a lead developer as a CTO and part founder, then you build overtime a development team to build your idea. Otherwise you are going to waste money, because once your company gets going you'll have to try to find people that will work with the MVP that was bought instead of built. also VC or Angel investors are going to see the fact you don't have a Development team in-house as a red flag and a risk.

Your also taking a huge risk by hiring out the development to a development house as that you won't know what kind of quality you'll get. You won't know if the development language is the right one for the job, if it was developed in a manner that features can be added later by your team once you have a team, etc... You might have to do a complete re-write later, which can sink a startup.

Figure out how much stock you can afford/willing to give to a partner, if you can pay a salary now that's a bonus. Look at your current connections, I'm sure you can find someone. I'm assuming you can as that you want to hire a development company. You might want to just figure out what you can pay now, and hire a lead developer if you can not find someone in you inner circle already. put together a offer, X a year to start, plus Y% Equity, etc...

</comment><comment><USER3> I'd need a lot more information about what you want to build and what your context is to give you real help.

Click on my HN profile link and I'd be glad to talk about this offline.

</comment><comment><USER4> have you played around with any of these:

[https://www.process.st/mvp-app/](https://www.process.st/mvp-app/)

</comment><comment><USER4> toptal - higher price/quality

upwork - get just about anything done. would break it up into smaller pieces.

fiverr for smaller things</comment>


Entr: run arbitrary commands when files change - <AUTHOR> http://entrproject.org/ <comment><USER2> Also, check out incrond. It's probably already included in your favorite distro.</comment>


How Many People Are Actually Trading Cryptocurrency? - <AUTHOR> https://www.cryptohopper.com/blog/240-how-many-people-are-really-trading-cryptocurrency <comment><USER2> When most of the companies in the market fake their data so people will invest in them It's a real problem to believe in data related to crypto.

<comment><USER3> Agreed, and many active traders operate several accounts</comment></comment>


Features are faults redux - <AUTHOR> http://www.tedunangst.com/flak/post/features-are-faults-redux <comment><USER2> Not directly tied, but another old simplifying call. And is considered by some as extremist. [http://archive.is/YLh6I](http://archive.is/YLh6I)

This is a description of his method (by Jeff) [http://www.ultratechnology.com/method.htm](http://www.ultratechnology.com/method.htm)

Another look at his way (contemplating problems with patients until reaching a simpler solution - simple, not easy and rarely done nowadays) [http://www.ultratechnology.com/mmeta.html](http://www.ultratechnology.com/mmeta.html)

Also from Jeff about reducing layering [http://www.ultratechnology.com/levels.htm](http://www.ultratechnology.com/levels.htm)

Note: All are Forth (the philosophy) oriented.

</comment><comment><USER3> In my experience this post is right on - there are so many bugs in so many layers (especially where they intersect), that the logical conclusion is to reduce and simplify.

These ideas are also emerging in the form of Go (simple) / Clojure (immutable) where simplicity is the primary feature. My only wish is that OpenBSD had additional vendor support for open source drivers (ie Intel / AMD / NVidia) so that it's impact isn't so limited to servers, but desktops / client devices as well.

<comment><USER4> All these faults seem to me to be the result of inadequate use of types. So Go/Clojure are precisely the wrong response; the way forward is decent type systems (i.e. ML-family languages) and replacing stringly-typed unix pipes with something more structured.

<comment><USER5> I would love to see an implementation of `ls`, `grep`, and `pwd`, with said pipes, in such a typed system of tools. `grep` is likely the most complex b/c it must do string comparison and I'm unsure how you would do this with types. I'm looking forward to seeing how such a system could be built.

<comment><USER4> Hopefully you'd replace grep with using the actual structure of what you're looking for. I mean there are type-safe pipeline libraries (I use fs2 a fair bit), it's just a question of modelling the things you want from a filesystem (or similar structure). If you're giving up unix compatibility then there's not so much value gained from having the unix filesystem model. So a better point of comparison is to take a business problem that you would solve with grep/ls/what-have-you, and solve it with fs2/conduit/... instead.

</comment></comment></comment></comment><comment><USER6> What an interesting read. I also enjoy how the URLs display on hover. Stylin'.

<comment><USER7> > _I also enjoy how the URLs display on hover. Stylin '._

Isn't this something browsers do by default anyway (except in smaller print)?

<comment><USER6> Sure, but I like the larger print. Maybe I'm just getting old. :)</comment></comment></comment>


Book review: "The Martian" - <AUTHOR> http://jasonlefkowitz.net/2015/10/book-review-the-martian/ <comment><USER2> I've seen this criticism in a few places, that Watney is a terrible character because he doesn't sit around writing about his feelings, he just gets on with the job of surviving on Mars. It seems to miss the point that this _is_ his character, the kind of guy who wouldn't spend his time wallowing in his fear and loneliness, but would get on with the job. And that's the kind of person you'd choose for a Mars mission-- indeed, that's the kind of person who has been filling up the astronaut corps for decades.

</comment><comment><USER3> lol. I couldn't finish the book, it was so annoying. Nothing draws you in (the calculations were fine but that's not a plot) and the blog style was really offputting. I loved the movie though.

</comment><comment><USER4> Spare me.

/The Martian/ is certainly not literary fiction -- it's pure genre fantasy, hard sci-fi. Of course Watney isn't going to bloviate on the nature of being human. We have plenty of masturbatory novelists doing that to death. Weir doesn't have to be one of them.

The inspiring thing about Mark's story is that he doesn't despair. He doesn't need to because he thinks about the problem and realizes that there is a way out. He works instead of weeping. This is hugely inspiring, especially as someone who struggles with depression. Watney even mentions suicide, but only as something he'll do in preference to starving to death. In other words, one needn't give up just because things seem hopeless, but go ahead and give up if they actually are. Don't assume -- do the math and figure it out. If Mark Watney can find a way out of his situation, you can probably find a way out of yours.

Most of all, remember that there are others pulling for you, and that they'll probably do anything in their power to help. Maybe they're not NASA, but they're there. They can't violate the laws of physics, but they can do a tremendous amount, and there's no shame in asking them for help.

<comment><USER5> Dunno why your post was tagged as [dead], I vouched for it to un-[dead] it. You make some reasonable points. Indeed the book isn't going to win the Man Booker Prize or a Nobel Prize for literature, but it's a fun fast read. At least that was the case for me and that was back when the story was available free on Weir's website and as a 99p download for the Kindle in early 2013.

[https://web.archive.org/web/20130115160130/http://www.galact...](https://web.archive.org/web/20130115160130/http://www.galactanet.com/writing.html)

I was very pleased for Andy when he got picked up by a publisher, it's nice to see an amateur author get some recognition for their writing passion, and even more pleased when I found out Ridley Scott was going to make a movie.

I've read a lot of SciFi over the years (including many 600-1000 page tomes by popular authors where I wished I could get the time back) and whilst Andy Weir isn't quite in the same league as Iain Banks or Alastair Reynolds (who incidentally have a a few duffers in print), there's space for The Martian, even if the character of Mark Watney is a wee bit two dimensional. Not everyone might like the diary/blog style of the writing, but I think it works fine, and is a good enough way of writing up Watney's challenges and solutions.

The Martian is an ok fun read and I don't think reviewers really need to come over all "literary critic" because it is what it is, a "Boy's Own" adventure on Mars solving problems with sticky tape, human poo, potatoes and other odds and ends.</comment></comment>


Ask HN: Thoughts on using Heroku for "heavy-lifting"? - <AUTHOR>

I am developing an app that pulls data from a third party API into a database. The data is only updated once a month by the third party. The database acts as a local cache so that users can log into the app and run different types of reports against the data. Each report processes around 15k rows of data.
That part of the app runs like clockwork. The backend is what I am questioning. Each day a script pings the API to see if the data has updated, if it has then a background job queues up that starts pulling data for the 40 topics in the database to a total of about 220k rows of data.
Is Heroku suited for a task like this? Would I be better off running it on a dedicated EC2 instance that gets spun up when necessary? I would love to hear some experiences from others.
Notes:
Not using Heroku's DB, instead connected to a small Amazon RDS instance
2 dynos
Resque instead of delayed job <comment><USER2> Fanvibe's backend is hosted on Heroku. We have 10 processes pulling in real- time sport stats every 1.25 seconds each. Our product has also been adopted by the NBA (yes, the national basketball association) and we power all of their apps across all mobile and web. In a nutshell, we're serving tons of users, and have huge peak times during the evenings when there's tons of games, and everything works great.

We have stats, an API, web / mobile destinations, and a boatload of users.

</comment><comment><USER3> Heroku is definitely up to the job. I've stored 100s of thousands of tweets a day using Heroku workers and a larger Amazon RDS instance.

Have a look at scaling your Resque workers up for your daily task, then back down once you're done. I haven't used the following technique, but it looks sound:

[http://blog.darkhax.com/2010/07/30/auto-scale-your-resque- wo...](http://blog.darkhax.com/2010/07/30/auto-scale-your-resque-workers-on- heroku)

<comment><AUTHOR> Actually already using this, works great!

Thanks for the input, I'll stick with Heroku for now!

</comment></comment><comment><USER4> Heroku will probably work fine for this, but if you have the technical chops to run your own EC2 instances, I'd recommend that - you'll pay less and you'll have more control.

Since this is effectively a cronjob sort of operation, though, is there a reason you wouldn't run it on one of your application servers? Unless you're in a position where CPU + memory are effectively all spoken for, I'm not sure I understand why you'd need a dedicated instance for this sort of thing - it'll run for a bit, but I suspect most of that time will be network comms, so it's not even going to thrash your CPU that hard.</comment>


'Mega Man' creator is embarking on a new adventure and needs your help - <AUTHOR> http://www.techspot.com/news/61253-mega-man-creator-embarking-new-adventure-needs-help.html

<comment><USER2> I don't think this is a good investment to go into purely because you are not buying a game like Mighty No.9. What you are buying is some episodes not a full game. Furthermore with this being the third kickstarter that they are doing (the second being Mighty No.9 animation, which is weird considering having a separate funding event already for that), the financial aspects of comcept leave me questioning how are they handling their resources.</comment>


U.S. To End Policy That Let Legal Pot Flourish - <AUTHOR> https://www.bloomberg.com/news/articles/2018-01-04/ap-newsbreak-us-to-end-policy-that-let-legal-pot-flourish <comment><USER2> I think weed should be legal. I also think Sessions should enforce every law, lest he pick and choose what is illegal and what is not, thus becoming the most powerful law-maker ( or unmaker ) in the land.

Passing a law is the act of the legislative, and repealing a law is too. If he does not enforce all the laws, he basically is seizing the power of congress and repealing those laws, for his term.

Imagine Sessions chose not to enforce every law. He could choose to stop enforcing tax laws to people from his home state. No. He has to enforce every law.

It is congress's job to repeal the stupid law, and I hope they do, especially if this creates more pressure for them.

<comment><USER3> IMO that's the correct answer. The only reason it was flourishing was due to lack of enforcement of federal law. It needs to be addressed at the federal level or there needs to be a clear method for states to veto/nullify/ignore federal laws that they feel overreach.

I can't remember the procedure, but isn't there some method for a state to nullify a federal law that it disagrees with?

<comment><USER4> There is a method for states to nullify federal laws they disagree with; the last time we tried it, though, the side effects were a bit undesirable.

<comment><USER5> Slavery was not against federal law when that happened. It only happened much later toward the end of the war with the 13th amendement.

<comment><USER6> As an aside, if you believe the Emancipation Proclamation to be legally binding, slavery was legal in the North longer than it was in the South.

<comment><USER5> That would be equivalent to an executive order, I'm not sure if you could call it a law, more like a regulation. But maybe things were a bit different back then.

<comment><USER6> It was, but the South had seceded, so they considered themselves a separate country with a separate (albeit hastily constructed) government, so executive orders don't apply to other countries. The legality of secession wasn't even decided until after the war, so it was a bunch of murky legal territory.

<comment><USER3> Was it ever decided?

<comment><USER6> Yes, sort of. After the end of the war, it was ruled unconstitutional (by SCOTUS), but only applied to 1869 onward. (perhaps meaning it was legal in 1861). The actual ruling is still being debated.

[https://history.stackexchange.com/questions/2056/was-the- sec...](https://history.stackexchange.com/questions/2056/was-the-secession-of- the-confederate-states-illegal)

<comment><USER3> That is a very interesting read

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> Is there an easy way to track donations from alcohol/big pharma lobbyists to the Republican party? I'm betting quite a bit of money, rather than concern for the prole's welfare, is behind this.

Sessions said this in March: "I reject the idea that America will be a better place if marijuana is sold in every corner store. And I am astonished to hear people suggest that we can solve our heroin crisis by legalizing marijuana – so people can trade one life-wrecking dependency for another that's only slightly less awful," he told law enforcement officials in March. Our nation needs to say clearly once again that using drugs will destroy your life."

As it happens, a person close to me who was a true alcoholic (physically dependent, would have seizures if they didn't drink, tried AA and failed through the 12 steps a number of times) successfully stopped drinking by choosing to safely vape pot instead. They vape about every two days. How exactly did pot destroy this person's life?

\- edited to add big pharma

<comment><USER8> If you follow the donations in this sector its usually boring and more towards whomever is in power. I would concentrate more on police and sheriff PACs and those related to the prison systems; not private but public which are most covered by PACs

while I find some things to like about this Administration as a Libertarian it stops when confronted with Sessions.

then again all this opens the door to more opportunities to flip this to Congress and put pressure there. The previous Administration did not push this either, they did their typical chicken move of pretending it wasn't an issue. As in, if we don't enforce the law then that means we don't support it. Yet no effort to repeal

<comment><USER9> The executive branch can't repeal laws, they can choose to selectively enforce them. Also, the previous administration via the state department, was working on unwinding the many agreements we have with other countries on marijuana legalization, it's hardly tenable to legalize it at a federal level while we're still giving (let's call it slush) money to governments who make it illegal, and punishing those who don't.

This administration has castrated the state department, so near as I can tell, none of that effort is happening anymore. And in fact any government paying attention would refuse to take such moves seriously now that the AG is reversing the prior administration's efforts thus far.

</comment></comment></comment><comment><USER10> Why? What harm can the Feds point to, with respect to legal marijuana? It's been mostly good in Colorado. Sales tax on marijuana has offset some budget problems citizens of Colorado inflicted on themselves (TABOR). Apparently, crime in Colorado isn't uniformly rising: most categories of crime are less common since legalization, a few have risen a bit. This is in line with a secular drop in crime in all of th USA, however, so, again, mixed bag.

<comment><USER11> It harms the pharmaceutical industry, the private prisons and police budgets, to name a few examples.

<comment><USER12> Police unions are also uniformly opposed to legalization, as it will reduce the need for police by definition if the hundreds of thousands of "crimes" per year vanish into smoke.

Fewer officers, less money and less power.

Of the 8.2 million marijuana arrests between 2001 and 2010, 88% were for simply having marijuana (ACLU).

</comment></comment></comment><comment><USER13> So much for « states rights »

> Sessions, who has assailed marijuana as comparable to heroin and has blamed > it for spikes in violence

Pot smokers aren't violent people because it tends to chill you out. The growers and dealers can belong to criminal organizations and cause problems. So naturally, keeping the gangs in business by keeping pot illegal is top priority.

<comment><USER14> Quite the contrary. I am glad he is doing this. It is a huge tactical blunder that will force the states' rights issue into court and either result in a victory for the states or massive public discontent about federal overthrow of popular state policies.

Either way the federal government is going to see their influence eroded here.

<comment><USER15> > It is a huge tactical blunder that will force the states' rights issue into > court and either result in a victory for the states or massive public > discontent about federal overthrow of popular state policies.

The states already lost; this already went to the Supreme Court _before_ Congress restricted such prosecution, and the feds won completely.

What will go to court next—unless Rohrabacher-Farr fails to be renewed (it's included in the most recent stopgap spending measure, but that expires, IIRC, later this month) before any prosecutions under the new DoJ policy—will not be a Constitutional states rights issue, but a federal statutory interpretation issue over whether DoJ is _prohibited by Congress_ from this action.

<comment><USER14> > The states already lost

precisely. which is why we need the feds to try and enforce the law again in order to relitigate it.

<comment><USER16> That's not how this works. The court operates under the rule of stare decsis which would already make this a tough hill to climb. Even more, the line of reasoning in the decision agreeing to federal restriction of in-state marijuana sales goes all the way back to the great depression and is really unlikely to be overturned in just over a decade since it was decided last time.

<comment><USER14> > the court operates under the rule of stare decsis

Yes and no. If you have a decision on one set of facts made on one basis just come up with another set of facts and another basis where you can get a opposing result without necessary logical conflict and you are all good.

The rat's nest of federal law and prior opinions makes this trivial, so at the end of the day, all legal opinions are arbitrary, and the only actual basis for any decision is whether or not it serves the interests of the court, which outside of the pet peeves, biases, and corruptions of individual judges, consists mostly of the perpetuation of the institution.

The SC's power is rooted in the federal government, and it is stacked with statist/corporatist hacks, so it will always have a preference for extending federal power, but that instinct must be tempered by the threat of an over- extension which reveals the inherent weakness of their position.

Making a move against a majority of the states now, on a subject where popular opinion is clearly against them, and with an all time low level of trust and respect for the federal government would definitely not be desirable.

Normally they could just refuse to hear appeals, but the 9th circuit is in a pretty feisty mood these days so I wouldn't be too surprised if they sided with the states, which would then force the SC to either let their ruling stand, or expose themselves directly on the issue.

Either way, they either let the states keep this going, or they piss off a lot of people, and either way is bad for them and good for the states.

<comment><USER15> If Rohrabacher-Farr doesn't expire, the states will challenge the action as a violation of _federal statute_ (where they've _won_ before against the Feds trying to narrowly interpret Rohrabacher-Farr) rather than launching a Constitutional challenge of on grounds where there is crystal clear Supreme Court precedent against them, and little reason to believe the Court has moved in their favor.

Even if they _also_ raise the Constitutional argument, a Court that fears public opinion as much as you suggest would likely take the less precedent- disturbing approach to the popular result by resting a decision on Rohrabacher-Farr (even if that took a somewhat expansive interpretation of that prohibition on DoJ use of funds) rather than overturning Gonzalez v. Raich.

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> If you look at the fine print he's still leaving the decision to crack down to each stares attorney general but sessions is doing exactly what you would want to do is you want to see the opiate crisis get much worse. These people in DC are so stupid they don't even have the brain power of an earthworm but they want to treat us lower than dogs like we were born to be Jeff Sessions slaves. I'm so sick of these bullies.

<comment><USER18> Cannabis use isn't the solution to opioid deaths.

Other countries have strict laws about cannabis, and those laws are enforced, and they don't have the problems of opioid deaths that the US has.

The real solution to opioid death is adequate treatment for pain; and treating addiction as a health problem not a criminal justice problem.

<comment><USER19> "The real solution to opioid death is adequate treatment for pain"

Like.... medical marijuana?

Hard to believe you wrote those three sentences without putting two and two together.

Regardless if I partially agree with you, further criminalizing marijuana is also NOT the solution to opioid deaths.

<comment><USER18> There's not much evidence of efficacy for cannabis as a treatment for long term pain.

<comment><USER19> To replace all instances of opioids? No.

It does a very good job with neuropathic pain though.

</comment></comment></comment></comment></comment><comment><USER20> Keep in mind this is based on two anonymous sources. The track record for those has been less than stellar since Trump began his administration.

<comment><USER21> Sometimes the leaks are intentional to gauge public reaction, and then actual action is taken based in part on feedback.

<comment><USER22> Leaks of this sort are almost always trial balloons. I'm sure this was an intentional leak. They're looking for a backlash, at which point they can quietly forget about it (if they don't want the fight) and pretend it never happened.

</comment></comment></comment><comment><USER23> I doubt that prosecutors in liberal states with legal markets (Oregon, Washington, California, Nevada) will clamp down on the industry, in fact under certain conditions I could see them clarifying their stance and perhaps clearing confusion as to how federal law will be enforced.

However, I do think that this may halt the spread of the industry into midwest and north east markets.

<comment><USER24> I think it may already be too established in the midwest for anything like this to threaten the spread of the legal pot industry.

I suspect this is a tactic to justify Federally taxing marijuana, and would be consistent with Trump's broader approach of making tax policy tweaks that hit the bluest states and regions the hardest.

<comment><USER25> Never forget: Trump did not even want to be president, as revealed yesterday. So this is the alt-rights way of exacting revenge for 8 years of Obama, by punishing the 52% of voters who didn't vote for Trump. The right is getting their licks in while they can.

Edited for clarity

</comment></comment></comment><comment><USER26> This guy is messing with my gains. Can't he go rant about tax deductions and too much regulation like a normal republican?

<comment><USER27> Budz off 37% already today.

Hope sessions and his boyfriend had short positions on this dumpster fire

<comment><USER28> Please don't post like this here.

</comment></comment></comment><comment><USER29> The Justice Dept has now issued a memorandum [https://www.justice.gov/opa/pr/justice-department-issues- mem...](https://www.justice.gov/opa/pr/justice-department-issues-memo- marijuana-enforcement)

</comment><comment><USER30> It'd be nice if pro drug and pro gun laws were both exempt from federal pre- emption. In Kansas, state law says guns made in the state are exempt from federal regulation. Of course the federal government disagrees. Pot and gun enthusiasts should band together.

</comment><comment><USER31> This reads like a strong warning to the already cautious payment processors that legalization hasn't eased any of the uncertainty around processing payments for dispensaries or made banking any simpler for them despite a massive market having just opened.

</comment><comment><USER32> If I were a US Attorney trying to bring pot cases in California, Colorado, or Washington I'd be very worried about jury nullification. Maybe I'd be able to solve the problem in voir dire but I wouldn't bet on it.

<comment><USER33> Most people don't know what jury nullification is, and the courts specifically do not instruct juries on it. Hence, it is not a big concern really.

<comment><USER32> People don't need to know what jury nullification or be instructed on it in order to engage in it. It was happening in England before this country even existed. Ask any prosecutor and she'll tell you about a case where it happened to her.

</comment></comment></comment><comment><USER34> Maybe this is a good thing: policies like this are going to damage the Republicans in the midterms.

There's only so much war waged on progressive policies before more and more even right-wing types feel their toes being stepped on.

</comment><comment><USER35> The states that have legalized it should do everything in their power to not provide any assistance to the federal government in this or any other investigations till the policy is improved, just like sanctuary cities are doing. The states have a lot of legal options on how to handle this. We'll see if they do the right thing or if they bend over backwards for a piece of shit racist AG who has already allegedly (my ass) perjured himself.

</comment><comment><USER36> [https://www.popehat.com/2018/01/04/lawsplainer-attorney- gene...](https://www.popehat.com/2018/01/04/lawsplainer-attorney-general- sessions-threatened-action-on-marijuana/)

Popehat's response is, as always, fun to read and more informative and less fear mongering than most sources of information.

</comment><comment><USER37> > as polls show a solid majority of Americans believe the drug should be legal

I am for the legalizing of marijuana, but considering the majority of Americans live in only 9 of the states, decisions should not be made based on the "majority". Federal law based on what the majority wanted was one of the things that the framers were afraid of. 9 states should not be able to dictate what occurs in the other 41 states and vice versa. Full state rights. Again I am for the legalization marijuana, but this needs to be a state by state decision, not federal govt.

<comment><USER38> To flip this, the minority of the country that live in 39 states should not be able to dictate the law to the majority of the country who just happen to be concentrated in a relatively small area. That's tyranny of the minority, which is arguably far worse than the tyranny of the majority the framers feared.

<comment><USER39> On the other hand one could frame this as the majority of states decided and those nine states are the tyrannical minority.

<comment><USER40> Empty land doesn't have a right to suffrage, _people_ do.

<comment><USER39> We're not talking about "empty land," we're talking about member states of a federation. Those members get to decide, you merely tell your state, vaguely, what you want.

</comment></comment></comment></comment></comment><comment><USER41> This is poised to be a giant states rights issue/fight and there's nothing Trump likes more than a fight

</comment><comment><USER15> "Legal" is incorrect in the headline, as there is no "legal pot" in the United States (well, aside from very narrow research, etc., allowed by the feds, which is not the focus of this policy.)

The fact that states don't have espionage laws covering everything in the federal espionage act doesn't mean that those states have "legal espionage".

<comment><USER42> You're conflating two different things. In the former, states have set up legal framework for marijuana sales. In the later, state laws don't have any opinion on the matter.

<comment><USER15> If a state like California sets up an imprisonment scheme under it's laws that violates federal law (to choose an example that has happened recently), it's still illegal prison overcrowding, not legal prison overcrowding.

A system under state law in violation of valid federal law is, because of the supremacy clause, an _illegal_ system.

</comment></comment></comment><comment><USER43> Sessions has clearly never had a session.

<comment><USER44> Given the frequency with which old guard Republican politicians get caught soliciting liaisons in public mens rooms while openly supporting legislation that discriminates against the LGBTQ+ community I'd drug test Sessions before I made any assumptions about his use habits.

</comment></comment><comment><USER17> If you're trying to destroy the country on behalf of Putin forcing millions of middle aged chronic pain patients off cannabis onto opiates and inevitably heroin and fentynal is an efficient way to murder millions of people without firing a single shot.

<comment><USER28> Please don't post inflammatory rants here. Any point worth making can be made civilly and substantively.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)</comment></comment>


Pitch Drop Experiment - <AUTHOR> https://smp.uq.edu.au/pitch-drop-experiment <comment><USER2> Neat 3 year time lapse video from the University of Queensland: [https://youtu.be/BZvsrOciU_Q](https://youtu.be/BZvsrOciU_Q)

And relevant Radiolab episode here: [https://www.wnycstudios.org/story/267176-never-quite- now](https://www.wnycstudios.org/story/267176-never-quite-now)

</comment><comment><USER3> Needs Adobe Flash to watch live steam of the pitch drop. Nobody will probably watch it fall then. LOL [http://www.thetenthwatch.com/](http://www.thetenthwatch.com/)

</comment><comment><USER4> Reminds me of: [https://www.scientificamerican.com/article/fact-fiction- glas...](https://www.scientificamerican.com/article/fact-fiction-glass- liquid/)

</comment><comment><USER5> They'll eventually have to pump in inert (i.e. not oxygen) gas to keep the steel stand from rusting out if the experiment is ever going to run out of pitch.

<comment><USER6> Wouldn't the oxygen eventually get "used up" in the iron reaction?

<comment> d-sc There's lots of oxygen in the atmosphere, typically the iron will be completely turned into rust before the oxygen runs out.

</comment></comment></comment><comment><USER7> I used to have a math class in the building housing this, used to walk past it a few times a week :D

</comment><comment> black-tea What are the "various" glitches that have prevented anyone seeing a drop fall?

<comment><USER8> The webcam wasn't working briefly when one of the drops fell. Before that one webcams didn't exist.

</comment></comment><comment><USER9> What's the experiment though?

</comment><comment><USER10> What broken website. The subscribe overlay is not even closeable</comment>


Ask HN: use Stripe outside US? - <AUTHOR>

Is there any possible way for a citizen/company of a not supported country to use Stripe? The money can stay in the Stripe account and/or US in the next months, no need to withdrawy it. The main reason is the easiness to implement and better taxes. <comment><USER2> You'll need a US bank account to disburse payments to, since Stripe does not have wallet functionality. You'll also need either a US citizen or a US corporate person, per their terms and conditions.

Non-residents can get both US corporate persons and US bank accounts, though it takes a bit of work these days. You can form an LLC trivially online (I used LegalZoom for a Nevada LLC, on advice of my accountant). Getting a bank account is _modestly_ more difficult. The easiest way is to go to a multinational bank which has branch offices in your country and get them to pull the strings to open up a _US_ account for you on behalf of your _US_ LLC, with the person having signatory authority being you. This keeps everything nice and tidy with their Know Your Customer processes, most of the time. Citibank is my go-to bank for arranging this for Japanese people, but in principle, you can get it from any bank willing to give it to you. (Word to the wise: they may be suddenly radically more willing to pull the strings if you are vague about your revenue numbers. "We're just establishing the US LLC on a trial basis with one product, but may redirect more of our business through it as time goes on. So, I don't know, call it $X0k per month immediately and potentially higher depending on future conditions.")

Note that international taxation is complicated. Talk to an accountant. Seriously. Talk to an accountant! I probably overpaid at least five figures over the years due to not taking this advice earlier.

<comment><AUTHOR> Great response, patio11! Thanks a lot :)</comment></comment>


Overload functions in Python - <AUTHOR> https://arpitbhayani.me/blogs/function-overloading <comment><USER2> This is pretty neat, and shows off some relatively advanced features of the language.

And while it's fine for a personal project or in a specific context, please don't do this in a regular Python project, especially in a professional setting. You'll just confuse new hires, slow down execution time, and make the code more difficult to reason about and debug.

<comment><USER3> It's a funny thing:

Advocates of dynamic languages tend to claim that the flexibility they offer — dynamic duck typing, dynamic dispatch, runtime reflection, eval — is a major advantage.

And yet every time someone actually tries to meaningfully use those features, they say 'why would you do that, it's too confusing' and tell people to stick to writing code that's just as easily expressed in a statically-typed, statically-dispatched, AOT-compiled language, while still paying the costs of their environment supporting those features.

If you're going to write Python like C, why even bother?

<comment><USER4> Just because you can, doesn't mean you should.

A large part of Python's popularity is due to the fact that there's a reasonably well defined 'pythonic' way to do things, that everyone can learn and then have a decent experience using and reading code produced by others.

You _can_ implement fancy operators, overloading, entire DSLs in Python; but by doing so you break the pythonic contract and make your creation stand alone with a separate learning curve. There are some valid reasons to do this, especially for bespoke in-house tooling, but open source modules intended for mass use have virtually no justification to deviate from the primitives which the entire community is used to.

<comment><USER5> > Just because you can, doesn't mean you should.

I think this is very much true, but actually I disagree with you when it comes to OSS. For example, Django makes heavy use of metaclasses in order to simplify its API, and I think _that 's fine_, because no junior developer realistically needs to contribute to such a project. They can work on a project _which uses_ Django without needing to understand the internals.

Having said that, I was only introduced to SQLAlchemy a couple of years ago, when already pretty competent at Python. Their filter syntax (ab)uses __eq__ to allow you to write expressions such as `MyModel.my_field == 'query'` which return an expression which can be evaluated dynamically when applied to a SQL query. I did a double take when first looking at this, assuming it at first to be a typo. I then ended up digging into the internals of SQLAlchemy to find out how it all fits together. The upshot was that I explored the SQLA API in great detail. The downside is I spent a few hours doing it :D

</comment></comment></comment></comment><comment><USER6> The standard library has something similar: [https://docs.python.org/3/library/functools.html#functools.s...](https://docs.python.org/3/library/functools.html#functools.singledispatch)

<comment><USER7> Cython also has had a mechanism for this for a long time. In fact if you wanted multiple dispatch in a new pure C program in 2020, just write it in Cython with no use of the CPython API and have Cython generate the pure C library for you.

[https://cython.readthedocs.io/en/latest/src/userguide/fusedt...](https://cython.readthedocs.io/en/latest/src/userguide/fusedtypes.html)

</comment></comment><comment><USER8> I thought a consensus had emerged that function overloading was a bad idea for a while now? Even in strongly-typed languages, it pushes that extra bit of cognitive load onto the human reader. It also complicates things for tooling. In loosely typed languages it's hard to see the need. As somebody else mentioned here, variable _args and_ _kwargs are the more_ pythonic* way to address such concerns. If you want to have different behaviour for different args you can do this explicitly.

I guess this article is a fun discussion and a nice comparison of language features, maybe I'm taking it too seriously.

<comment><USER9> On one hand - I agree, overloading isn't great. On the other hand having a `def func(args, kwargs)` is a pain the ass for everyone involved (people & IDEs): you have no idea what the args or kwargs could be without reading the source.

If you can get away with just a bunch of named kwargs after the arguments that is fine, but I'd take overloading over the `args, kwargs` garbage any day, even if that is the more "pythonic" way.

<comment><USER8> I think the kwargs approach is fine for when you're reading your code. When you're writing I think you'll always have to consult the docs, or headers. In a strongly typed language IDE can pick up the hint but in a more dynamic language like python it can get confused.

<comment><USER9> My bad - I meant this but didn't know how to format code so that is showed the stars

        def func(*args, **kwargs)

I am in full support of actual kwargs with names, it's the wildcard ones that I don't like.

</comment></comment></comment></comment><comment><USER10> Python has idiomatic ways of implementing something like overloading. \- Default parameters, so variable numbers of arguments can be passed. \- Run- time type identification. Though not generally recommended, you can use it for slightly different implementations for different argument types.

</comment><comment><USER11> This is a neat article, and a nice dive into Python.

I think it also taught me, by prompting an immediate negative gut reaction to the basic idea, about an opinion about language features that I didn't know I had, let alone that I didn't know I had so strongly: I think that I officially believe that function overloading should only be used for two reasons: First, you can overload functions of the same arity to mimic dynamic typing in a static language. A print function that takes many types of argument, for example. Second, you can provide multiple arities to mimic optional arguments in a language that doesn't have them.

But the example in the argument, where the overload is for providing two different versions that do different things with their arguments, is not something I'd want to see in real code. There's just too much opportunity for confusion. For example, if I were familiar with `float area(int)` as a function that calculates the area of a circle, and and then encountered `area(int, int)`, I would guess that the return value is a float, and that the two ints are now the lengths of the semi-major and semi-minor axes of an ellipse.

And I'm having a hard time coming up with a better example for the article. Perhaps because function overloading just isn't a desirable feature in a language like Python.

<comment><USER12> I don't miss it a lot in Python except for some cases such as:

        area(Circle circle):
            ...

        area(Square square):
            ...

You could say "Ah! But that could be something that you define in each class, like square.calculate_area()". Yes, but sometimes you don't have access to the class. You could monkey-patch it but that's not something that I like to do.

<comment><USER11> The Pythonic way to deal with that would be to just remember that Python is a dynamic language:

      def area(shape):
          if isinstance(shape, Circle):
              ...
          if isinstance(shape, Square):
              ...

Or, if you want better coverage from your type checker,

      from typing import overload

      @overload
      def area(shape: Circle): ...

      @overload
      def area(shape: Square): ...

      def area(shape):
          if isinstance(shape, Circle):
              ...
          if isinstance(shape, Square):
              ...

This still isn't real overloading. The last one is the one and only function. All the other two bits do is tell the static type checker what kinds of arguments it's prepared to support.

edit: Scratch that, I think what I'd really go for in a simpler case like this would just be

      def area(shape: Union[Circle, Square]):
        ...

<comment><USER13> Python including functools.singledispatch I think is a strong indicator that function overloading IS pythonic (or at least pythonic enough to core python developers)

<comment><USER14> I don't know that I've seen singledispatch used anywhere, and the standard library includes a lot of unpythonic code (and entire modules).

As a simple example, the unittest module is entirely unpythonic.

Singledispatch was mostly included to handle specific cases where singledispatch is very clearly useful (the PEP mentions pprint and copy), but not as a generic tool for common end-user code.

</comment></comment></comment></comment></comment><comment><USER15> The Wren scripting language supports this kind of "overloading by arity" [0].

Wren therefore allows overloads such as `range(stop)` and `range(start, stop)`. This is more intuitive than Python's `range(start=0, stop)`, which might be the only function in the language that has an optional parameter _before_ a required one.

[0] [http://wren.io/method-calls.html](http://wren.io/method-calls.html)

<comment><USER16> I could have sworn I have written range(1,stop) many times in Python. Did I misunderstand your argument, or has my memory gone all sideways?

<comment><USER15> `range(stop)` and `range(1, stop)` are both supported, but without overloading, the implementation of `range` is messy as it has to work out the meaning of each argument manually.

<comment><USER17> Why is that a problem? I _want_ the standard library to contain all messy stuff so my code doesn't have to.

From the call site there's no difference between Python's optional-first- argument range() function and a hypothetical overloaded one. Any perceived complexity in usage, therefore, can be fixed with better documentation.

<comment><USER15> `range` is an example. Lack of support for overloading makes it harder to replicate its API in our own functions.

<comment><USER17> Ah right, totally misunderstood.

Yep, true. Overloading is nice.

</comment></comment></comment></comment></comment></comment><comment><USER18> Its weird an article written about this _now_ , has no mention of [https://www.python.org/dev/peps/pep-0443/](https://www.python.org/dev/peps/pep-0443/) (skrause mentioned the standard library docs for this [https://docs.python.org/3/library/functools.html#functools.s...](https://docs.python.org/3/library/functools.html#functools.singledispatch) a few minutes ago [https://news.ycombinator.com/item?id=22346433](https://news.ycombinator.com/item?id=22346433) )

It's especially weird to me, since single dispatch generic functions would do quite a lot of what he shows in the article, without having to build it all from scratch. I mean if you need more than what the standard library tools for multiple dispatch will let you have, then sure build your own, but I definitely echo nickserv's sentiments [https://news.ycombinator.com/item?id=22346235](https://news.ycombinator.com/item?id=22346235) ... This kind of hand rolled alternative to something in the standard library is not something you should end up doing as a last resort, its usually more trouble than it's worth. When you do need it, you should be documenting the _hell_ out of not just what it does, but why you had to do it yourself.

Edit for general knowledge sharing reasons: I just noticed the nice update to the built in functools.singledispatchmethod ([https://docs.python.org/3/library/functools.html#functools.s...](https://docs.python.org/3/library/functools.html#functools.singledispatchmethod)) that came with Python 3.7, it now supports registering arguments using type annotations. I can already think of a few places where I could go back and clean up some code by removing a bunch of now unnecessary code doing "if isinstance(foo, str):" checks.

</comment><comment><USER19> This is very clever. But function overloading is something out of static language territory. It feels un-Pythonic and needlessly complicated. Especially when compared to _args and_ *kwargs.

<comment><USER13> It feels pythonic to me. One thing that I think brings perspective here is the PEP on singledispatch, which is essentially on function overloading, and is implemented in functools!

[https://www.python.org/dev/peps/pep-0443/](https://www.python.org/dev/peps/pep-0443/)

</comment></comment><comment><USER20> Got to the Namespace portion and couldn't help thinking "Namespaces are one honking great idea—let's do more of those!"

</comment><comment><USER21> meh.. that kind of code would be on a shortlist for refactoring at first sight.

        area(radius=1)
        area(width=1, height=1)</comment>


Ask HN: State of XMPP and open and extensible alternatives? - <AUTHOR> I'm not at all aware of current stakeholders in the XMPP world. Who funds the development of new standards? Which technical people participate, develop, and champion proposals? Are new proposals getting enough feedback from organizations which large number of users that implement them?
I guess the ultimate question I'm trying to answer through these sub-questions is how active is XMPP development and what parts are failing. I do think that the world needs a chat protocol that's open and extensible, and the question is about health of the de-facto protocol I know of which was designed around these principles.
There has been a recent resurgence in interest for chat protocols, but I don't know of any that are designed with extensibility in mind. This [HN comment thread](https://news.ycombinator.com/item?id=17064616)
 discusses how XMPP/Jabber and Matrix compare. If XMPP currently stands to fail, are there attempts to standardize protocols that supersede it and aren't affected by the same problems? <comment><USER2> IME, XMPP just works. I recently setup ejabberd+Conversations.im+gajim. There's definitely baggage (the basic idea of routing messages to specific prioritized endpoints, rather than a foundational shared history), but extensions have patched that up to satisfaction. And OMEMO seems to just work.

This doesn't answer your direct question, but does speak to the general "health" of the project. If a project doesn't have much activity, it can be because it simply works to satisfaction rather than being abandoned.

There is a lot of excitement around Matrix, but having evaluated it at the same time as XMPP, I just don't get it. I wanted to like it based on the community excitement, but ended up not. Riot.im on Android is laggy and unresponsive. No feedback when trying to start a chat, then when the server finally caught up hours later, multiple rooms popped up at once. Messages are "sent" with no indication whether that actually happened, and "synchronizing" notifications randomly pop up as if I care. The eventually consistent synchronization layer seems interesting, but without being fleshed out, creates more problems than it solves.

I didn't bother trying a desktop client because the poor flagship phone client was a blocker. Basically the project felt right in line with the poor quality of web apps in general. Perhaps like physical goods, we've collectively forgotten how to build decent software as well, and XMPP is the best we'll have for a long while.

<comment><USER3> > Riot.im on Android is laggy and unresponsive.

Riot/Android hasn't been developed in over a year. We rewrote it as RiotX/Android, which is unrecognisably better, and will be exit beta shortly.

I suspect you also suffered from the default homeserver (matrix.org) being horribly overloaded.

Sorry this put you off the rest of the ecosystem.

</comment></comment><comment><USER4> The greatest weakness of the XMPP is... it's main advantage - it's extensibility. Because of that, which you can "pick and choose", it's more difficult to offer "consistent IM solution" because there is no one party/company that offer complete environment (server + clients for all platforms).

XMPP evolves and is developed by volunteers (and developers contributing to XMPP software) and there has been a lot of work done to improve it (some say "catch up with IM landscape"): chat synchronisation (same conversation in all clients), E2E encryption (OMEMO), Audio/Video Calls (with Jingle), improvements on mobile (push) and groupchat (persistent membership / MIX).

Surprisingly enough, XMPP is quite popular and there is a lot of deployments but... XMPP is not exposed or advertised as being used, so you may be using XMPP without even realising it.

(sorry if this is a bit vague but I'm not sure I can give more details as I'm involved with one XMPP project)

</comment><comment><USER5> >... what parts are failing.

Client usability is one thing.Conversations for Android is an example of how to do things well. An example:

You start a multiuser chat and Conversations just picks the options that will allow OMEMO encryption by default. You do the same thing on Gajim and it picks the wrong options and then uses completely different terminology in the error message when OMEMO is attempted. There is no way to know how to change the options to make things work.

Supposedly iOS XMPP clients could use some work but I have no direct experience.

The protocol itself is reasonably good and there are lots of implementations out there.

</comment><comment><USER6> Have you visited xmpp.org? To me it already has been extended, the x in its name is for extendable. That said I would start with xmpp.org</comment>