NetLogo / LevelSpace

This is the LevelSpace extension repository. LevelSpace allows you to run NetLogo models |: from inside NetLogo models :|
Other
19 stars 8 forks source link

Look into using procedure injection #88

Closed qiemem closed 7 years ago

qiemem commented 8 years ago

Could be a great replacement for

The idea is to enable stuff like this:

ls:ask ls:models [ ls:die ]
qiemem commented 8 years ago

Thoughts on how to do this:

If these primitives only required running NetLogo code, we could just append the procedure definitions to the end of the code when loading the model. Unfortunately, they require actually calling scala code.

We may be able to take advantage of the extensions api to inject what amount to extension procedures. Need to look into this.

qiemem commented 8 years ago

The current plan: define a ClassManager in ls that defines these primitives, load it via an InMemoryExtensionLoader, which is attached to the workspace via workspace.extensionManager.addLoader.

This will require moving InMemoryExtensionLoader to from test to main, which should be done in the same PR that I update the ls pointer in core.

qiemem commented 7 years ago

We decided against this as being too magical and weird.