Make a zero-based version of Snap!

i dont really get why it adds so much overhead. its not that hard to wrap your head arround and snap even shows the list numbers. it wouldnt make much sense if item 0 was indexed as 1 in the preview. (i guess thats why this is a mod) but its really not that hard to wrap your head arround adding 1

im not saying its flawed or bad. i understand if its just for fun

We are definitely not on the same page :slight_smile:

But carry on :slight_smile:

You'd be surprised at how someone that has been working with 0 based lists gets so used to them, that it takes them a while to get used to 1 based lists.

The motivation is that almost all other languages are zero based indexing

So, let's make a zero based version of Snap! So, then, it will look and behave the same as the others but with all the Snap! goodness as well :slight_smile:

Exactly so. :slight_smile:

man i wish i had a dev console on this school chromebook :confused:
does anyone know a workaround?

@coder_07 Was that your PR on GitHub #ROTFLOL :slight_smile:

for some reason github wanted me to make a pr to the normal snap repo

I thought - who the heck has had the temerity to do such a large unsolicited PR and then I saw the 07 at the end of the GitHUb handle and I thought - hang on - I think I might know who :slight_smile:

Ignore what github says, don't make a pr. Github just thinks you're trying to contribute to snap.

i've resorted to logging errors on a seperate window that opens when you (re)load the page
effectively a (very primitive) error log

@coder I've been looking at your fork on GitHub and I've a few comments

You seem to be developing against the current master branch.

This is a dead end. Any mod of Snap! starting today should be based off the dev branch

Any fork of any project (unless a bug fix exercise) should always do that :slight_smile:

That's not entirely true, since they might want to base their mod on the current stable version, rather than the dev version that includes unfinished additions, things that can be removed, and more. If you're contributing to snap, then yes, base it off the dev branch, but if you're making a mod, and have no plans on contributing to snap, then it's best to base it off of the stable branch, and then update it once the next version is released.

You make reasonable points but..

That's the rub :frowning:

Re-syncing to the next version will be a right PITA! :slight_smile:

That's what I was trying to say.

I was having a go at trying to do the change at the Snap! level (using V10dev) but one of my constraint requirements is that the blocks appear in the same place in the pallete and look the same (apart from changes from 1 to 0 as defaults)

And I'm stuck on how to modfiy the item of block to achieve this without creating a new block

Any ideas?

This could have been a bad time to try this fork :slight_smile:

Jens is currently changing the behaviour of the item of block to use negative numbers to indicate items at the end of the list!

Something I've personally wanted for quite a while :slight_smile:

i merged the dev branch into the master branch so its technically just the dev branch
you get all the dev features

i dont think you can make an item of block without item of

That is the problem I'm up against :frowning: