Zep, I think I have found a bug but I don't know whether you would agree.
First, here's what happens when I type the "dir" in the console:
> dir
directory: /test/
dirtest.p8
dirtest.p8.png
Which is what I expected, only this cart is saved. Here's the code entered into the editor to reproduce this bug:
x=dir()
cls()
print(x)
and the result is it prints (on a clear screen) the following:
nil
dirtest.p8
dirtest.p8.png
I suppose the value of x is nil because dir() doesn't return anything. And I suppose the dir contents are printed after because the threading model is weird.

