Discuss Scratch

TheAspiringHacker
Scratcher
100+ posts

Tail Call Optimization

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

PrincessFlowerTV wrote:

OP, If you want people to support your suggestion, you should explain it, otherwise… No one will know what you are suggesting!
I don't really care whether people support my suggestion, I would just like it to be implemented.
Acting like that won't get it implemented.
The amount of people “supporting” the suggestion is pretty much irrelevant to whether the suggestion is implemented.
I am talking about your attitude. Your saying it like “implement this, even if no one understands it!”
The Scratch developers should understand TCO. Any self-respecting programmer should understand TCO.

Last edited by TheAspiringHacker (Sept. 30, 2018 01:53:32)

KJRYoshi07
Scratcher
1000+ posts

Tail Call Optimization

No Support. Scratch is for beginners, and most people on it don't know what the heck it is.
Edit: Semi-Support, I guess? It would probably be useful for complex coding, but then again, scratch is for beginners and this would also almost never be used. I've also had a very hard time understanding it, but I'm trying to.

Last edited by KJRYoshi07 (Oct. 1, 2018 10:18:30)

badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

KJRYoshi07 wrote:

No Support. Scratch is for beginners, and most people on it don't know what the <removed bad word> it is.
Firstly, please do not swear. Secondly, I posted this sentence for a reason:

badatprogrammingibe wrote:

If you don't know what Tail Call Optimization is, please do not post on this suggestion until you find out what it is, you're not helping the discussion.
Please take the effort to learn what TCO is before you decide to not support it.

On to your point:
It won't affect beginners, as it isn't something you can physically see in the editor, rather it is just something that makes the scratch VM better use memory.

Last edited by badatprogrammingibe (Sept. 30, 2018 06:25:08)

KJRYoshi07
Scratcher
1000+ posts

Tail Call Optimization

badatprogrammingibe wrote:

KJRYoshi07 wrote:

No Support. Scratch is for beginners, and most people on it don't know what the heck it is.
Firstly, please do not swear. Secondly, I posted this sentence for a reason:

badatprogrammingibe wrote:

If you don't know what Tail Call Optimization is, please do not post on this suggestion until you find out what it is, you're not helping the discussion.
Please take the effort to learn what TCO is before you decide to not support it.

On to your point:
It won't affect beginners, as it isn't something you can physically see in the editor, rather it is just something that makes the scratch VM better use memory.
Firstly, Heck isn't a swear word.
Second, who would even use it? I tried to understand it, but I just couldn't. That's how hard it is to understand.
badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

KJRYoshi07 wrote:

badatprogrammingibe wrote:

KJRYoshi07 wrote:

No Support. Scratch is for beginners, and most people on it don't know what the heck it is.
Firstly, please do not swear. Secondly, I posted this sentence for a reason:

badatprogrammingibe wrote:

If you don't know what Tail Call Optimization is, please do not post on this suggestion until you find out what it is, you're not helping the discussion.
Please take the effort to learn what TCO is before you decide to not support it.

On to your point:
It won't affect beginners, as it isn't something you can physically see in the editor, rather it is just something that makes the scratch VM better use memory.
Firstly, Heck isn't a swear word.
Second, who would even use it? I tried to understand it, but I just couldn't. That's how hard it is to understand.
It's an optimization, all it does is makes the scratch VM run projects more efficiently.
One could use it without even understanding it, or knowing what it is.

It's kind of like the dynamic memory allocation that scratch list's (presumably) do. Many users use it without understanding how it works, or even that it exists.

Last edited by badatprogrammingibe (Sept. 30, 2018 06:49:14)

KJRYoshi07
Scratcher
1000+ posts

Tail Call Optimization

TheAspiringHacker wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

PrincessFlowerTV wrote:

OP, If you want people to support your suggestion, you should explain it, otherwise… No one will know what you are suggesting!
I don't really care whether people support my suggestion, I would just like it to be implemented.
Acting like that won't get it implemented.
The amount of people “supporting” the suggestion is pretty much irrelevant to whether the suggestion is implemented.
I am talking about your attitude. Your saying it like “implement this, even if no one understands it!”
The Scratch developers should understand TCO. Any self-respecting programmer should understand TCO.
You don't need to understand what TCO is to respect your programming. That's like saying I shouldn't respect myself just because I don't understand something that doesn't really matter in life.
badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

