Live data from Hacker News

Haskell tutorial for C programmers

haskell.org

41–50 of 56 posts

Re: Haskell tutorial for C programmers

#41
post #39

@kissthblade: Your comment (dead) below is very sad. You've been hell-banned for more than a year and a half. It doesn't just seem like nobody is seeing your comments, it's true. For those without showdead on: "I posted about the same comment as the parent hours ago. I don't know if anybody even sees my posts, never gotten a response, and my "karma" or something has always been 15. And posting and reading the forum i…

This happened to me, too. I spent about a year replying before finally seeing someone mention I was hell banned. I also wondered why the forum was so slow, but it's not particularly well coded so I just assumed its always been like that.

Re: Haskell tutorial for C programmers

#42
post #39

@kissthblade: Your comment (dead) below is very sad. You've been hell-banned for more than a year and a half. It doesn't just seem like nobody is seeing your comments, it's true. For those without showdead on: "I posted about the same comment as the parent hours ago. I don't know if anybody even sees my posts, never gotten a response, and my "karma" or something has always been 15. And posting and reading the forum i…

This is why it is important to use a different account on each of your browsing devices, with [showdead] so you can see of you got hellbanned.

But I guess if you can do that, you would also recognize the effects of a hellban on your account.

Re: Haskell tutorial for C programmers

#43

Earlier quoted context omitted.

> For databases, there are a myriad of options and tutorials for those Where? The only half appealing type safe query DSL that I've found for Haskell is Esqueleto, and that features a blank github readme[1] o_O [1] https://github.com/meteficha/esqueleto

Groundhog is pretty awesome[1]. Persistent also works, but it does some wonky stuff on SQL databases. Acid-state is really neat! Of course, there's stuff like postgresql-simple, but that's not very type safe. [1] https://www.fpcomplete.com/school/to-infinity-and-beyond/pic... Edit: Also, esqueleto has a pretty okay looking hackage page[2], but I've never used esqueleto, so I don't really know. [2] http://hackage.hask…

Do you have any experience with Database Supported Haskell (DSH) [1]? I've just recently found it and it seems very nice. I didn't have the time to test it though.

[1] https://hackage.haskell.org/package/DSH

Re: Haskell tutorial for C programmers

#44

Earlier quoted context omitted.

> For databases, there are a myriad of options and tutorials for those Where? The only half appealing type safe query DSL that I've found for Haskell is Esqueleto, and that features a blank github readme[1] o_O [1] https://github.com/meteficha/esqueleto

Groundhog is pretty awesome[1]. Persistent also works, but it does some wonky stuff on SQL databases. Acid-state is really neat! Of course, there's stuff like postgresql-simple, but that's not very type safe. [1] https://www.fpcomplete.com/school/to-infinity-and-beyond/pic... Edit: Also, esqueleto has a pretty okay looking hackage page[2], but I've never used esqueleto, so I don't really know. [2] http://hackage.hask…

Did not know about Groundhog, thanks. Looking into the docs Groundhog does not support joins (same deal with Persistent), which I'd say is a deal breaker for most (non-trivial) applications.

Acid-state is a different beast entirely, seems to be similar to Clojure's Datomic.

That leaves us with Esqueleto for real world type safe database access (with no SQL Server or Oracle support).

I want to jump ship from Scala to Haskell but there are some gaps to be filled yet before leaving the batteries included Java ecosystem.

Re: Haskell tutorial for C programmers

#45
post #27

Oh my, another tutorial. I've looked at many of them, trying to learn something from the Haskell way. And I think I get the fundamental advantages of the type systems, the lazy evaluation enabled by the languages purity, I think I can somehow make sense of the Monads even. I have the "learn you a haskell for good" on a pile of books where I have a glimpse from time to time. Most tutorials and books are very enthusias…

I feel like the defunct PLEAC site page on Haskell sums up most autodidactic folks experience with Haskell: http://pleac.sourceforge.net/pleac_haskell/index.html

Oh cool, you can do everything, right up to something useful. At which point you should use this library for side effects, no wait, this new library, oh wait, have you tried this new feature that's only in the latest GHCi and w/ the right Data import? ... eh, maybe I'll pass.

