C FIFO Queue
1
Name:
Anonymous
2009-01-03 19:11
I was looking up info on implementing a FIFO queue in C and came across this code from a
published book :
http://www.cs.sunysb.edu/~skiena/392/programs/queue.c
Isn't this thing going to fail after you've queued QUEUESIZE times, regardless of dequeuing?
2
Name:
Anonymous
2009-01-03 19:13
q->last = (q->last+1) % QUEUESIZE;
3
Name:
Anonymous
2009-01-03 19:27
QUEUESIZE
A fixed-size queue? Terrible!
And I could never figure out how to pronounce that word. It always ends up coming out as "kwaywee" or something similarly absurd.
4
Name:
Anonymous
2009-01-03 19:27
So I guess the mod is causing it to wrap around to the beginning everytime it maxes out at QUEUESIZE? Wasn't immediately obvious to me
5
Name:
Anonymous
2009-01-03 19:37
>>3
Queue is pronounced Q (cue || kyoo).
Also, how would you implement at FIFO queue? Got any standard algorithms you could recommend?
6
Name:
Anonymous
2009-01-03 19:48
In LISP this would take me for seconds
7
Name:
Anonymous
2009-01-03 20:00
In LISP this would take me call/cc seconds
8
Name:
Anonymous
2009-01-03 20:19
In LISP this would take me c-c-c-combo breaker
9
Name:
Anonymous
2009-01-03 21:49
>>5
Incorrect; its actually pronounced
qwayway .
10
Name:
Anonymous
2009-01-03 21:57
11
Name:
Anonymous
2009-01-03 22:02
kyew
12
Name:
Anonymous
2009-01-04 11:46
no, it sounds just like the letter Q. For example, "Johnny Dumbass needs to go back to school, and when he got there, he entered the QUEUE of people waiting to register."
13
Name:
Anonymous
2009-01-04 12:51
14
Name:
Anonymous
2009-01-04 18:12
It's pronounced KAH WAH WE.
Much like "kawaii", but with an additional 'w'.
15
Name:
Anonymous
2009-01-04 18:26
How do you pronounce ``deque''?
1) Deck
2) Deck-wee
3) De-cue (faggot)
4) Da-kway
16
Name:
Anonymous
2009-01-04 18:51
duckw
17
Name:
Anonymous
2009-01-04 18:56
>>15
You're doing it wrong. The correct pronunciation is supposed to have the ``(faggot)''.
18
Name:
Anonymous
2009-01-04 20:43
ヂキュ
19
Name:
Anonymous
2009-01-04 23:03
20
Name:
Anonymous
2009-01-04 23:47
>>17
in this case the correct pronunciation includes the word
faggot .
21
Name:
Anonymous
2009-01-05 8:11
fah-got (faggot)
22
Name:
Anonymous
2009-08-16 23:44
Lain.
23
Name:
Anonymous
2009-08-17 0:11
Lain.
25
Name:
Anonymous
2010-12-23 7:22