geofholbrook / om-darwin

Genetic Algorithm library for OpenMusic
1 stars 0 forks source link

add inheritance to defspecies macro #1

Closed geofholbrook closed 9 years ago

geofholbrook commented 9 years ago

specimen is default superclass

geofholbrook commented 9 years ago

done

geofholbrook commented 9 years ago

except this is only inheritance with respect to the underlying classes, not to the species as I define it. For example, operon-slots do not inherit (first step would be to at least have the operon class inherit from the superclass's operon class)

geofholbrook commented 9 years ago

phenotype inherits properly...

geofholbrook commented 9 years ago

to this end made the 'species' metaclass. not sure why initforms of slots of the species metaclass don't work ... have to do this 'manually'

geofholbrook commented 9 years ago

this is going to be single inheritance only! (for now)

except for the actual class itself ... so 'music-mixin' will work actually as a second inheritance

geofholbrook commented 9 years ago

inheritance works fine except on loading workspace ... order of events is screwed up, probably because of macro weirdness. Check all that.

geofholbrook commented 9 years ago

OK fixed that problem by changing "compile&load" to just "load" in om-darwin.lisp. This way the macros evaluate immediately after expansion.

shouldn't depend on the class itself to determine slots ... should store this information in a global variable, which can be accessed during expansion.

geofholbrook commented 9 years ago

just "load" is really no good because it runs super slow. either load, then compile, OR scrap calls to find-class somehow