Still doesn't stop me from playing around now and thien. Right now the resources here: http://www.seas.upenn.edu/~cis194/

and the new book Beginning Haskell, seem to be alright.

Re: Haskell tutorial for C programmers

#46
post #27

Oh my, another tutorial. I've looked at many of them, trying to learn something from the Haskell way. And I think I get the fundamental advantages of the type systems, the lazy evaluation enabled by the languages purity, I think I can somehow make sense of the Monads even. I have the "learn you a haskell for good" on a pile of books where I have a glimpse from time to time. Most tutorials and books are very enthusias…

If all you've done is looked at tutorials and glimpsed at a book, I think it's very unlikely that you actually get the advantages or really understand any of the patterns like Monads. Write some code. The only way that you'll actually grok the language and get any of the benefits from learning it is if you actually write code in it.

[deleted]

Re: Haskell tutorial for C programmers

#47
post #27

Oh my, another tutorial. I've looked at many of them, trying to learn something from the Haskell way. And I think I get the fundamental advantages of the type systems, the lazy evaluation enabled by the languages purity, I think I can somehow make sense of the Monads even. I have the "learn you a haskell for good" on a pile of books where I have a glimpse from time to time. Most tutorials and books are very enthusias…

This tutorial itself has a zip file of non-trivial examples, if you scroll down to the last section.

Re: Haskell tutorial for C programmers

#48

Earlier quoted context omitted.

Groundhog is pretty awesome[1]. Persistent also works, but it does some wonky stuff on SQL databases. Acid-state is really neat! Of course, there's stuff like postgresql-simple, but that's not very type safe. [1] https://www.fpcomplete.com/school/to-infinity-and-beyond/pic... Edit: Also, esqueleto has a pretty okay looking hackage page[2], but I've never used esqueleto, so I don't really know. [2] http://hackage.hask…

Did not know about Groundhog, thanks. Looking into the docs Groundhog does not support joins (same deal with Persistent), which I'd say is a deal breaker for most (non-trivial) applications. Acid-state is a different beast entirely, seems to be similar to Clojure's Datomic. That leaves us with Esqueleto for real world type safe database access (with no SQL Server or Oracle support). I want to jump ship from Scala to…

Does esqueleto not do it for you? Can you be explitit about whats missing for you? Is it just oracle or sql server support?

Re: Haskell tutorial for C programmers

#49
post #35

Earlier quoted context omitted.

Multiple inheritance from a purely virtual class. In Java, they're called interfaces; Comparable is the analogue to Ord. The advantage that Haskell's typeclasses have over either Java or C++ is that the types aren't closed. I can define a new typeclass and tell the compiler that a type you defined is a member of that class at any point. In Java, if you don't define that your type is Comparable, there's nothing that I…

The advantage you mention is one of many (over OOP interfaces), I'll repeat it as (A). (A) Ability to instantiate old types with new classes (B) Conditional instantiation: "Maybe a" is an instance of "Show" iff "a" is an instance of "Show" (C) Can do return-type polymorphism, or polymorphism on any part of the signature (D) Objects do not need to pay for the interface vtable pointer. Large array of some type-class in…

(C) is covered by generics in most cases. The others, yes.

Re: Haskell tutorial for C programmers

#50
post #35

Earlier quoted context omitted.

Multiple inheritance from a purely virtual class. In Java, they're called interfaces; Comparable is the analogue to Ord. The advantage that Haskell's typeclasses have over either Java or C++ is that the types aren't closed. I can define a new typeclass and tell the compiler that a type you defined is a member of that class at any point. In Java, if you don't define that your type is Comparable, there's nothing that I…

The advantage you mention is one of many (over OOP interfaces), I'll repeat it as (A). (A) Ability to instantiate old types with new classes (B) Conditional instantiation: "Maybe a" is an instance of "Show" iff "a" is an instance of "Show" (C) Can do return-type polymorphism, or polymorphism on any part of the signature (D) Objects do not need to pay for the interface vtable pointer. Large array of some type-class in…

E) you do get a dilemma if you add two elements in a sorted structure , lexically in two different files, where two different Ord instances arr in scope, respectively. this function-is-instance problem is dual to OO's -object-is-instance problem.
Post reply on HN