Monad Comprehensions

View: New views
2 Messages — Rating Filter:   Alert me  

Monad Comprehensions

by Günther Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

once again I find myself merely scratching the surface of the power of  
Haskell, which is exciting and frustrating at the same time.

While real world demands require me to find / develop solutions quickly  
(abstractions for querying data sets) I keep catching glimpses of all this  
power.

But for someone like me it's difficult to assess from these glimpses alone  
which to study first. In the last few weeks I kept bugging people here on  
this list about DSLs, so I could create my own to express queries /  
relational algebra. I'd later choose then to compile this to SQL or to  
in-memory code.

Next thing I notice that I've overlooked list comprehension all this time,  
which already express quite a lot of what I'd need. And then, on top of it  
all, monad comprehension, or rather monads period. The thing that  
particularly set me off was a video from Dan Piponi:  
http://vimeo.com/6590617

It certainly made me realize how little I have understood how much power  
merely monads give you.

In short, I'm truly lost. If anyone else, with roughly the same starting  
point as me, has found their way through this jungle I'd certainly  
appreciate some tips. In particular I wonder if someone has been able to  
follow what Dan demonstrates in this video, or was it a jaw-dropping  
experience for everyone else just as me?

Günther

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Parent Message unknown Re: Monad Comprehensions

by Günther Schmidt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Ryan,

thank you for your email, it's much appreciated.


In summary I'd like to say that in the 2 years that I have been using  
Haskell I have managed to get a good working knowledge of the language  
which allows me to construct programs that are concise, correct and  
without greater redundancy.

However I also realize more and more that in order to harness the full  
power of Haskell I need to gain a greater understanding of the underlying  
math and go beyond mechanical application. It is only lately that I am  
recognizing the significance of the often used term "abstraction".  
Certainly this is pointed out in the Haskell world often enough, but hey  
I'm a noob. For someone like me this is not immediately apparent. I mean  
there seems to be almost no end of what I still have to learn, barely  
scratching the surface, tip of the iceberg, that sort of thing.

DSLs are apparently *the* way to go in the abstraction department. Oleg &  
Co's "Finally Tagless" style is my favorite when it comes to  
implementation. It bears this simplicity and elegance that I have come to  
recognize and what to me *is* "mathematical".

Not all of my dealings in Haskell are goal-oriented. Well there is that of  
course, but mostly there are all these shiny beautiful things. I get  
distracted quite a lot too. Trying to dig deeper on the subject of Dan  
Piponis video for instance. BTW I found Phil Wadlers paper "Comprehending  
Monads" quite helpful here.

I also find my focus of interest on the topics of articles on haskell-cafe  
shift. Before I would basically skip "deep stuff", ie. theoretical /  
abstract topics, and focus on technical details. Now I focus much more on  
"mathematical" issues despite the fact that I can barely understand them,  
it'll come to me eventually. Because now I consider the mathematical  
discussions far more fundamental and more "lasting". Technical details I  
can look up as the need arises and they will likely change over time, so  
no need to bother with them beforehand, they may be out-dated when you  
need them. Mathematical ones won't, they'll be good forever.


Well that's my 2 cents for now.


Günther



Am 07.11.2009, 09:37 Uhr, schrieb Ryan Grant <rgrant@...>:

> 2009/11/1 Günther Schmidt <gue.schmidt@...>:
>> In short, I'm truly lost. If anyone else, with roughly the same starting
>> point as me, has found their way through this jungle I'd certainly
>> appreciate some tips. In particular I wonder if someone has been able to
>> follow what Dan demonstrates in this video, or was it a jaw-dropping
>> experience for everyone else just as me?
>
> Günther, i have been lurking in H-cafe, and enjoying your pace of
> exploration.  AFAIK, you are trying to understand how to make
> excellent languages using Haskell.  you are asking some practical
> questions that i find relevant to my own journey into Haskell.
>
> "best practices" for specifying a DSL are not well agreed upon,
> partly due to recent advances.  i sense this problem in your
> question and in the newsworthiness of Dan's talk, (which i also
> enjoyed with a jaw-drop).
>
> i encourage you to say exactly what you want from your DSL (do it
> again, if you have already).
>
> i hope to follow your footsteps, maybe not in exact DSL needs,
> but in path of discovery.
>

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe