A Snap! Mod Idea (Part 2)

Wouldn't the [scratchblocks] () [+ v] ()@delInput@addInput :: operators :: reporter[/scratchblocks] be the same as the multiplication one because the [+ v] is a dropdown?

that doesn't seem to work...

[scratchblocks]
(() [+ v] () @delInput @addInput::operators)
[/scratchblocks]

[scratchblocks]
(() [+ v] () @delInput @</a>addInput::operators)
[/scratchblocks]

Thanks.

What's the motivation? Just to make the palette smaller? Because there's a bit of a discoverability cost.

They want it as a menu so it looks a little cleaner.

Huh, I was going to refer you to the FAQ about settings, but to my surprise there isn't one. So here's the answer:

Every setting has to be checked, repeatedly, throughout your session. So having a setting slows Snap! down whether you enable it or not. We try to avoid them.

Sometimes it doesn't look that way because Jens adds temporary settings while debugging some feature, then removes the setting eventually.

Do you want to create expresssion builder
[scratchblocks]
() [+ v] () [- v] () @delInput @addInput :: operators reporter
[/scratchblocks]
or just try to replace "relabel" with drop down menu?

do not forget the parentheses () if this is the case ...

No, it's a dropdown; they are the same block.



The latter, i.e.:
untitled script pic (72)

I can't seem to get the operator blocks to work in threads.js:

Process.prototype.reportCommutativeOperator = function (a, op, b) { // a is a number,
    switch (op) {                                                   // op is an operator,
        case '+':                                                   // b is a list of nums
            return this.reportCombine(this.reportCONS(a, b), this.reportSum);
        case '\u00D7':
            return this.reportCombine(this.reportCONS(a, b), this.reportProduct);
        case 'max':
            return this.reportCombine(this.reportCONS(a, b), this.reportMax);
        case 'min':
            return this.reportCombine(this.reportCONS(a, b), this.reportMin);
    };
};

Process.prototype.reportCommutativeOperator = function (a, op, b) {
    switch (op) {
        case '\u2212':
            return this.reportDifference(a, b);
        case '÷':
            return this.reportQuotient(a, b);
        case '^':
            return this.reportPower(a, b);
        case 'mod':
            return this.reportModulus(a, b);
    };
};

So you want to recreate the "Variadic reporters" library
SVGCostume script pic
SVGCostume script pic (1)
SVGCostume script pic (4)
SVGCostume script pic (2)

But all commutative math operators in one block, and all commutative logic operators in another block.

is a funny name for the noncommutative ones in the second function. :~/

I should fix that.

Edit: fixed:
Process.prototype.reportNonCommutativeOperator = function (a, op, b) {
Thanks for pointing that out!

Would you agree with my edit here?:

    addPreference(
        'Flat design',
        () => {
            if (MorphicPreferences.isFlat) {
                return this.defaultDesign();
            }
            this.flatDesign();
        },
        MorphicPreferences.isFlat,
        'uncheck for default\nGUI design',
        'check for disgusting\n flat GUI design',
        false
    );

(not intending to insult anyone who actually likes flat design)

Your edit is the pink stuff?

-------------^^^^^^^^^^-------------------
[offtopic]why pink and not some other color like green, for example?[/offtopic]

reportCombine requires a ringified expression, not a JS function.

How do I turn

into ringified expressions?