Live data from Hacker News

The New Haskell Homepage

new-www.haskell.org

91–100 of 258 posts

Re: The New Haskell Homepage

#91

Please 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.

What I personally would like to see:

    www.haskell.org: fun, introductory, digestible
    lang.haskell.org: the current haskell.org homepage, good bookmark for those who want the haskell portal

Re: The New Haskell Homepage

#92
post #54

Please 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.

Hi, I think the visual refresh is a great idea. Would you need some help in curating a better set of videos? I think that having some topics this advanced on the home page might scare of users, especially given their visual priority on the page. Also, what's the plan on the view examples links on the page? Currently these don't link anywhere. Are you looking for existing articles that exist online to link to, or are…

I liked that the videos showed a glimpse into the active community around Haskell -- they are not just a fixed set of tutorials for newcomers, but show the variety of talks that Haskell programmers around the world give (including some deeper topics).

I'd hope there's some way to keep that perpetually current -- for it to include recent talks, kept up to date.

Re: The New Haskell Homepage

#93
post #51
post #12

Neat! A nitpick: I haven't used Haskell, so I'm trying to read the prime sieve example in the corner, but there's very little contrast between the background and the nonalphanumeric characters. Some brighter syntax highlighting would be a better choice against that dark background.

Also maybe pick a simpler example and not play into the stereotype that Haskell is for people who think they are smarter than everyone else.

FWIW I think the sieve is a great example. Fibonacci is trite and a toy, whereas this is nontrivial and shows off a lot of what's powerful about Haskell (infinite lists, list comprehensions, pattern matching with cons...).

It's complex enough that it encourages people to stare at it for a few minutes and engage with it, which is also good.

I vote to keep it!

Re: The New Haskell Homepage

#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 find that the syntax of the ghci REPL seems to have almost nothing to do with the syntax shown so far. Apparently, I have to use let for every variable, which was never mentioned, and there are lots of funny tricks for how to use multi-line stuff. I still have no clue how to actually write something, compile it, and have some sort of output in the main ghc compiler. Is there a tutorial anywhere that actually helps you learn the language through doing useful things, instead of throwing a bunch of syntax that you can't do anything with at you?

Speaking of tutorials, the old page links to like 500 of them or so. I have no clue how to figure out which one to start with. If you're re-doing it, please link no more than 3 learning pages, no matter what. Have the rest in some buried page somewhere if you must, but keep the front page manageable. How is anybody supposed to make sense of however many tutorials and courses you guys have linked on the old one? I gotta figure I'm the prime audience for this stuff, but I have no idea where to start on your current page.

While I'm at it, can anybody recommend something like a step-by-step thing for people who are proficient in several other languages, but have never seen any Haskell before? Like where every little step has something you can actually type in, run somewhere, and get some sort of output?

Re: The New Haskell Homepage

#95
I get paid to write C++ code. I'm pretty good at it. I understand it's normal usage syntax very well. I don't fucking know what a god damn thing means in Haskell.

λ 5 + 7 12 :: Num a => a

What the christ? The 12 I get. Got it. The colons? Not sure. I think it's just a dumb separator. Num is type! What the hell is a => a? I have no idea.

In the top they have an example.

primes = sieve[2..] where sieve (p:xs) = p : sieve [x | x Jesus. Where to begin? First of all I had to consult a dictionary for sieve. I guess primes is a thing (function?) that takes 2 or more things? Not sure. Not sure what 'where' means in this context. Don't have a good guess. Have absolutely no fucking clue what "p:xs" means. Also no idea what "p : sieve" means. I am equally stumped as to what "[x | x And here's the thing. I've tried to read a dozen or so tutorials on Haskell and I give up every time because the syntax isn't explain. Please, please for the love god just tell me what your abstract symbols represent!

Edit: http://learnyouahaskell.com/ Reading that now. So far it's pretty good.

Re: The New Haskell Homepage

#96
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 suggest you enable the `+m` flag for multiline input

This way, you don't have to use the weird curly braces trick (which I always forget), at the cost of having to type one more enter when entering a oneliner

FYI, this is my ghci.conf: https://github.com/berdario/dotfiles/blob/master/ghci.conf (I don't suggest a new user to use ClassyPrelude)

That said, I'm not sure what learning material to suggest to you, but if google and stackoverflow.com fails you, try freenode#haskell

personally, I got a lot more interested in Haskell after starting with Clojure (it helped me to appreciate more things like immutable data structures)

Re: The New Haskell Homepage

#97
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…

You could try IHaskell[0] for playing around with Haskell. It is like GHCi, but provides a notebook interface where you can enter multiline expressions and do declarations, so it is a lot closer to real Haskell. (It can be a bit of a paint o install though.)

Disclaimer: IHaskell author here :)

