Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C ode to P=NP

1 view
Skip to first unread message

-matt

unread,
Oct 1, 2004, 8:36:48 AM10/1/04
to
C ode to P=NP...

-- cut here --

/* Untested code - needs suitable compiler.
For clarity /^/ is raise-to-the-power, !/XOR/.
Misc defns. and casting is left as an exercise for the student */

static char const rcsid[] ="$Id: P=NP.c,v 0.1 2004/10/01 13:10:10 matt
Exp $";

extern void *everything;
static void *Clarke, *Smith, *Nielsen;
extern void (*Foobar_bods)[];
extern Foobar_fns()[];

main()
{
ASSERT(p_equals_np(&everything));
}

/* never returns and always returns - here be magic */
void
p_equals_np(
/* void *this implicit */
void *argv_stuff, ...
)
{
try {
/* while I and therefore everything exists */
while( 0!=1 ) {

again=setjmp( &argv_stuff.emergency_buffer ); /* come heaven,
hell or high water... */

if ( 2^2==0+1*2*2 && 2^1==0+1*2 ) {

ASSERT( 2^0==0+1*0 || 2^0==0+1*everything ); /* n'est pas? */
ASSERT( s=u*t+(a*t^2)>>1 ); /* to keep us
grounded */
ASSERT( derivatives( t.complex)!=0 ||
derivatives( s.complex, u.complex, a.complex ) !=0
); /* to let us fly
*/

/* ensure certain people do not load dice again */
if ( e==0+1*m*c^2 ) {
choose_definitions(
&0, &1, &2, &e, &m, &c,
&operator ==, &operator *, &operator ^, &operator +
);
/* commented out obvious bug - mgs 20041001
longjump(Hawkins); */
}

/* think next line mostly correct - can decide on first run */
ASSERT( Asimov==Smith.Will &&
Clarke.AC->(Centurian[0]&|Sentinel[everything.subset()]) );

/* For satirical reasons passim */
srand( Cook.Peter, Python.Monty );

/* probability correct */
if (argv_stuff.contains(Nielsen.Leslie) ) {
ASSERT( argv_stuff.contains( strong_anthropomorphic(
v2p(Oppenheimer) ) ) );
}

/* for I/O */
ASSERT( argv_stuff.contains(
Debussy, /* audio */
Dali /* visual */
) );

/* Ensure of an almost human nature */
ASSERT( argv_stuff.contains( the_floyd ) );

/* actually human then... */
ASSERT( argv_stuff.contains( Leonardo ) );

/* special case ... */
ASSERT( argv_stuff.contains( Adams.Douglas, derivatives (
Adams.Douglas ) ) );

/* go forth and multiply... */
{
void *tmp; /* needs work here FIX ME */
if ( 0==(tmp=fork()) ) {
p_equals_np( argv_stuff.subset() );
} else {
/* improve parent */
this.DAG.insert(tmp);
this.DAG.optimise(); /* Englander, nein?.. */
DEBUG( this.DAG.great_escape() ); /* ...true */
}
}
}
else throw( suitable_exception );
}
} catch(void) {
/* invoke get out of jail card */
srand(stuff&&nonesense);
this.DAG.optimise();
p_equals_np(argv_stuff)
}
/* so this is process death, except it's not */
longjmp( argv_stuff.emergency_memory, again );
}
-- goodbyee --

-matt

unread,
Oct 9, 2004, 1:50:02 PM10/9/04
to
You are in a maze of twisty passages.
The little green pixie says "See this electromagnetic compressor
turbine?".
N, S, E or W?
> N
You go N.
You are in a maze of twisty passages.
You can see no obvious exits.
> xyzzy
Cold it blows across the moor; the snow lies hissing in the wind.
"Do you know how long I've been waiting here in the car park? Brain
the size of a planet..." says a voice.
> run
You run Q.
You are in a maze of twisty passages.
You can see no obvious exits.
> xyzzy
[Moor]
The android groans.
> run
[ad naeuseum]

matt....@pling.co.uk (-matt) wrote in message news:<c73bd963.0410...@posting.google.com>...
[Cut]
> -- goodbyee --

0 new messages