Break free from traditional email - Host your own server - <AUTHOR> http://blog.mkucz.com/2017/10/how-to-host-your-own-email-server.html <comment><USER2> Tutorials for setting up a personal email server are fine for educational purposes -- or -- if you're primarily using it to _receive_ emails.

On the other hand, if you absolutely depend on the ability to _send_ emails such that your recipients reliably get them, hosting your own email server is extremely tricky. One could carefully go through the checklist of SPF, DKIM, ip blacklists, etc and emails will still be rejected by MS Hotmail, GMail, Yahoo, etc. Those giants are "black boxes" when it comes to their heuristics for rejecting incoming mail as spam. E.g. your hosted email server does nothing wrong _but some other bad actor on your ip block_ sends spam which then makes MS/Google block _you_ because of "guilty by association". Trying to debug your "sender reputation" is not easy.

In the 1990s, I hosted my own home email server over ISDN lines. These days, I have a million other things I'd rather do than babysit a personal email server with software updates, SpamAssassin lists, etc. I get the whole decentralized ethos but it's just not worth the effort for email servers.

<comment><USER3> What kind of colossal idiot would block an email because it comes from a certain IP-block _IF_ SPF and DKIM has been properly setup?

Is this an urban legend that just keeps getting repeated?

<comment><USER4> No, it's real. I gave it up a year ago, after hosting my own mail since forever. Exactly as stated: Hotmail (or whatever MS mail is called these days), GMail etc. are the main culprits. So yes, 'colossal' is the word.

<comment><USER5> Yep I did the same. I ran my own email server off the same IP address for 15 years with zero problems, but I had to give up recently because email is not something that you can do on you own anymore. You now have to pay some somebody to vouch for you or else MS will send your emails to spam or even worse just randomly delete them.

<comment><USER6> Something should eventually come along and replace email. Like bitcoin and other technologies, what was originally designed to be decentralized became centralized in practice.

<comment><USER7> Bitcoin's history involves a plan for combating spam—that's why proof of work was invented.

Hashcash, Bitcoin's PoW game, was intended for use as an email attachment to create a real cost to spam without any micropayments.

"If you want to mail me, prove that you burned five seconds of CPU time."

<comment><AUTHOR> That is really interesting. Do you know of any articles that go into more details?

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> Hell no.

The moment Yahoo, Microsoft or google decide that they don't like you, you're SOL.

Yahoo are the worst. If you try and deliver to them you get a deferral with an error message in your log with a URL. Then you have to open the link in the URL and fill in a form. They don't have to accept the form and they ignore you for 3 months if it goes wrong.

This happens even if you're not on an RBL and have set up DKIM and SPF properly.

Edit: you want to see the trouble we had to go to so we could run an SMTP server in AWS for outbound/abuse address inbound only and get that talking to Office 365 for internal use only. Two days of hell.

<comment><USER9> I've been self-hosting for the past 4 years and this hasn't been my experience. Things like fixing DKIM/SPF eat an hour or two occasionally, but I've never encountered an issue where the time investment overtook the learning + other benefits - it's been hands-off 364 days of the year.

I've only seen one blocked send happen -- blocked by my grandma's @att.net account. Since it happens so infrequently and nobody uses @att.net, I just re- sent from a Hotmail account instead. No issues with the other major players. But for my use-case it's easy to mitigate and if the problem persists I can invest more time in it, but one recipient blocking me in 4 years isn't bad.

It's the only way to have ownership, which is is one of the benefits I really like - Google, Yahoo, etc. still get pieces of my personal email history because nobody else self-hosts or uses PGP, which is disappointing, but I prefer it over handing one player ownership the full history.

BTW, I'm running it on the same 512MB DigitalOcean droplet that I use to host my static sites (personal website, small product sites, etc), so it's basically free since I'd need to host those things anyway, which is nice. Needs some swap though.

Edit: Not saying these points are invalid. They're certainly valid, a service like Gmail _will_ be more reliable and easier. If you're blocked for some reason or have any other email probs, there's nobody else to fix it besides you.

<comment><USER10> How do you know you haven't had numerous emails marked as spam and never seen by the recipient? Do you receive a reply to every one you send?

BTW, AT&T's customer email is now hosted by Yahoo.

<comment><USER9> Certainty is difficult. I use the approach mentioned - I maintain email accounts at 3-4 different popular providers anyway. If I do ever notice something fishy I'll send to a couple of them.

Since I'm only using this for personal email, and that's at a lower volume vs. work email with different communication patterns, I think it's a little easier to detect failed sends (in other words, usually some response is expected, even if it's just "ha"/"cool"). But you're right, some might have been lost in the spam folder and never seen.

<comment><USER9> To clarify further:

Uncertainty is the cost of gaining more ownership, and I don't want to downplay that. If I'm sending messages where I want to maintain as much personal ownership as possible, I use my personal mailserver and accept the risks. If I'm sending mail where I need higher certainty and don't care about ownership, I use other providers.

Another commenter said: "if you absolutely depend on the ability to send emails such that your recipients reliably get them, hosting your own email server is extremely tricky." I agree with that -- different communication has different needs/requirements, and a self-hosted mailserver gives some benefits that I really like and that you can't get any other way. I'm just saying for me and for my common uses, it doesn't feel like a constant headache + battle.

</comment></comment></comment></comment></comment><comment><AUTHOR> I wrote this article because I couldn't really find a good email tutorial that included DNS setup. I hope this helps you out. It's 2017 and it's surprisingly difficult to set up an email server, but hopefully this will make it a little bit easier. Please let me know if you need any help or you think I missed something major :D

<comment><USER4> Alas, you haven't extended the self-hosting idea to your blogging. You publish on Blogger, which throws out some garbled js, and otherwise refuses to show up on my screen.

<comment><AUTHOR> Yeah that's true. I set up blogger a few years ago and I just haven't gotten around to self hosting it yet. I have a todo list of things I want to switch over to.

</comment></comment></comment><comment><USER11> I wrote my own receive-only Haraka-based server. The web UI is pretty simple: x-y matrix of small blocks representing received emails with basic info (subject and from address). A column is the account. Clicking an email block brings up full text or html mime content (not rendered).

It's setup to receive everything that's sent to it, which means I occasionally have to delete rando spam. TLS is setup too. But it's an interesting system because you can keep tabs on what exactly you are receiving per service (e.g. using email@example.com), and maybe one day will tip me off to services giving away email addresses.

Otherwise I'm using gmail for personal sending.

<comment><USER10> I've been signing up on sites using unique addresses for each one for about 10 years. I've had two addresses that eventually started receiving spam, one for a small local business and one for Adobe. I'm sure both were due to hacks of those sites, not the customer addresses being sold.

</comment></comment><comment> ryan-c I have been running my own mail server for a number of years. I recently was forced to move to a new IP. I had to get my server listed on DNSWL, then send in manual requests to Microsoft, AOL, and Yahoo to not block my email because they all seem to deny by default.

I also ran through a couple of IPs with my provider before I found one that wasn't on any meaningful RBLs (my IP's on SpamGrouper, but that list is clearly run by an insane person and nobody seems to use it).

As other people point out, some mail providers are just complete assholes and will blackhole your mail with no indication to the sender or recipient that it happened.

</comment><comment><USER12> Echoing to other's thoughts that hosting a server on your own would probably flag you in spam and just be a very tiresome process.

A reasonably good and cheap service I could not recommend enough is [https://www.migadu.com](https://www.migadu.com) . They allow you to use unlimited email domains, storage, addresses with the only limit being on total daily outgoing emails. The mini plan allows 100 outgoing emails a day which is more than sufficient for most of my purposes.

</comment><comment><USER13> Cool article. I personally use Virtualmin for this, it's very easy to set up, you can manage hosting and mail accounts for a bunch of different domains, easily do backups via S3, easy to set up SPF and DKIM, has a good web admin interface, easy to set up automatic updates, etc.

By the way, here's the obligatory HN-style critic of the format, not the content: the blog template in this is a little annoying, it fiddles with scrolling by making it really slow on Safari on Mac, and Reader mode doesn't work.

<comment><AUTHOR> Virtualmin looks pretty cool, that looks like a great option.

Yeah thanks for the feedback, I need to get around to self-hosting my blog as well. I set up blogger a few years ago and I never got around to changing it.

</comment></comment><comment><USER14> Just another data point: I've been running my own mail for more than 6 years and I've never had a problem with receivers.

Hosted on a cheap Strato VServer in Germany, I've never cared for the technical details, could not explain right now what DKIM and SPF are (and they're not configured), and only recently installed a self-signed SSL certificate in my Exim configuration to be able to use it with a Desktop client for submission (pretty sure outbound traffic still runs unencrypted).

</comment><comment><USER15> This is very interesting. Recently I realized that if tomorrow the big G decides to take over or close my email address I lose access to all my online accounts.

Step one to freedom was to use my own domain, redirected to my old account, but I'm seriously thinking about doing it all myself.

But keeping a whole server up to date, secure, etc.... that's a full time job. Is there a good solution?

<comment><USER16> I switched to mailbox.org where I'm a paying customer. That feels better than being a ad target at Gmail.

<comment><USER17> >That feels better than being a ad target at Gmail.

I believe they stopped this recently.

But you could have always become a paying customer of Google.