KJRYoshi07 wrote:

TheAspiringHacker wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

PrincessFlowerTV wrote:

OP, If you want people to support your suggestion, you should explain it, otherwise… No one will know what you are suggesting!
I don't really care whether people support my suggestion, I would just like it to be implemented.
Acting like that won't get it implemented.
The amount of people “supporting” the suggestion is pretty much irrelevant to whether the suggestion is implemented.
I am talking about your attitude. Your saying it like “implement this, even if no one understands it!”
The Scratch developers should understand TCO. Any self-respecting programmer should understand TCO.
You don't need to understand what TCO is to respect your programming. That's like saying I shouldn't respect myself just because I don't understand something that doesn't really matter in life.
When he says programmer, I'm pretty sure he means an industry programmer, not your average scratch “programmer.”
For many programmers TCO isn't just something that “doesn't really matter,” it is something that is very important for making sure their programs don't run out of memory.
TheAdriCoolManDude
Scratcher
1000+ posts

Tail Call Optimization

badatprogrammingibe wrote:

KJRYoshi07 wrote:

TheAspiringHacker wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

PrincessFlowerTV wrote:

OP, If you want people to support your suggestion, you should explain it, otherwise… No one will know what you are suggesting!
I don't really care whether people support my suggestion, I would just like it to be implemented.
Acting like that won't get it implemented.
The amount of people “supporting” the suggestion is pretty much irrelevant to whether the suggestion is implemented.
I am talking about your attitude. Your saying it like “implement this, even if no one understands it!”
The Scratch developers should understand TCO. Any self-respecting programmer should understand TCO.
You don't need to understand what TCO is to respect your programming. That's like saying I shouldn't respect myself just because I don't understand something that doesn't really matter in life.
When he says programmer, I'm pretty sure he means an industry programmer, not your average scratch “programmer.”
For many programmers TCO isn't just something that “doesn't really matter,” it is something that is very important for making sure their programs don't run out of memory.
Little memory that is.
badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

KJRYoshi07 wrote:

TheAspiringHacker wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

PrincessFlowerTV wrote:

OP, If you want people to support your suggestion, you should explain it, otherwise… No one will know what you are suggesting!
I don't really care whether people support my suggestion, I would just like it to be implemented.
Acting like that won't get it implemented.
The amount of people “supporting” the suggestion is pretty much irrelevant to whether the suggestion is implemented.
I am talking about your attitude. Your saying it like “implement this, even if no one understands it!”
The Scratch developers should understand TCO. Any self-respecting programmer should understand TCO.
You don't need to understand what TCO is to respect your programming. That's like saying I shouldn't respect myself just because I don't understand something that doesn't really matter in life.
When he says programmer, I'm pretty sure he means an industry programmer, not your average scratch “programmer.”
For many programmers TCO isn't just something that “doesn't really matter,” it is something that is very important for making sure their programs don't run out of memory.
Little memory that is.
Little memory with TCO, but large amounts of memory without.
Run this and see how much memory is up over time.
TheAdriCoolManDude
Scratcher
1000+ posts

Tail Call Optimization

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

-snip-.
Little memory with TCO, but large amounts of memory without.
Run this and see how much memory is up over time.
How? It will go back to the original block, and it would have nothing to do, so little memory.
badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

-snip-.
Little memory with TCO, but large amounts of memory without.
Run this and see how much memory is up over time.
How? It will go back to the original block, and it would have nothing to do, so little memory.
It would only use up little memory if TCO is implemented, otherwise it still stores that it has to go back to the end of the block.
Try running the project for a few minutes.

Last edited by badatprogrammingibe (Sept. 30, 2018 22:49:38)

TheAdriCoolManDude
Scratcher
1000+ posts

Tail Call Optimization

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

