[Haskell-cafe] DSL in Haskell
Henk-Jan van Tuyl
hjgtuyl at chello.nl
Mon Nov 16 17:05:43 EST 2009
The most recent version of this book is
(See http://plucky.cs.yale.edu/cs431/reading.htm )
Henk-Jan van Tuyl
On Mon, 16 Nov 2009 18:49:07 +0100, Daryoush Mehrtash
<dmehrtash at gmail.com> wrote:
> Have you seen the Haskell School of Expression book by Paul Hudak?
> The book is available on line, Ch 9 and 10 talks about music.
> On Mon, Nov 16, 2009 at 3:16 AM, CK Kashyap <ck_kashyap at yahoo.com> wrote:
>> Thanks Don,
>> I read the PDF. I was not able to figure out how to get the BASIC
>> Wanted to see a reference implementation.
>> The DSL I want to start with is a music generation DSL ... It should
>> generate a wave file
>> with music data as input -> for example the input could contain
>> C3 D3 E3 ... -> should output a wave file with those notes ... some
>> kind of
>> mnemonics for tempo will also be there.
>> Later I'd like to incorporate parallel sequence generation -> where I
>> get chord effect etc ...
>> I had done a rudimentary implementation in C a while back ->
>> I'd appreciate it very much if you could give me some pointers on
>> *From:* Don Stewart <dons at galois.com>
>> *To:* CK Kashyap <ck_kashyap at yahoo.com>
>> *Cc:* haskell-cafe at haskell.org
>> *Sent:* Mon, November 16, 2009 12:57:54 AM
>> *Subject:* Re: [Haskell-cafe] DSL in Haskell
>> > Hi All,
>> > I was reading a Ruby book and in that it was mentioned that its
>> capability to
>> > dynamically query and modify classes makes it suitable for
>> > ... I am referring to Ruby's reflection and methods like
>> > It can allow things like not having to define constants for all
>> > unicode code points etc...For example, first use of U0123 could bring
>> such a
>> > constant definition into existence etc
>> > I see multiple search hits when I look for Haskell and DSL - can
>> > point me to a good primer or explain to me how equivalent of above
>> > features in Ruby can be done in Haskell ... or the Haskell alternative
>> for it.
>> The Haskell equivalent would be overloading, primarily via type classes.
>> See Lennart Augusston's BASIC for an example of this in the extreme:
>> That's BASIC syntax, in Haskell, relying on overloading numbers, strings
>> etc. And all statically typed.
>> For a survey of some of the more recent EDSLs in Haskell, see this brief
>> -- Don
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe