Talk:Priority queue: Difference between revisions

(promote?)
 
(2 intermediate revisions by 2 users not shown)
Line 1:
== Lua version broken? ==
 
I think the Lua version is broken. Well the default list of things works just fine and makes the correct output, if you change the list of priorities to:
<lang lua>tasks = {
{3, 'Clear drains'},
{334455, 'Feed cat'},
{441234, 'Make tea'},
{23, 'Solve RC tasks'},
{2, 'Tax return'}
}</lang>
You get what i think is completely, wrong output.
<lang>Putting: 3 - Clear drains
Putting: 334455 - Feed cat
Putting: 441234 - Make tea
Putting: 23 - Solve RC tasks
Putting: 2 - Tax return
Popped: 441234 - Make tea
Popped: 2 - Tax return
Popped: 334455 - Feed cat
Popped: 23 - Solve RC tasks
Popped: 3 - Clear drains</lang>
I think this happens because Lua guarantees no order to associative tables (key value pairs), the example is just lucky enough that that hashes are lining up or something.
 
== Refinement ==
 
Line 41 ⟶ 64:
==Ready to promote?==
I think it's good enough to go out of draft. --[[User:Ledrug|Ledrug]] 03:23, 29 August 2011 (UTC)
: Aye. --[[User:Paddy3118|Paddy3118]] 07:29, 29 August 2011 (UTC)
 
==Python Entries==
I think there's too much Python docs shown in the Python entries.