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

What Scheme does /prog/ use?

Name: Anonymous 2012-01-28 22:31

I have been using Chicken for a little bit. Used Racket for like 5 minutes. R6RS is PIG DISGUSTING!

That is all.

Name: Anonymous 2012-01-29 14:16

>>8,11

Here is my, pathological, scheme object scheme for 32-bit systems. This is pretty standard for most C-based implementations of scheme, and possibly, most LISPs for that matter. Notice the use of the struct hack and the size field in the manifest. This makes the compacting GC's job simpler in reckoning with objects on the heap, while placing on the allocator the burden of calculating and recording the size of each object.

typedef struct obj
{
    //manifest
    struct {
        unsigned int type   : 5;
        unsigned int gc     : 1;
        unsigned int vec    : 1;
        unsigned int pad    : 9;
        unsigned int size   : 16;
    };
    union
    {
        struct obj     *l;
        signed int      i;
        float           f;
        char            c;
    } datum[0];
} obj;

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