probmods / webchurch

A Church to Javascript compiler (DEPRECATED)
Other
140 stars 15 forks source link

eval behaves baddly #30

Closed ngoodman closed 10 years ago

ngoodman commented 11 years ago

eval doesn't get correct local scope in church... for example

(define a 1)
(eval 'a)

also, eval doesn't play nice with error highlighting, as the locations reset on the sub-evaluate.

longouyang commented 10 years ago

This will be possible if/when we switch from local javascript eval to global javascript eval.

If we do that, though, we'll really want to isolate everything inside web workers. And that makes things like the probmods physics examples more difficult to get running.

longouyang commented 10 years ago

Never mind - it turns out that the local/global issue is orthogonal.

I got this working in 2cfe2a99e944b90c926ddb81b9ee25787c154b4b