A Snap! Mod Idea (Part 2)

Woah, I never knew you were over 13(I can guess how old someone is by their behavior on the forums.). But I guess I was wrong because you have a GitHub account.

Oh. I just looked at the ToS, and yeah.

Wait a minute! I can make my deleted posts wiki posts‽

Interrobang. Look it up.

16 posts were split to a new topic: Typesetting dashes and related glyphs

I want to turn
[scratchblocks]
() + ()
() * ()
() max () :: operators reporter
() min () :: operators reporter
() - ()
() / ()
() ^ () :: operators reporter
() mod ()
[/scratchblocks]

into
[scratchblocks]
() [+ v] () @delInput @addInput :: operators reporter
() [* v] () @delInput @addInput :: operators reporter
() [max v] () @delInput @addInput :: operators reporter
() [min v] () @delInput @addInput :: operators reporter
() [- v] () :: operators reporter
() [/ v] () :: operators reporter
() [^ v] () :: operators reporter
() [mod v] () :: operators reporter
[/scratchblocks]
And I've made the middle input types, but I just can't figure out how to have the first input with an offset of 0 and the second with an offset of 1 in the "block migrations".

Yes, repl.it is now replit.com :wink:

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.