News for hackers. Stuff that matters.
Re:Intro to Haskell for Erlangers by jerf on Sunday March 09, 2014 @02:05PM (#7369247)
This is how I came to Haskell. If you're a polyglot sort and you eventually want to get to Haskell, but Erlang also looks interesting, it's not a bad path. Erlang can get you over the basics of working with immutable data structures (in particular it can get you past "But how can I write a program without mutable values?!?"), has enough interesting stuff to learn on its own about reliable programming to justify learning it on its own merits, and then when you go to Haskell, you won't be trying to swallow quite as much in one go. You can focus on what Haskell actually has to say, instead of being stuck on the basics. The downside is after that, Erlang's deficiencies as a functional language will be pretty obvious and quite frustrating. (I'm not kidding that it's worth learning, probably much moreso than the next C(#/++/)-etc variant, but there's a certain klunkiness to Erlang that gets old after a while.)
Re:Intro to Haskell for Erlangers by mercurial on Sunday March 09, 2014 @06:07PM (#7370193)
On the other hand, I find myself unable to plateau in Haskell, it seems that there is always new abstractions behind the corner. Want to thread exceptions through your monad transformers? Learn MonadState. Want accessors which do not suck? Learn Lens. And then you have free monads, comonads, Operational, Kleisli arrows, Pipes/Conduits/IO Streams/Iteratees...

It may be an issue with the language: make a powerful language, and many things which ought to be part of the core system are going to be in a library. And as Haskell's syntax unfortunately allows library designers to go wild with ASCII symbols, you can easily end up with really hard-to-grok code (especially with the right amount of point-free style). Bonus if you use one-character variables. Unfortunately, in the real world code is read more than it is written, and the prevalent cleverness doesn't really help with that.

Re:Intro to Haskell for Erlangers by lostcolony on Sunday March 09, 2014 @08:44PM (#7370677)
I'm working to learn Haskell, and that's actually part of the appeal.

I don't expect to ever write Haskell in production. Oh, sure, some places do, but they're very, very few; I suspect it's pretty much impossible in any area where you expect to grow, simply because finding people who know it already is nearly impossible, and learning it is difficult, especially as your established crew learns new and more powerful abstractions; the amount of learning required to get someone up to speed gets higher and higher, which is not what you want as you expand.

But that said, as a developer even in more approachable languages, learning that cleverness has its benefits. It provides new insights into ways problems can be expressed. Most developers agree on the benefits of learning a new language; you learn a few good ideas, a few paradigms and approaches, that can carry over and affect the way you code in your day to day. Haskell, with its depth, is better still; you have a seemingly neverending set of ideas to learn and draw from. Many, yes, are too clever to see a full implementation elsewhere in production code that has many maintainers. But borrowing even part of an idea expressed in Haskell may lead to a simple, reusable, and concise solution to a problem that otherwise would be an ugly bug riddled one off solution.

Re:Intro to Haskell for Erlangers by copergi on Sunday March 09, 2014 @11:12PM (#7371112)
Your assumptions are not very accurate at all. The job I just left we had moved to haskell precisely for growth. We had no problems hiring haskellers, or having our existing PHP devs learn haskell. The new job I took is getting tons of applications from experienced haskellers. There's tons of people who know haskell and don't get to use it at work. They are generally quite eager to fix that problem.
Re:Intro to Haskell for Erlangers by MetaCosm on Monday March 10, 2014 @04:39AM (#7371855)
cough bullshit cough

I meant it in good humor, but over the last 15 years, I have had the joy (and pain) of getting to ship production systems in a lot of less popular stacks including: Erlang (multiple), Eiffel, Haskell, and OCaml.

Hiring and training for these less popular stacks has been a goddamn nightmare in "win" conditions. You have the benefit of the better signal to noise ratio in resumes, absolutely. But, you pay for that in rarity, salary and job demands, which is fine as long as you go in eyes wide open and plan to have a small team (under 10).

Rapid team growth (from money injection, or simply success and need) is really, really hard when you don't have a large pool of qualified candidates to pull from... and training, I honestly can't fathom trying to train PHP developers in Haskell. If you company has done this successfully, please setup a newsletter, I would subscribe.

Re:Intro to Haskell for Erlangers by copergi on Monday March 10, 2014 @10:16AM (#7372986)
>But, you pay for that in rarity, salary and job demands

Quite the opposite. As I said, there are a lot of people who know haskell but don't get to use it in their job. There's tons of people applying for haskell jobs at $50-60k/year. Being able to use haskell is a big enough draw in and of itself.

>If you company has done this successfully, please setup a newsletter, I would subscribe.

There would be nothing to go in it. Haskell is not particularly difficult to learn. People can get up and running doing web development very quickly, without any significant changes to how they normally do things since you don't do much destructive updating in most web apps anyways.

Re:Intro to Haskell for Erlangers by seddona on Monday March 10, 2014 @02:51AM (#7371612)
Can you mention the company? We're interested in using Haskell and I'm looking for reference experiences, particularly use in startups.
Re:Intro to Haskell for Erlangers by chongli on Monday March 10, 2014 @05:01AM (#7371899)
make a powerful language, and many things which ought to be part of the core system are going to be in a library.

That's an issue? I would consider it a feature. Core language features which cannot be extended are very frustrating to deal with; just look at generic containers in Go!

Re:Intro to Haskell for Erlangers by davidw on Monday March 10, 2014 @05:34AM (#7372012)
It was an issue for Tcl and OO systems:

http://journal.dedasys.com/2010/03/30/where-tcl-and-tk-went-...

> Somewhat related to the large Tcl vs small Tcl issue was one particular extension, or extensions to the language that was noticeably absent: a system for writing “object oriented” code. Tcl, at heart, will never be an OO language through and through, like Ruby or Smalltalk, but that doesn’t mean that an OO system for it is not a useful way of organizing larger Tcl systems. Indeed, Tcl’s syntax is flexible enough that it’s possible to write an OO system in Tcl itself, or, optimizing for speed, utilizing the extensive C API in order to create new commands. Over the years, a number of such systems have arisen, the most well-known being “Incr Tcl” (a play on the incr command, which is akin to += 1 in languages like C). However, none of these extensions was ever included with the standard Tcl distribution or somehow “blessed” as the official OO system for Tcl. This meant that a newcomer to Tcl wishing to organize their code according to OO principles had to pick a system to use from several competing options. And of course, newcomers are the least able to judge a complex feature like that in a language, making it a doubly stressful choice. Furthermore, even experienced Tcl programmers who wanted to share their code could not utilize an OO system if they wanted their code to work with just standard Tcl. Also, if their code had a dependancy on some OO system, it would require the user to download not only the extension in question, but the OO system it was built on, which, naturally, might conflict with whatever OO system the user had already selected! As of Tcl 8.6, thanks to the work of Donal Fellows, Tcl is finally integrating the building blocks of an OO system in the core itself, but this effort is probably something like 10 years too late.

Re:Intro to Haskell for Erlangers by chongli on Monday March 10, 2014 @05:39AM (#7372027)
This is not the same thing. You are talking about language extensions, I am talking about libraries. Features which require language modification/extension in other languages can usually be implemented as ordinary libraries in Haskell.
Re:Intro to Haskell for Erlangers by davidw on Monday March 10, 2014 @06:08AM (#7372130)
> Features which require language modification/extension in other languages can usually be implemented as ordinary libraries in Haskell.

Tcl can implement OO as a library. Granted that it's not "turtles all the way down OO" ala smalltalk, but it's good enough for code organization purposes.

Re:Intro to Haskell for Erlangers by mercurial on Monday March 10, 2014 @05:49AM (#7372057)
Yes, and then you get several different and incompatible ways of handling errors, at least three different lens libraries... The resulting fragmentation is an issue. It is the same issue as Tcl.
Re:Intro to Haskell for Erlangers by chongli on Monday March 10, 2014 @06:14AM (#7372142)
Fragmentation is an issue with every mature, vibrant ecosystem. It's also a benefit in that it fosters innovation.

As for lens libraries? Edward Kmett's library[0] has taken over that space. The other libraries represent previous attempts at discovering the optimal API and mainly exist now for historical/compatibility reasons.

[0]. http://hackage.haskell.org/package/lens

Re:Intro to Haskell for Erlangers by mercurial on Monday March 10, 2014 @06:37AM (#7372206)
> Fragmentation is an issue with every mature, vibrant ecosystem. It's also a benefit in that it fosters innovation.

I get your point, but sometimes it can be better to have a somewhat less-than-optimal solution standardized rather than many "better" solutions. And while people obviously come up with different solutions to the same issue, it is important to distinguish critical systems (eg, error handling) from other systems which are specific to a few domains (eg, webservers). IMHO, the former absolutely need to be standardized.

> As for lens libraries? Edward Kmett's library[0] has taken over that space. The other libraries represent previous attempts at discovering the optimal API and mainly exist now for historical/compatibility reasons.

I get your point, but I'm sure you'll still find a number of libraries on Hackage depending on non-Lens packages. This is not a desirable state of affairs.

Re:Intro to Haskell for Erlangers by chongli on Monday March 10, 2014 @07:32AM (#7372354)
I get your point, but I'm sure you'll still find a number of libraries on Hackage depending on non-Lens packages. This is not a desirable state of affairs.

That's an issue of package curation. It has nothing to do with the merits or demerits of a language. When outdated/broken/abandoned software sits around it's always going to be a problem for beginners who don't know the difference.

Re:Intro to Haskell for Erlangers by mulligan on Sunday March 09, 2014 @12:48PM (#7368901)
I attended this talk and it was very well done. Most intro to $LANGUAGE talks try to share a few very simple examples of the language. Something most people could read about and absorb on their own in 10-15 minutes. Bob's slides and presentation went for breadth, acknowledging that this was not a tutorial but a way to present listeners with a great sense of what the language does, how it contrasts with Erlang, and [what I found the most useful] a good explanation of how to approach some of the more difficult to explain concepts. Now when I sit down to actually learn Haskell, I have a useful mental model on a bunch of the not so obvious concepts.

I think video of the talk that goes with these slides will eventually be uploaded at: http://www.youtube.com/user/ErlangSolutions

Some of the presentations from just a couple days ago are already up, so I hope to see the rest soon.

Re:Intro to Haskell for Erlangers by pohl on Sunday March 09, 2014 @02:02PM (#7369233)
I love how dense but clear slide 125 is. I look forward to the upload.
Re:Intro to Haskell for Erlangers by jaytaylor on Sunday March 09, 2014 @05:09PM (#7369978)
Getting to slide 125 can be a challenge (no TOC, each next slide takes a history slot in Chrome).

http://bob.ippoli.to/haskell-for-erlangers-2014/#/abstractio...

Re:Intro to Haskell for Erlangers by louthy on Sunday March 09, 2014 @12:58PM (#7368936)
> Cabal; easily fetch more packages from Hackage

Having spent the past two days trying to recover from Cabal Install's dependency hell (still ongoing), I must disagree on this. OSX seems to be particularly shonky (on mavericks), Windows has been relatively plain sailing.

http://ivanmiljenovic.wordpress.com/2010/03/15/repeat-after-...

Don't let that put you off though, Haskell really is a beautiful language, I quite often find myself just sitting back and looking at the code thinking "Damn that looks good".

Re:Intro to Haskell for Erlangers by nbouscal on Sunday March 09, 2014 @01:19PM (#7369034)
Cabal still has a little ways to go, but it has been improving rapidly. Sandboxes came out recently and have helped a lot.
Re:Intro to Haskell for Erlangers by louthy on Sunday March 09, 2014 @01:00PM (#7368952)
Heh, 1 min after posting this I fixed my dependency hell! Finally. Clearly I just needed a bit of HN distraction :)
Re:Intro to Haskell for Erlangers by lelf on Sunday March 09, 2014 @01:18PM (#7369032)
You should sort out how to use cabal sandboxing

http://www.haskell.org/cabal/users-guide/installing-packages...

Re:Intro to Haskell for Erlangers by MaxGabriel on Sunday March 09, 2014 @04:37PM (#7369885)
This was what finally got Cabal working for me on OS X http://stackoverflow.com/a/21285413/1176156
Re:Intro to Haskell for Erlangers by lallysingh on Monday March 10, 2014 @01:25AM (#7371407)
I just cabal init in each new project directory, add my deps as desired there, and cabal-dev install it. Pretty easy.
Re:Intro to Haskell for Erlangers by DiabloD3 on Sunday March 09, 2014 @12:05PM (#7368759)
As someone that knows Erlang but doesn't Haskell and wants to learn, this might come in handy.
Re:Intro to Haskell for Erlangers by rdtsc on Sunday March 09, 2014 @09:05PM (#7370752)
To piggy back on this topic -- this is happening at Erlang Factory (Erlang's main "conference").

Here is a list of uploaded videos from it. There are some very exciting talks, including a talk from Whatsapp about their architecture.

https://www.youtube.com/user/ErlangSolutions/videos?view=0&s...

Re:Intro to Haskell for Erlangers by glesica on Sunday March 09, 2014 @05:50PM (#7370122)
Having seen this talk, I highly recommend it, even if you don't know Erlang (just skip the Erlang slides). It's a great overview of Haskell for anyone looking to quickly become productive(-ish) with the language!
Re:Intro to Haskell for Erlangers by spullara on Sunday March 09, 2014 @01:34PM (#7369103)
This seems like a vanishingly small set of people. You're introducing the 49th[1] most popular language to people that program in a 50+ language. If you are trying to get more converts to Haskell, I would go after a larger set of programmers. If it is just for fun, cool.

[1] http://www.tiobe.com/index.php/content/paperinfo/tpci/index....

Re:Intro to Haskell for Erlangers by nox_ on Sunday March 09, 2014 @02:04PM (#7369240)
You do realise that this talk was given at an Erlang-only conference which you have to pay to attend to it (well, everyone but the speakers)? How people are so focused on language popularity will never cease to amaze me.
Re:Intro to Haskell for Erlangers by banachtarski on Sunday March 09, 2014 @04:13PM (#7369801)
Ippolito is well known in the Erlang world for his work at Mochiweb and he is sharing with his community his explorations in Haskell. What's the matter with this?

Juxtapositions between Haskell and Erlang have historically always come up so a comprehensive summary is always welcome.

Also, out of all the possible epenis measurement metrics for 1337est programming languages, popularity is the absolute dumbest one and is the bastion of mediocre codemonkeys.

Re:Intro to Haskell for Erlangers by pohl on Sunday March 09, 2014 @01:58PM (#7369212)
Think of it as targeted marketing: smaller set of people, but higher likelihood of buy-in.
Re:Intro to Haskell for Erlangers by glesica on Sunday March 09, 2014 @05:40PM (#7370083)
So he should have out-of-the-blue applied to talk about Haskell at PyCon or whatever conference PHP developers have?
Re:Intro to Haskell for Erlangers by kungfooguru on Sunday March 09, 2014 @01:57PM (#7369208)
Hah.
Re:Intro to Haskell for Erlangers by chongli on Sunday March 09, 2014 @01:41PM (#7369145)
Functional language cannibalism at its finest!

Seriously, it seems like the more people agree on something the more they bikeshed over it.

Re:Intro to Haskell for Erlangers by chc on Sunday March 09, 2014 @02:48PM (#7369419)
Haskell and Erlang are different enough in large and significant ways that I don't feel like they really qualify for the "color of the bikeshed" comparison. They both fit into the "functional languages" paradigm, but then, Objective-C and Fortran both fit into the "imperative languages" paradigm.
Re:Intro to Haskell for Erlangers by troutwine on Sunday March 09, 2014 @07:04PM (#7370409)
Being very proficient in Erlang and able to bumble about pretty effectively in Haskell, I can confidently say that while the two languages require complementary skills they target two different problem domains: Erlang's a heavy-lift rocket, Haskell's a sub-orbital rocket-plane.

Well worth being at least familiar with both.

Re:Intro to Haskell for Erlangers by chongli on Sunday March 09, 2014 @10:45PM (#7371053)
After having slept on it, I now don't know what point I was trying to make with the bikeshed comment. It doesn't make any sense now!
Re:Intro to Haskell for Erlangers by lostcolony on Sunday March 09, 2014 @02:18PM (#7369295)
Can't wait for the talk to be made available. I missed out on Erlang Factory this year, but this is one talk I am definitely looking forward to seeing uploaded.
Re:Intro to Haskell for Erlangers by lclarkmichalek on Sunday March 09, 2014 @12:28PM (#7368825)
Anyone know of anything similar going the other way around?
Re:Intro to Haskell for Erlangers by subleq on Sunday March 09, 2014 @03:17PM (#7369542)
In what way is Haskell's pattern matching not as clever as Erlang's?
Re:Intro to Haskell for Erlangers by lostcolony on Sunday March 09, 2014 @03:25PM (#7369570)
It shows later in the slideshow, no? Slides 40-41.
Re:Intro to Haskell for Erlangers by subleq on Sunday March 09, 2014 @04:43PM (#7369898)
I see, it's just the non-linear patterns? Looks like they were considered for Haskell and there are some good arguments against them: http://www.mail-archive.com/[email protected]/msg03721.htm....
Re:Intro to Haskell for Erlangers by lostcolony on Sunday March 09, 2014 @05:31PM (#7370050)
I don't know if it's only; didn't see the talk. I can see why to exclude it, but Erlang has everything in place to make its inclusion a very obvious ones. All data types are comparable, for ill or for good (I've been both helped and hurt by it), and allowing non-linear patterns makes for some very clean pattern matching code for many recursive functions.
Re:Intro to Haskell for Erlangers by nox_ on Sunday March 09, 2014 @10:19PM (#7370988)
Yes, Erlang patterns are non-linear, Haskell has view patterns. Neither are more powerful than the other. They are just different.

Erlang non-linear patterns fit more with the semantics of match where an already bound name isn't shadowed, view patterns fit well into Haskell because of the ensured purity.

Re:Intro to Haskell for Erlangers by peteretep on Monday March 10, 2014 @05:22AM (#7371970)
Consider:

    evaluate([ A,A,A, _,_,_, _,_,_ ]) when A != b -> { winner, A };
    evaluate([ _,_,_, A,A,A, _,_,_ ]) when A != b -> { winner, A };
    evaluate([ _,_,_, _,_,_, A,A,A ]) when A != b -> { winner, A };
I don't think I can do that as eloquently in Haskell using pattern matching, but I'd love for you to show me.
Re:Intro to Haskell for Erlangers by judk on Sunday March 09, 2014 @12:36PM (#7368848)
Nice, a slide show using a bleeding edge layout/display framework that doesn't work on mobile. Way to spread your ideas.
Re:Intro to Haskell for Erlangers by thu on Sunday March 09, 2014 @12:47PM (#7368898)
It seems those are slides for a live presentation, so I guess you might also complain about the lack of sound or about how pointless it is to post slides on the internet. Or you might make a constructive comment. Or no comment at all.

Still I was curious to find out what "doen't work" means in the context of your comment. I tried on my Nexus 4 and everything was nice. So maybe you should complain about how a slack the original author is to not try his intended-for-a-live-presentation slides on all possible devices a careful reader like you could see them.

Re:Intro to Haskell for Erlangers by runejuhl on Sunday March 09, 2014 @04:19PM (#7369819)
Because of your comment I tried the site in my installed browsers: stock CyanogenMod browser, Firefox, Chrome, Opera and Dolphin. I tried looking at the source of the page, and I've looked at it in w3m and elinks.

Bottom line? Works great.

Re:Intro to Haskell for Erlangers by bhauer on Sunday March 09, 2014 @05:32PM (#7370057)
Worked just great on IE for Windows Phone.
Re:Intro to Haskell for Erlangers by nbouscal on Sunday March 09, 2014 @01:20PM (#7369038)
It worked really nicely on my iPhone.
Re:Intro to Haskell for Erlangers by coldtea on Sunday March 09, 2014 @03:35PM (#7369628)
Yes, because mobile users are entitled to his presentation right?
Re:Intro to Haskell for Erlangers by jeffdavis on Monday March 10, 2014 @02:57AM (#7371624)
What specific device and software are you using? Perhaps the problem can be fixed once it's identified.
Re:Intro to Haskell for Erlangers by jokoon on Sunday March 09, 2014 @01:11PM (#7368990)
what about C++ers ? :(
Re:Intro to Haskell for Erlangers by wging on Sunday March 09, 2014 @01:27PM (#7369075)
A little googling has dug this up: http://www.haskell.org/haskellwiki/Haskell_Tutorial_for_C_Pr...

I'm sure that you also know C, since you know C++. Let me know how it goes.