5
votes

I've been working through the Julia Tutorial, and strangely (1,2,3) returns (1,2,0).

(1,2,3,4) returns (1,2,0,0)

(1,2,3,4,5) returns (1,2,3,4,5) as expected.

It seems that sets of size 3 or 4 replace the 3rd and fourth elements with 0. I don't expect that this is normal behavior but I'm not familiar with the environment so I'm not sure with what I might have done to cause this.

I deleted all julia files from my profile and restarted the interpreter, and the behavior persists.

Version 0.3.5 (2015-01-08 22:33 UTC) under windows executed in cygwin. Same problem when executed from command.

1
Hopefully someone else will have a sense of what's going wrong for you. For what it's worth, I can't replicate your error; (1,2,3) and (1,2,3,4) each return themself with Julia 0.3.5 on my linux system. - Darshan Rivka Whittle
Can not reproduce in Julia Version 0.3.6-pre+12 Commit 4496b1f (2015-01-15 11:08 UTC). (on Debian) This sounds like a bug, so you should submit it to the bug tracker. However first check that it hasn't been patched, since I can't reproduce it - Lyndon White
I was hesitant to believe something so simple was a bug, but this has been confirmed from several sources, and it's apparently only a display issue, the values in memory are correct. - gbegley

1 Answers

8
votes

This is a (very strange!) long standing display bug on Windows. You can read about it at the link - in short, the value is correct but it doesn't display right. It should also be fixed in final release of Julia 0.4, which will use LLVM 3.5 (at least, thats what the thread says).