Haskell tutorial for pseudo users?

Hello, Are there any Haskell tutorials suitable for people who don't (and possibly don't want to) know Haskell, but just want to use an embedded language that happens to be in Haskell? Such a tutorial would focus on using libraries rather than defining them. For example, it might explain how to interpret a type signature involving type classes, but not how to write one's own type class. Thanks, / Emil

2009/2/2 Emil Axelsson
Hello,
Are there any Haskell tutorials suitable for people who don't (and possibly don't want to) know Haskell, but just want to use an embedded language that happens to be in Haskell?
Such a tutorial would focus on using libraries rather than defining them. For example, it might explain how to interpret a type signature involving type classes, but not how to write one's own type class.
Thanks,
/ Emil
Hi, Emil I don't think it's a good idea (or even possible) to use a Haskell library without knowing anything about Haskell or functional programming. However, it shouldn't take too long to learn the very basics needed to get going, but this of course depends on the complexity of the library you're trying to use. Take some the time to read the parts that are relevant to you in e.g. Learn You a Haskell for Great Good (http://learnyouahaskell.com/) or Real World Haskell which has been published in book form, but is also available at http://book.realworldhaskell.org. If you haven't already taken the course "Introduction to Functional Programming given at Chalmers", you can take a look at the lecture slides and/or exercises/labs from the course at http://www.cs.chalmers.se/Cs/Grundutb/Kurser/funht/. I hope that helps. Deniz

Hi Deniz, Deniz Dogan skrev:
I don't think it's a good idea (or even possible) to use a Haskell library without knowing anything about Haskell or functional programming. However, it shouldn't take too long to learn the very
Well, I guess I was asking for a tutorial which covers everything except the parts that are not normally relevant for a DSEL user. For example, I would expect the following to be left out: * Definition of data types and classes * Laziness * Monad internals * IO * etc. Things that I think should be covered: * Polymorphism * Higher-order functions * Lists * Recursion * Monadic combinators * etc. Of course, the requirements may vary from case to case, but you get the idea.
Take some the time to read the parts that are relevant to you in e.g. Learn You a Haskell for Great Good (http://learnyouahaskell.com/)
Seems like a nice and gentle tutorial, somewhat like what I imagined. However, it also seems a bit too "high school"-oriented for the audience I currently have in mind :) / Emil (who may try to write this tutorial himself at some point)

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Emil Axelsson wrote: | Well, I guess I was asking for a tutorial which covers everything except | the parts that are not normally relevant for a DSEL user. For example, I | would expect the following to be left out: | | * Definition of data types and classes | * Laziness | * Monad internals | * IO | * etc. | | Things that I think should be covered: | | * Polymorphism | * Higher-order functions | * Lists | * Recursion | * Monadic combinators | * etc. | | Of course, the requirements may vary from case to case, but you get the | idea. I think that the contents of the two lists would vary so dramatically from case to case that writing a generic tutorial of this sort would likely be impossible. - - Jake -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmHRm8ACgkQye5hVyvIUKk1+ACdF4b6m/+NWR56AqbTLhGWxb3b fFwAn3f6AHnbGionwlYsa47Vnz7ZW4VC =UTae -----END PGP SIGNATURE-----

Deniz Dogan wrote:
Learn You a Haskell for Great Good (http://learnyouahaskell.com/)
Mmm, interesting. Does anybody else think it would be neat if GHCi really did colourise your input like that? (Or at least display the prompt in a different colour to user input and program output?)

andrewcoppin:
Deniz Dogan wrote:
Learn You a Haskell for Great Good (http://learnyouahaskell.com/)
Mmm, interesting.
Does anybody else think it would be neat if GHCi really did colourise your input like that? (Or at least display the prompt in a different colour to user input and program output?)
I wrote about this a while ago, http://haskell.org/haskellwiki/GHCi_in_colour Needs integration with ghc-api, and we're done.

On Mon, 2009-02-02 at 20:55 +0000, Andrew Coppin wrote:
Deniz Dogan wrote:
Learn You a Haskell for Great Good (http://learnyouahaskell.com/)
Mmm, interesting.
Does anybody else think it would be neat if GHCi really did colourise your input like that?
Bleah. More terminal hacking to break and/or slow Emacs to a crawl? No thanks. jcc

Jonathan Cast
On Mon, 2009-02-02 at 20:55 +0000, Andrew Coppin wrote:
Deniz Dogan wrote:
Learn You a Haskell for Great Good (http://learnyouahaskell.com/)
Mmm, interesting.
Does anybody else think it would be neat if GHCi really did colourise your input like that?
Bleah. More terminal hacking to break and/or slow Emacs to a crawl? No thanks.
A while ago, I'd say that emacs looks like a decent operating system, sadly lacking a decent editor. Now it seems that it's even lacking a decent terminal. I'm really not sure what to make of all that: Would you recommend using it? Eternal flamewars cast aside, what about integrating such a thing into yi? Yi has the advantage of working for both masochists _and_ efficient typists. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.

On Fri, 2009-02-06 at 08:30 +0100, Achim Schneider wrote:
Jonathan Cast
wrote: On Mon, 2009-02-02 at 20:55 +0000, Andrew Coppin wrote:
Deniz Dogan wrote:
Learn You a Haskell for Great Good (http://learnyouahaskell.com/)
Mmm, interesting.
Does anybody else think it would be neat if GHCi really did colourise your input like that?
Bleah. More terminal hacking to break and/or slow Emacs to a crawl? No thanks.
A while ago, I'd say that emacs looks like a decent operating system, sadly lacking a decent editor.
I always wonder how many people who say that have actually *tried* Emacs' editor.
Now it seems that it's even lacking a decent terminal.
Actually, I think the issue is just that Emacs' ANSI color parsing code is effectively O(n^2); when I really, really need colored output I run the command in a separate window (with B&W output) and switch major modes. Emacs' terminal is also lacking all the modern conveniences, like addressable cursors and builtin line-editing designed for 1970s printing terminals and practically no searching capabilities. Alternatively, you could say it's incompatible with modern Unix's biggest mistakes and worst legacy issues.
I'm really not sure what to make of all that: Would you recommend using it?
Of course. It sucks the least of any solution I've tried. Barely.
Eternal flamewars cast aside, what about integrating such a thing into yi? Yi has the advantage of working for both masochists _and_ efficient typists.
Yi has a terminal? Maybe I should try it again. jcc

2009/2/6 Jonathan Cast
Emacs' terminal is also lacking all the modern conveniences, like addressable cursors and builtin line-editing designed for 1970s printing terminals and practically no searching capabilities. Alternatively, you could say it's incompatible with modern Unix's biggest mistakes and worst legacy issues.
With the risk of making this even more OT: Emacs has three different types of shells built-in, at least to my knowledge. These are M-x shell, eshell and term. I'm not sure which one you are referring to as "Emacs' terminal", if any of them, but inf-haskell.el uses "shell" afaics. And what do you mean with "no searching capabilites?" What kind of searching are we talking here? Deniz

On Fri, 2009-02-06 at 14:56 +0100, Deniz Dogan wrote:
2009/2/6 Jonathan Cast
: Emacs' terminal is also lacking all the modern conveniences, like addressable cursors and builtin line-editing designed for 1970s printing terminals and practically no searching capabilities. Alternatively, you could say it's incompatible with modern Unix's biggest mistakes and worst legacy issues.
With the risk of making this even more OT:
Emacs has three different types of shells built-in, at least to my knowledge. These are M-x shell, eshell and term. I'm not sure which one you are referring to as "Emacs' terminal", if any of them, but inf-haskell.el uses "shell" afaics.
I believe so. But the colorization support in shell-mode is supplied by comint; comint does fine with colorization normally, but I've had problems with large files in the past. (E.g., comint can't handle the colorized output from a full run of the test suite at work).
And what do you mean with "no searching capabilites?" What kind of searching are we talking here?
Emacs' incremental search (C-r, C-s). Remember that my list is a (sarcastic) list of advantages of M-x shell (and comint) over full-blown Unix terminal emulators --- I had mis-remembered that Konsole and GnomeTerm lacked builtin search capabilities. (Checking, I see that Konsole (KDE 3.5.10, which is what I have at work) does have poorish search support. But Emacs' search is still better!). jcc

Jonathan Cast
Konsole
ctrl+shift+f, incremental, all matches highlight, case (in)sensitive, regexen. Konsole 2.1 (KDE 4.1.2), that is. I'd use its tab support, but I have xmonad. In fact, it comes with a nice editor: I just have to type vi. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.

It's not a tutorial but it covers all the relvant portions you asked
about. Download the package, unzip it and you'll find my "Haskell
Cheat Sheet" PDF inside:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CheatSheet
On Mon, Feb 2, 2009 at 6:35 AM, Emil Axelsson
Hello,
Are there any Haskell tutorials suitable for people who don't (and possibly don't want to) know Haskell, but just want to use an embedded language that happens to be in Haskell?
Such a tutorial would focus on using libraries rather than defining them. For example, it might explain how to interpret a type signature involving type classes, but not how to write one's own type class.
Thanks,
/ Emil
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Ah, that's nice! I never actually looked at your Cheat Sheet before (thought it would be much shorter and not very useful :) ). I will definitely forward this to the people in our project. Still on the lookout for a DSEL tutorial though... / Emil Justin Bailey skrev:
It's not a tutorial but it covers all the relvant portions you asked about. Download the package, unzip it and you'll find my "Haskell Cheat Sheet" PDF inside:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CheatSheet
On Mon, Feb 2, 2009 at 6:35 AM, Emil Axelsson
wrote: Hello,
Are there any Haskell tutorials suitable for people who don't (and possibly don't want to) know Haskell, but just want to use an embedded language that happens to be in Haskell?
Such a tutorial would focus on using libraries rather than defining them. For example, it might explain how to interpret a type signature involving type classes, but not how to write one's own type class.
Thanks,
/ Emil
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (8)
-
Achim Schneider
-
Andrew Coppin
-
Deniz Dogan
-
Don Stewart
-
Emil Axelsson
-
Jake McArthur
-
Jonathan Cast
-
Justin Bailey