jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.49k stars 742 forks source link

Extensions: Add ide_set_setting and ide_get_setting #3100

Open cycomachead opened 2 years ago

cycomachead commented 2 years ago

I think it would be useful in an extension to be able to toggle settings in the settings menu.

jmoenig commented 2 years ago

I'm very reluctant about this. My principle is that the program belongs to the program author, but the IDE and its preferences belong to the user.

cycomachead commented 2 years ago

Maybe we don't need everything, but I would like to be able to do things like build a block which lets you easily escape a microword, for example. That's honestly the main thing.

jmoenig commented 2 years ago

Oh yes, that's certainly within the scope of reasonable things, I agree.

brianharvey commented 2 years ago

Wait, can't students already escape from microworlds?

There are any number of settings that users want to change in their programs. Kids want the stage dimensions to match the aspect ratio of their monitor. Dan's BJC-in-Spanish team wants to switch the language between English and Spanish under program control to automate translating script pics. I want to switch in and out of presentation mode for making tutorial videos. (I think Paul's microworlds do that too.) Log pen vectors is a natural setting for programs to control, if the program wants to make an svg. Turbo mode is another obvious one.

There are reasons to disallow reading the username. That's the only serious example I know of to disallow. So instead of very slowly adding settings to the IS ON? and SET TO _ blocks in Sensing, one at a time, when Jens needs one in a project (we've already determined empirically that Brian needing one for a project isn't good enough), why don't we make the one problematic case the exception instead of having to fight over non-problematic cases, one at a time, with pitched battles ranging over years each time?