Live data from Hacker News

GHC 7.8.1 released

haskell.org

71–80 of 103 posts

Re: GHC 7.8.1 released

#71
post #65

Earlier quoted context omitted.

It can give unexpected/wrong results when working with Unicode strings.

Can you elaborate? Perhaps you are talking about the Char8 ByteString instance? It was a mistake to declare that instance, I think.

Perhaps you are talking about the Char8 ByteString instance?

Yes. Data.ByteString.Char8.pack does not form an isomorphism with Data.ByteString.Char8.unpack. It is thus not interchangeable with String.

Example:

    Prelude Data.ByteString.Char8> putStrLn . unpack . pack $ "Российская Федерация"
    >AA89A:0O $545@0F8O
And here the correct result with Data.Text:

    Prelude Data.Text> putStrLn . unpack . pack $ "Российская Федерация"
    Российская Федерация

Re: GHC 7.8.1 released

#72
post #65

Earlier quoted context omitted.

What are your objections to OverloadedStrings?

It can give unexpected/wrong results when working with Unicode strings.

That's true. Similarly, I expect that for types with weird Eq or Ord instances overloaded lists might give strange results. That said, those issues still exist when someone types

    pack " string"
    fromList [1,2,3,4,4.000000000000000000000000001]

Re: GHC 7.8.1 released

#73
post #53

Earlier quoted context omitted.

If you want an alternative opinion from somebody who 1. Has taught a lot of Haskell 2. Thinks LYAH is better as a reference than a step-by-step method for learning Haskell Then see my Learning Haskell gist here (it includes Haskell Fast & Hard, and other things too). https://gist.github.com/bitemyapp/8739525 If anybody is learning Haskell and needs help, please email me. Edit: I agree with nnq, I think LYAH moves too…

Cool, i'm going to look at that gist for this years "try to learn haskell... again" attempt. :) I do it every year but hit io monads and my mind continually just has a core dump. Some year I hope to climb everest.

>I do it every year but hit io monads and my mind continually just has a core dump

Stop doing that. I explicitly say in my gist:

"Most of all, don't sweat the stuff you don't understand immediately. Just keep moving."

IO is not important. It behaves no differently at a basic level than any other monad. Monads themselves are just an interface.

Don't put the knowledge on a pedestal, just keep hacking Haskell. It'll all come with time.

This blog post of mine might lend some intuition for monads (including IO): http://bitemyapp.com/posts/2014-03-24-monads-bind-join-actio...

But don't get stuck. It doesn't matter. Just write Haskell code. The compiler won't let you do anything too crazy anyway.

Re: GHC 7.8.1 released

#74
post #2

I'm intrigued by "full iOS support." Does this mean it's now possible to write iOS apps using a Haskell backend?

I'll be giving a workshop on using GHC iOS at BayHac 2014 [1] along with a demo of http://tree.is which is built entirely on top of it!

[1] http://www.haskell.org/haskellwiki/BayHac2014

Re: GHC 7.8.1 released

#76
post #70
post #45

Earlier quoted context omitted.

It's not that easy. I mean, just sending a message could entail one of objc_msgSend, obj_msgSend_stret or objc_msgSend_fpret, and which one you want to use is not always as clear-cut as you might prefer ( http://www.sealiesoftware.com/blog/archive/2008/10/30/objc_e... ). And then there's the hassle of defining classes dynamically, which entails six function calls just to create a class with one empty method, and one…

The other hard part about it is that Haskell's FFI doesn't support variadic functions in a friendly way, which makes argument passing that much trickier.

There is a similar problem with objc_msgSend in C: Methods with certain argument types can't be called with a normal objc_msgSend(). Instead, you need to create a specifically typed function pointer and assign objc_msgSend to it. I think a similar solution would be necessary with Haskell.

Re: GHC 7.8.1 released

#77
post #52

Earlier quoted context omitted.

As a non-fan of OverloadedStrings, I'm not sure how I feel about this.

What are your objections to OverloadedStrings?

It just makes programs ambigious when reading. The amount of typing you save is the amount of type information the reader loses. It's okay if there's just one instance of IsString you're actually using, but if you're using few of them in the same module it turns out to not be satisfactory for my tastes.

Re: GHC 7.8.1 released

#78
post #77

Earlier quoted context omitted.

What are your objections to OverloadedStrings?

It just makes programs ambigious when reading. The amount of typing you save is the amount of type information the reader loses. It's okay if there's just one instance of IsString you're actually using, but if you're using few of them in the same module it turns out to not be satisfactory for my tastes.

That's pretty reasonable, yeah.

Re: GHC 7.8.1 released

#79
post #75

Earlier quoted context omitted.

I've projects I'd be willing to delegate, if I can pay you sufficiently little...

Sharing izietto's wish, how might one contact you?

You can shoot me an email (davidleothomas@gmail.com) or hit me on irc (davidthomas on freenode - I typically lurk in #haskell and #snowdrift, amongst other places). I don't want to get hopes up too high - sufficiently little isn't going to be much in the short term.

Re: GHC 7.8.1 released

#80
post #61

Earlier quoted context omitted.

This might be interesting to you: http://stackoverflow.com/questions/4858585/why-is-ghc-so-lar...

Now I'm kind of curious. The GHC is listed there as being 113 megabytes. When I try to install it on Arch Linux, the size is listed as 736MB! What in God's name is Arch doing to nearly septuple the size of this package— and more to the point, does anyone know any way of getting it to not do that? I'd very much like to learn Haskell, but taking up that much space on my laptop's SSD is a dealbreaker.

That's because they're measuring the tarball, which is a worthless metric anyway (for example, we just switched to supporting .tar.xz, which reduced the size of Linux binary distributions close to 50% for a ~65MB total. But that doesn't tell you anything about what's inside.)

The unpacked binary distribution is closer to 1GB, which sounds about right. I speculate Arch Linux is doing a regular build with nothing special.

If 1GB is undoable for your laptop (which I find odd, as someone even on a 100GB device), then that's unfortunate. You're best to wait for some other build with things removed or to just build it yourself (for example, no dynamic linking).

Post reply on HN