Arc Forumnew | comments | leaders | submitlogin
1 point by eds 6118 days ago | link | parent

Do you think this would be a realistic amount of work for one summer?

What about part two (converting the compiler to compile Arc instead)? I suppose I would gain something on an understanding of the operation of the compiler while doing part one, but this seems rather intimidating to me.

And I'm not really sure Stalin is the right compiler to base an Arc in Arc on. (Although I suppose that wasn't really the point of your post.)

Can you suggest any other Scheme compilers I might try to port?



1 point by cchooper 6118 days ago | link

I don't know much about Scheme compilers (or Scheme for that matter, I'm a Lisp guy), so I can't really say.

For the conversion to an Arc compiler, it's similar enough to Scheme that I don't think it'll be a big issue, especially as it's implemented on MzScheme. Quite a few tricky Arc functions are just MzScheme functions under a different name (e.g. threading, I/O stuff). That brings up a point: you really want a compiler for the subset of MzScheme that Arc uses, not Scheme itself (although a Scheme->Arc compiler would be cool too).

Is it too much work for a summer? Depends on what you want to achieve. A completely non-optimising Arc compiler, based on code ripped from other projects, would probably be really easy to implement. Writing a Scheme compiler in one semester is standard coursework on some CS courses. So I guess the important questions are:

1. What good Scheme compilers written in Scheme already exist?

2. How much actually needs to be converted? (Most of the runtime will probably be implemented in C anyway, so no conversion necessary).

3. Given the spread of possible compilers you could convert, do any of them look like a summer's worth of work?

So I'm basically saying: maybe.

-----

1 point by almkglor 6118 days ago | link

I like how Chicken implements Scheme ^^;

-----