Live data from Hacker News

The New Haskell Homepage

new-www.haskell.org

221–230 of 258 posts

Re: The New Haskell Homepage

#221
post #161

I like how it says "Rock-Solid Ecosystem", yet I have had the exact opposite experience trying to install even the most basic things with Cabal. I still can't get the Sublime text haskell plugin to work due to a dependency that fails to compile.

I had a similar experience with Cabal. On one computer I haven't been able to install Yesod whereas on another one, it finally worked after I had wiped my ~/.cabal. It gave me the impression that Cabal's dependency resolution mechanism is still a bit britle.

Also I found that installing stuff through Cabal was pretty slow. It's probably partly because Haskell libraries tend to be kept narrow in scope so it's necessary to install a lot of small packages to get a piece of functionality (take for instance the dependency list of Aeson, which seems to be the recommended choice for working with JSON : http://hackage.haskell.org/package/aeson ). Another reason is that Cabal compiles Haskell code into native code.

Re: The New Haskell Homepage

#222

Earlier quoted context omitted.

There's a difference between crashing and returning null. If head returned null on an empty list, that null could be passed around to different places in the program before it crashed from a null pointer exception. There can be unexpected crashes in Haskell, but not because of null.

It's not equivalent to null, but analagous to it. With lazy evaluation, I can pass also around the expression `head []` to different places, and it won't complain until I attempt to evaluate it - much like a language with null won't complain until you try to dereference it. Sure there's a difference though - you can see immediately where the problem is with Haskell's error, but it's more difficult to trace why a valu…

> With lazy evaluation, I can pass also around the expression `head []` to different places, and it won't complain until I attempt to evaluate it - much like a language with null won't complain until you try to dereference it.

It won't complain until you try to evaluate it temporally, but the stack trace will point to the call to head.

Re: The New Haskell Homepage

#223
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 too dislike tutorials focused around the REPL, because it's rarely how you write code in practice. The REPL is more of a debugging tool for quickly testing and manipulating code you've already written. I'd jump directly into creating code files/modules - begin by creating simple programs using `main` as you would in other languages. Create a file with ".hs" extension, (Haskell filenames start with capital letters b…

> The preferred tool for writing Haskell though is emacs.

That's news to me. Emacs is a popular editor for Haskell and in general, but I don't see any reason to say it's "preferred". Unlike, say, as it is with Agda or Coq. I use Sublime Text and Atom mostly (although occasionally emacs), and it's perfectly happy. Then again, all I really ask for from an editor is syntax highlighting, basic tab completion and sensible automatic indentation. But for those who want more, there's the SublimeHaskell plugin, although I've had mixed results with it.

Re: The New Haskell Homepage

#224

Off-topic: I want to learn a functional programming language, and I was thinking to go with Scheme (because, you know, SICP...) Would there be any advantage for me to go with Haskell instead?

Perhaps, but it wouldn't hurt to pollute your mind with SICP first. At least watch the Abelson/Sussman videos (an accelerated version for HP employees); the audio sucks on a couple of them (I mean, in a couple of the lecture videos the audio sucks with much greater force than it sucks in the rest of them, but it's still not quite as bad as Feynman's Robb lectures), but it's a small time sink for a lot of enlightenment.

Re: The New Haskell Homepage

#225

Off-topic: I want to learn a functional programming language, and I was thinking to go with Scheme (because, you know, SICP...) Would there be any advantage for me to go with Haskell instead?

Scheme and Haskell are very different languages. Both are functional, but that's about where the similarities end. Scheme is impure, haskell is pure; scheme is strict, haskell lazy; scheme is dynamically typed, haskell static; all functions in scheme are variadic, all in Haskell are unary; etc. So it depends on what you're looking for, and what you're trying to use it to do. That said, here are some advantages of Haskell:

1) Speed. Haskell binaries are highly optimized and tend to be very fast.

2) Correctness. Haskell's type system is far more advanced than any other language with as much or more usage, and is very good at preventing runtime errors. (and can go a long way to preventing logic errors). Also, its purity prevents huge classes of bugs.

3) Interesting: Haskell introduces a lot of new concepts which can really open up your understanding of computer science. It's a lot of fun.

4) Forward-looking: many of the ideas introduced or popularized by Haskell, such as pattern-matching, type classes, no null pointers, etc, are manifesting themselves in the new languages these days (such as Rust and Swift). Haskell itself is also (slowly) making its way into industry. Learning Haskell, in some ways, exposes you to the "next generation" of languages and programming techniques. I'm not sure the same can be said of Scheme, which tends to be used pedagogically more than as a means to push the envelope.

Then again, I know Haskell a lot better than I know Scheme, so maybe I'm biased. But at least, it gives you something to think about.

Re: The New Haskell Homepage

#226

Off-topic: I want to learn a functional programming language, and I was thinking to go with Scheme (because, you know, SICP...) Would there be any advantage for me to go with Haskell instead?

Scheme and Haskell are very different languages. Both are functional, but that's about where the similarities end. Scheme is impure, haskell is pure; scheme is strict, haskell lazy; scheme is dynamically typed, haskell static; all functions in scheme are variadic, all in Haskell are unary; etc. So it depends on what you're looking for, and what you're trying to use it to do. That said, here are some advantages of Has…

Thanks.

By training I am not a computer scientist, but an applied mathematician, so it is a little difficult for me to make judgement calls on things like type system, lazy evaluation, unary/variadic (don't even know what that means). I am interested in AI (machine learning) and statistical inference. I was looking at Lisp/Scheme because I know that AI needs gave birth to Lisp. Plus you have newer things like Church[1] that extends Scheme to deal with probabilistic models.

[1]http://projects.csail.mit.edu/church/wiki/Church

Re: The New Haskell Homepage

#227

Earlier quoted context omitted.

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.

No. That's wrong. Completely wrong. All I'm asking for is a Kanji to Latin dictionary. It's not about changing Haskell syntax. And it's not about "studying" the syntax. Haskell has funny syntax with funny symbols. That's totally fine. I just need someone to say "see this symbol? that means cat!" Most tutorials do a terrible, terrible job of that.

Which introductory tutorials have you read?

Re: The New Haskell Homepage

#228
post #205

Earlier quoted context omitted.

Yeah. A major reason null is called the "billion dollar mistake" is that once you finally do get a NullPointerException (or the like), it can take a huge amount of time to track down where the null value originated. If you take the head of an empty list in Haskell, you get an exception right away. Not a poisoning of the well, like you do in so many other languages. That's absolutely a benefit of Haskell worth touting…

That's still the same problem, isn't it? You still have to track down where the empty list originated, just as the null value in C. I'm not a Haskeller, but do the language and tools make that easier than in other ecosystems?

So first of all, head as it is in Prelude is a partial function. The error isn't a null pointer exception, it is an issue with head not being defined on empty lists.

I personally would never use head in code I write. Instead I'd use a version which looks like [a] -> Maybe a which does properly solve the null problem.

On top of that, the compiler can warn/error if partial functions are used. I do this for all of my projects.

There has been a lot of debate over these functions should even existing in Prelude. I think they are a blight on the language.

Re: The New Haskell Homepage

#229

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.

I'm a bit late, but perhaps you'll see this. Can you catch Ctrl+W in the REPL and use it to delete the prior word, instead of closing the tab? Kind of jarring to get into the groove of using a REPL and then accidentally close the tab.

Re: The New Haskell Homepage

#230
I find the disappearance of the Haskell text and logo in the navigation bar to be really strange. It feels like I'm going to a completely different website every time I click anything on the menu.

I think it should always stay there, or something else should be done entirely.

Post reply on HN