Live data from Hacker News

Fighting spam with Haskell

code.facebook.com

81–90 of 98 posts

Re: Fighting spam with Haskell

#81
post #63

This is impressive, and in line with Haskell's philosophy to "avoid success at all costs". As a mere mortal programmer, who knows a little Haskell, my takeaway is that if you want to run Haskell in at web scale for a a large userbase, you need the language's primarily compiler author to help build the application and to modify the Haskell compiler to make it performant. And you also need your team led by a 20-year-ve…

This is an incredibly stupid takeaway. Facebook can hire the best software engineers and computer scientists in the world, so of course they hire such people and these people build stuff at Facebook. That doesn't mean other people can't use Haskell to build web applications.

> That doesn't mean other people can't use Haskell to build web applications.

Very few companies do, though, so OP's point still stands.

This article would be a much better ad for Haskell if it weren't written by one of GHC's main author. The article also casts doubt on whether Haskell was picked because it's the best tool for the job or because of the team's familiarity with it.

Re: Fighting spam with Haskell

#82

For those not involved in the Haskell community, Simon Marlow worked full time on the GHC compiler and specifically run-time system for many years. Along with Simon Peyton-Jones, he's huge in the Haskell world. Marlow also wrote the very excellent "Parallel and Concurrent Programming in Haskell" book. Facebook also employs Bryan O'Sullivan, an epic Haskell library writer (Aeson, Attoparsec, Text, Vector, and on and o…

It really shows what an investment they are willing to make in the language. They aren't just training up internal engineers, they're bringing in some of the best in the community. I'm hugely excited that Facebook is making this investment and giving some of the developments back to the community. There are many smaller companies that would be interested in Haskell but don't have the resources or expertise to tackle…

That's a bit sad a great language like Haskell (I haven't personally used it but heard great things about it) is used for a hippie thing such as Facebook. Facebook doesn't even have much of a future, its a hippie fad just like Myspace was, eventually they'll get bored and find some new hippiespace social network: Snapchat, Whatsapp, whatever.

Re: Fighting spam with Haskell

#83
post #63

Earlier quoted context omitted.

This is an incredibly stupid takeaway. Facebook can hire the best software engineers and computer scientists in the world, so of course they hire such people and these people build stuff at Facebook. That doesn't mean other people can't use Haskell to build web applications.

> That doesn't mean other people can't use Haskell to build web applications. Very few companies do, though, so OP's point still stands. This article would be a much better ad for Haskell if it weren't written by one of GHC's main author. The article also casts doubt on whether Haskell was picked because it's the best tool for the job or because of the team's familiarity with it.

You don't hire Simon Marlow to hack PHP.

Re: Fighting spam with Haskell

#84
post #82

Earlier quoted context omitted.

It really shows what an investment they are willing to make in the language. They aren't just training up internal engineers, they're bringing in some of the best in the community. I'm hugely excited that Facebook is making this investment and giving some of the developments back to the community. There are many smaller companies that would be interested in Haskell but don't have the resources or expertise to tackle…

That's a bit sad a great language like Haskell (I haven't personally used it but heard great things about it) is used for a hippie thing such as Facebook. Facebook doesn't even have much of a future, its a hippie fad just like Myspace was, eventually they'll get bored and find some new hippiespace social network: Snapchat, Whatsapp, whatever.

You know, you're not alone in thinking along these lines, but, if you would have just put a wee bit more effort into your wording, you could have made a good point out of it. Too bad you kept it even way below average Facebook post quality.

Oh and seeing how I'm actually responding now anyway, there's one more thing: use of the word "Hippie" does not actually qualify as name calling, you do know that, right? I do hope so; you see, it is mostly used in the cartoon Southpark, by a kid who is both the biggest bully of them all, and the most pathetic one as well. The ancipitality is really obvious, so I'm curious: was the satirical context so lost on you that you decided to copy this cartoon character's behaviour verbatim instead? Because in that case I think you could actually gain one or two social skills from Facebook! Chop chop, be a good lad now and give 'er a try, eh?

Re: Fighting spam with Haskell

