
The New Haskell.org - dons
https://www.haskell.org/?new
======
skrebbel
I'm new to Haskell, and I like this page. So, wanting to get a feel for it, I
tried typing the sieve example from the top of the page into the "Type Haskell
expressions in here." box right beneath it.

First, I got

    
    
        <hint>:1:8: parse error on input `='
    

Hm so apparently definitions aren't expressions? Or something?

I decided to remove the `primes = ` part, which made my browser really slow
and had no result. I'm assuming it was computing all primes in the background.

Now, of course, maybe I should try to _understand_ the sieve example before
running it, but isn't the whole point of having a REPL box on the front page
that you can facilitate people who learn the other way around? It would be
great if there'd be some code or expressions available at my fingertips that
would actually _work_ in that REPL.

In other words, maybe make the first example be something that actually
terminates?

Please read this as constructive criticism, which is how it is intended.

EDIT: Only now I'm noticing that exactly the things I ask for are listed to
the _right_ of the "try" box. Pardon my lazy reading, I'm really enjoying the
tutorial right now. Still, making the `sieve` example terminate would be nice.
But I believe my nitpick is maybe a bit much of a nitpick now.

~~~
cbd1984
The biggest problem isn't what others have said. The biggest problem is that
_the try box doesn 't let you define your own functions or variables._

Therefore, even if you were an old hand at GHC and GHCi and so on, you'd still
be unable to run the code it shows at the top of the page.

This is probably bad website design. Especially since the website still lets
randoms burn themselves by entering non-terminating code that makes their
browsers slow.

~~~
nightski
I agree with the problems but am curious how you would solve the non-
terminating code problem?

~~~
cbd1984
> I agree with the problems but am curious how you would solve the non-
> terminating code problem?

I thought it was running on the browser, based on what the OP said, so that
would entail opcode-counting or, if you can use multiple threads, watchdog
timers. That is, don't try to solve the halting problem, just enforce an
arbitrary limit to how long code can run.

However, if the code is being run on the server, you could enforce CPU and RAM
quotas to do the same thing with the OS's help.

------
qubitcoder
I really like the new design. The old site was certainly showing its age--very
dense and hard to navigate. Never mind the lovely 1990s motif. This is far
more welcoming and user-friendly, especially to those who might be curious
about Haskell.

It's exciting to witness Haskell gain traction within industry. Facebook
announced last week that its building an entirely new Haskell team to focus on
distributed systems, data mining, and machine learning. They're also hiring
for a second team to support Haxl [1].

For those eager to use Haskell in the workplace, I imagine the new design
should make it easier to formulate a compelling business case. Being able to
point your project manager and/or colleagues to a website that clearly
explains what Haskell is--and what sets it apart--is a big plus.

The source code for the site can be found on GitHub [2]. Awesome work by Chris
Done, who kicked this off last year; see his blog post about the motivation
for the new site [3].

[1]
[http://www.reddit.com/r/haskell/comments/2useoq/haskell_oppo...](http://www.reddit.com/r/haskell/comments/2useoq/haskell_opportunities_at_facebook/)

[2] [https://github.com/haskell-infra/hl](https://github.com/haskell-infra/hl)

[3] [http://chrisdone.com/posts/haskell-
lang](http://chrisdone.com/posts/haskell-lang)

------
chrisdotcode
This new, awesome site is using the framework Yesod[0], which is kinda like
the Rails of the Haskell world, only it can do rad stuff like prevent XSS and
404s at _compile time_. Yes, you read that right.

[0] [http://www.yesodweb.com/](http://www.yesodweb.com/)

~~~
arianvanp
You know what is REALLY cool? Almost all haskell web frameworks use the Web
Application Interface[0]. Which is a unified interface for haskell web
applications. This means you can mount web applications written in OTHER
frameworks under your routes and vica versa.

[0] [http://www.stackage.org/package/wai](http://www.stackage.org/package/wai)

~~~
icebraining
Yeah, wsgi was also cool when it appeared for Python, back in 2003.

------
radmuzom
Interestingly, my love for Haskell was re-kindled today and I went to the site
to download the latest platform. There is so much wrong with the new site -

1\. Earlier, there was a lot of information on the Home Page. Now there's
almost nothing. Yes the earlier page was a bit too busy, but crucially
comprised simple HTML links and was fast to load. 2\. Now there's a big banner
saying "Open Source Community Effort for 20 Years" with Vimeo links, which
itself is a bad idea. What happened to simple HTML anymore? Anyway, I don't
care about the effort - show me the results e.g. Hackage, Hoogle, IDEs, etc.
all of which was readily available in the old page but not anymore. 3\.
Earlier, it was easy to locate the Haskell platform for Windows. Now it takes
to a cryptic download page and I am not sure what I am downloading. What is
MinGHC?

These are just my initial impressions. Anyway, I wonder why people don't
realize that not everything needs to be converted to the "modern web".
Sometimes the old web is vastly superior to any modern alternatives.

~~~
arianvanp
A new website will never be perfect. Luckily They're very open to suggestions
and criticism . There seems to be an active issue tracker here [0] that is
used to keep track of feedback. Pull requests seem to be welcomed as well.
Quite the friendly community it seems.

By the way. the old website moved to
[https://wiki.haskell.org/Haskell](https://wiki.haskell.org/Haskell)

[0] [https://github.com/haskell-infra/hl/issues](https://github.com/haskell-
infra/hl/issues)

------
thomasahle
I don't understand why they want to use this code

primes = sieve [2..] where sieve (p:xs) = p : sieve [x | x <\- xs, x `mod` p
/= 0]

As their first example of Haskell. It's a prime generator based on trial
division. And not even trial division up to sqrt of the number you test, but
all the way up.

I like the idea of a small snippet showing of the power of haskell, but there
are many much better examples imho. Perhaps the website could just choose one
at random at each load?

~~~
sigilion
It's the Sieve of Eratosthenes, which is a fairly classic algorithm.

~~~
Moyamo
No it's not. It is only superficially[1].

The sieve of Eratosthenes goes like this:

1) Mark 2 as prime. Let it be n.

2) Mark all numbers of the form i times n as composite, where i is a positive
integer. (We can do this by stepping over multiples of n. No multiplication
needs to take place.

3) The next unmarked number is prime. Let it be n. Goto 2

Notice how this alogorithm does not use division. Division in modern CPUs is
slow.

The algorithm presented uses the `mod` operator, which does division. This
algorithm is equivalent to the Trial Division Algorithm. Instead of "deleting"
multiples of n as composite, this algorithm tests _all_ numbers greater than n
for divisibilty by n, and then only does it "delete" the number.

For a more detailed explanation, see
[http://www.cs.hmc.edu/~oneill/papers/Sieve-
JFP.pdf](http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf)

[1]
[https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Trial_di...](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Trial_division)

------
zak_mc_kracken
The new web site looks better than the old one but it also makes everything
harder: finding documentation, downloading the compiler, explaining the
environment and tool chain, etc... All these very important tasks are now
hidden behind links to links to links.

I wouldn't be surprised that the average time that users spend on haskell.org
goes down as a result (assuming the Haskell team even cares about measuring
these things).

------
caligastia
I'm glad the page is getting a design refresh, as it needed it, however it may
have swung too far in the direction of the latest web scripting language du
jour. The 'try it now' box is appealing to the short attention span scripter
and not to the engineer. Already you are having to mention IO actions which is
a subject that can't be properly explained through a web form.

As for the image, I don't know why it would be interesting to see a picture of
a bunch of people at a conference, especially if you go back to the page
frequently. Why not some original Haskell art like the Diagrams factoring
image?

Regarding the 20 years in development, I agree this fact should be front and
center, this is a serious tool that has had a lot of work by very high level
thinkers, it is a world away from the origins of Java as far as engineering
integrity.

------
hristov
It looks good, but they have to get rid of the out of focus photo. Photos that
are entirely out of focus are really annoying and give a lot of people
headaches.

Usually out of focus areas should be used to bring the eye to an object in the
photo that is in focus. But if such an object does not exist, then the eye
wanders and tries to adjust itself to focus (the eye has its own focusing
mechanism). But of course it cannot do so, so what you get as a result is
strain on the eye and a headache.

Out of focus photos have no business in what hopes to be a mainstream website.

~~~
pilgrim689
I agree... I didn't even realize there was a videos section between the "Try
it" and the "Features" section until I read your comment.

------
iopq
λ do line <\- getLine; putStrLn line

> л

mueval-core: Imports.hs: removeLink: does not exist (No such file or
directory) ExitFailure 1

What did I do wrong?

~~~
shangaslammi
You need to use curly braces in single-line do-expressions:

    
    
        do { line <- getLine; putStrLn line }

~~~
iopq
First of all, I took that example from the webpage. And it works in ghci (if
printing ? back to me "works", then I guess it works)

~~~
shangaslammi
Ah, right, sorry. I completely misread your post.

I guess there's something funky in the unicode handling on the site.

------
kryptiskt
If I go to downloads for Windows, I get the opportunity to download an
installer for something called MinGHC with no indication of what version it
is, and no indication if it is a 32 or 64 bit GHC. Whichever it is, if I want
the other one, I'm apparently out of luck.

The Haskell Platform is nowhere to be seen, why?

It looks nice on the surface, but the actual content needs work. And the link
to more content is well-hidden at the absolute bottom of the page.

------
jfaucett
great! I love the fact that "try it" takes center stage. Though there was a
lot more information on the old site, I feel the new one does good job of
breaking it up into more meaningfully grouped segments.

The sponsors section is confusing to me though, are these actual sponsors or
just services that haskell.org uses? Its not actually clear to me based on the
text and the relative prominence each is given.

------
Ixiaus
This is a step backwards imho. The fit and finish of this site betrays much
about the language and its amazing community.

This feels amateurish, with enough people complaining about the interactive
repl and lacking information, this should have gone through more iterations
and feedback loops with people outside the Haskell community.

~~~
sclv
Luckily for everyone, the current discussion here is just such an iteration!

------
bonn1
Out of curiosity:

Who has written Haskell & deployed to production in the last 24h and if yes
for what kind of app?

~~~
skrebbel
I know Amsterdam startup [http://www.silk.co](http://www.silk.co) has their
entire backend written in Haskell. I'm not sure they deploy in weekends
though.

Their CEO Salar told me that that, among other things, it gives them a hiring
edge. People move to Amsterdam from all kinds of places just so they can write
Haskell professionally.

~~~
sfvisser
No we usually don't deploy in weekends. Only if we break stuff just before the
weekend. :)

~~~
skrebbel
Indeed! So you didn't deploy Haskell in the last 24h so you don't count :-)

------
gbonetti
I started the tutorial. Then I got stuck in the second step - Let's try
something completely different. Type in your name like this: "chris".

The problem is: the input box doesn't get the quotes I write on my Mac. I
tried double (") and single (') quotes

------
shakeel_mohamed
I found a bug in the tutorial that introduces map.

Typing in: map(+1) [1..5] won't advance to the next step (even though the
interpreter handles it fine), but map (+1) [1..5] will (note the space after
map).

------
frik
The old site moved to [https://wiki.haskell.org](https://wiki.haskell.org)

------
krick
Looks neat, although I don't feel it's some big news. But there's some new
weird font in "Haskell" logo now, isn't it?

Anyways, I'll always remember that cute cherry-flower (I guess) background on
the old front page. It was nice first impression somehow.

------
m_mueller
It's a good start to make people want to try it out, but I feel the tutorial
could go a bit further.. chaining functions together? defining functions? map
functions and branching?

------
afandian
This appears to be broken in my browser. Screenshot:
[http://m.imgur.com/uXcS2ZS](http://m.imgur.com/uXcS2ZS)

------
peeyek
Rakspace logo that appear on the footer should be light or white version, so
it can match with the footer background

------
scottjad
This redesign appears to take the position: the first page on haskell.org is
for people who are brand new to the language, not for people who are already
learning the language or currently use the language. I don't like that choice.
I think the page should be trying to be the most useful for users of the
language with a link to an About or Getting Started page that is geared toward
new users. To me, a user of the language visits the site dozens or hundreds of
times over the course of a career, while the average brand new user only
visits it (I'm guessing here) 1.1 times. But I can appreciate the difference
of opinion and priorities and from the creator's perspective I think the page
does an ok job.

It makes me wonder though, what if news.ycombinator.com took that position.
What if it were a page describing what Hacker News is, how posting and
commenting and voting works, and how long the community had been around, etc.
And then there were a link in a menu that said "Submissions" that took you to
the actual content.

For someone currently learning the language (past the first 5 minutes) or that
uses the language regularly, the only useful things on this front page are the
four links along the top.

As for improvements, I think some sections (e.g. community banner) should be
removed. I think the videos should, given the focus on brand new users,
probably be removed too. The community banner is, I believe, only there to
facilitate displaying the titles when people click on the videos. I haven't
watched any of the videos, but from their titles I am skeptical that they
should be watched before the next section (Features) is read, so they should,
at a minimum, be moved further down the page. I don't like the alternating
dark/light sections, so moving them further down would give you a more
traditional dark header, light content, dark footer look.

I assume the videos are not going to change regularly, because they appear to
all be from a single Vimeo account that has more recent videos than those that
are displayed. If the videos are kept, I think the titles should be visible
without clicking on the video, because I thought (which means some others will
think) that clicking on the video would start playing it. Hovering one by one
to see the title is not a good solution.

Congrats to the people who built and deployed this, I'm sure it took a long
time to get it live (since I remember seeing this page hosted elsewhere many
months ago).

~~~
chrisdone
> This redesign appears to take the position: the first page on haskell.org is
> for people who are brand new to the language, not for people who are already
> learning the language or currently use the language.

Correct! See here for a complete report on the motivations behind each design
decision: [http://chrisdone.com/posts/haskell-lang#the-
audience](http://chrisdone.com/posts/haskell-lang#the-audience)

> To me, a user of the language visits the site dozens or hundreds of times
> over the course of a career, while the average brand new user only visits it
> (I'm guessing here) 1.1 times.

In practice this isn't true—it's generally agreed in the Haskell community:
nobody goes to the home page, they go to either Hackage, Hoogle or google
something and reach a page on the Wiki.

------
nma83
The 'Click to expand' below each feature could be changed to 'Read more'.

------
shaunxcode
Small thing but the favicon should be updated to look crisp on retina
displays.

~~~
chrisdone
Huh, thanks for noticing. I have a retina display but on Linux Chrome and
Firefox both ignore any kind of global font size settings for their tabs, so
the icons are tiny and look crisp, didn't realise. That kind of thing bugs me
too. The rest of the layout itself should be retina-friendly, though, as I
developed it like that.

~~~
shaunxcode
Yeah that is the only reason I mentioned it as the rest of the site was spot
on.

------
talnet
Dam this is cool.

------
lion_del
Nice new design!

------
chorizos22
"advanced" purely-functional. Does -advanced- actually means something?.

~~~
theseoafs
Two different unrelated adjectives: it's an advanced language, and a purely
functional language

~~~
logicallee
This is about
[https://news.ycombinator.com/item?id=7475631](https://news.ycombinator.com/item?id=7475631)

You asked a year ago:

>You say it's used all the time -- so how about you give an example of a
"lazy" solution to a problem in, say, C?

but I was just reading that old thread now, so replying here.

short-circuit evaluation would be an example in C, because the programmer can
ask the compiler to do something, but at run-time it won't do it if the
results aren't necessary - it just won't execute despite the programmer
explicitly writing those instructions.

e.g. in the condition if (is_prime(a) && is_something_hard_to_compute(a)) then
even though you're calling the function is_something_hard_to_compute() about
a, at run-time if it's not necessary for the result, then purely out of
laziness it won't get called. (i.e. if the first test returns false.)

this meets the condition you asked about.

reference: [http://en.wikipedia.org/wiki/Short-
circuit_evaluation](http://en.wikipedia.org/wiki/Short-circuit_evaluation)

------
doctorstupid
"Hi there, [name]! That's a pretty name. Honest. You're getting the hang of
this!"

I fear that this style of childish and somewhat condescending tutorial content
is becoming fashionable. Was it the best fit for the audience?

~~~
chrisdone
The tutorial is 5 years old, so I guess that makes me a hipster tutorial
writer because I was doing it back when it wasn't fashionable? =p

