Live data from Hacker News

The New Haskell Homepage

new-www.haskell.org

171–180 of 258 posts

Re: The New Haskell Homepage

#171
post #130
post #62

Earlier quoted context omitted.

Well, for one, it's a bad sieve algorithm. I think a neat algorithm to demonstrate laziness and Haskell clarity would be enumerating the Calkin-Wilf rationals. [0] It's quite a bit longer but demonstrates a number of neat ideas. I'll start first with a derivation which demonstrates all of the structure of the algorithm and then go through a series of mechanical transforms so that by the end I have a one-liner and a c…

I haven't digested it completely yet, but I suspect that the definition of `next` in `allRationals` is incorrect next (a, b, c) = (a, f b, f c) I can't find the declaration for `f` (probably go?)

It is, sorry. I was writing that all without checking it and I can't edit now.

I wrote a post elaborating the ideas here: http://tel.github.io/2014/07/09/calkin_wilf_for_early-ish_ha...

Re: The New Haskell Homepage

#172
post #62

Earlier quoted context omitted.

Well, for one, it's a bad sieve algorithm. I think a neat algorithm to demonstrate laziness and Haskell clarity would be enumerating the Calkin-Wilf rationals. [0] It's quite a bit longer but demonstrates a number of neat ideas. I'll start first with a derivation which demonstrates all of the structure of the algorithm and then go through a series of mechanical transforms so that by the end I have a one-liner and a c…

To be honest: This would turn me off even more than the current example which is also hard to read/understand as a non Haskell programmer. The fibonacci example in another comment in this thread however is very easy to understand and would fit much better.

Even the one-liner form at the end?

This comment was really bad at exposition, but I think it got somewhere nice.

Re: The New Haskell Homepage

#173
post #83

Earlier quoted context omitted.

i'm pretty sure existing users don't go to the official haskell site

I want a login. I can login at javascript.com and get straight to coding. That's good UX.

You mean www.codeschool.com? There is no UX for javascript.com.

Re: The New Haskell Homepage

#174
Just trying out the tutorial: there may be an error on step 11.

followed the instruction to type out 'a' : [] and got:

λ 'a' : [] can't find file: Imports.hs

It worked when I clicked on the command, but that may not be obvious to a new user.

λ 'a' : [] "a":: [Char]

Re: The New Haskell Homepage

#175

This appears to be a continuation of chrisdone's work on an "alternative Haskell homepage" [1], which was previously posted to HN [2]. [1] http://chrisdone.com/posts/haskell-lang [2] https://news.ycombinator.com/item?id=7814354

Yes, the new page is signed by Chris Done at the bottom. I'm glad the Haskellers listened to his advice and accepted the proposed design; now it's time to tweak it with some real use.

I didn't put that signature there, whoever deployed my repo did. I've asked several people to remove it.

Re: The New Haskell Homepage

#176
The very first example I see, the infinite sequence of primes, seems to indicate it is Eratosthenes' Sieve, but it is not. http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf

In fact, the correct implementation, with some discussion of the bad performance characteristics of the example on the front page, is in your own wiki: http://www.haskell.org/haskellwiki/Prime_numbers#Sieve_of_Er...

Reading further, it looks like it is the correct implementation of "Turner's Sieve", but I don't think (though I may be wrong) that I'm in the minority that sees "prime" and "sieve" and thinks "Eratosthenes".

Re: The New Haskell Homepage

#177
post #94

Well, it sure looks nicer, I'll give you that. I'm more interested in the content, though. I was just trying here and there over the last week or so to learn some Haskell - people always seem to be raving about how cool it is. I found my way to the CIS 194 class link, the first one on the page, and I find that it really isn't very good for learning. I went through the first page, trying to run some of the stuff. I fi…

I've been reading "Learn You a Haskell for Great Good" and it has been going much more smoothly than it has apparently been going for you. It addresses pretty much all of your complaints.

http://learnyouahaskell.com/

Re: The New Haskell Homepage

#178

Earlier quoted context omitted.

Being a god in C++ won't give you anything regarding foreign paradigms. Are you familiar with other FP languages such as ML, Miranda or even Lisp ? More than syntax it's the semantics that differs a lot. Laziness, Immutability...

Not really. No. And that's the problem! You're right that semantics are what make the languages truly different. However it is literally impossible to even begin to understand semantics if you don't know the syntax. That's what is so frustrating. It might as well be written in Kanji. That's how meaningless it is to me and, I believe, most programmers.

What you're saying is like arguing that the Japanese should switch from Kanji to Latin characters because more people worldwide use them. That's the language, it's not going to change. It's just silly to criticize Haskell/Japanese for not being immediately understandable without study.

Re: The New Haskell Homepage

#179
post #52

Please, get rid off the primes example, as it is horrible inefficient (in the sense of, "Ok, let's find the first n primes by a simple well-known algorithm, like the Sieve of Eratosthenes") and a simple (non-pure) array-based approach will kick its ass. Such a toy-example just contributes to the wrong belief that Haskell is just useful in academics or teaching. Some time ago I did implement the sieve in several langu…

> Please, get rid off the primes example, as it is horrible inefficient (in the sense of, "Ok, let's find the first n primes by a simple well-known algorithm, like the Sieve of Eratosthenes") and a simple (non-pure) array-based approach will kick its ass.

The primes example may be a bit awkward for people with no background in math but it's also an excellent example to demonstrate lazy evaluation in Haskell.

The interesting bit is that primes is an infinite list, containing all prime numbers. Don't try to print the whole list or count the sum unless you have a computer with infinite memory :)

Re: The New Haskell Homepage

#180
post #35

It bugs me a bit that the example code is brute force trial division instead of a true prime sieve. Sure, it highlights lazyness but the algorithm is less efficient. http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf

Well it's the haskell.org landing page, of course they're showing off the type of code that Haskell is good at. In your link, the purely functional version (15 lines around a priority queue) is more complicated than a naive version with a mutable array, so why would they advertise it?

My pet peeve is mainly the function name. It says the algorithm is a prime sieve when it isn't and it spreads a common misconception :)
Post reply on HN