Discuss Scratch

Goodthingsaregood66
Scratcher
100+ posts

split blocks

Too confusing for my brain to understand, I don't get it.

Last edited by Goodthingsaregood66 (Oct. 11, 2020 23:43:18)

mitdk
Scratcher
1000+ posts

split blocks

ThatOneWeirdDude wrote:

actual duplicate
this is not exactly what I am proposing, even though it is similar. that block has more than one output.
mitdk
Scratcher
1000+ posts

split blocks

Goodthingsaregood66 wrote:

Too confusing for my brain to understand, I don't get it.
any ideas on how to make it simpler?(not trying to be rude)
cwkavery46304
Scratcher
29 posts

split blocks

?
cwkavery46304
Scratcher
29 posts

split blocks

misteray wrote:

Support, and

sportfan999 wrote:

It may seem a little complicated to beginning Scratchers. Sorry, but no support. I may support it if the block name was easier to read.
A lot of things are complicated to beginning Scratchers.
i agree! cloud variables, lists, username… all complicated. that is not a problem.
support (split blocks)
cwkavery46304
Scratcher
29 posts

split blocks

and the block name has to be complex! what else could you do?
has to be complex? <true>
mitdk
Scratcher
1000+ posts

split blocks

cwkavery46304 wrote:

and the block name has to be complex! what else could you do?
has to be complex? <true>
Just letting you know, don't put in all the extra blocks. it's called blockspamming
Greg8128
Scratcher
500+ posts

split blocks

Maybe a block such as
split [] by [] and add to [list v] // split [abc.de.f] by [.] and add to [list v] would add "abc", "de", and "f" to [list] in that order.
The advantage of this block would be that it would let you split large strings more efficiently: e.g. splitting an essay into words would require only one pass over the text instead of hundreds or possibly thousands
mitdk
Scratcher
1000+ posts

split blocks

Greg8128 wrote:

Maybe a block such as
split [] by [] and add to [list v] // split [abc.de.f] by [.] and add to [list v] would add "abc", "de", and "f" to [list] in that order.
The advantage of this block would be that it would let you split large strings more efficiently: e.g. splitting an essay into words would require only one pass over the text instead of hundreds or possibly thousands
I actually like the idea! I will not replace my original suggestion though, even though i will add it to my suggestion.
mitdk
Scratcher
1000+ posts

split blocks

deleted



Last edited by mitdk (Oct. 15, 2020 23:03:05)

cwkavery46304
Scratcher
29 posts

split blocks

Just letting you know, don't put in all the extra blocks. it's called blockspamming
ok
MartianSoil
Scratcher
100+ posts

split blocks

Maybe edit the original post so that the suggestion is a bit more clear.
mitdk
Scratcher
1000+ posts

split blocks

MartianSoil wrote:

Maybe edit the original post so that the suggestion is a bit more clear.
good idea.
will do.
cwkavery46304
Scratcher
29 posts

split blocks

mitdk wrote:

I would now like these 2 blocks to be added
(section() of split[] on character[]::operators)
and:
split [] by [] and add to [list v]::operators 
credit to Greg8128 for this idea(as you can see in the posts above)



mitdk
maybe they should move some of the opperators blocks to a new section called ‘text’ that would also have your split blocks.
Greg8128
Scratcher
500+ posts

split blocks

MartianSoil wrote:

(pi::operators)
is a rejected feature and can be implemented with
([22]/[7])
mitdk
Scratcher
1000+ posts

split blocks

cwkavery46304 wrote:

mitdk wrote:

I would now like these 2 blocks to be added
(section() of split[] on character[]::operators)
and:
split [] by [] and add to [list v]::operators 
credit to Greg8128 for this idea(as you can see in the posts above)



mitdk
maybe they should move some of the opperators blocks to a new section called ‘text’ that would also have your split blocks.
I'm not sure.. we don't want to ask for too much

Last edited by mitdk (Oct. 16, 2020 02:40:26)

panda-wat
Scratcher
100+ posts

split blocks

