Discuss Scratch

walkcycle
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

a C block that makes regular Scratch blocks case sensitive

case sensitive  { 
if <[cat] = [CAT]> then
false :: grey
else
does this because cat and CAT are not the same in the case sensitive C block:: grey
} :: control // control

not sure of the category

case sensing   {

} :: sensing // sensing

letter case aware {

} :: operators // operators

Last edited by walkcycle (Aug. 29, 2017 19:48:25)

FancyFoxy
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

I'd love this, actually! Maybe a little different wording:
with case sensitive {} :: sensing

THIS IS MY SIGNATURE. THIS MEANS IT IS AN AUTOMATIC MESSAGE THAT APPEARS AT THE BOTTOM OF ALL MY POSTS.
Hi! I'm FancyFoxy! I create animations and games that were never, EVER meant to be taken seriously.
FancyFoxy Heroes and #Thanksgiving are some of my latest projects, check them out!
WolfCat67
Scratcher
1000+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

I'd love this! Would really make it a lot easier for people to make case-sensitive code. After all, the fact that it's not case-sensitive as it is is kind of a let-down in some ways (some ways), so it would really help out with this block.

walkcycle
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

FancyFoxy wrote:

I'd love this, actually! Maybe a little different wording:
with case sensitive {} :: sensing

yeah, not sure of the wording, either

'with' is an improvement

more trying

sense case   {

} :: sensing // sensing

turn overlook capital letters off {

} turn overlook captal letters back on:: operators // operators

turn on case sensitive {

} turn off :: control // control

WolfCat67 wrote:

I'd love this! Would really make it a lot easier for people to make case-sensitive code. After all, the fact that it's not case-sensitive as it is is kind of a let-down in some ways (some ways), so it would really help out with this block.

I agree.

Last edited by walkcycle (Aug. 31, 2017 18:30:04)

yzyzyz
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

I support! this would solve a lot of problems.

hi! I'm yzyzyz, the owner of the #bring_it_back studio, a sticky, 400+ projects and 500+ posts.
I am an active scratcher.
advertise in my signature!
ad:Urgently need a popular animation? If you do, check out Every Time I Share A Project, by Randomness-TV!
-ShadowOfTheFuture-
Scratcher
1000+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

Support!

<Insert uncreative signature here>









██       ██  ██            ██  ██       ██
██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██
███ ███ ██ ████ ██ ███ ███
█████████ █████ █████ █████████

“Though the seasons come and go, and sunshine turns to snow, we will always have tomorrow up ahead.”
smartzx
Scratcher
100+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

Duplicate. Seriously, I find 2 pairs of duplicates in the first 10 non-stickied posts I see?

