Macros Project by Bh

I noticed this project, macros v0.1 by @bh in the Snap!Con 2021 section of the Snap! home page, and I was wondering how it works. Also, when I go to the project, a few blocks in it are [scratchblocks] (Undefined! :: red reporter[/scratchblocks]:



If this is the wrong category for this, please tell me.

I saw it to, same issue.

The reason for the Undefined blocks is that you have to load it into the dev version.

At this point, the MAKE ORDINALS block is the only working macro. This was just a proof-of-concept to let people know what I'm working on (when I manage to squeeze it in...). I've mostly been trying to get backquote (or maybe read this one) to work. That's a bit of a digression, because if/when I do macros correctly users won't need backquote to build one, but it's useful anyway because I'm learning how the syntactic differences between Snap! and Scheme make trouble. (In particular, in Scheme a procedure definition is just a list, whereas in Snap! lists and blocks are completely different animals. So I need conversion functions between scripts (made of blocks) and syntax trees (made of lists).

Snap! 7 dev? It won't let me load it in "regular" Snap! 6.9.2. Unless you mean this:
Screenshot (53)
(Why are the two called pretty much the same thing?)

Edit: Looking at the links you gave just made me want macros even more.

Yes, 7-dev. Are you saying you got undefineds in 7-dev? Oops, yes, there are indeed undefineds in that file. It's because I loaded a bunch of different people's projects to start, but I'm only using a few of their blocks, so it works despite the undefineds. Sorry for misleading you.

They have the same name because they're both for developers (i.e., Jens).

The "log" list is huge! 453 items, each of which is 0-4 items, some of which are lists themselves, flattening it gives a 1654-item list.

Yes, well, I'm in the middle of debugging. You're supposed to clear out the log between runs.

What are runs? (in this context)

Clicking on one of the backquote blocks in the scripting area.

Ok. I didn't realize that changed the log. It seems to be 40 items initially.

If you read the code, you'll see several places where it makes log entries. Very useful for debugging!

The (` data) block calls a (` helper data 0) block, which has a ton of log entries.