This may seem like an unusual blog post: why not a post to parrot-dev? Well, I've struggled the past few weeks as a newbie, largely with language syntax. But this problem is different: this is an interesting problem, one that I think shows that language/compiler design is more than just mastering basic language syntax and getting something to run approximately.
For readers unfamiliar with squaak, I think it is a teaching tool, not a finished high-level language (HLL) that would likely be used to get some job done.
# In squaak:
for var i = 0, 10000 do
a[i] = i
# Question 1: Why is the answer:
# and not
??? My guess: there are hidden PMCs here, so the pointer is being assigned rather than the value, and so the value of i at the end is really just being pointed to? In other words, it may not be a 'for' loop problem at all.
# Question 2: How can squaak be changed to fix this up?