Code off
1
Name:
Anonymous
2009-07-28 13:59
Welcome to the first annual /prog/ Code off !
The language will be C.
Compeptitors include (in no particular order):
Mr. Ribs
Xarn
FV
Anonymous
W. T. Snacks
Rumor has it, that there may be a special guest appearance from either The Sussman or
Leah Culver.
What's the point of this, you ask?
It's to determine who is an EXPERT PROGRAMMER .
Marking criteria:
Optimization
Elegance
Bonus marks:
indentation
Good luck!
161
Name:
Anonymous
2009-07-30 12:07
>>160
Enterprise_Square_Rendering_Shit.c
162
Name:
Anonymous
2009-07-30 12:47
ed(1) to the rescue!
104a
glGenBuffers(1, &vbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 16 * MAX_SQUARE, NULL, GL_STATIC_DRAW);
.
85c
glutInitDisplayMode(GLUT_DOUBLE);
.
81a
GLuint vbo;
.
40c
glBufferSubData(GL_ARRAY_BUFFER, square_count++ * sizeof(GLfloat) * 16, sizeof(GLfloat) * 16, data);
.
21c
glVertexPointer(4, GL_FLOAT, 0, NULL);
.
9,11d
163
Name:
Anonymous
2009-07-30 14:46
>>157-158,162
This is quality. Good on you!
164
Name:
Anonymous
2009-07-30 15:30
>>104
There's actually a surprisingly lack of programs that do this.
165
Name:
Anonymous
2009-07-30 15:56
>>164
This may surprise you, but I haven't written a program to do this.
166
Name:
Anonymous
2009-08-02 10:56
Nobody won. Time limit over.
167
Name:
Anonymous
2009-08-02 12:26
>>166
Anonymous won, u god damned eejut
!
168
Name:
Anonymous
2009-08-02 15:14
>>162
Managed to figure out how to get the squares where I wanted them. Now you can drag the mouse and it'll move in that direction at the speed you dragged.
44c
t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001f;
x1 = x;
y1 = y;
} else if (button == GLUT_LEFT_BUTTON && state == GLUT_UP) {
GLfloat t2 = glutGet(GLUT_ELAPSED_TIME) * 0.001f;
int x2 = x;
int y2 = y;
int vx = (x2 - x1) / (t2 - t1);
int vy = (y2 - y1) / (t2 - t1);
int x0 = x1 - vx * t2;
int y0 = y1 - vy * t2;
square_add(x0, y0, vx, vy);
.
42a
static GLfloat t1;
static int x1, y1;
.
169
Name:
Anonymous
2009-08-02 19:09
STOP SMOKING DOPE
170
Name:
Anonymous
2009-08-03 4:37
WTF happened to OP? Who won challenge 2? Whats challenge 3?
171
Name:
Anonymous
2009-08-03 5:01
>>157
Anonymous is the winner of challenge 2! C's incredible speed and efficiency delivered you to victory! Seriously dude, I'm impressed. Also, runner up goes to !Double-Shot-Of-Java for his self-hosted applet implementation.
FINAL CHALLENGE
Dick Tower
This challenge is simple: code a program that involves the infamous Dick Tower. Any language may be used, anything goes. The most awe inspiring, revolutionary program wins.
NO HOLDS BARRED !
Good luck!
172
Name:
Anonymous
2009-08-03 5:12
>>171
Challenge ends at 4:00 PM Eastern Wednesday, August 5th.
173
Name:
Anonymous
2009-08-03 6:03
What is a Dick Tower?
174
Name:
Anonymous
2009-08-03 6:25
175
Name:
Anonymous
2009-08-03 6:44
176
Name:
Anonymous
2009-08-03 10:13
bump
177
Name:
Anonymous
2009-08-03 14:32
#!/usr/bin/python2.5
dicks = ( u"(\uff00\u2256\u203f\u2256)"
, u"( \u2256\u203f\u2256 )"
, u"(\u2256\u203f\u2256\uff00)"
, u"(\u203f\u2256 )"
, u"(\u2256\uff00\uff00\uff00)"
, u"(\uff00 \uff00\uff00 )"
, u"(\uff00 \uff00\uff00 )"
, u"(\uff00\uff00\uff00\u2256)"
, u"( \uff00\u2256\u203f)"
)
def prunt(n): print n
while True: map(prunt, dicks)
Eagerly awaiting the return of OP.
178
Name:
Anonymous
2009-08-03 14:42
>>171
Uhh, is this real? Should I start programming this?
179
Name:
Anonymous
2009-08-03 14:44
>>178
No it's not, there are still a few challenges to go before the final
That is, however, the final challenge
180
Name:
Anonymous
2009-08-03 15:06
>>171
Standing by for Double-Shot's applet.
181
Name:
Anonymous
2009-08-03 15:24
>>178
Yes, real. At least a challenge I stand a chance in *grabs dead dof*
182
Name:
Anonymous
2009-08-03 16:26
>>181
*grabs dead dof*
U MENA HASKAL
183
Name:
Anonymous
2009-08-03 16:40
That doesn't look like a dick tower to me!
Just looks like gibbles
184
Name:
Anonymous
2009-08-03 16:49
Dick tower is harder to implement than meets the eye. This is a worthy challenge indeed!
185
Name:
Anonymous
2009-08-03 16:51
>>184
True, I tried and it didn't compile due to it's odd characters.
186
Name:
Anonymous
2009-08-03 17:06
[john@haskal^o^:~] ghci
GHCi, version OLD http://www.haskell.org/ghc/ :yhbt for help
Loading package base ... linking ... done.
Prelude> putStrLn "( ≖‿≖)"
(V?V)
Prelude> :m System.IO.UTF8
Prelude System.IO.UTF8> System.IO.UTF8.putStrLn "( ≖‿≖)"
Loading package array-0.1.0.0 ... linking ... done.
Loading package bytestring-0.9.0.1 ... linking ... done.
Loading package utf8-stri*** Exception: stack overflow
mai dof is ded :(
187
Name:
Anonymous
2009-08-03 17:42
And who do you think is at fault here ( ≖‿≖) ?
188
Name:
Anonymous
2009-08-03 22:34
>>179-187
This thread doesn't need your shit.
189
Name:
Anonymous
2009-08-04 9:03
>>188
Oh, we'll see how you don't need it when this thread is ran over with U MENA HASKAL faggotry.
190
Name:
Anonymous
2009-08-04 9:08
wait, wtf?
Snacks is a /prog/rider?
191
Name:
Anonymous
2009-08-04 10:57
>>189
The
semantics of your sentence doesn't
parse .
I think your optimizations may not be
safe for
aliasing .
192
Name:
UMH memesmith
2009-08-04 12:36
>>189
Tell me about it. If my meme was never used again it would still be too soon. I hope everone who posts it dies in a fire.
193
Name:
Anonymous
2009-08-04 14:27
>>191
Are we having fun yet?
194
Name:
Anonymous
2009-08-04 21:42
>>192
Make another one. U MENA HASKAL is getting old.
I NEED NEW MATERIAL
195
Name:
UMH memesmith
2009-08-04 22:53
196
Name:
Anonymous
2009-08-05 0:12
>>194
U MENA
I NEDE NEW MATERAL
197
Name:
Anonymous
2009-08-05 0:42
>>195
Isnt it kinda a false promise to name yourself MEMESMITH and not make any more memes?
198
Name:
UMH memesmith
2009-08-05 1:37
>>198
Fuck you and stop stealing my name
200
Name:
UMH memesmith
2009-08-05 1:55
You need to write moot an email and if he approves you he'll trip your IP.
Newer Posts