<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Thank you very very much Daryoush ... I had not seen the book ... Looks pretty interesting, I saw it mentioning Midi though ...<br>Thank you Justin for the location of the BASIC module.<br>Regards,<br>Kashyap<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Daryoush Mehrtash &lt;dmehrtash@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> CK Kashyap &lt;ck_kashyap@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> Don Stewart &lt;dons@galois.com&gt;; haskell-cafe@haskell.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, November
 16, 2009 11:19:07 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Haskell-cafe] DSL in Haskell<br></font><br>
Have you seen the Haskell School of Expression book by Paul Hudak?&nbsp;&nbsp; <br><br>The book is available on line, Ch 9 and 10 talks about music.<br><br><span><a target="_blank" href="http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.7.pdf">http://plucky.cs.yale.edu/cs431/HaskoreSoeV-0.7.pdf</a></span><br>
<br>Daryoush<br><br><br><br><div class="gmail_quote">On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:ck_kashyap@yahoo.com" target="_blank" href="mailto:ck_kashyap@yahoo.com">ck_kashyap@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Thanks Don,<br><br>I read the PDF. I was not able to figure out how to get the BASIC module. Wanted to see a reference implementation.<br>
<br>The DSL I want to start with is a music generation DSL ... It should generate a wave file<br>with music data as input -&gt; for example the input could contain<br>C3 D3 E3 ... -&gt; should output a wave file with those notes ... some kind of mnemonics for tempo will also be there.<br>
Later I'd like to incorporate parallel sequence generation -&gt; where I could get chord effect etc ...<br>I had done a rudimentary implementation in C a while back -&gt; <br><span><span><a target="_blank" href="http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html">http://kashyap-1978.tripod.com/Escapades/Goodies/Construct_WAV.html</a></span></span><br>
<br>I'd appreciate
 it very much if you could give me some pointers on getting started.<br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Regards,<br><font color="#888888">Kashyap<br></font><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">
<div class="hm"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Don Stewart &lt;<a rel="nofollow" ymailto="mailto:dons@galois.com" target="_blank" href="mailto:dons@galois.com">dons@galois.com</a>&gt;<br><b><span style="font-weight: bold;">To:</span></b> CK Kashyap &lt;<a rel="nofollow" ymailto="mailto:ck_kashyap@yahoo.com" target="_blank" href="mailto:ck_kashyap@yahoo.com">ck_kashyap@yahoo.com</a>&gt;<br>
<b><span style="font-weight: bold;">Cc:</span></b> <a rel="nofollow" ymailto="mailto:haskell-cafe@haskell.org" target="_blank" href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br><b><span style="font-weight: bold;">Sent:</span></b> Mon, November 16, 2009 12:57:54 AM<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Haskell-cafe] DSL in Haskell<br></font></div><div class="im"><br>
ck_kashyap:<br>&gt; Hi All,<br>&gt; I was reading a Ruby book and in that it was mentioned that its capability to<br>&gt; dynamically query and modify classes makes it suitable for implementing DSL's<br>&gt; ... I am referring to Ruby's reflection and methods like "method_missing" here.<br>
&gt; It can allow things like not having to define constants for all possible<br>&gt; unicode code points etc...For example, first use of U0123 could bring such a<br>&gt; constant definition into existence etc<br>&gt; <br>
&gt; I see multiple search hits when I look for Haskell and DSL - can someone please<br>&gt; point me to a good primer or explain to me how equivalent of above mentioned<br>&gt; features in Ruby can be done in Haskell ... or the Haskell alternative for it.<br>
<br>The Haskell equivalent would be overloading, primarily via type classes.<br><br>See Lennart Augusston's BASIC for an example of this in the extreme:<br><br><span><span>&nbsp; &nbsp; <a target="_blank" href="http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html">http://augustss.blogspot.com/2009/02/more-basic-not-that-anybody-should-care.html</a></span></span><br>
<br>That's BASIC syntax, in Haskell, relying on overloading numbers, strings<br>etc. And all statically typed.<br><br>For a survey of some of the more recent EDSLs in Haskell, see this brief<br>overview,<br><br><span><span>&nbsp; &nbsp; <a target="_blank" href="http://www.galois.com/%7Edons/papers/stewart-2009-edsls.pdf">http://www.galois.com/%7Edons/papers/stewart-2009-edsls.pdf</a></span></span><br>
<br>-- Don<br></div></div></div>

</div><br>

      </div><br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a rel="nofollow" ymailto="mailto:Haskell-Cafe@haskell.org" target="_blank" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><span>
<a target="_blank" href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a></span><br>
<br></blockquote></div><br><br>
</div></div>
<!-- cg24.c4.mail.gq1.yahoo.com compressed/chunked Mon Nov 16 08:30:09 PST 2009 -->
</div><br>



      </body></html>