Lambda the Ultimate

inactiveTopic Efficient coroutine generation of constrained Gray sequences
started 6/9/2003; 12:01:26 AM - last post 6/9/2003; 11:36:54 PM
Ehud Lamm - Efficient coroutine generation of constrained Gray sequences  blueArrow
6/9/2003; 12:01:26 AM (reads: 1675, responses: 5)
Efficient coroutine generation of constrained Gray sequences
Efficient coroutine generation of constrained Gray sequences, aka "Deconstructing coroutines". Donald Knuth and Frank Ruskey.

A nice example of efficiently implementing coroutines (using a single stack).


Posted to general by Ehud Lamm on 6/9/03; 12:01:37 AM

David B. Wildgoose - Re: Efficient coroutine generation of constrained Gray sequences  blueArrow
6/9/2003; 9:16:39 AM (reads: 648, responses: 1)
I'd be grateful if someone could post me a link to an uncompressed version of this paper. I have tried downloading it several times using both Opera and even (in desperation) Internet Explorer, but I can't uncompress the resulting file. It is not recognised by gunzip, and WinZip (which is usually excellent) fails with it also.

Alternatively, if anyone could enlighten me as to the compression method used, (because it certainly isn't gzip as suggested by the .gz suffix)...

Ehud Lamm - Re: Efficient coroutine generation of constrained Gray sequences  blueArrow
6/9/2003; 9:52:32 AM (reads: 668, responses: 0)
IE + WinZip worked fine for me. Are you sure that's really the problem?

Ken Hirsch - Re: Efficient coroutine generation of constrained Gray sequences  blueArrow
6/9/2003; 12:12:16 PM (reads: 620, responses: 0)
If the file size is 312586 bytes, then it has already been inflated and you just need to rename it to p160.ps.

What happens is that the server returns a header of

Content-Encoding: x-gzip
and the browzer exands it, but it still leaves the ".gz" ending on the file. Although there is some controversy about this, it really is the server that is wrong about this, not the browser.

I have cygwin on all my windows machines and I use a tiny shell script that I call "munzip" that first tries to gunzip the file and if that fails just renames it:

#!/usr/bin/bash for i in $@ do gunzip $i || mv $i ${i%%.gz} done

Isaac Gouy - Re: Efficient coroutine generation of constrained Gray sequences  blueArrow
6/9/2003; 12:39:28 PM (reads: 614, responses: 0)
Saving p160.ps.gz and opening it with GhostScript GSView without uncompressing also works.

David B. Wildgoose - Re: Efficient coroutine generation of constrained Gray sequences  blueArrow
6/9/2003; 11:36:54 PM (reads: 565, responses: 0)
Thanks very much everybody - a simple rename was all it took.