Another thing I'm a bit confused about is whether or not a #lang-based language is considered to be module-based, as well. I always assumed they were, since #lang is essentially sugar syntax for a module form, but the Adding Languages section of the docs had two separate sections for these, causing me to doubt that assumption. If they are different, would the drracket:language:simple-module-based-language% approach work with #lang-based languages? It shouldn't be an issue for me, since my goal is to move away from the #lang syntax here, but it would still be nice to know in the future.
On Wed, Jun 4, 2014 at 9:47 PM, Daniel Brady <dabr...@umail.iu.edu> wrote: > After re-reading that section more closely, I realize that I understand > what it's saying; the part that I'm unsure about is how to actually go > about implementing the drracket:language:language<%> interface. It would > be nice if a small example was shown (like the examples shown when > implementing a reader language). I am also unsure of where this > implementation should go in my language directory: should it be in its own > file? in the same file as the language module? The documentation suggests > that I might be interested in the predefined simple implementation of the > interface, drracket:language:simple-module-based-language%, and I think > that is what I am looking for, but again there is the question of where I > should be using this in my language implementation. > > > On Wed, Jun 4, 2014 at 9:37 PM, Matthias Felleisen <matth...@ccs.neu.edu> > wrote: > >> >> On Jun 4, 2014, at 9:26 PM, Daniel Brady wrote: >> >> Hi all, >> I've decided to undertake the project of creating a small language, and >> then model the HtDP teaching languages by creating a hierarchical series of >> versions of that language. My current approach is to just make each of them >> a #lang language, but grouped together in a collection, and that's working >> out fine. But I would like to see if I can do it in a similar way to the >> HtDP languages, such that the user chooses the language from a group in the >> Choose Language menu, and doesn't use #lang syntax. >> >> (I'm already asking about how to add a group of languages to that menu in >> a different thread.) >> >> So I guess the question boils down to: *How can I take a group of #lang >> languages and convert them to the teaching-language 'style', if you will?* >> ~Daniel. >> >> -- >> *SEE YOU SPACE COWBOY...* >> ____________________ >> Racket Users list: >> http://lists.racket-lang.org/users >> >> >> >> So you read >> >> >> http://docs.racket-lang.org/tools/adding-languages.html?q=drracket%20language%20menu#%28part._.Adding_.Arbitrary_.Languages_to_.Dr.Racket%29 >> >> Can you explain where you get stuck and (if possible) why you're stuck >> there? This would help us improve the docs and we can answer your >> question(s). I think it is safe to conflate the two threads here. >> >> -- Matthias >> >> (p.s. I have done this language-menu thing only once, for The Little >> Lisper languages, but never released it.) >> > > > > -- > *SEE YOU SPACE COWBOY...* > -- *SEE YOU SPACE COWBOY...*
____________________ Racket Users list: http://lists.racket-lang.org/users