#85
post #8
post #2

Thanks for the overview Simon, great to hear about the use of Haskell at scale. At CircuitHub we use Haskell to build our entire web app, Haskell is great for most tasks these days.

Did you use a particular framework? I've been greatly enjoying my 4th attempt at learning Haskell (I think only now am I seasoned enough to really get it ), and my general proof that I know something and can use it usefully is to develop a web app (as all apps are now anyways). However, I didn't find anything which looked like it had majority community buy-in unlike Rails/Sinatra/Flask et al.

We use Yesod

Re: Fighting spam with Haskell

#86

I learned a few things from this post outside the usual "technical" explanations: 1. They have CORE Haskell contributors on their payroll to deliver this type of project (what this mean is that no... Haskell isn't any better than other language, it's just that they have people who know Haskell very very deep to the compiler level...) 2. In-house custom language eventually does not scale (the EOL is much much much sho…

And Google and Dropbox hired Guido van Rossum ...

Re: Fighting spam with Haskell

#87

Anybody know what sort of policy resolution algorithms are used? Is this based on Rete, or home grown?

I don't know if Rete is appropriate. Rete optimizes for a large number of rules and a small amount of data. I used to hack Rete based OPS5 a lot, including adding support for multiple data worlds. If you like Common Lisp, then the OPS5 code base is fun to hack.

Re: Fighting spam with Haskell

#88

This is an amazing effort, implementing ApplicativeDo and using Haxl for automatic batching and concurrency, doing code hot-swap in a compiled language, developing per-request automatic memoization, finding a aeson performance bug, translating C++ from/to haskell to do partial marshalling of data, implementing allocation limits to ghc threads, creating a shared c++ library to bundle the c++ dependencies in ghci for i…

It's definitely not just a "We're really happy with Haskell here at FB" post. This probably explains the trollish comments elsewhere to the tune of "Haskell without Simon+bos /= scalable".

It is a little intimidating, though. I think the perception is "Haskell is hard enough, AND I have to be a C++/GHC internals expert too?" The hard truth is you have to be this level of expert at something to achieve robustness at industrial scale.

Simon's comment in this thread hints at some of the power of Haskell alone:

The "automatic" bit is that we insert the code that consults the map so the programmer doesn't have to write it. The map itself is already invisible, because it's inside the monad. So the overall effect is a form of automatic memoization.[1]

This pretty much sums up appdev in Haskell. Engineer (or employ) amazing abstractions with no funny business (hello Spring!) and no loss in safety or expressiveness.

I'm really happy this team exists, this is the kind of work that will take Haskell into the mainstream. Kudos!

[1] https://news.ycombinator.com/item?id=9787523

Re: Fighting spam with Haskell

#89
post #43

Earlier quoted context omitted.

Also the nice thing about Yesod, is the freely available online book[0]. [0] http://www.yesodweb.com/book

Has the book caught up with the software? Last I checked, the book was written in terms of obsolete APIs that didnt match the yesod-geneterated app boilerplate, and Snoyman said that he didn't have time yet to update the book.

Even though it was at one point a physical book, I think, it's really a regularly updated documentation for the library. Sometimes it's not fully updated because it's written by one guy (Michael Snoyman, who also leads Yesod), but it always gets fully updated for the new version. It's not like a print book where you have to wait for the 2nd edition to come out.

Re: Fighting spam with Haskell

#90
post #63

Earlier quoted context omitted.

This is an incredibly stupid takeaway. Facebook can hire the best software engineers and computer scientists in the world, so of course they hire such people and these people build stuff at Facebook. That doesn't mean other people can't use Haskell to build web applications.

> That doesn't mean other people can't use Haskell to build web applications. Very few companies do, though, so OP's point still stands. This article would be a much better ad for Haskell if it weren't written by one of GHC's main author. The article also casts doubt on whether Haskell was picked because it's the best tool for the job or because of the team's familiarity with it.

Do you know a better language for implementing an eDSL that needs to be pure? Also familiarity does matter. With the requirement of needing a pure eDSL though I think Haskell would be the easiest path for most teams.
Post reply on HN