
School of Haskell Goes Beta - dons
http://fpcomplete.com/school-of-haskell-goes-beta
======
skwosh
Hope this goes into a lot of _depth_...

My main issue with existing books and tutorials is that I'm left in the dark
about the more interesting/advanced parts of Haskell.

Some of the areas I would like to have a better understanding:

\- More advanced kinds of monads e.g. Logic, Continuation

\- Monad Transformers

\- Arrows

\- Rank-N types

\- GADTs

\- Category theoretical ideas e.g. Bananas and Lenses

\- Type derivatives and TypeClass abuse c.f. Conor McBride

\- Control patterns like Iteratees, Generic Zippers c.f. Oleg Kiselyov, Chung-
Chieh Shan

I have an intuitive grasp of the above, but to me Haskell is more about
programming with types than anything functional.

On the practical side, it seems like Haskell excels as a language processor,
and parsing/compilation would be a great way to explore how to structure
certain kinds of applications (like web servers, graphics pipelines, etc).

Please don't make it too real-world, I already have bash ;)

~~~
gtani
Everybody has a different list of a dozen intermed/advanced topics ;-}

[http://www.reddit.com/r/haskell/comments/17gavl/what_you_con...](http://www.reddit.com/r/haskell/comments/17gavl/what_you_consider_advanced_haskell_topics/)

[http://stackoverflow.com/questions/5778436/what-haskell-
topi...](http://stackoverflow.com/questions/5778436/what-haskell-topics-need-
to-be-addressed-in-a-real-world-haskell-style)

And most of those are fast moving topics these days but they're well covered
in blogs, the Cafe list, stackoverflow, they just need to be
collated/cataloged. At a minimum some wiki farming would address a lot of
those. Unfortunately, I emailed the wiki contact a couple times about pitching
in and never got response.

___________________

There's a few books you could look at, tho they're more building out what's in
RWH, not up:

draft by Snoyman <https://github.com/mezzohaskell/mezzohaskell>

Bird's Functional algorithm pearls [http://www.amazon.com/Pearls-Functional-
Algorithm-Design-Ric...](http://www.amazon.com/Pearls-Functional-Algorithm-
Design-Richard/dp/0521513383/)

[http://haskell.cs.yale.edu/wp-
content/uploads/2013/01/HSoM3....](http://haskell.cs.yale.edu/wp-
content/uploads/2013/01/HSoM3.pdf)

