Discuss Scratch

TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

This idea, allowing changing of how many inputs there are in an operator block, would help users make cleaner code.
Ones that would be affected:
// Idea A (Dropdowns)
( [sum v] of (2) (2) @delInput @addInput :: operators) // Redesign of the current basic math blocks.
<[and v] <> <> @delInput @addInput :: operators> // Redesign of the predicate (boolean reporter) blocks.
(join [] [] @delInput @addInput :: operators)
<[] [] @delInput @addInput are the same? :: operators>
Note the reason for the boolean operator to be at the beginning is because it has a dropdown, and this is the least confusing way to put it. (Thanks, Za-Chary)
// Idea B (Block Switching with Right Click)
(sum of (2) (2) @delInput @addInput :: operators)
<<> and <> @delInput @addInput :: operators>
(join [] [] @delInput @addInput :: operators)
<[] [] @delInput @addInput are the same? :: operators>
——————
Ones that would not be affected:
([sqrt v] of (9))
<[not v] <> :: operators>
<[] [> v] [] :: operators>
(letter () of [])
(length of [])
((0) mod (0))
(pick random (0) to (10))
——————
It would also be nice if this could be added to these blocks:
play note () @delInput @addInput for (0.5) beats :: sound
add [] @delInput @addInput to [list v] :: list
delete () @delInput @addInput of [list v] :: list
and possibly a choice for custom blocks even though they are not operators.
——————
I would like to see this suggestion implemented as I can't find any downsides (besides coding)

Thanks to Medians for greatly improving this suggestion.

Yes, I (sort of) stole this idea from Snap!

Last edited by TheCreatorOfUnTV (Sept. 28, 2024 15:26:06)

WindowsAdmin
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

Good idea.

But there is a tiny issue.

I want this to be added but it isnt cuz “erm you can just stack them!!!!”
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

WindowsAdmin wrote:

Good idea.

But there is a tiny issue.

I want this to be added but it isnt cuz “erm you can just stack them!!!!”
Correct. But this will help create cleaner code.
medians
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

So wait, would this:
delete (1 v) (2 v) @delInput @addInput of [list v] ::list
translate to this:
delete (1 v) of [list v]
delete (1 v) of [list v]
Also, the equals block could use this too:
(input1::grey) = (input2::grey) = (input3::grey) @delInput @addInput::operators boolean
Oh, and, why does the equals block have a dropdown in the original post?
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

medians wrote:

So wait, would this:
delete (1 v) (2 v) @delInput @addInput of [list v] ::list
translate to this:
delete (1 v) of [list v]
delete (1 v) of [list v]
Yes.

medians wrote:

Also, the equals block could use this too:
(input1::grey) = (input2::grey) = (input3::grey) @delInput @addInput::operators boolean
I'm going to add that right now, thanks for the suggestion!

medians wrote:

Oh, and, why does the equals block have a dropdown in the original post?
Don't worry, this is not a feature currently in 3.0 but it would go with the dropdown system.
medians
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

TheCreatorOfUnTV wrote:

medians wrote:

Oh, and, why does the equals block have a dropdown in the original post?
Don't worry, this is not a feature currently in 3.0 but it would go with the dropdown system.
I mean, I don't really usually get the dropdown, since block switching could just be reimplemented outside of the Data category (basically, before 3.0, you could also swap certain operator blocks to other related blocks, and that included the equals block by right clicking, which you can still do currently, but only for variables and lists).
banana439monkey
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

would love to also see this added to NOT, AND and OR operators!!!

Banana
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

Oh, and, why does the equals block have a dropdown in the original post?
Don't worry, this is not a feature currently in 3.0 but it would go with the dropdown system.
I mean, I don't really usually get the dropdown, since block switching could just be reimplemented outside of the Data category (basically, before 3.0, you could also swap certain operator blocks to other related blocks, and that included the equals block by right clicking, which you can still do currently, but only for variables and lists).
Block switching is not possible on tablets and slightly harder on Chrome Books than on most computers (which is the whole reason Scratch switched to HTML5, NOT because they knew Flash was going to get removed), and the dropdown system would reduce clutter on the blocks page as well as being less confusing for beginners who don't know right-clicking gave you a list of blocks.

Last edited by TheCreatorOfUnTV (July 10, 2024 15:06:15)

medians
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

TheCreatorOfUnTV wrote:

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

Oh, and, why does the equals block have a dropdown in the original post?
Don't worry, this is not a feature currently in 3.0 but it would go with the dropdown system.
I mean, I don't really usually get the dropdown, since block switching could just be reimplemented outside of the Data category (basically, before 3.0, you could also swap certain operator blocks to other related blocks, and that included the equals block by right clicking, which you can still do currently, but only for variables and lists).
Block switching is not possible on tablets and slightly harder on Chrome Books than on most computers (which is the whole reason Scratch switched to HTML5, NOT because they knew Flash was going to get removed), and the dropdown system would reduce clutter on the blocks page as well as being less confusing for beginners who don't know right-clicking gave you a list of blocks.
You're able to right click on mobile by holding down, which you can already do for the Data category with variable/list names. It could be explained somewhere, and I'm often concerned about putting the dropdown because of the fact that it can make scripts a lot longer.
Also, you know what I mean by Data category xD
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

