While playing with the compile reporter

Please fill out these questions for all feature requests and bug reports. If you're requesting a feature, please let us know why this feature is important or useful, not just what it should do.

  1. What browsers show this problem?
  2. Please share an example project (if possible).
  3. Describes the steps to reproduce this issue.
    Try to run the script in the screenshot (say (split (join compile ((if <> then [] else [])) for (2) args)) by [line]))
  4. What does Snap! currently do?
    Throw a weird error (Expecting 2 input(s) but getting 2)
  5. What should Snap! do instead?
    Something other than throwing an error about the number of arguments if it was given the expected number of arguments

The error is just in the compile reporter; say, split, and join are not needed to reproduce the error.

Replacing the if-else reporter with a join reporter with three empty input slots also produces the error.

the IF reporter has 3 inputs.

Guys, there are no user serviceable parts inside Snap! blocks that I've hidden behind shift-click in the settings menu saying "EXPERIMENTAL" in capital letters are experimental features for me to debug other parts of the code. Feel free to play around with things you find, but don't expect me to welcome bug reports about them.

sorry... should I delete this topic?

nah, it's fine :slight_smile:
Did you get it to work with 3 inputs?

Not while compiling for 2 args. Other number of args work.

the number of specified inputs must be the same as the number of implicit parameters, i.e. empty slots. The IF block also has a test input (unevaluate Boolean). If you use formal parameters you don't have to specify the number of inputs in the compile block. Does that help?

Another thing I found:

That works as long as there are no empty input slots (but I think you already know that).

yes, I wrote it :wink:

Where is the "compile" block?

Doesn't matter, I've found it. It's in the "JIT compiler support" option if you shift-click the settings menu