Nice, as long as it doesn't crash if it sees these:
(section [3] of split [a.b] on character [.]::operators) // sections 3 and up do not exist
(section [1] of split [a.b] on character [Q]::operators) // that character is not in the input
(section [1] of split [a.b.c] on character [.]::operators) // multiple of that character are in the input
(section [1] of split [a.b] on character [ab]::operators) // this does not need an explanation.
Also, the stack block, if this reporter were to be made, would have an obvious workaround like this:
add (section [] of split [] on character []::operators) to [list v]::list

Lastly, I think that this is a little too advanced for a website geared toward eight year olds. but then again:
([abs v] of ())

Last edited by panda-wat (Oct. 16, 2020 05:33:56)

PkmnQ
Scratcher
1000+ posts

split blocks

panda-wat wrote:

Nice, as long as it doesn't crash if it sees these:
(section [3] of split [a.b] on character [.]::operators) // sections 3 and up do not exist
(section [1] of split [a.b] on character [Q]::operators) // that character is not in the input
(section [1] of split [a.b.c] on character [.]::operators) // multiple of that character are in the input
(section [1] of split [a.b] on character [ab]::operators) // this does not need an explanation.
They would report this:
(section (3) of split [a.b] on character [.]::operators) // would report an empty string
(section (1) of split [a.b] on character [Q]::operators) // would report "a.b"
(section (1) of split [a.b.c] on character [.]::operators) // would report "a"
(section (1) of split [a.b] on character [ab]::operators) // would report "a.b"
And here's some extras to help you understand better:
(section (1) of split [a.ab.b] on character [ab]::operators) // would report "a."
(section (2) of split [a.ab.b] on character [.]::operators) // would report "ab"
Vibrato
Scratcher
1000+ posts

split blocks

cwkavery46304 wrote:

username… all complicated.
Ehh, that one's pretty self-explanatory

Last edited by Vibrato (Oct. 16, 2020 12:11:28)

mitdk
Scratcher
1000+ posts

split blocks

PkmnQ wrote:

panda-wat wrote:

Nice, as long as it doesn't crash if it sees these:
(section [3] of split [a.b] on character [.]::operators) // sections 3 and up do not exist
(section [1] of split [a.b] on character [Q]::operators) // that character is not in the input
(section [1] of split [a.b.c] on character [.]::operators) // multiple of that character are in the input
(section [1] of split [a.b] on character [ab]::operators) // this does not need an explanation.
They would report this:
(section (3) of split [a.b] on character [.]::operators) // would report an empty string
(section (1) of split [a.b] on character [Q]::operators) // would report "a.b"
(section (1) of split [a.b.c] on character [.]::operators) // would report "a"
(section (1) of split [a.b] on character [ab]::operators) // would report "a.b"
And here's some extras to help you understand better:
(section (1) of split [a.ab.b] on character [ab]::operators) // would report "a."
(section (2) of split [a.ab.b] on character [.]::operators) // would report "ab"
Yes, all correct. and..

panda-wat wrote:

Nice, as long as it doesn't crash if it sees these:
(section [3] of split [a.b] on character [.]::operators) // sections 3 and up do not exist
(section [1] of split [a.b] on character [Q]::operators) // that character is not in the input
(section [1] of split [a.b.c] on character [.]::operators) // multiple of that character are in the input
(section [1] of split [a.b] on character [ab]::operators) // this does not need an explanation.
Also, the stack block, if this reporter were to be made, would have an obvious workaround like this:
add (section [] of split [] on character []::operators) to [list v]::list

Lastly, I think that this is a little too advanced for a website geared toward eight year olds. but then again:
([abs v] of ())
actually, i just seemed to think of another workaround. sorry @Greg8128 but i think i will remove the stack block.
Thanks for all the support and suggestions.
set [ v] to []
repeat (length of [])
change [ v] by (1)
add (section (::variables) of split [text] on character [ ]::operators) to [list v]

end

Last edited by mitdk (Oct. 16, 2020 23:24:23)

Powered by DjangoBB