-snip-.
Little memory with TCO, but large amounts of memory without.
Run this and see how much memory is up over time.
How? It will go back to the original block, and it would have nothing to do, so little memory.
It would only use up little memory if TCO is implemented, otherwise it still stores that it has to go back to the end of the block.
Try running the project for a few minutes.
The project doesn't run at all.
badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

badatprogrammingibe wrote:

TheAdriCoolManDude wrote:

-snip-.
Little memory with TCO, but large amounts of memory without.
Run this and see how much memory is up over time.
How? It will go back to the original block, and it would have nothing to do, so little memory.
It would only use up little memory if TCO is implemented, otherwise it still stores that it has to go back to the end of the block.
Try running the project for a few minutes.
The project doesn't run at all.
It does, it just doesn't do anything except run a tail recursive procedure, to demonstrate that they use up lots of memory, and that scratch doesn't currently have TCO.

Last edited by badatprogrammingibe (Sept. 30, 2018 23:24:50)

Harakou
Scratcher
1000+ posts

Tail Call Optimization

So for what it's worth, badat is mostly right here - tail call elimination is a useful feature in programming languages that saves memory and can allow you to solve problems in certain ways. While there are valid arguments against it (see this post from Guido, the original developer of the Python programming language), the main concern regarding debug output doesn't apply to Scratch. Unless you're particularly against Scratch recursive code in general, there don't seem to be a lot of practical concerns. It comes down to developer time then, meaning we're kind of back to where we were with Paddle2See's post. It's not clear to me how hard it would be to implement. (Though you're welcome to try it yourself. )

With regards to the moderation side of this, I'd like to reiterate Paddle2see's request that you reframe the OP here. While I understand the reasoning that “support” is not necessary for us to implement a suggestion, you indicate that users should try to inform themselves and refrain from commenting if they don't understand in a much more polite and ahem constructive manner. Linking to TheAspiringHacker's very helpful explanation would also be a good step to helping others get some context for your idea.

And as an addendum, I am disappointed how many people are quick to shoot down an idea they don't seem to be the target audience for. While there is a question of how useful it is in Scratch, especially when iterative solutions do completely work around this problem, it's not without merit.

Last edited by Harakou (Oct. 1, 2018 05:12:52)

bybb
Scratcher
1000+ posts

Tail Call Optimization

Scratch was using 4GB of RAM after running OP's project for a few minutes, it then crashed.
This is a very useful feature, and would allow much more recursion-based complexity in more advanced Scratch projects.
badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

BUMP
UNAI
MAIN
PINK
TheAspiringHacker
Scratcher
100+ posts

Tail Call Optimization

If you want TCO so much, instead of dealing with the uninformed Scratch masses here, why don't you read the Scratch VM code to see if TCO has already been implemented, fork a version of Scratch with TCO if Scratch doesn't have it, and make a pull request on GitHub, as per free software contributor tradition?
badatprogrammingibe
Scratcher
500+ posts

Tail Call Optimization

TheAspiringHacker wrote:

If you want TCO so much, instead of dealing with the uninformed Scratch masses here, why don't you read the Scratch VM code to see if TCO has already been implemented, fork a version of Scratch with TCO if Scratch doesn't have it, and make a pull request on GitHub, as per free software contributor tradition?
I would if I could, but I don't know enough javascript.
finnb4513
Scratcher
100+ posts

Tail Call Optimization

Support, this would help with running Scratch older hardware. More often than not, children who use Scratch do it on old or weak computers. To be honest, this is not something that I worry about on a day-to-day basis; I use half of my RAM on a normal day.
TheAspiringHacker
Scratcher
100+ posts

Tail Call Optimization

badatprogrammingibe wrote:

TheAspiringHacker wrote:

If you want TCO so much, instead of dealing with the uninformed Scratch masses here, why don't you read the Scratch VM code to see if TCO has already been implemented, fork a version of Scratch with TCO if Scratch doesn't have it, and make a pull request on GitHub, as per free software contributor tradition?
I would if I could, but I don't know enough javascript.
You know what, why don't you just make an issue instead of a pull request?

Powered by DjangoBB