[0] https://github.com/gibiansky/IHaskell

Re: The New Haskell Homepage

#98
post #84
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…

Wonderful comment, but I have a math degree and Haskell experience. This stuff would be insane to drop on a beginner.

I'm hoping to simplify it!

Re: The New Haskell Homepage

#99

I get paid to write C++ code. I'm pretty good at it. I understand it's normal usage syntax very well. I don't fucking know what a god damn thing means in Haskell. λ 5 + 7 12 :: Num a => a What the christ? The 12 I get. Got it. The colons? Not sure. I think it's just a dumb separator. Num is type! What the hell is a => a? I have no idea. In the top they have an example. primes = sieve[2..] where sieve (p:xs) = p : sie…

I wrote a page that tries to explain the syntax in a way that's appropriate for programmers (who don't need to be shown how the REPL can be used as a calculator and things like that): http://dv.devio.us/a-quick-look-at-haskell.html

Re: The New Haskell Homepage

#100

I get paid to write C++ code. I'm pretty good at it. I understand it's normal usage syntax very well. I don't fucking know what a god damn thing means in Haskell. λ 5 + 7 12 :: Num a => a What the christ? The 12 I get. Got it. The colons? Not sure. I think it's just a dumb separator. Num is type! What the hell is a => a? I have no idea. In the top they have an example. primes = sieve[2..] where sieve (p:xs) = p : sie…

    Num a => a
is actually (Num a) => (a)

that is, Num a means roughly something like

    template
    class INum{
    }
`a` is an instance of `Num`

if you want to write a times2 function(f(x) = x*2), its type would be (with redundant parenthesis added)

     (Num a) => (a -> a)
so, a->a means it's a function that takes an `a` and returns an `a`... and `a` can be any thing that implements Num

The idea with haskell is that you heavily rely on polymorphism on the return types, this might make using code a little more awkward, since you have to explicitly say the type that you want to constrain to, but it makes writing generic libraries/APIs a lot easier, you might find this question interesting:

http://programmers.stackexchange.com/questions/105662/is-ret...

     `[2..]`
is the same thing as

     itertools.count(2)
in Python, an infinite sequence of number, starting from 2

    sieve something where sieve (p:xs) = yadayada
is usually written on multiple lines

    sieve something
      where
        sieve (p:xs) = yadayada
if you know that you can define a function with

    f x = something_with_x
it's somewhat obvious that you're defining a function called sieve that takes a (p:xs)

so, you're just defining a function and using it (with the [2..]) argument on the same line

   (p:xs)
is destructuring, it basically take a list (`(:)` is used to `cons`truct lists) and assign the first element of it to `p`, and the rest to `xs` (xs is a commonly used name for this in Haskell)

so, it's like calling

    sieve(list);
but you can define its signature as

    something sieve(T head, list rest);
(`something` will turn out to be `list`)

    /=
is indeed the same as !=, so (x `mod` p /= 0) is just (x is not a multiple of p)

    [x | x 
is a list comprehension, and is taking all the elements from xs that aren't multiples of p

p, as suggested by the letter, is a prime... so you're recursively filtering the elements who are not multiples of p, leaving only the ones who are multiple only of 1 and p themselves (that is, primes)

finally, you're concatenating the prime you're currently acting on (p) with the infinite lazy list of all subsequent primes

Hope this helps

Post reply on HN