JA Alonso has another book of exercises (in Spanish
[http://www.cs.us.es/~jalonso/publicaciones/Piensa_en_Haskell...](http://www.cs.us.es/~jalonso/publicaciones/Piensa_en_Haskell.pdf)

also the FP in Scala (Morris, Chiusano, Bjarnason) may include some haskell
code, I haven't read yet, but definitely covers a lot of these hot topics

<http://manning.com/bjarnason/>

~~~
FPguy
We welcome people who have written (or plan to write) Haskell tutorials and
exercises to post them on the School of Haskell, if they find its features
useful. By now you've probably seen the Active Haskell demo in the beta
screencast video? <https://haskell.fpcomplete.com/beta>

We also welcome good organizers (like yourself perhaps?) to write tutorials
that consist partly or entirely of links to other materials. The role of
editors and organizers is sometimes undervalued, but not by us!

------
Ixiaus
Any Haskell web-application framework is awesome - Yesod in particular as it
has the most active community and written material for it.

I've lately been working on an (unpublished) project using
Haskell+Yesod+Fay+Clay and it's remarkable how productive I am; in that most
of my time is spent figuring out my types, writing the code, then...it's done?
In Python I run into a lot of programmer related bugs that Haskell's rigid
type system prevents. It can't prevent logic/flow "bugs" but it does keep a
lot of other bugs out that would normally have me spending potential future
hours fixing/debugging.

It's also not just the type safety that increases my productivity, it's
also...Haskell. Abstraction in Haskell can make for very concise and correct
programs.

Fay and Clay are particularly awesome too.

Haskell definitely has a learning curve, there was a steep curve for me and I
already had significant functional programming experience (Erlang & Scheme).
I'm really happy to see these guys taking that on!

~~~
laureny
> In Python I run into a lot of programmer related bugs that Haskell's rigid
> type system prevents.

Isn't your productivity gain coming from using a statically typed language
rather than Haskell specifically? It feels like any statically typed language
is a leg up from Python :)

~~~
codewright
Are we still spreading that canard where type errors are somehow some kind of
bugbear in Python?

It's not a profound part of writing code in Python for anybody that's spent
more than a few weeks with it.

~~~
mercurial
A profound part? Maybe not. However, I noticed yesterday that a provisioning
tool I wrote was blowing because I was assigning by mistake an empty string
coming from a CSV instead of a None value to an integer field in an sqlalchemy
model. That's a bug a static type system would have found.

------
maximveksler
HN never fails, just as I was browsing the web after reading pg assay about
programming languages and the story of how he built what is now yahoo shop
using lisp and deciding that instead of lisp I will learn Haskell this comes
along. Looks very good and hope that it won’t be /too/ easy start without any
challenges...

~~~
jhuni
You should still learn Lisp unless you are certain that Haskell is already in
the perfect form for what you want to do. Lisp gives you unprecedented freedom
to transform the language into the form that suits you best.

~~~
tikhonj
That's not really _unlike_ Haskell: in Haskell, you just have a different set
of tools for transforming the language.

I just came off a largish project in Racket, and do appreciate that it's very
flexible. However, I've found Haskell to be roughly as flexible in practice.
Haskell has surprisingly flexible syntax and semantics, and I've found it very
easy to have parts of my program with radically different semantics from
normal Haskell.

You can very easily layer on things like non-determinism, logic programming,
error-handling, asynchronous programming or even continuations onto Haskell
code. And since it's lazy by default, you do not have to do anything special
to add new control structures--you don't even need to use the macro system.
(Which, of course, Racket does much better--template Haskell _works_ , but
it's a bit of a pain.)

I've also spent some time embedding DSLs in both Racket _and_ Haskell, and
have found that they are about roughly equally convenient. Racket is more
flexible syntactically--it's very easy to do things like inspect variable
names and the like. Haskell, on the other hand, has some _very_ lightweight
tools (laziness, do notation and a very spartan syntax) that make it very easy
to change its semantics. The type system--especially things like GADTs--also
makes life much easier for DSLs.

~~~
jhuni
Haskell introduces restrictions with its non-homoiconic syntax, static type
system, and pure effects system. I am not yet convinced that these
restrictions are necessary.

\- I am not convinced that it is worth it to throw out the benefits of
homiconicity in order to create a distinction between code and data. I find
that Haskell's heteroiconic syntax is actually harder to read and write then
S-expressions.

\- In mathematics all sets of the same cardinality are isomorphic. In assembly
language there isn't really any notion of types besides cardinalities counted
in bits. I am not convinced that we need to introduce a system of static
typing besides an optional system of cardinalities. I am skeptical of the
claims that we need static typing to eliminate errors and bugs.

\- I am not convinced that we should have purely functional programming based
upon monadic IO rather then other alternatives like uniqueness types. Perhaps
a better option is to have a term rewriting and macro expansion phase that is
purely functional and to encapsulate all side effects in a seperate evaluation
phase.

If you are certain that Haskell's non-homoiconic syntax, static type system,
and pure effects system exist in the right form for what you want to do then
by all means use them. Otherwise, consider that Lisp doesn't distinguish
between code and data so it gives you unprecendented freedom to shape the
language into the form that suits you best.

------
bpolania
I learned Haskell in my first algorithm course in the University, mine was the
last class ever to do it in that university, the following semester they
switched completely to Pascal and later to Java.

These are good news, I just can't wait to see that IDE.

~~~
shurane
Isn't switching from Haskell to Pascal or Java a _huge_ switch? That's a
change in thinking style, even!

------
monkeyfacebag
As excited as this makes me, I am way more excited to hear about the "full
blown Haskell IDE" they mention. Is this a cloud service?

~~~
efnx
It may be leksah, which is currently available on hackage, though I've never
been able to get it to compile (I haven't tried that hard)...

~~~
mlinksva
Not likely leksah <http://fpcomplete.com/designing-the-haskell-ide/>

------
hosh
Lady's Illustrated Primer, ha!

I've been working my way through "Learn You a Haskell For Great Good". I
worked my way up around functors and monads. Then I stopped for a while. This
new School will be interesting :-)

~~~
tunesmith
Yeah, this will be interesting. I've also been going through Learn You A
Haskell, making an Anki deck as I go. Slow work, but Anki will help me retain
everything I'm learning.

~~~
ehamberg
Slightly off-topic: How much do you break down concepts when using Anki to
learn a programming language? I use Anki for tonnes of stuff, but haven't used
it for learning programming languages/APIs.

~~~
tunesmith
Good question, I think about that a lot. So far it seems that it's better to
break down too much rather than not enough. Because at worst you'll have easy
cards. In other decks I have some puzzles that require more steps than I can
do in my head, and I always feel annoyed when those cards come up.

For programming languages, it seems like a good fit to use it for rules and
syntax, and the principles behind why the language works the way it does. I
don't think I'll use it to ask me how to write scripts, though.

------
arocks
This is a very promising approach. I was blown away when they actually
executed a web application and the working web page was shown inside an
IFRAME. This means that I could learn programming from any device, even a
tablet, without needing to install anything.

~~~
FPguy
Thanks. One of our design points in fact is that you can use the School from a
tablet. We're still a bit concerned about Safari performance on the iPad, but
we're on the case!

~~~
pohl
I suspect that you are not running into safari's performance limits so much. I
think it's more likely that your client-side code is doing something that
interferes with the browser's event loop, and is thereby preventing the
browser from processing ordinary operations like doubletap-to-zoom, scrolling,
pinch-to-zoom, etc. If you have a lot of JavaScript operations to perform,
sometimes you need to defer some of them until the next time the event loop
comes around — so that the browser can "breathe", as it were.

GWT, for example, has a DeferredCommand and IncrementalCommand facility for
this situation. I believe they are just wrapping the setTimeout(func, 0)
trick. (See link below.) If Fay does not have such a facility, then you may
need to do some upstream work to teach it how.

[http://b.javascript.info/tutorial/events-and-timing-
depth#as...](http://b.javascript.info/tutorial/events-and-timing-
depth#asynchronous-events)

But I guarantee that even an iPad 2 should have enough oomph to tackle your
modest needs. It does just just fine on more intensive things like Google
docs, spreadsheets, reader, and plus. And Facebook.

If, for example, I have not yet asked the monads tutorial to compile and run a
snippet, then the browser's JS thread should be entirely quiescent and the
event loop should be responsive to my zoom, pan, and rotation requests. That
it isn't implicates your code (and/or the code Fay emits) — not the browser. I
hope the creators of Fay considered this while architecting it. If they
didn't, it's unlikely that they would have arrived at the correct solution by
accident, because ordinarily compilers never need to worry about being "a good
citizen" to a browser's event loop.

Best of luck. I envy that you get to work on this!

------
yarou
Signed up. :) This is my nth attempt at learning Haskell, but I have a fairly
good handle on most of the basics.

------
silverlake
How is this better than working through a book? If I can't download and
install Haskell, then learning the language is the least of my problems.

~~~
tikhonj
The important part is to engage newcomers. This is easiest to do if there is
no barrier to playing with Haskell. They can always install Haskell once
they're a bit more familiar with it and see why it's awesome.

If you're already planning to learn Haskell and have a book about it, this is
useful because it lets the author of the tutorial integrate the material more
closely with the language environment. This makes things like little exercises
to illustrate a particular point easier to do.

------
hexonexxon
alas waiting list

doubt i'll switch from scheme but still interested

~~~
FPguy
Sorry about the short wait -- we've had literally thousands of applications in
the first day, and we are letting people on by groups of 100 (and that step
size itself will increase).

------
misleading_name
just got my log in

