"this script" tomfoolery

I called it the title that was given because this has to do with "this script"

Do this:

and you get this:

and this script stays there no matter what, and the upvar will stay for eternity.

Do this:
untitled script pic (7)
And the program will erase the script. As in, if you get the result, you can use it to erase the block.

untitled script pic (7)

This is a noble addition to the long history of expressions that evaluate to themselves! The canonical one is
((λx . x) (λx . x))
which in Snap! would be

which is also an infinite loop, like yours. I guess yours works at the level of syntax (notation) whereas this CALL one works at the level of semantics (meaning).

this script seems to report the current script as a procedure value by reference...?! There must be some crazy stuff you can do with that, even beyond what I've already seen.

I'm just going to put every bug about the metaprogramming blocks here so that I don't have to make a new topic for every bug I find that floods the forum.


If you do this:

untitled script pic (9)

That pesky block decides to be defined as this:

The unevaluated becomes block variables.

Try actually adding block variables to that, via the right-click menu.

I tested that, and the only option for block variables is, remove block variables.


Interesting. Thank you for the report.

Another (minor) bug in this: if you ringify the this script which got "stuck" in the define block, you can drag it out leaving a large gap in the define block where it used to be, which also prevents you from saving/exporting the project: demo project here

woah, and also welcome back!

you also cannot drag "this script" out of the ring when you put it in one