Does anyone know where I can find an ACTIVE Big Brother AUDITION studio? Pweeez tell me. (I'm also find with the Amazing Race, but not Survivor)
FancyFoxy
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

smartzx wrote:

Duplicate. Seriously, I find 2 pairs of duplicates in the first 10 non-stickied posts I see?
There's a difference between
<case sensitive [] = [] :: operators>
and
case sensitive {} :: sensing

THIS IS MY SIGNATURE. THIS MEANS IT IS AN AUTOMATIC MESSAGE THAT APPEARS AT THE BOTTOM OF ALL MY POSTS.
Hi! I'm FancyFoxy! I create animations and games that were never, EVER meant to be taken seriously.
FancyFoxy Heroes and #Thanksgiving are some of my latest projects, check them out!
TheAspiringHacker
Scratcher
100+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

Why can't we just have two separate functions? Having a C-shaped block would make the comparison functions impure and the reporter blocks are better designed if they did not depend on external state. Also, how would the block work if it called a custom block that used the comparison functions? Would the custom block be case-sensitive or not? I can see beginners getting confused by the vagueness.

Long live Kyoto Animation!
walkcycle
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

TheAspiringHacker wrote:

Why can't we just have two separate functions?

Scratch has more blocks where case (in)sensitivity comes into play.

For instance,

<[list v] contains [item] ?>

And in Scratch 3.0 (maybe)

<[string] contains [string] ? ::operators >

Also,

<key [ v] pressed?>

could have its list of keys include caps

a
A
b
B

inside the context of the C block.

TheAspiringHacker wrote:

Having a C-shaped block would make the comparison functions impure and the reporter blocks are better designed if they did not depend on external state.
It would make them case sensitive. But yeah, it is not a perfect solution.

TheAspiringHacker wrote:

Also, how would the block work if it called a custom block that used the comparison functions? Would the custom block be case-sensitive or not? I can see beginners getting confused by the vagueness.

I don't think it would extend to change the behavior inside custom blocks used in its context. But it would have consistent, dependable behavior, whatever choice is made.
Charles12310
Scratcher
1000+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

walkcycle wrote:

TheAspiringHacker wrote:

Why can't we just have two separate functions?

Scratch has more blocks where case (in)sensitivity comes into play.

For instance,

<[list v] contains [item] ?>

And in Scratch 3.0 (maybe)

<[string] contains [string] ? ::operators >

Also,

<key [ v] pressed?>

could have its list of keys include caps

a
A
b
B

inside the context of the C block.

TheAspiringHacker wrote:

Having a C-shaped block would make the comparison functions impure and the reporter blocks are better designed if they did not depend on external state.
It would make them case sensitive. But yeah, it is not a perfect solution.

TheAspiringHacker wrote:

Also, how would the block work if it called a custom block that used the comparison functions? Would the custom block be case-sensitive or not? I can see beginners getting confused by the vagueness.

I don't think it would extend to change the behavior inside custom blocks used in its context. But it would have consistent, dependable behavior, whatever choice is made.
*ahem*

<key [shift v] pressed? :: sensing >

We need this instead.


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

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

Charles12310 wrote:

<key [shift v] pressed? :: sensing >

We need this instead.
Then you would have to detect two key presses (instead of one). And Caps Lock is not the same as Shift lock on US keyboards.
TheAspiringHacker
Scratcher
100+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

I think that a more elegant solution is if Scratch had lambdas so we can write custom equality functions; the default compare function if none is given would be the case-insensitive equals block.

Long live Kyoto Animation!
walkcycle
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

Scratch 3.0 may have custom reporters, but we would still need a dependable way to get at letter case.

Last edited by walkcycle (Sept. 25, 2017 20:26:44)

TheAspiringHacker
Scratcher
100+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

walkcycle wrote:

Scratch 3.0 may have custom reporters, but we would still needs a dependable way to get at letter case.
No, I said lambdas, AKA functions as values. They can be taken as arguments by other functions.

If you want to know what I'm talking about, C++'s hash map can take a equality function that is set to std::equal_to<T> by default. http://www.cplusplus.com/reference/unordered_map/unordered_map/

EDIT: We should have a case-sensitive equality block and a case-sensitive less than block that we can use to define other case-sensitive functions.

Last edited by TheAspiringHacker (Sept. 25, 2017 20:29:57)


Long live Kyoto Animation!
walkcycle
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

I am afraid custom reporters is the best you can hope for in the next Scratch. It would be an improvement. But Scratch still needs a dependable way to get at letter case.

Advanced Topics is over here. Discussion on Snap! currently at top.
+ λ = alonzo
walkcycle
Scratcher
500+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

TheAspiringHacker wrote:

EDIT: We should have a case-sensitive equality block and a case-sensitive less than block that we can use to define other case-sensitive functions.
More than one equality block is going to be confusing.

For a case-aware less than (or greater than) block, what should it do with letters?

E.g., is A > a because of size. Or is a > A because of unicode numerical ordering?

How about strings of characters or mixed case?
TheAspiringHacker
Scratcher
100+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

walkcycle wrote:

TheAspiringHacker wrote:

EDIT: We should have a case-sensitive equality block and a case-sensitive less than block that we can use to define other case-sensitive functions.
More than one equality block is going to be confusing.

For a case-aware less than (or greater than) block, what should it do with letters?

E.g., is A > a because of size. Or is a > A because of unicode numerical ordering?

How about strings of characters or mixed case?
The case-aware less than block should use the ASCII numbers. The string comparison version should use lexicographical ordering. The less-than block can already compare characters and strings.

Long live Kyoto Animation!
Charles12310
Scratcher
1000+ posts

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

walkcycle wrote:

Charles12310 wrote:

<key [shift v] pressed? :: sensing >

We need this instead.
Then you would have to detect two key presses (instead of one). And Caps Lock is not the same as Shift lock on US keyboards.
<caps lock on? :: sensing >

Besides, it will decrease the need to keep scrolling down until you reach the capital letters.


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

case sensitive C block (for uppercase, lowercase aware blocks in Scratch)

hi (asdf) steps

Powered by DjangoBB