Oh, and, why does the equals block have a dropdown in the original post?
Don't worry, this is not a feature currently in 3.0 but it would go with the dropdown system.
I mean, I don't really usually get the dropdown, since block switching could just be reimplemented outside of the Data category (basically, before 3.0, you could also swap certain operator blocks to other related blocks, and that included the equals block by right clicking, which you can still do currently, but only for variables and lists).
Block switching is not possible on tablets and slightly harder on Chrome Books than on most computers (which is the whole reason Scratch switched to HTML5, NOT because they knew Flash was going to get removed), and the dropdown system would reduce clutter on the blocks page as well as being less confusing for beginners who don't know right-clicking gave you a list of blocks.
You're able to right click on mobile by holding down, which you can already do for the Data category with variable/list names. It could be explained somewhere, and I'm often concerned about putting the dropdown because of the fact that it can make scripts a lot longer.
Also, you know what I mean by Data category xD
I was going to correct you on Data being Variables, but I didn't have the time.
Either way, block switching should probably be in a different suggestion.
medians
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

TheCreatorOfUnTV wrote:

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

Oh, and, why does the equals block have a dropdown in the original post?
Don't worry, this is not a feature currently in 3.0 but it would go with the dropdown system.
I mean, I don't really usually get the dropdown, since block switching could just be reimplemented outside of the Data category (basically, before 3.0, you could also swap certain operator blocks to other related blocks, and that included the equals block by right clicking, which you can still do currently, but only for variables and lists).
Block switching is not possible on tablets and slightly harder on Chrome Books than on most computers (which is the whole reason Scratch switched to HTML5, NOT because they knew Flash was going to get removed), and the dropdown system would reduce clutter on the blocks page as well as being less confusing for beginners who don't know right-clicking gave you a list of blocks.
You're able to right click on mobile by holding down, which you can already do for the Data category with variable/list names. It could be explained somewhere, and I'm often concerned about putting the dropdown because of the fact that it can make scripts a lot longer.
Also, you know what I mean by Data category xD
I was going to correct you on Data being Variables, but I didn't have the time.
Either way, block switching should probably be in a different suggestion.
Yea, I tried to find the suggestion, but I wasn't able to but it was called sth along the lines of “Right clicking to change blocks removed in Scratch 3.0”.
Also, it's technically kinda related
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

TheCreatorOfUnTV wrote:

medians wrote:

Oh, and, why does the equals block have a dropdown in the original post?
Don't worry, this is not a feature currently in 3.0 but it would go with the dropdown system.
I mean, I don't really usually get the dropdown, since block switching could just be reimplemented outside of the Data category (basically, before 3.0, you could also swap certain operator blocks to other related blocks, and that included the equals block by right clicking, which you can still do currently, but only for variables and lists).
Block switching is not possible on tablets and slightly harder on Chrome Books than on most computers (which is the whole reason Scratch switched to HTML5, NOT because they knew Flash was going to get removed), and the dropdown system would reduce clutter on the blocks page as well as being less confusing for beginners who don't know right-clicking gave you a list of blocks.
You're able to right click on mobile by holding down, which you can already do for the Data category with variable/list names. It could be explained somewhere, and I'm often concerned about putting the dropdown because of the fact that it can make scripts a lot longer.
Also, you know what I mean by Data category xD
I was going to correct you on Data being Variables, but I didn't have the time.
Either way, block switching should probably be in a different suggestion.
Yea, I tried to find the suggestion, but I wasn't able to but it was called sth along the lines of “Right clicking to change blocks removed in Scratch 3.0”.
Also, it's technically kinda related
Alright, I changed the suggestion to add an “Idea B” for block switching.
ajskateboarder
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

TheCreatorOfUnTV wrote:

This idea, allowing changing of how many inputs there are in an operator block, would help users make cleaner code.
Ones that would be affected:
<do logical operation [and v] to <> <> @delInput @addInput :: operators> // Redesign of the boolean blocks.
I feel like the and block could be better worded as:
<<> and <> @addInput :: operators>
<<> and <> and <> @delInput @addInput :: operators>
play note () @delInput @addInput for (0.5) beats :: sound
add [] @delInput @addInput to [list v] :: list
delete () @delInput @addInput of [list v] :: list
I understand the add and delete blocks, but how would the play note block work? Would it play every note in parallel or one after another for 0.5 beats?
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

ajskateboarder wrote:

TheCreatorOfUnTV wrote:

This idea, allowing changing of how many inputs there are in an operator block, would help users make cleaner code.
Ones that would be affected:
<do logical operation [and v] to <> <> @delInput @addInput :: operators> // Redesign of the boolean blocks.
I feel like the and block could be better worded as:
<<> and <> @delInput @addInput :: operators>
<<> and <> and <> @delInput @addInput :: operators>
It would but that makes the block messier and larger when you need many of those, which would ruin the suggestion. Maybe this?
<do boolean operation [and v] to <> <> @delInput @addInput :: operators>
play note () @delInput @addInput for (0.5) beats :: sound
add [] @delInput @addInput to list :: list
delete () @delInput @addInput of list :: list
I understand the add and delete blocks, but how would the play note block work? Would it play every note in parallel or one after another for 0.5 beats?
It would play in parallel.
Za-Chary
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

TheCreatorOfUnTV wrote:

ajskateboarder wrote:

I feel like the and block could be better worded as:
<<> and <> @delInput @addInput :: operators>
<<> and <> and <> @delInput @addInput :: operators>
It would but that makes the block messier and larger when you need many of those, which would ruin the suggestion. Maybe this?
<do boolean operation [and v] to <> <> @delInput @addInput :: operators>
I actually had the same concern that @ajskateboarder had. I think “do boolean operation X to YZ” is actually messier, especially if you only need to compare two things. Then, if for example you need to write something like

<<<bool1> and <bool2>> or <<bool3> and <bool4>>>

then you're looking at some extremely long/messy code. Even aside from that, beginner programmers won't necessarily know what “logical operations” or a “boolean operations” mean. The meaning of “and” and “or”, on the other hand, are relatively easy to understand even for those who are beginner programmers.

I prefer @ajskateboarder's mockup as a result. Unless you were not intending for these blocks to replace the existing blocks?
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

Za-Chary wrote:

TheCreatorOfUnTV wrote:

ajskateboarder wrote:

I feel like the and block could be better worded as:
<<> and <> @delInput @addInput :: operators>
<<> and <> and <> @delInput @addInput :: operators>
It would but that makes the block messier and larger when you need many of those, which would ruin the suggestion. Maybe this?
<do boolean operation [and v] to <> <> @delInput @addInput :: operators>
I actually had the same concern that @ajskateboarder had. I think “do boolean operation X to YZ” is actually messier, especially if you only need to compare two things. Then, if for example you need to write something like

<<<bool1> and <bool2>> or <<bool3> and <bool4>>>

then you're looking at some extremely long/messy code. Even aside from that, beginner programmers won't necessarily know what “logical operations” or a “boolean operations” mean. The meaning of “and” and “or”, on the other hand, are relatively easy to understand even for those who are beginner programmers.

I prefer @ajskateboarder's mockup as a result. Unless you were not intending for these blocks to replace the existing blocks?
Alright then, I updated it!

Last edited by TheCreatorOfUnTV (July 10, 2024 18:21:29)

medians
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

You're now on the bamboozlement project LOL (on slide 106)
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/979822351

TheCreatorOfUnTV wrote:

Alright then, I updated it!
Yea, that is also the reason I didn't really want dropdowns for blocks like this:
() [+ v] ()::operators reporter
Also, in Scratch 3.0, if you try to pick up a block like this, then it often opens one of the inputs instead, or opens the dropdown.
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

medians wrote:

You're now on the bamboozlement project LOL (on slide 106)
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/979822351

TheCreatorOfUnTV wrote:

Alright then, I updated it!
Yea, that is also the reason I didn't really want dropdowns for blocks like this:
() [+ v] ()::operators reporter
Also, in Scratch 3.0, if you try to pick up a block like this, then it often opens one of the inputs instead, or opens the dropdown.
I made it as:
([sum v] of (0) (0) @delInput @addInput :: operators)
instead of
((0) [+ v] (0) @delInput @addInput :: operators)
for a reason.
medians
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

TheCreatorOfUnTV wrote:

medians wrote:

You're now on the bamboozlement project LOL (on slide 106)
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/979822351

TheCreatorOfUnTV wrote:

Alright then, I updated it!
Yea, that is also the reason I didn't really want dropdowns for blocks like this:
Also, in Scratch 3.0, if you try to pick up a block like this, then it often opens one of the inputs instead, or opens the dropdown.
I made it as:

instead of

for a reason.
Though, I felt like if there was a dropdown, then scripts might be too long (for both of those)
TheCreatorOfUnTV
Scratcher
1000+ posts

Allow changing of how many inputs there are in operator blocks.

ajskateboarder wrote:

TheCreatorOfUnTV wrote:

This idea, allowing changing of how many inputs there are in an operator block, would help users make cleaner code.
Ones that would be affected:
<do logical operation [and v] to <> <> @delInput @addInput :: operators> // Redesign of the boolean blocks.
I feel like the and block could be better worded as:
<<> and <> @addInput :: operators>
<<> and <> and <> @delInput @addInput :: operators>
Fixed the problem with:
<[and v] <> <> @delInput @addInput :: operators> // for the dropdown
<<> and <> @delInput @addInput :: operators> // for block switching

Powered by DjangoBB