Earlier quoted context omitted.
This sounds like a dangerous trade off to be making. It's reminiscent of what we saw with GNOME 3, or even Windows 8. The experience is made much worse for existing users, in a vain attempt to "simplify" the design to allegedly appeal to new users who may not even really exist in practice. It's obvious now that it didn't work well in those cases, and I don't see why this case would be any different. As an occasional…
i'm pretty sure existing users don't go to the official haskell site
The New Haskell Homepage
141–150 of 258 posts
Re: The New Haskell Homepage
#142Earlier quoted context omitted.
> I understand it's normal usage syntax very well. You understand C++ syntax because you're familiar with it, not because it is "normal" in any way.
Very true, but helpfully many other languages have a similar syntax (C, Java, JavaScript, even PHP's OOP system looks like Java) so it is easy to move between them. This looks very alien. Is there any language with a similar syntax?
primes = sieve[2..] where sieve (p:xs) = p : sieve [x | x [2..] is a list starting at 2; "where" is pretty clearly defining the function after using it. So sieve is a function; p:xs is a destructuring assignment or pattern or whatever you call it (I mean, xs clearly isn't a type, so I guess Haskell writes lists as 1 : 2 : 3 : Nil, where Scala or ML would use ::). (Which means this is a function that only works on a nonempty list, which seems a bit sneaky, but we can see that it's never going to be called for an empty one).
So sieve(p:xs) returns p:sieve(...), a fairly straightforward recursion. And the ... is fairly obviously a list comprehension I'd write in Python as "[x for x in xs if x % p != 0]".
Did I get it right?
The language certainly has an excess of symbols - I think the Python way of writing that list comprehension is much clearer - but it's certainly not incomprehensible; the "where" makes perfect sense, and the [] make a good visual distinction. The : form of lists is not the C way, but it's by no means unknown. The destructuring assignment might be unfamiliar, but once you've got that p:xs is a list there's only really one thing it could mean (and even in Python you can write (a, b) = something()). To a non-Haskeller it's kind of surprising that the code doesn't stack overflow from infinite recursion, but again, given that the code works, there's only one thing it could possibly mean.
This was much easier than the time when I tried to read some Clojure.
Edit: Just to be sure I got it, I rewrote the one-liner in Python. Had to use generators to get the laziness, and had to split it in two lines for the function:
def sieve(xs): p = next(xs); yield p; yield from sieve(x for x in xs if x % p != 0)
primes = sieve(itertools.count(2))
Is that clearer than the Haskell? Maybe.Re: The New Haskell Homepage
#143Re: The New Haskell Homepage
#144It's really distracting that typing in the REPL changes the size of the containing div.
The blurry photo of (I assume) the audience of a lecture just doesn't work - what's it supposed to do?
There's very little useful information - everything is at least one click away. If the whole purpose of the site is to 'sell' to a new audience then I guess that's not an issue, but I expect to be able to go to the site of a language & get very quickly and easily to useful manual/wiki pages explaining whatever feature I'm having trouble with.
The basic style is very 'modern' but it looks more like a Kickstarter page that's there to sell you something trendy and new than the front page of a site giving you information about a language. It's very pretty but (to me) sends completely the wrong message about what this site is.
Re: The New Haskell Homepage
#145A few thoughts: It's really distracting that typing in the REPL changes the size of the containing div. The blurry photo of (I assume) the audience of a lecture just doesn't work - what's it supposed to do? There's very little useful information - everything is at least one click away. If the whole purpose of the site is to 'sell' to a new audience then I guess that's not an issue, but I expect to be able to go to th…
primes = sieve [2..]
where sieve (p:xs) =
p : sieve [x | x :1:8: parse error on input `='" error
Now I have almost no knowledge of Haskell, so I'm probably making some really basic mistake, but I figure most visitors will try that and then get put offRe: The New Haskell Homepage
#146Re: The New Haskell Homepage
#147Please note this homepage is NOT final and it's going to see revisions before we push it out to the actual website, including many tweaks to the content and probably some styling tweaks too. There are a lot of other things we still need to do as well, like ensure all redirects and subpages work properly. Source: I'm one of the Haskell.org administrators, and we pushed this out only today.
Can you please fix this markup? There should be a href on the tag. View examples
Re: The New Haskell Homepage
#148Re: The New Haskell Homepage
#149For instance FP Complete's Introduction to Haskell presents some ugly Java code which can be written in two elegant lines in Haskell (video around 03:25 min).
Re: The New Haskell Homepage
#150https://dl.dropboxusercontent.com/u/30225560/poc-haskell.png