Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

char buf[LINE_MAX]

Name: Anonymous 2008-08-26 6:39

Why do programmers still code in arbitrary limits like these?

It breaks when you do
#define LINE_MAX UINT_MAX

Why not redesign so that you use an O(1) space algorithm, or if it can't be avoided, dynamically allocate as much as needed?

Name: Anonymous 2008-08-26 23:56

>>32
Have you never written real code before?  The easiest is a continuation, but in C or ENTERPRISE OO TURNKEY SOLUTIONS you encapsulate the state of processing in an object (you know, just those same damn variables you'd have bound up inside your OMG OPTIMIZED parsing loop) and hop right back where you left off when more data comes in.  You don't even need a full state machine, though if you're generating those or have a protocol generator it's the easiest.

Fuck, you people are inexperienced.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List