Discuss Scratch

stickfiregames
Scratcher
1000+ posts

letters () to () of () block

lalala3 wrote:

stickfiregames wrote:

Support since other programming languages can do this. Also the workaround is very slow as I noticed when I used it to make a cloud encoder.
Even with the “no screen refresh” thing disabled? Wow.
Why didn't I think of doing that?










If you can read this, my signature cubeupload has been eaten by an evil kumquat!




or you just used Inspect Element, you hacker

;
MushroomMan99
Scratcher
100+ posts

letters () to () of () block

If a New Scratcher wanted to make a Pig Latin translator like I did, the workaround would be far too complicated for them to understand so even if limiting the number of blocks makes things simpler, I still think it would be simpler to have the block

when green flag clicked
if <(language) = [English ]> then

say [Everything is Awesome!] for (2) secs
end
if <(language) = [French ]> then

say [Tout est super-genial!] for (2) secs
end
if <(language) = [Italian ]> then

say [E meraviglioso!] for (2) secs
end
if <(language) = [Spanish ]> then

say [Todo es fabuloso!] for (2) secs
end
samanyolu
Scratcher
1000+ posts

letters () to () of () block

+1
DadOfMrLog
Scratcher
1000+ posts

letters () to () of () block

I've madeitclearbefore… (alongside many others) that I'd really like to see this block added - it would simplify the scripting of so many other string operations!

Paddle2See wrote:

I get a bit annoyed when I see really short responses to suggestions.
*Asks slightly nervously*… What about really long responses…? (Well, you did say “Please take the time to support your opinions with some arguments”!)


Paddle2See wrote:

I like to do text manipulation projects at times and I would love to have this block. Sure, there are ways to work around it - but they are not very clean. However, I also recognize that Scratch is intended to be simple to learn - and one way to keep it simple is to limit the number of blocks. So there have to be some very compelling benefits before a new block is added to the pallet.
Apart from, as I mentioned at the start, making so many other things simpler, one compelling benefit is speed.

Scratch is relatively slow, since it has to perform translation of the blocks. That means the workaround takes several orders of magnitude longer than a built-in block would. And Scratch could really use all the help it can get, where doing so has no barriers to understanding - I have a hard time believing that anyone who can understand “letter N of STRING” would struggle with “letters M to N of STRING”. And as mentioned above, a built-in block is clearly way simpler than having to work out the script yourself.

It could be argued that it takes away the opportunity to learn a useful script. However, I have to admit that I can't see it as much of a loss, since the same basic loop construction appears in so many other situations…


astro-mechanic wrote:

Ah yes, slicing. Unfortunate for the undefined behaviors here, such as invalid indexes. Will the starting index be inclusive and the ending index be exclusive, as in Python, such that end - start = length? Or will both be inclusive?
I don't see any ambiguity in the *meaning* here - the wording makes it clear (unlike a not-immediately-determinative operator name like ‘slice’ or some form of indexing).

However, the behaviour for cases like M<1, and/or N>length… I'd say it should just take its cue from the current behaviour of “letter N of STRING”, which ignores those parts beyond the start and end. As for M>N, well…

astro-mechanic wrote:

A text reverse block would go well with this.
As it happens, the string-manipulation project in my sig has a “letters M to N of STRING” custom block, and that reverses the order of characters if M>N.
(Not suggesting a native ‘letters M to N" block should do that, though I’d hardly complain if there was a faster built-in way to do such a reversing…)

Last edited by DadOfMrLog (Aug. 27, 2014 16:41:46)



Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

imadrainpipe
Scratcher
100+ posts

letters () to () of () block

this would be very useful for compiling lists

TimothyLawyer
Scratcher
1000+ posts

letters () to () of () block

lalala3 wrote:

letters (1) to (3) of [world] :: custom
say (return) for (2) secs
Honestly, though, that's why we need custom reporter blocks in general.
say (letters (1) to (3) of [yes custom operators] :: custom) for (3e7) secs

BeetleBlocks, WatercolorBot, and Turtle Art
Hover over a name or label to translate into current language
When Earth was… Purple?

☂️




Dmith
Scratcher
1000+ posts

letters () to () of () block

HOWING
Scratcher
500+ posts

letters () to () of () block

MushroomMan99 wrote:

I am suggesting a block like this
(letters (1) to (3) of [world])
What section does this go?

Check out my most popular game! Check out my cool apple catcher! Check out my awesome Bullet Bill Dodge!
TimothyLawyer
Scratcher
1000+ posts

letters () to () of () block

HOWING wrote:

What section does this go?
It would be an operator
(letters (1) to (3) of [world] :: operators)
similar to letter ( ) of [ ].

BeetleBlocks, WatercolorBot, and Turtle Art
Hover over a name or label to translate into current language
When Earth was… Purple?

☂️




KingOfAwesome58219
Scratcher
1000+ posts

letters () to () of () block

That would be useful for games like Hangman. Support.



xX_Damion_Xx
Scratcher
40 posts

letters () to () of () block

FULL SUPPORT!

REAAAALY useful for online saving.
Charles12310
Scratcher
1000+ posts

letters () to () of () block

This block should definitely be added for many purposes such as quizzes, and so we don't have to keep on using join blocks, and so we don't have to do too much scripting for detection.

Last edited by Charles12310 (Oct. 11, 2017 23:14:50)



A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
MCGUY15
Scratcher
100+ posts

letters () to () of () block

(letters (2) to (8) of (qsupportdjjfisnvoa)

hi
gavinskycastle
Scratcher
85 posts

letters () to () of () block

MushroomMan99 wrote:

I am suggesting a block like this
(letters (1) to (3) of [world])

Cool idea! I've made scripts that act similarly to this, but this would definitely oversimplifiy it .

when green flag clicked
forever
if <someone is looking at this signature> then
ask [Why are you here?] and wait
if <(answer) = [I'm bored]> then
open link [https://scratch.mit.edu/users/gavinskycastle]
end
end
end
Charles12310
Scratcher
1000+ posts

letters () to () of () block

bump


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
walkcycle
Scratcher
500+ posts

letters () to () of () block

Charles12310
Scratcher
1000+ posts

letters () to () of () block

walkcycle wrote:

Charles12310 wrote:

SUPPORT
Why?
Edited my post.


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
DaEpikDude
Scratcher
1000+ posts

letters () to () of () block

Charles12310 wrote:

walkcycle wrote:

Charles12310 wrote:

bump (formerly SUPPORT)
Why?
Edited my post.
yeah ok

And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
calulord
Scratcher
100+ posts

letters () to () of () block

I actually made my own topic for this before I was informed this one already existed.

Support, this would make things a lot easier.

ninjaMAR
Scratcher
1000+ posts

letters () to () of () block

bump
support
i have always wanted this block

Powered by DjangoBB