Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
finnw
12y ago
0 comments
Save
Share
> Wait, does that mean that iterating across the members of a Lua table is not in deterministic order?
Yes. And it is documented as such. Any dependency on repeatable iteration order is a bug.
0 comments
2 comments · 1 top-level
top
newest
oldest
Pxtl
12y ago
· 1 in thread
Huh. I'm not involved directly in SpringRTS, but I'm going to take a look at the code... I assume there's a compilation flag for Lua to disable that, or they've hacked it up and are using a custom interpreter, because protecting sync is paramount.
avar
12y ago
Just using "sort(hash-keys())" instead of "hash-keys()" should be a trivial patch that fixes this.
j
/
k
navigate · click thread line to collapse