pyret-lang icon indicating copy to clipboard operation
pyret-lang copied to clipboard

REPL does not initialize properly?

Open shriram opened this issue 4 years ago • 4 comments

In a new CPO instance (with use context essentials2021 showing on the left), go to the REPL and type take; you get an unbound identifier error. But click run (in the empty buffer) and it's now defined. So it seems like the initial REPL does not accurately reflect the content of the editor window.

shriram avatar Oct 06 '21 00:10 shriram

Yeah in general we don’t want to auto-run the context because it could be arbitrary code. But the REPL should probably start in essentials2021.

On Tue, Oct 5 2021 at 5:09 PM, Shriram Krishnamurthi < @.***> wrote:

In a new CPO instance (with use context essentials2021 showing on the left), go to the REPL and type take; you get an unbound identifier error. But click run (in the empty buffer) and it's now defined. So it seems like the initial REPL does not accurately reflect the content of the editor window.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brownplt/pyret-lang/issues/1621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5IU6BTSJLVT25LGV3TXDUFOHUTANCNFSM5FNATFTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jpolitz avatar Oct 06 '21 00:10 jpolitz

The other UX option is to hide the REPL until Run is pressed, but that seems a non-starter given the number of tutorials it will break.

On Tue, Oct 5 2021 at 5:09 PM, Shriram Krishnamurthi < @.***> wrote:

In a new CPO instance (with use context essentials2021 showing on the left), go to the REPL and type take; you get an unbound identifier error. But click run (in the empty buffer) and it's now defined. So it seems like the initial REPL does not accurately reflect the content of the editor window.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brownplt/pyret-lang/issues/1621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA5IU6BTSJLVT25LGV3TXDUFOHUTANCNFSM5FNATFTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jpolitz avatar Oct 06 '21 00:10 jpolitz

I think it's probably fair to start the REPL off in the result of evaluating the use context line -- but we do have to be careful. For courses that use essentials####, sure. For courses that use a shared-gdrive, though, we're opening ourselves up to arbitrary code execution upon loading the file.

blerner avatar Oct 06 '21 00:10 blerner

Then the UI should at least look different: RHS should probably say "click Run" or something like that to make clear it won't be ready until…

shriram avatar Oct 06 '21 01:10 shriram