Discuss Scratch

Rex208
Scratcher
500+ posts

Dictionaries AND Lists [A lot of supporters]

Support. This would make everything easier.
PrincessPanda_test_
Scratcher
1000+ posts

Dictionaries AND Lists [A lot of supporters]

Support although this sounds confusing to me!
RandomPerson1789
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

Blaze349 wrote:

Work-aroundable.
Agree

Iditaroid wrote:

I think adding a third kind of data like this would make things a bit more complicated for children just getting into programming, i mean, they'll have a hard enough time figuring out what a “variable” is supposed to be anyway!
Yeah

So, No support
super_crazy
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

RandomPerson1789 wrote:

Blaze349 wrote:

Work-aroundable.
Agree

Iditaroid wrote:

I think adding a third kind of data like this would make things a bit more complicated for children just getting into programming, i mean, they'll have a hard enough time figuring out what a “variable” is supposed to be anyway!
Yeah

So, No support
New scratchers dont have to use them anyway. How many New scratchers actually understand the “Define” block, but we stil have it. Scratch is made for all ages from new programmers to advanced programmers.
gregory9
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

So you want 2-D arrays?
I support.
super_crazy
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

bump
1234abcdcba4321
Scratcher
1000+ posts

Dictionaries AND Lists [A lot of supporters]

I still feel like the workaround is easy enough, it's really just two lists.

If it's for advanced scratchers at least make it 2d lists instead of 2 lists.

no support.

Last edited by 1234abcdcba4321 (Dec. 29, 2014 23:45:35)

super_crazy
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

1234abcdcba4321 wrote:

I still feel like the workaround is easy enough, it's really just two lists.

If it's for advanced scratchers at least make it 2d lists instead of 2 lists.

no support.
The workaround doesn't work 100% well and having dictionaires will make your code alot simplier and easy to use/understand.

Last edited by super_crazy (Dec. 30, 2014 01:19:08)

1234abcdcba4321
Scratcher
1000+ posts

Dictionaries AND Lists [A lot of supporters]

super_crazy wrote:

1234abcdcba4321 wrote:

I still feel like the workaround is easy enough, it's really just two lists.

If it's for advanced scratchers at least make it 2d lists instead of 2 lists.

no support.
The workaround doesn't work 100% well and having dictionaires will make your code alot simplier and easy to use/understand.

yes it does, actually.
and I said 2d lists. that makes it a little key work is a little more confusing than this and 999% more useful.
MrSherlockHolmes
Scratcher
500+ posts

Dictionaries AND Lists [A lot of supporters]

Nice concept but if you laid it out right you could have a list which had
Name: 12
Ollie: 15
Joe: 13
Where it split automatically.
liam48D
Scratcher
1000+ posts

Dictionaries AND Lists [A lot of supporters]

Support.
MrSherlockHolmes
Scratcher
500+ posts

Dictionaries AND Lists [A lot of supporters]

Nice idea, but also, you could do a list with name and then data after that. Then another name and data, again and again.
define find [thing]
set [i v] to (-1)
repeat ((length of [list v])/(2))
change [i v] by (2)
if <(thing :: custom-arg)=(item (i) of [list v])
add (item ((i)+(1)) of [list v]) to [data v]

Last edited by MrSherlockHolmes (Dec. 30, 2014 16:01:20)

super_crazy
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

MrSherlockHolmes wrote:

Nice idea, but also, you could do a list with name and then data after that. Then another name and data, again and again.
define find [thing]
set [i v] to (-1)
repeat ((length of [list v])/(2))
change [i v] by (2)
if <(thing :: custom-arg)=(item (i) of [list v])
add (item ((i)+(1)) of [list v]) to [data v]
Yes this would work but dictionaires will be easier to use and less complicated
super_crazy
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

bump
MushroomMan99
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

Semi-support

Advantage: May come in handy for some projects
Disadvantage: May take up a lot of space on the site for something not a lot of projects require.
super_crazy
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

MushroomMan99 wrote:

Semi-support

Advantage: May come in handy for some projects
Disadvantage: May take up a lot of space on the site for something not a lot of projects require.
Thank you for the semi-support. I get what you mean with the taking up space but I have seen alot of projects that don't use the ‘define’ block but we still have it. I don't think it would be much of a problem
Zro716
Scratcher
1000+ posts

Dictionaries AND Lists [A lot of supporters]

you keep spelling it “dictionaire”. I'm certain it's spelled “dictionary”, with a “y”

anyways, I don't understand exactly what you're suggesting: a 2-dimensional array, or a hashmap. if you mean 2d arrays, I support because that is extremely needed for so many personal uses. if you mean hashmaps, I'd give some support only because it's complicated and worked around much more simply than 2d arrays.
Wes64
Scratcher
500+ posts

Dictionaries AND Lists [A lot of supporters]

it is possible to implement a functional dictionary with very fast lookup times by using two lists and inserting the keys in sequential order. then you can use binary search to find the values efficiently.

if you want to get complicated it is also possible to define nested lists and dictionaries using strings, such as [['A','B'],['C','D']]. you can construct a procedure to extract information respecting the brackets and commas. that is, item 1 of this list is ['A','B']. item 1 of item 1 is 'A'.

from this point it is simple to define a dictionary as [[key1,key2...keyN],[value1,value2...valueN]]. the point is that even nested lists and dictionaries have this workaround. i have built this code and the lookup time is very fast and usable.

Last edited by Wes64 (Jan. 1, 2015 23:54:48)

super_crazy
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

Zro716 wrote:

you keep spelling it “dictionaire”. I'm certain it's spelled “dictionary”, with a “y”

anyways, I don't understand exactly what you're suggesting: a 2-dimensional array, or a hashmap. if you mean 2d arrays, I support because that is extremely needed for so many personal uses. if you mean hashmaps, I'd give some support only because it's complicated and worked around much more simply than 2d arrays.
Yeah sort of like that.
(Opps, yeah I know its spelt dictionary. I keep forgeting)
LionsStair
Scratcher
100+ posts

Dictionaries AND Lists [A lot of supporters]

This is similar to a thing in a python book I have calls map, but of course, the map function is different, but there is a way to use RPFluffy's List Variables to maybe configure it to do what you want, but I still support!

Powered by DjangoBB