<comment><USER18> They stopped scanning for purposes of targeted advertising.

However, they still scan and read email. People can't be inconvenienced. I tend to think this is worse than scanning for ads.

I also tend to think anyone concerned about privacy moved from Google long ago. After all, its terrifying when you allow a company to determine if perhaps your received/sent links are fake, or malware, maybe they should report that you like certain sites, or have a flight.. People lived the idea of the President maxing out his power with executive orders, until they didn't.. Life is ask about tradeoffs i suppose..

[http://variety.com/2017/digital/news/google-gmail-ads- emails...](http://variety.com/2017/digital/news/google-gmail-ads- emails-1202477321/)

</comment></comment></comment></comment><comment><USER19> You couldn't pay me enough to host my own mail...

To me it falls under the same category as assembling my own computer. I can do it but to me it's not worth the trouble.

Between DKIM, DMARC, and SPF, security, backup strategy, the fact if you are an open relay for even a day a bot net will find you and get your IP blacklisted for life... or an ISP could just blacklist you because they saw other spam from your same subnet on a shared hosting provider...

Granted this article covers a lot of that (it talks about DKIM, DMARC, and SPF) I'm still counting this as one of the things I outsource.

</comment><comment><USER20> Friends don't let friends host their own email. It's just not worth the hassle these days unless you're managing _hundreds_ of accounts and it's a full time endeavour.

Even at the _hundreds_ level, I'm sure there are people who'd rather outsource. It's not just email that these guys (Gmail, Outlook, Fastmail, etc) provide.

</comment><comment><USER21> I've been hosting my own email server for 10 years until a couple of weeks ago, when I switched everything to gsuite. During the sign up process there is a step claiming "email just got awesome". That's as close of a description of my experience so far as you can possibly get. Email just got awesome.

</comment><comment><USER22> [https://workaround.org/ispmail](https://workaround.org/ispmail)

We used this to setup a multi-domain email server. Works reliably and fast at both sending and receiving mail.

</comment><comment><USER23> I moved from gmail to [https://mailinabox.email/](https://mailinabox.email/) a few years ago and never looked back...

</comment><comment><USER24> [https://github.com/mailcow/mailcow- dockerized](https://github.com/mailcow/mailcow-dockerized)

</comment><comment><USER25> Pro tip: don't do this, use a custom domain name if you want, but never host your own email server.

</comment><comment><USER26> I wasn't aware of mail-tester. Yet another tool for checking my domains. Thanks.

</comment><comment><USER27> Ugh a virtual server running Docker? Dumb. Just install it on the base OS without the overhead.</comment>


Fitting the Facts to the Narrative - <AUTHOR> http://daringfireball.net/2013/07/fitting_the_facts <comment><USER2> What is actually kind of telling is that this matters _so much_ to Gruber that he wrote a blog post about it. It is extremely important to him that there not be any undue perception that Samsung is making more profit than Apple. Why?

Because, I think, a tremendous amount of his world view and many Apple oriented folk like him, is bound up in the idea that Apple's business model is infallibly better than that of the OEM model. It just _can 't_ be true that there is more profit from making "crap" things than making "good" things can it? That selling lower quality stuff can actually be _better_ business than premium quality? (I am of course, taking liberties with the these words). This possibility is deeply threatening to many people who have bound themselves up in the Apple ecosystem. If making better things is, in fact, worse business, what does it mean for people who care deeply about quality? There's a whole mindset, even way of life here that is dependent on this beautiful self- consistent, self-reinforcing ecosystem. Closed, centralized, controlled, designed, simplified, quality AND higher profits all go together. The fact that Apple keeps making more profits than other phone makers has been the last metric that held together this belief system. If it goes, so too while the whole notion that Apple has done something new, different and better. Their rise will once again be seen as an abberration (as he himself refers to in the post).

Of course, the fact that I felt the need to post this rant itself is also telling about me :-)

</comment><comment><USER3> Quoting out of context:

        "that Apple's market domination has been an aberration"
        "that the company in the midst of an inevitable decline"

Let me know when he gets to 2010... [I wrote an email to iOS/Android friend- partisans in April of 2010 predicting the effects of Apple's TOS changes. From my perspective, the TOS itself was not the issue; the orientation to developers was the issue. Pretty much all of the predictions in that email has been realized.]

I do agree with the point that it doesn't matter whether or not Samsung sells more phones or makes more profit than does Apple. But that doesn't mean that ecosystem shifts do not matter. They do and Android seems to be on the winning side of that shift.

This is also not to discount the value of advocating for the "right" side. Dating myself, I advocated for OS/2 in 1992 but my advocacy was drowned out by the dominance of Windows. That said, OS/2 had technical underpinnings to recommend it. At this point, iOS advocacy seems to be focused more on random factors (e.g. color scheme or parallax backgrounds) and less on significant

        Another factor is the strange affliction that causes
        many to believe whatever is attributed to an "analyst"

I assume by "many" he means "no one" since one is either unaware of analysts or, if aware, discounting of analysts.

I'm trying to read DF's article as something besides a partisan apology/explanation, but [as usual] I'm having a hard time. Hints?

</comment><comment><USER4> And yet weirdly, Appleinsider, the source of the alleged debunking, regularly publishes very similar estimates.

Obviously they started doing so when Apple was far in the lead, they'll probably stop after the latest one, which shows that Samsung has now caught up and is only three percentage points behind after closing a gap of 40 percentage points in the last 3 quarters:

"Apple takes 53% of smartphone profits, Samsung at 50%, remainder lose money"

[http://appleinsider.com/articles/13/07/31/apple- takes-53-of-...](http://appleinsider.com/articles/13/07/31/apple-takes-53-of- smartphone-profits-samsung-at-50-remainder-lose-money)

Amusingly, they refer to this as "the latest data to refute a recent claim that Samsung Electronics had dethroned Apple, Inc., in mobile profits." because Samsing being 3, 2 or 1 percentage points behind is _so completely different_ from them being 1, 2 or 3 ahead (and remembering we're talking about estimates here) that it warrants not one but two rants from Appleinsider and John Gruber questioning people's morals and professionalism.

</comment><comment><USER5> I think he's creating his own narrative: that news firms are out to "get" Apple. To punish Apple's wicked ways, or something, I dunno.

The "fact" here is that news organisations _don 't care_ what the narrative is. Journalism has two basic features:

1\. Write something people will read.

2\. By deadline.

If something is unusual, it gets published. If it is normal, it doesn't. If there's a deadline looming, interesting or unusual stories will not be scrutinised with any great care.

Remember: it's called "News", not "Same As Yesterdays".

Incidentally: [http://en.wikipedia.org/wiki/Hostile_media_effect](http://en.wikipedia.org/wiki/Hostile_media_effect)

<comment><USER6> I think you are overlooking the fact he is focusing on the built up "expectation".

It's perfectly obvious the media (social and news) went OTT with this story, but the follow up reality check fell flat.

That's his angle.

<comment><USER5> The reality check is boring, as it affirms the status quo. Doubly boring because the Samsung story is _yesterday 's_ news.

It needs to overcome any number of more interesting stories that are both more timely and more novel.

</comment></comment></comment><comment><USER7> it was amazing, even here on HN, how this analyst report spread like wildfire - while the counter analysis was ignored, both in comments as well as a separate posting.

the global reach of these things is amazing, all tech "reporters" worldwide seem to copypaste in realtime, this piece popped up in germany, etc. right after it hit the US. all the webfrontends for traditional newspapers have separate, lower payed staff that often is nerd-heavy, so more web/tech news make it on their frontpages. and none of them, ever, seem to check facts.

it is an amazing time to manipulate the stock market.</comment>


Assange weasels out of pledge to surrender if Manning received clemency - <AUTHOR> http://arstechnica.com/tech-policy/2017/01/assange-weasels-out-of-pledge-to-surrender-if-manning-received-clemency/ <comment><USER2> I'm not certain Assange has "weaseled" anything in this particular case. Had he not sought an exchange?

The logic of this article would have Assange extraditing himself to the US in 2045 had Manning's sentence not been commuted. What would be the point of Assange handing himself over, in either case?

As it stands, Assange would be a fool to allow extradition now; if Manning goes free anyway, what use is there in Assange's martyrdom?

</comment><comment><USER3> I can't say I'm actually surprised here. I don't know if Mr. Assange appreciates the optics of this move on his part, time will tell on how that plays out.

</comment><comment><USER4> does the article already include information from this tweet? [https://twitter.com/wikileaks/status/821753136692002816](https://twitter.com/wikileaks/status/821753136692002816)

</comment><comment><USER5> This does a lot of harm to Assange if true :-/

Maybe it's time for WikiLeaks alternatives?...

<comment><USER6> why ?

<comment><USER5> Things like the indiscreet way certain material was released (I agree, some of the cables embarrassed the US, but with no clear reason for WL to release them), and some of the politics around its personnel (Assange should never have pledged to submit to the US, them seemingly tack on more conditions).</comment></comment></comment>


Program Induction and Synthesis at ICML 18 - <AUTHOR> https://gfrison.com/2018/08/02/program-induction-synthesis-icml-2018/ <comment><USER2> >>> Neural networks belong to the differentiable realm, while code generation belongs to the discrete

Even a GAN discriminator step to simulate or even compile and run generated program may never produce the desired output. Getting 99.9% accuracy simply won't do in this domain. Even down to the final curly bracket, the program must be perfect.

Thing is we have an excellent model already. Composed of the architectures, instruction sets, binaries and code. A massive search space for x86-64. But perhaps solvable for 8-bit AVR on modern gpu cloud clusters.

</comment><comment><USER3> Two words: loop invariant. Implement a system that figures out the right loop invariant given a problem description (expressed however you want), and you will have made a lot of progress.</comment>


This Is What Common Core Looks Like - <AUTHOR> http://www.erickerickson.org/blog/2014/09/30/this-is-what-common-core-looks-like/

<comment><USER2> Common core is not a curriculum. It is not a textbook. It is not a method of subtraction. There are badly-written textbooks both in and outside of Common Core.

Edit: Here we go, Common Core math standards. Grade 2 starts on page 17. [http://www.corestandards.org/wp- content/uploads/Math_Standar...](http://www.corestandards.org/wp- content/uploads/Math_Standards.pdf) Have a look, it's only 4 pages long.

To be specific, this is a third-grade textbook. Students learn subtraction in previous grades, so this is just a quick review before moving on to third- grade topics like multiplication. Notice the problems at the bottom don't require students to use this particular method. If your third-grader can't subtract, they were already behind before you switched to Common Core.

Also, is the method given really that hard to understand? It's probably not my favorite way to subtract, but it's kinda cool.

<comment><USER3> Just to be clear

"But standardized tests, the SAT, and the ACT are all moving over to Common Core. So our child has to learn this insanity."

which implies that standardized tests test for this particular "counting up" subtraction method. If I understand your statement you are saying that this is not the case.

Right?

<comment><USER4> It's really hard for a standardized test to measure _how_ you subtracted. (Yes, I am aware that it could be done.) But what it really measures is, can you subtract? Do you get the right answers?

Personally, I don't like this approach, because to do one subtraction, you have to do four additions. That's kind of inefficient, in my view. But as sp332 pointed out, the kids should already know how to subtract numbers by this point. If a kid didn't get it before, this curriculum throws a new method at them, hoping that this one will make sense to them. I'm not sure that I have a problem with the approach (though it wouldn't hurt tweak it so as to not confuse the kids who already know how to subtract).

<comment><USER2> I doubt the count-up method was intended to be a new method. I think the new curriculum had it in the second-grade book, and assumed that former second- graders had seen it there. It's not the textbook makers' fault that the school changed between years.

</comment></comment></comment></comment><comment><USER5> This seems like generated outrage.

The OP should take a minute to think about how the method of subtraction works, and then explain it to his kid.

I associate this panic reaction (OP: "this new method makes no freaking sense") with people who are math-phobic. The solution is to just settle down and think about it. (Common core, third grade objectives, number 1: "Make sense of problems and persevere in solving them.")

And, one thing I've learned about elementary educators is that they don't want to fight with parents. (Unsurprising!) So if you say (like OP did), "This common core math sucks," they are going to say, "yes, we don't like it either." If you said it was an interesting way to do subtraction, they'd agree with that too.

</comment><comment><USER6> Back in the days before computerized cash registers, this was typically how cashiers made change. Hand one $5 for a $1.34 purchase, and the cashier counts it back out as

(penny) $1.35 (nickel) $1.50 (quarters) $1.75, $2 (dollar bills) $3, $4, $5

Some still do it that way.

In _Teacher in America_ , chapter "Let _x_ Equal ...", Jacques Barzun mentioned as an example of widespread innumeracy the half-trained cashiers who did not know this technique. That was written in the early 1940s.

<comment><USER7> It's actually a very useful method for quickly finding the difference between two numbers. And I would think that any computer programmer would appreciate the algorithm. The algorithm is a classic divide-and-conquer technique that is perfect for quickly performing arithmetic in ones head. And it would also be a good entre into teaching things like associativity and commutativity.

I use something similar to avoid getting too much change at a cashier, and to use up loose change (pennies, nickels, etc), except I usually count down and add in the difference. So, for example, if some bubble gum cost $1.28, I might give the cashier $2.03. Then, assuming the bewildered cashier doesn't try to give me the pennies back, I get three quarters for laundry, instead of two quarters, two dimes, and two pennies.

If I don't need laundry change, I'll count up or down searching for the amount that will maximally reduce the number of coins in my pocket (without avoiding bills, which would just be annoying to everybody). With practice you can do this in a split second, and it really blows the mind of some cashiers.

Isaac Asimov said something to the effect that smart people will tend to figure out these algorithms on their own. So it's kind of ironic that now somebody is complaining that it's being taught to kids. I suppose the only real legitimate criticism here is that, according to the link, there's only one example of this method, and then it's never mentioned again. If anything, it should be expounded upon.

<comment><USER8> It's a good method for making change, but for doing subtraction in general it is (in my opinion) not so great, the reason being that you have to keep track of more figures in your short term memory, when compared to left-to-right.

To do subtraction by counting up you need to remember: the minuend, how far you've already counted up, and the number you've already counted up to. So, three figures. Subtraction left-to-right (or right-to-left) only requires you remember two numbers: what remains of the minuend, and what remains of the subtrahend. It's pretty easy even for primary school kids once they practice a bit.

Of course, when you're making change, you don't actually care how far you've counted up, because you're not really after the difference exactly, you're only trying to arrive at the correct number of coins and bills. So you can forget that part, or rather you can leave it to the coins in your hand to remember for you, and now you're back to two numbers. But I'd bet that if I asked you to tell me on the spot what the difference was _without looking at the change in your hand_ you'd struggle to tell me.

Making change by subtraction left-to-right is cumbersome because, while you still only need to remember two numbers, after you calculate the difference in your head you must now count out the change, whereas with counting up you're already done.

Different tools for different purposes. I agree with Asimov.

<comment><USER7> In practice you're not doing every step consciously.

Take, for example, subtracting 188 from 500. Count up to 200 to get 12. The difference between 500 and 200, however, is automatic. It takes no thought at all. So you arrive at 312.

Sometimes you can count down, too. Take 512 - 333. That's just 200 - 21. You can find 21 by doing it left-to-right if you want (it's how I just did it).

I'm not saying it's some kind of magical way to handle arithmetic, and it's not something you use to the exclusion of other techniques. Rather, what you're doing is converting the problem to something that is easier to solve. Left-to-right is a very useful, general, and systematic approach to do that, but there are faster ways depending on context. You can analogize it to programming in that you can trade CPU (left-to-right) for memory (cached tables of differences) to arrive at an optimal algorithm for the problem at hand.

So I would just re-iterate that learning these techniques isn't simply for the sake of doing arithmetic faster in your head. Rather, understanding how and why they work, and how to select the methods, improves numeracy in general.

And FWIW, I never look at the change in my hand. I don't literally count up like a cashier might when handing you change. To be honest, until _just_ right now I never really fully comprehended exactly what they were doing. I knew it was similar, but it only now just clicked that they were counting up in a fashion similar to what I've always just done in my mind's eye by breaking up and rounding numbers. (Not that I think I'm particularly good at this--please don't walk up to me on the street and drill me ;)

</comment></comment></comment></comment><comment><USER9> As a homeschooler I think Common Core is a good thing in that it tells you what you need to cover, and it means that I can choose from a lot of different curricula which include it.

If you work through Kahn Academy math, you will certainly run through some of these areas where kids are pushed to do some kind of math problem in a highly stylized way that (i) they struggle with and (ii) don't see the relevance of. Elementary school teachers have told me the same thing, but it is not the end of the world.

There is "no one true way" to do arithmetic. When I was in the fourth grade I had the worst time with 3-by-3 digit multiplication. That didn't stop me from getting a B.S. in Physics and Math, with an A average in my majors, and also getting a PhD in theoretical physics. Recently I read that a lot of other people who were "good at math" struggled with the curriculum when I was a kid so nothing is going to be perfect.

</comment><comment><USER10> I'll echo the comment that Common Core is not a textbook nor a particular way to add/subtract. It's a standard to establish baseline knowledge US kids must master. That blog post is raging about a new way to do subtract which seems to be out of reach for his comprehension, can't teach an old dog kindda thing, so he blames it on Common Core. He also mentioned that there are 4 new ways to do subtraction. This should be good news. Kids/people learns to do things differently. 4 different ways means kids have more arsenals to tackle their problems. I wish I had that learning opportunity! Specifically about that subtraction, did you noticed that it'd make it easier to do the math in your head? maybe there is a reason for the madness after all.

</comment><comment><USER11> Common Core is just fine as a set of standards and has a good shot at being adopted around the world, so we need to get over it. Common Core is going to lead to a lot more innovative solutions, because the market of students on it will be large. It's very nice from a computer science standpoint as well. Check out the game we built at Zeal. While it's a nice simple game on the surface, behind the scenes we are maintaining a complete map of everything every child has mastered in Common Core Math and Literacy K-8, which lets us figure out an ordering of skills to learn and what to do if a child is struggling on a given skill. This is the kind of thing that has been solved in every other industry, but Common Core enables in education.

</comment><comment><USER12> > They cannot help their children. The math makes no sense and seems to offer > no practical purpose other than it is new.

First of all parents were not able to help their children with old methods either. Give someone a pen and paper and ask them how to add 17% to 58. You don't want an answer - just a working method. A lot of people can't do this on paper, but that's okay because we have computers to do that stuff. Lots of people can't add 17% to 58 using a computer. I find that a bit scary.

Going on to the example: I'm pretty stupid; I've often said that I am hopeless at math. I found that single example really easy to understand. I've not had any exposure to similar examples. I don't believe the author is actually baffled by the example. Perhaps a book might help?

[http://www.robeastaway.com/books/maths-for-mums-and- dads](http://www.robeastaway.com/books/maths-for-mums-and-dads)

> What on earth are number bonds? What are partitioning and chunking? And why > does my child look blank - or have a tantrum - when I demonstrate long > multiplication? This book is for mums, dads and grandparents who want to > help their primary school children or grandchildren with maths. To do so, > many parents find they need to overcome their own rustiness and also to > learn the strange new methods and terminology. Throughout the book are > games, puzzles and examples of amusing ways in which kids ingeniously 'get > it wrong'.

</comment><comment><USER13> While I agree that one example is not enough to grasp the concept for most people, I think that the "counting up" method is actually better because it shows kids what is going on in subtraction.

The borrowing method that I learned growing up doesn't make much sense. You just follow the rules with no real reason.

I'm in my third year of college and only just learned why the borrowing method works - and I only learned it because I had to start subtracting numbers in different bases for my MIPS assembly class.

<comment><USER3> Perhaps the counting up method makes it easier for most kids to grasp the underlying concepts. The borrowing method can also teach kids the underlying concepts and follows nicely from addition as it is the inverse of "carrying the 1".

> You just follow the rules with no real reason.

This is the real problem here. We should not teach our kids to memorize a set of rules but to understand the concepts. When I was in school I had a rule that I would not memorize rules that I did not understand or formulas that I could not derive. I would probably be faster at arithmetic if I had memorized my multiplication table like I was supposed to, but I think that rule served me well.

<comment><USER14> When you're in 2nd or 3rd grade, it's more important to learn the mechanics of subtraction than to understand why it works. Kids at that age need to fill their brains with facts so that they have the raw materials for developing understanding when the are more mature and more able to understand.

In this case, borrowing is more compact and efficient. That makes it faster and easier, both on paper and in your head. If you write out the borrowing method as verbosely as this counting-up method, it's almost as easy to understand. However, that's not important in elementary school and shouldn't be done. The counting-up method has the disadvantage that you _can 't_ write it more compactly.

Students who learn the counting-up method will be hobbled in algebra: they'll be wasting their limited brainpower on the mechanics of subtracting the hard way when they could be using an easier method and devoting more brainpower to learning the concepts of algebra.

Of course it's important to understand how subtraction works, but by the time you get to algebra, that should be easy. Anybody who is uncomfortable in their ignorance can either just think about it, or ask a teacher. It's not hard. Just note that 325 = 300 + 20 + 5. Then line everything up and go. That understanding isn't worth a lifetime of pain.

<comment><USER3> I think that understanding basic concepts is foundational. It not only gives you an understanding you can build off of, but also teaches you how to think, how to approach a new problem. You say that kids need to fill their heads with facts, but I think they should fill their heads with concepts that they actually understand. Simple concepts that they understand, not facts, are the raw material for developing more complex understanding when they are more mature.

I realize that I cannot prove what I just said, so perhaps I stated it too strongly. It's possible even, that what I claim is true for some children and what you claim is true for others. I know that an emphasis on understanding has served me well, and that an emphasis on rote memorization has worked poorly for several people I know.

</comment></comment></comment></comment><comment><USER15> Perhaps more disturbing than the author's inability to understand a simple procedure in a third-grade math text is his attempt to cast Common Core as part of an overarching conspiracy of corporations and (of course) government to turn our little ones into docile robots. This is what a nut case looks like.

</comment><comment><USER16> The first two paragraphs illustrate a huge problem with US math education, which pre-dates common core, but is reinforced by it.

That problem is the false belief that numeracy is improved by learning different ways of looking at number operations. (i.e. four ways to subtract).

Our child's second-grade teacher (a very good teacher) has a poster illustrating 7 ways to subtract. Seven ways, no exaggeration. This poster is older than common core.

Students learn math just like they learn to kick a ball. By practicing. Learn one way to subtract, and practice it really really well. Or learn two ways, and practice each way really, really well. Learn more ways if you want, but practice each way really really well. Most math curriculums assume that learning multiple ways is equivalent to (or better than) practicing one way. They don't require the repetitive practice.

As comments have pointed out, the common core standards don't explicitly require this multi-way approach. But the CC standards compound the problem by requiring students to _explain_ concepts in order to demonstrate mastery. Completing lots of subtraction problems with a low rate of error doesn't count. You must _explain_ , in order to understand. And if you _really_ understand, shouldn't you be able to explain different approaches?

I would say no. Or at least, not yet. I don't want a third-grader explaining how to subtract unless they can also finish 50 subtraction problems in a row without pausing to struggle. And if they get the problems right? Good job, you get an A. Wonderful, let's skip grading the explanation because that is subjective as hell.

TL/DR: The article rightly points out a crap way to teach math. Common core is not totally to blame, but it makes a bad problem worse.

<comment><USER17> Which programmer would you rather hire: the one who memorized a particular algorithm but has no idea how it works, or someone who can develop it from first principles and enlightened judgment?

There's no strong reason to glorify one particular subtraction algorithm over another, especially since the actual use case for it is relatively rare.

<comment><USER16> Full agreement - any subtraction algorithm is fine, as long as it's well- learned (which takes a non-trivial amount of practice).

</comment></comment></comment><comment><USER18> I wouldn't fault Common Core. I'd fault the textbook. That little page on counting-up subtraction didn't make sense to me either, so I went to Wikipedia, read this shorter snippet[1], and understood it immediately. That textbook's just crappy.

[1] [https://en.wikipedia.org/wiki/Subtraction#Counting_up](https://en.wikipedia.org/wiki/Subtraction#Counting_up)

</comment><comment><USER19> This is what one implementation of Common Core looks like</comment>


What Toasters and Distributed Systems Might Have in Common - <AUTHOR> https://www.mailgun.com/blog/for-devs/what-toasters-and-distributed-systems-might-have-in-common <comment><USER2> This article described something I've wanted to do for a bit: using PID (and possibly other control algorithms) to control software systems. I've thought about this for a bit and I have some reservations (perhaps unfounded because I'm just not that knowledgeable) actually trying to implement it in live systems:

1\. PID tuning is somewhat non-trivial. It's interesting to see that the author was able to tune their PID using a simulation. This is something I've thought about doing for a while but I don't know how I can effectively validate that the simulation approximates reality to an reasonable extent. Sure I could build the simulator and validate it against the live system, but the resource spent doing that might be better off just improving the live system. It would be nice to have some theoretical arguments over why the simulation would be correct. Now this shows my lack of knowledge, so perhaps someone else knows how to deal with this more effectively.

2\. Software systems these days are always changing, especially when these things are running on your servers that you're constantly updating. Tuned PID constants are only valid for a particular system configuration (the "plant"). If the plant changes too much, the controller performance can degrade, or worse: it can become unstable and blow up. This makes any system controlled by the PID difficult to change: you want to avoid changes to the system because that means you have to retune the PID, which may be difficult to perform. This effectively becomes a technical debt, especially if the original author of the PID no longer works on that project (and assuming only a few knows how it works to begin with).

There are some other thoughts about non-linearity of software systems. Although these are routinely dealt with in the real world, it makes a topic that's already somewhat complex even more complicated, which further adds to the non-maintainable status of the controller.

This all makes me feel like PID may not be the best choice in software systems, but I don't have concrete proof either.

Sorry if this felt a little bit rambling. It's something that has been on my mind for a bit but I haven't had a chance to formalize.

<comment><USER3> Regarding the point that the software systems being more flexible. A nice thing about controllers such as PID is that they deal well with disturbances and changing environments. In this particular case the PID controller runs alongside the system with a fixed sampling rate. It means that it does not really care about dynamics of the system in control. Say we want to update the caching TTL and that affects how the system behaves. The PID algo only cares about the delta of the error over a fixed period of time (sampling rate) and will adjust accordingly. Also, as mirceal mentioned, there are autotuning algos if it gets really bad.

Unfortunately it is a problem if the system changes too much the algo can stop working properly. But that could happen any time you make a major change in any complex system. To me it's more of a problem of testing and sanity- checking, not of PID or other control algorithms. When you get to a certain point of complexity, testing all possible conditions becomes unrealistic and that might lead to bugs when a big part of the system gets rewritten.

On the point that only a few engineers might know how it works. One of the purpose of the article is actually put an idea out there to make more engineers familiar with the concept and collect some feedback. :)

I'll update the comment with "On non-linearity of software systems" when I get a chance. This is actually a really good one and I have a few thoughts about it.

<comment><USER3> On non-linearity of software systems. Correct me if I'm wrong but I'm assuming you mean it in a sense of being probabilistic and not easily predictable. Which is an interesting point because a lot of modern algorithms are like that. Let's take neural networks. Being able to explain what the model is doing and how to make sure it's correct is a whole area of research. For example, the results of a convolutional net can change drastically by altering a single pixel in an image[1].

We also faced with a problem of explaining a machine learning model that was much simpler than a neural net. It is a global problem and unfortunately I don't have any solution of the top of my head.

[1] [https://arxiv.org/abs/1710.08864](https://arxiv.org/abs/1710.08864)

</comment></comment></comment><comment><USER4> [http://nikital.github.io/pid/](http://nikital.github.io/pid/) is really neat.

I do wish it either had an option for a saturated integral, or had an option for "wind" blowing in a particular direction as any significant change to the setpoint will make large integrals useless and small values have little use absent a force for them to counteract.

<comment><USER4> Why complain when it's open source: [https://jasom.github.io/pid/index.html](https://jasom.github.io/pid/index.html) has both improvements I suggested, plus a display of the X and Y error values

<comment><USER5> Cool, I made this toy some years ago :) Thanks for the additions, merged your code into the original.

</comment></comment></comment><comment><USER6> Wasteland? [0] [1]

[0]: [https://en.wikipedia.org/wiki/Wasteland_(video_game)](https://en.wikipedia.org/wiki/Wasteland_\(video_game\))

[1]: [http://wasteland.wikia.com/wiki/Broken_toaster](http://wasteland.wikia.com/wiki/Broken_toaster)

</comment><comment><USER7> "IP warmup." Is this an algorithm to send broadcast emails at the maximum rate that avoids ISP spam detection? I find this concept disturbing. Morals of spam aside, we have two systems clearly working at odds rather than doing productive work.</comment>


How Can Yahoo Afford To Give Flickr Users 1TB Free Cloud Storage? - <AUTHOR> http://www.zetta.net/blog/cloud-storage-explained-yahoo-give-flickr-users-1tb-free/

<comment><USER2> I grant that I could be wrong as I'm not a hardcore Flickr user and don't have access to the statistics that Yahoo has on usage patterns. However, I'd bet that the overwhelming majority of people that would use Flickr won't come close to using anywhere near 1 TB of storage anytime soon.

More than anything, I think their announcement is really just a smart marketing gimmick that gets them on peoples' radar and gives them nerd credibility without doing much extra.</comment>


Two new cannabinoids identified - <AUTHOR> https://www.nature.com/articles/s41598-019-56785-1 <comment><USER2> To be clear, there are tons and tons of cannabinoids that have been identified (see here: [https://en.wikipedia.org/wiki/Synthetic_cannabinoids](https://en.wikipedia.org/wiki/Synthetic_cannabinoids) and here: [https://en.wikipedia.org/wiki/Endocannabinoid_system](https://en.wikipedia.org/wiki/Endocannabinoid_system) and here: [https://en.wikipedia.org/wiki/List_of_designer_drugs#Synthet...](https://en.wikipedia.org/wiki/List_of_designer_drugs#Synthetic_cannabinoids)). What's particularly interesting about these is that they're phytocannabinoids, meaning that they're present in (at least some) cannabis and can help explain why folks don't respond to pure THC in the same way they respond to cannabis. The article mentions this a few times, but sadly it doesn't delve too deeply into what the parts of the cannabis effect profile might belong to THCP.

These aren't the first non-THC, non-CBD phytocannabinoids identified, here are the others currently known: [https://en.wikipedia.org/wiki/Cannabinoid#Cannabis- derived_c...](https://en.wikipedia.org/wiki/Cannabinoid#Cannabis- derived_cannabinoids)

<comment><AUTHOR> It would be interesting to see what levels of THCP (and CBDP) are in commercial cannabis. And they didn't do the _in vivo_ work with CBDP, which may be more tolerable to medical users since we try to avoid intoxicating compounds in medicine... yet we still have many pharmaceuticals that can get you high (e.g. opioids).

I am sure (I hope) we will see follow up studies with a variety of _in vivo_ work.

</comment></comment><comment><USER3> I'd like to see more research on _already known_ cannabinoids. From what I've read, the effects of CBD on its own are pretty limited; most of its strength lies in "entourage effects" when combined with THC. The same seems true of CBG and CBC, though (possibly) to a smaller degree. I'd rather not have to take THC to get the others' analgesic, anti-inflammatory, or anti-viral effects. Research oriented toward THC alternatives or additives that minimize its psychoactive effects while still unlocking CB[CDG]'s effects would be great. Anybody know of any?

<comment><AUTHOR> Totally agree. I honestly think the research is way too limited, but the entourage effect looks promising. But you are right, when we talk about the entourage effect we usually only think about THC and CBD.

Not sure if you have seen these reviews (below), but they might be a good place to reference from. Ethan Russo seems to be the major authority on the subject. Although he is associated with GW pharmaceuticals, the producers of Epidiolex (CBD) for seizures.

[https://www.researchgate.net/publication/317354478_Cannabis_...](https://www.researchgate.net/publication/317354478_Cannabis_Pharmacology_The_Usual_Suspects_and_a_Few_Promising_Leads)

[https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6334252/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6334252/)</comment></comment>


Show HN: A place to privately save embedable media (youtube videos etc) - <AUTHOR>

LideoApp: http://lideoapp.webfactional.com
So this is my first actually public side project. It's quite rough around the edges but what the hell, it works.
I wanted a place to save videos/embedable media I find online. I don't want to Share it on Facebook, I don't want to Favorite it on YouTube, I just want to keep it somewhere so I can watch it later. I could just bookmark it but then I'm left with a bunch of bookmarks to sort through.
What this does is simply save the embed/oembed data of a URL resource, let you rate it (1-3) and add it to a list.
So what are your thoughts on this? Would you use it? <comment><USER2> I prefer RadBox <http://radbox.me>

They support most of the video sites.

<comment><AUTHOR> That is certainly more polished. It seems that they get their data from oembedly as well, so support for sites is probably the same.</comment></comment>


Cash is still king: San Francisco to ban credit-only stores - <AUTHOR> https://www.sfgate.com/business/technology/article/San-Francisco-to-join-list-of-those-banning-13824319.php <comment><USER2> I ran a pop up shop and totally understand not wanting to deal with cash. It adds overhead (counting, bank runs, accounting entries) and puts you at higher risk for robbery.

But I also use cash for most of my daily purchases, because I don't trust banks to not sell my spending habits.

It's a complicated situation, and for now, requiring cash is a smart move. Most people will default to cards (most places I go buy from, turn on the card reader before even asking if I'm using cash), and we'll probably end up there eventually. Hopefully, not before better consumer privacy regulations.

<comment><USER3> The government could help make this better for stores by allowing a "cash receiving machine" which destroys and counts all cash put into it.

The government can then print/make new cash, while the business gets that credited to their bank accounts.

Now the business doesn't have on-site cash to handle.

The cost of reprinting money is pretty low, especially considering how few people use cash.

</comment></comment><comment><USER3> Businesses can get round this ban by saying "we accept cash, but don't give change".

Lots of vending machines/parking meters already do this. It dramatically simplifies cash handling, because now all incoming money can just go in a theft proof in-only safe.</comment>


Ignite 100, The UK YC? - <AUTHOR> http://ignite100.com/

<comment><USER2> It seems to me that what the UK is crying out for is not a "UK YC" but actually YC. I see lots of activity here in London and I'm guessing that if there were an outpost of YC there'd be a ton of people applying.

Also, whenever I see these programs with a ton of mentors (<http://ignite100.com/view/mentors/>) I think "quantity over quality". Look at YC: a tiny team of people. You don't need 50 mentors, you need three good ones. Also, Ignite 100 looks like it is a rebranding/relaunching of a previous program called The Difference Engine. I'd like to see some successes from that before judging this program.

And there are quality VCs in London (e.g. Accel has a major office here).

<comment><USER3> Agree on the quality/quantity point - I haven't even heard of most of the companies these mentors work for and I'm always a bit dubious when someone describes themselves as a 'serial entrepreneur'.

However, the fact that there are quality VCs in London doesn't help much if you're 'up North' (yes, there is life beyond Watford). It's good to see something like this outside of the South East region.

<comment><USER2> The problem with geographical dispersion is exactly what YC worries about too. Initially YC was Boston + Silicon Valley and then became Silicon Valley only. If you were going to do a non-Silicon Valley YC then you'd need to put it somewhere where there was high connectivity between entrepreneurs, VCs, engineers, etc. etc. You really need the ecosystem.

In Europe there are probably only two places like that: London and Berlin. And I'd argue that Berlin is far behind London. You could include Tel Aviv as well at a pinch.

</comment></comment></comment><comment><USER4> Hi guys. Lots of very interesting points.

ignite100 is essentially a private sector spin-out of the Difference Engine.

One of the key issues accelerator models have struggled with is what happens post programme. The additional funding allows teams to maintain momentum after the programme and create a runway to the next funding round.

Happy to take any questions here, or you can get me at jon at ignite100 dot com

<comment><USER5> How about a Accelerator that caters for single founders? I wrote a post about it here: [http://chestergrant.posterous.com/proposal-for-a-single- foun...](http://chestergrant.posterous.com/proposal-for-a-single-founder-seed- fund)

</comment></comment><comment><USER6> From the about page: "The founders move to Newcastle..."

 _Closes tab_

<comment><USER7> I wouldn't downvote this. England is not like the US, where there are many "hub cities" which are all the centre of something. England has effectively got just one centre: London. And living in London is very, very different from living in any other place in England. For one, there are far fewer British people in London. It's a cosmopolitan, international metropolis, with all the benefits that brings.

Asking people to move to Newcastle would be a bit like asking people to move to, picking a random one, "Tulsa, Oklahoma". Sure, it's a city, and there are people there and all that, but... why the hell would you move your startup there?

<comment><USER8> You're not really 'moving' your startup. The founders are just spending 3 months there. Where they end up after that is up to them.

I don't see any harm in spending time in a place that (potentially) has fewer distractions so you can actually build stuff. Besides, I think you're doing Newcastle a disservice. Sure, it's not London but it's still a pretty big city.

<comment><USER9> The size of the city isn't an issue. Jupiter is a pretty big planet but I wouldn't want to live there.

Newcastle is a weird choice, it's not the first place most people would choose to spend time in and it's miles away from what is becoming a decent tech ecosystem in East London. Why not do it there?

</comment></comment></comment></comment><comment><USER10> I have to agree that the location won't help Ignite100. Though Ignite100 may help the North East.

If I had to choose between moving to the North East to be part of an incubator or moving to London and going it on my own, I'd still choose London, The probability of chance opportunities, networking and connections are far higher in London and these things make the difference. Even YC was moved to Silicon Valley because the cultural pull meant businesses would benefit from being there.

As someone who has recently been part of a UK incubator scheme outside of London and "up north" the mentoring side of it had neither quantity or quality and it was a compulsory expense, paid for out of our funding. The best parts of the scheme were interacting with other startups and the support from the staff administrating the scheme.

The fact that YC accepts global applications gives me great hope. When I think of YC, I think of founders/mentors that champion, encourage and problem solve with the teams, Super smart, dedicated applicants willing to travel around the world for a 10min interview.

I wonder how many applicants to Ignite will come from afar?

I still have my sights set on YC, Though I'm still looking for the right co- founder.

<comment><USER2>
       compulsory expense, paid for out of our funding

Compulsory and paid from your funding? WTH?

<comment><USER11> Yeah, we were told our funding amounts and then advised that around £1200 (which in my case was about 15%) of this had already been allocated to cover training, office space (which I never used) and mentor meetings.

Some of the other businesses only got a small amount of funding to start with which left them with very little after subtracting this expense.

However, just to have had a place or any funding at all in the UK in my opinion is a great thing.

I think YC have it spot on, their funding is the right amount to allow a team to concentrate on their idea yet not so much that they can be complacent about running costs.

I still had a full time job whilst part of my incubator. The funding couldn't be used for living expenses.

I wonder how much further along I would be now if that wasn't the case.

I think great things happen when afforded the time to focus on that one thing.

</comment></comment></comment><comment><AUTHOR> From the Site -

It's a straightforward deal. Each team will receive £5,000 per founder (to a maximum of £15,000) for which we will accept 8% of founder shares per start-up (not per founder). We do not have any strange terms and conditions and we align ourselves entirely with the other founders of the business – effectively becoming a co-founder of the business. In addition, we provide you with office space and other services from various partners including hosting, legal and professional services etc. Subject to the teams achieving pre-agreed milestones, the balance of the £100,000 will be released in the form of a convertible loan with a discount of 20% against the next funding round. Teams are not obliged to accept the loan note at the end of the programme.

<comment><USER12> _Subject to the teams achieving pre-agreed milestones_

Wonder what they are. Doesn't sounds so simple to me.

<comment><USER13> i guess pre-agreed means that both sides decides what milestones can be achieved during the programme

</comment></comment></comment><comment><USER14> isn't 8% a lot of equity for less money compared to other incubators?

</comment><comment><USER15> anyone know the relationship between this and springboard? Seems to contain a lot of the same people, even some of the pages looks similar to the sb site?

<comment><USER8> Same guy running it (jdbradford). It'll be the 4th accelerator cycle he's run (3rd in the north-east).

<comment><USER16> Makes me wonder why there are so many iterations. Also, have there been any interesting success stories to come out of his accelerators?

<comment><USER17> Three I know of:

[http://eu.techcrunch.com/2011/01/27/screenreach- raises-50000...](http://eu.techcrunch.com/2011/01/27/screenreach- raises-500000-for-its-screach-app-and-platform-for-smartphones/)

[http://eu.techcrunch.com/2011/05/23/loveyourlarder-wants- to-...](http://eu.techcrunch.com/2011/05/23/loveyourlarder-wants-to-be-an- etsy-for-foodies/)

<http://techcrunch.com/2010/11/23/curated-by/>

Not sure about Springboard, the programme is still going on.

<comment><USER18> Yep, first cycle of Springboard will finish end of July, so let's see what happens from there!

</comment></comment></comment></comment></comment><comment><USER19> seems like the signup form is broken.

<comment><USER20> what's broken? seems to work for me

<comment><USER19> Well, I signed up with an email address and a password with special characters in. I got "invalid email/password combination" When I retried with a different password it complained that an other user already registered with that email address.

I then retried with a different email address and dead simple password and got the same.

</comment></comment></comment><comment><USER21> Why do we keep hearing about London-based incubators, but then all the great European companies are born elsewhere?

</comment><comment><USER22> What explains the proliferation of UK incubators, given the rather modest success achieved here with similar programs?

<comment><USER2> My take is that it seems like easy money for the people who create these incubators. They don't risk much cash and they hope that they'll find the next Zuck and make a packet. Given the strong FS sector in the UK it's not surprising that there's money chasing ideas.

If you look at the list of mentors etc. involved in these incubators they tend to be second-rate. I got invited to be a mentor in one of these programs and the participation required from me was really minimal yet my name would be all over the thing. I wasn't able to take part because of other commitments, but it strikes me that there's a real quantity over quality problem.

My (jaded) view is that it's a version of new adage: "those that can do, those that can't incubate". That may be unfair to these specific folks, but until we see some success from these incubators. Compare, for example, all the effort in branding/marketing these programs to the effort YC spends on the same. You do not need a slick web site and list of mentors to make this stuff work. Hello, you can even use HTML tables for layout and still get people who do cutting edge web work in your program. What you need are quality principals.

I'd be happy to work for a real YC-like in London (actually, it would probably have to be YC itself) because you'd be working in a really small team of really smart people. Not in some massive team of 'mentors' who aren't providing a great deal of value.</comment></comment>


Doing a project with my retired father - <AUTHOR>

My father has recently retired so he has a lot of spare time. Being capable of using the web and fluent in English I was thinking of creating a web application where he can be the operator. I was thinking of web shop or a web brokerage where he can move the orders from the website to the provider.<p>Do you have any other ideas? <comment><USER2> Your father may be retired but he's not yet braindead. He is a person, he has needs, friends, interests and he moves in a different circles to you. It would be in your interest to tap this information - find out what the pain points in his circles are and develop products for those. As a rule of thumb older people tend to spend a lot of time and money on procuring chronic medication. There are many other opportunities which you may not be aware of, but your father may be aware of. Try that first...

<comment><AUTHOR> Actually my father is in great physical shape. he runs, goes to the gym and rides his bike on a daily base.

the reason he wants to do this is to make another lucrative activity.

the question is more about the kind of services that might be lucrative, with one person operating the site.

</comment></comment><comment><USER3> Sounds like a great idea. Think its important he has a genuine interest in what it is he'll be doing, if possible. Maybe have your Dad note down all the things he finds clunky on the web for the next fortnight and build something to help him out, something he can have input in and use to help and sell to others.

</comment><comment><USER4> What sort of hobbies does he have? You could try and start a shop or expert site around that subject.</comment>


Error handling in Rust - <AUTHOR> http://blog.burntsushi.net/rust-error-handling/ <comment><USER3> Yes, it really is that complicated. It's quite elegant in its way. If you start from the proposition that you don't want exceptions, you don't want Null, everything is strongly typed, error types are not hierarchical, and functional programming with lambdas is reasonable within sequential code, this is where you end up. It's logical, but not fun.

I wrote an RSS reader in Rust, and all the code required to compose all the error types (I/O, HTTP, XML, RSS, date formats) into a custom error type is as bulky as the modest amount of code that does the useful work. That's not a good thing. Having to write all that error handling code up front is going to be a big problem for the Agile crowd. This may be a major drag on Rust adoption.

All this error machinery is in Rust to avoid exceptions. That may have been a mistake. Exceptions have the good property that they can't be ignored - <USER2> they're not handled, you get a reasonable program termination. If there's a reasonable exception hierarchy, you can catch an exception near the root of the tree and get all subsidiary exceptions. (It took three major revisions of exception handling before Python got that right, but it finally did.) Rust doesn't have an error hierarchy like that; you can't just check for "RuntimeError" or "EnvironmentError" and get all the more detailed errors. You have to combine error types yourself, as the article shows.

I really want Rust to succeed, but I think they took a wrong turn with error handling.

<comment><USER4> Some people need to use Rust in places where exceptions aren't allowed (because the unwind tables and cleanup code are too big). Those people include virtually all browser vendors and game developers.

Furthermore, exceptions have this nasty codegen tradeoff. Either you make them zero-cost (as C++, Obj-C, and Swift compilers typically do), in which case throwing an exception is very expensive at runtime, or you make them non-zero- cost (as Java HotSpot and Go 6g/8g do), in which case you eat a performance penalty for every single try block (in Go, defer) _even if no exception is thrown_. For a language with RAII, every single stack object with a destructor forms an implicit try block, so this is impractical in practice.

The performance overhead of zero-cost exceptions is not a theoretical issue. I remember stories of Eclipse taking 30 seconds to start up when compiled with GCJ (which used zero-cost exceptions) because it throws thousands of exceptions while starting.

The C approach to error handling has a great performance and code size story relative to exceptions when you consider both the error and success paths, which is why systems code overwhelmingly prefers it. It has poor ergonomics and safety, however, which Rust addresses with Result. Rust's approach forms a hybrid that's designed to achieve the performance of C error handling while eliminating its gotchas.

<comment><USER5> The argument made by others--that you are working from a mental model of exceptions as made popular by Java as opposed to as a generic language feature for removing boilerplate (essentially a syntax sugar for a specific kind of error monad)--should be well examined (and I don't want to detract from it, as it is really important and seems to have colored your perception quite badly :( enough that it seems to have led you astray even in this comment... one of the big issues with Java exception performance is the required reification and storage of stacktraces, a language quirk that gcj must honor), but I am going to bring up a related one of error handling performance: C's error handling is _expensive_ (in addition to being verbose and unsafe, Rust sadly only trying to work on the latter) because it requires functions that could possibly return an error but normally don't (which certainly should be "all functions that claim to return errors", though I will argue is actually the set of "all functions", but this is a longer argument) to have to go out of their way, moving around values in registers at minimum, to indicate "success".

C++ zero-cost exceptions make successful code run fast--faster than the equivalent successful C code--and in the cases where the compiler infrastructure (or more likely in 2015, cultural baggage, as it really doesn't take much effort to bootstrap exceptions) or memory constraints prevents them from being used, the great thing about the C++ mindset is that they don't cost you anything to ignore: even in a program that has exceptions elsewhere, if your code doesn't need unwind semantics (and a lot of code doesn't), you don't take any overhead; and, as kernel and game developers also often build their own data structures--not to avoid exceptions, but for other important pragmatic reasons (including but not limited to virtual memory restrictions, control over non-determinism, and extreme case-specific optimization)--it is easy (and, I would argue, strongly preferable) to free most developers from frustrating error handling boilerplate while still seeing (as we do) the developers who somehow need to avoid these features having no issues doing so (as we do in the C++ community).

<comment><USER6> Zero-cost exceptions are occasionally required for performance, yes. They usually aren't--I think the strongest argument for them is in parsers, where you may be performing _tons_ of I/O that could potentially error and don't want to bloat the icache with result handling. Either way, for two reasons (performance, and making sure you can catch exceptions at C FFI boundaries) Rust provides a `catch` in unsafe code. What it discourages is using them for semantic reasons.

I wish you would be more realistic about the tradeoffs of exceptions, though. The win in compile time alone from not having landing pads everywhere is substantial, and the "error handling boilerplate" you discuss isn't generally agreed to be boilerplate.

<comment><USER5> A big argument for using systems programming languages is thay they are fast: you are writing code that is compiled once and run thousands of times per second on millions of computers. Why would I care so much about compile-time performance? If I need a faster compiler mode during development (though in my experience, the pain of C++ compile times is due to its muti-stage transformation and lack of separate compilation for templates, not its exception handling... I don't find my projects that turn off exceptions to compile much faster), the compiler can also implement a really slow mechanism for exceptions as an alternative.

I also maintain that requiring the developer to do manual error propagation to get errors from the point of failure to the point of reporting to the administrator or the operator (which is what happens to almost all errors, whether you are writing a command line tool, a graphical application, or a website) is "boilerplate". At the simplest, without changing the error model, littering the code with calls to try! that push the error upwards is automatable (and I have a friend working on a compiler plugin to accomplish exactly that).

An example: I like statically-typed languages, but as demonstrated by languages with type infererence, having to declare every type every time it is used is "boilerplate", especially if types are long and unwieldy. C++98 has typedef, which lets me take C++'s long and unwieldy type definitions and make them shorter. If you are used to typing them out manually, every single time, some might even claim this is "ergonomic". However, C++11's auto is much better, and as demonstrated by languages like OCaml and Haskell even that isn't as good as it can get. C and Go have long and unwieldy error propagation (checking flags and manually returning new ones). Rust provides macros and tooling for this that make it safer (no more "goto fail;" or "Rage Against the Cage" exploits) and easier (like typedef!), but that doesn't mean it isn't still "boilerplate".

<comment><USER6> I mean, sure. But I've personally benchmarked a lot of code that uses Result and noted where it caused performance issues, if it did, fixed the code so it didn't anymore, and moved on with my life. Most of the time, it wasn't even close to being a bottleneck--most of the time the branch is correctly predicted and the time is just spent copying bytes for the `Ok` value, which is basically a nonissue if you can keep your error word-sized unless you're calling a tiny function in a tight loop that LLVM can't inline for some reason. OTOH, landing pad generation in Rust probably doubles its compile time, which is already pretty slow (which is one reason I personally will probably just compile with panic! -> abort, when that option becomes available).

I don't consider the error handling boilerplate because I do frequently want to recover, even from supposedly fatal errors. For example, if I'm handling an iterator of things, and some of them fail, I still usually want to keep processing them before I return the error. Exceptions lock you into a very rigid pattern of error reporting that make that much more difficult to deal with. Because libraries don't _assume_ that I want to fail when they do, it can be easy and fast for me to do this, even for pathological inputs; that wouldn't be the case if everyone used exceptions.

I agree with you that Rust could do better at providing options for error reporting with panic. I believe there's an RFC about that right now, please comment on it!

<comment><USER5> I have been a games developer in a past life (my primary focus for over three years), and I am unconvinced I or any of the other people I worked with would have been willing to tolerate a low-grade performance degradation distributed around all of our code if we had access to programming languages that did not have that issue and weren't infinitely worse (and while I really wish I could use Rust, it just isn't infinitely better in a way that seems relevant for either the hardcore or casual gaming markets). Also, it sounds like there is something wrong with the Rust compiler if this landing pad generation really _doubles_ the compile time... a poor compiler should not influence the language design in such a negative direction.

Solving problems like your iterator issue should not be difficult with exceptions: in fact, frankly, I don't see why it is any harder than with Result: your worst case is that you start with a primitive, "antitry!" (which should be called "try!", as it makes more sense than what "try!" currently does for that word) which performs an operation and returns a Result of either its value or its failure. Even if you do this "frequently", I would be shocked if this was remotely as common as the code that was assuming success and just wanted to fail if something fails. And, as long as you aren't trying to "handle" those errors (and it doesn't sound like you are, you just kind of want to fail out with a list of failure reasons) there is no semantic complexity either. Exceptions are the flexible primitive, not Result: simulating Result from exceptions requires a tiny finite amount of code, while simulating exceptions using Result requires modifications to an arbitrarily large amount of code.

As for fixing panic, what really sucks is that so much library code is going to be written using Result now when much of it should have been written with panic, both in the core library and from third-party developers, meaning that the boilerplate is going to be somewhat inescapable at the lowest levels of the program... I think the thing I like most about programming in Python vs C++ is that I don't have to wrap every single API I use to make it handle errors in a sane way. I don't think that fixing panic at some point in the future is going to work as there seems to be such awkward community momentum against exceptions and behind Result, when the real RFC needs to be "when you write your library, try to use panic, not Result".

<comment><USER6> > Also, it sounds like there is something wrong with the Rust compiler if this > landing pad generation really doubles the compile time... a poor compiler > should not influence the language design in such a negative direction.

Um, actual, non-trollish question: do you know how exceptions are implemented? Because I can't think of a way around this in a language with destructors, short of some sort of "doesn't throw" effect (which Rust doesn't currently have) or aborting on every exception. Do you have any pointers? Similarly, I don't understand how your "antitry" solution would be efficient on pathological input--"zero-cost" exceptions are far from that when the exceptions actually happen (and can be made to happen by malicious users). You also haven't addressed how I'm supposed to know to use antitry in the first place, which is one of my biggest issues with unchecked exceptions--again, the only alternative I see is a "throws" effect. All of these are language level concerns, not implementation-level ones.

> Exceptions are the flexible primitive, not Result

Catchable exceptions require coding transactionally if you want to use them everywhere and maintain strong exception safey. There's an enormous cost associated with that too; and worse, it can't be checked by the compiler.

Again: I have actually benchmarked a lot of code that uses Result, explicitly checking to see if it was a performance issue. It's almost never a performance issue. So performance-related arguments for why exceptions should be used everywhere are going to fall on deaf ears here. I am far more interested in seeing whether we can eliminate panics altogether for most of the common cases (e.g. with compile-time checked range types).

</comment></comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> One of the reasons I'm really excited for stability is that people can start to write things like this, knowing that the effort is worth it, as it won't suddenly stop working tomorrow.

Next week, burntsushi and I are going to talk about rolling this into the official documentation.

<comment><USER7> Yes, I'm very glad to see Rust stabilizing. I wrote a few personal projects in it earlier this year, and now none of it compiles. I'm very excited for Rust, but the instability has put me off learning in-depth.

<comment><USER8> That sounds terrible, is Rust that unstable in practice today? I remember hearing that the language had mostly stabilized at the end of 2014, but anecdotes like yours are discouraging.

<comment><USER9> There had been some breaking changes going on towards the 1.0 release. The first alpha to clean that up was in January of this year which really started the move to stabilize a lot of things, but there were still some breaking changes (I know there were a few around IO). It went beta back in April and there haven't been any serious breaking changes since (that I know of, I'm only following things not a rust developer). Tomorrow it'll be released as the 1.0 stable version that from then on you won't have any breaking changes (until 2.0, or whatever the next version is). That's not too unusual for a language that has been evolving the way rust has, you just can't avoid breaking changes for a while until you actually figure out what works the way you're after. But kudos to the rust team for getting it this far; I can't wait to see all the celebration tomorrow.

</comment></comment></comment></comment><comment><USER10> How about separate the processing code from error handling code into a block of it's own. Like this:

            fn file_double<P: AsRef<Path>>(file_path: P) -> Result<i32, String> {
    		let mut file = File::open(file_path);
    		let mut contents = String::new();
    		let read_Result = file.read_to_string(&mut contents);
    		let n = contents.trim.parse::<i32>();
    		let result = 2 * n;

    		error_handling {
    			file: None => Err("Failed open file"),
    			read_Result: Err(err) => Err(err),
    			n: Err(err) => Err(err),
    			_success: Ok(result)
    		};
    	}

The compiler would then convert each error handling case into early return statements in the places where assignment is made to the specified variable.

<comment><USER11> I'm not sure how that's supposed to work. For example, you have `file.read_to_string`, but in your code, `file` is a `Result`. So you'll need to use `map` I presume.

I personally like the style that `try!` encourages.

</comment></comment><comment><USER12> Awesome article, but I'm stuck on the "error-double-string" example:

        ...
        argv.nth(1)
            .ok_or("Please give at least one argument".into())
            .and_then(|arg| arg.parse::<i32>().map_err(|err| err.to_string()))
        ...

What is str::into? I find the documentation is really hard to navigate for a Rust newbie like me: here's what I've tried:

1) Search "into" on the API docs. I find ([https://doc.rust- lang.org/std/convert/trait.Into.html#tymeth...](https://doc.rust- lang.org/std/convert/trait.Into.html#tymethod.into)) and see that str implements this trait to convert it to a Vec<u8>. Not seeing the need for a conversion to Vec<u8> I...

2) Search "ok_or": I find ([https://doc.rust- lang.org/core/option/enum.Option.html#metho...](https://doc.rust- lang.org/core/option/enum.Option.html#method.ok_or)) but I still don't see why the string has to be converted to Vec<u8>.

3) Maybe literal strings are Vec<u8> and into() just is used to convert a Vec<u8> to str. Can't find any documentation on that, and seems fishy if it were the case.

4) Try googling "rust str into" with useless results. Not Rust's fault here :)

I haven't used Rust yet but often try to read other people code and understand what's going on, and everytime I hit the API docs I'm filled with despair that I can't find what a function is supposed to do.

Again, I'm a noob. I must be doing something wrong..

<comment><AUTHOR> One thing you can do when you're confused about a type is to remove the call, and see what happens:

        error: mismatched types:
         expected `core::result::Result<_, &str>`,
            found `core::result::Result<i32, collections::string::String>`
        (expected &-ptr,
            found struct `collections::string::String`) [E0308]
        hello.rs:6         .and_then(|arg| arg.parse::<i32>().map_err(|err| err.to_string()))
                                           ^<comment><comment><comment><comment><comment><comment><comment><comment><comment><comment><comment><comment><comment><comment><comment><comment>
        hello.rs:6:25: 6:74 help: pass `--explain E0308` to see a detailed explanation

In other words, without the call to `into()`, we expected a &str, but got a String. This `into()` call is the first one that you found, but, through some magic, it's not clearly obvious, it's true. The secret is Into's opposite, From: [https://doc.rust- lang.org/std/convert/trait.From.html](https://doc.rust- lang.org/std/convert/trait.From.html)

There's a generic implementation in the standard library:

        impl<T, U> Into<U> for T where U: From<T> {

In other words, anything that implements From, implements Into as well. So generally, things just implement From, and take advantage of this blanket implementation.

With this knowledge, this From implementation makes sense:

        impl<'a> From<&'a str> for String

We can convert From a String to a &str, and hence, we can convert a &str Into a String.

This kind of type shenanigans is _very_ powerful, but admittedly, a bit confusing.

<comment><USER12> So

        "foo".into()

could be expressed as

        String::from("foo")

I would personally use the latter form as it is easier to parse and reason about. Thanks for the explanation!

<comment><AUTHOR> Yup! Yeah, it really depends on your style. Rust tends to prefer methods to free functions, due to multi-dispatch, but there's a good argument for either style.

Furthermore, there's a non-generic version of this particular conversion:

        "foo".to_string()

And, a generic version that expresses a different semantic:

        "foo".to_owned()

Strings are a very common type, and so implement a _lot_ of these things, even when this kind of usecase may overlap.

<comment><USER13> > Strings are a very common type, and so implement a _lot_ of these things, > even when this kind of usecase may overlap.

I can't say this is very helpful; it's hard enough learning the one way. Why have `to_string()` if we have `into()`?

<comment><AUTHOR> Well, one reason is that to_string() is ancient, but into() is fairly new. Another is that 'to' and 'into' are two different things: to_string() takes its caller by reference, and produces a copy. into() takes its caller by value, and so consumes it.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> Perhaps naive question: is there a language where errors are automatically returned from a function (in lieu of exceptions)?

So if you have a function x that has some unhandled "exception" thrown, what it does is it returns an error value at that point to the caller (instead of actually throwing an Exception).

Does that exist?

<comment><USER15> I believe you can't have that happen universally since then you don't get the benefit of having exceptions bubble at all—you're just de facto operating in an error monad.

On the other hand, if it's not universal then you have to set boundaries where the exception to value transition occurs and this is "just" a catch block.

<comment><USER14> > _I believe you can 't have that happen universally since then you don't get > the benefit of having exceptions bubble at all—you're just de facto > operating in an error monad._

I was thinking something like you get an Optional, and you check it.

If you use it without a check (e.g. something like "try" in Rust), and it's an error value, then it "explodes" again and bubbles up.

<comment><USER15> The mechanics of that are easily captured with a monad, but baking it into the natural semantics of the language would be a neat experiment, I agree.

</comment></comment></comment></comment><comment><USER16> > The power of Error comes from the fact that all error types impl Error, > which means errors can be existentially quantified as a trait object. This > manifests as either Box<Error> or &Error.

It took me a couple of minutes to figure out that this means: "you can have heterogeneous collections of errors, and you can use them 'polymorphically' without knowing their concrete type."

In other words, you can use Error as a "trait object." I don't think a newbie to Rust would follow the language in the article here.

(Just a suggestion to help improve an outstanding article).

</comment><comment><USER17> The example

        io-basic-error-custom

and the first version of

        error-impl

have the same content but different names, while the reference just above the first version of the latter points to the former.

Is this intentional? It confused me for a second.

I know this is nitpicking, just asking.

And, thank you steveklabnik, pcwalton, and other contributors of Rust for working in the open and answering our questions here. Thank you burntsushi for your great post.

<comment><USER11> Ah, hmm. They have different content.

error-impl: [https://github.com/BurntSushi/blog/blob/master/code/rust- err...](https://github.com/BurntSushi/blog/blob/master/code/rust-error- handling/src/bin/error-impl.rs)

io-basic-error-custom: [https://github.com/BurntSushi/blog/blob/master/code/rust- err...](https://github.com/BurntSushi/blog/blob/master/code/rust-error- handling/src/bin/io-basic-error-custom.rs)

The key is that the code is spread out over multiple blocks in the article. I need a better literate programming tool than hacky Python...

<comment><USER17> I looked at it again and now I see that the code examples don't necessarily constitute the whole file. And the parts in question happen to be the same in both files. My fault.

 _Maybe_ it would be interesting for the reader to see the number of the lines of the shown code, something like "error-impl.rs, lines 3-12 out of 51".

<comment><USER11> Yeah, that would be a nice improvement. Some day, I will need to improve my literate programming tool: [https://github.com/BurntSushi/blog/blob/master/scripts/rust-...](https://github.com/BurntSushi/blog/blob/master/scripts/rust- from-blog)

:P

</comment></comment></comment></comment><comment><USER18> Where does the n and err values come from?

        fn double_number(number_str: &str) -> Result<i32,     ParseIntError> {
            match number_str.parse::<i32>() {
                Ok(n) => Ok(2 * n),
                Err(err) => Err(err),
            }
        }

<comment><USER19> From the left-hand side of the `=>` arrows in the `match` expression.

<comment><USER18> I know that. Where do they come from before that?

<comment><AUTHOR>
        match number_str.parse::<i32>() {

This matches on the return value of parse, which is an Result<T>. It can have two values: Err(E), or Ok(T).

            Ok(n) => Ok(2 * n),

This line matches an Ok(T), and binds the value of type T to n, which can then be used on the right hand side.

            Err(err) => Err(err),

this line matches an Err(T), and binds the value of type T to err, which can be used on the right hand side.

The right hand sides re-wrap these values into another Result.

<comment><USER20> Nitpick: Result<T, E> instead of Result<T> assuming Result is std::result::Result.

<comment><AUTHOR> Ahh yes, thank you.</comment></comment></comment></comment></comment></comment>