Why not self-hosted?

Jun 4, 2008 at 11:31 AM
Hello Lepplie,
As a part of my research project related to metaprogramming techniques I'm interesting in collecting ways of R6RS-scheme interoperability with CLR (including compilation to the IL). Speaking about IronScheme I currently suppose that your project is the most complete implementation of R6RS on the top of CLR. Great job!
Could I ask architectural question?
Why IronScheme isn't self-hosted? Before looking at the implementation I expected that I'll see something similar to classical bootstrapping technique of writing compiler. However I found that the most of core implemented on C#.
Did you consider the idea about self-hosted implementation? If this idea was rejected what was the reasons?

--
Best regards,
halt
Coordinator
Jun 11, 2008 at 7:31 AM


halt wrote:
Hello Lepplie,
As a part of my research project related to metaprogramming techniques I'm interesting in collecting ways of R6RS-scheme interoperability with CLR (including compilation to the IL). Speaking about IronScheme I currently suppose that your project is the most complete implementation of R6RS on the top of CLR. Great job!
Could I ask architectural question?
Why IronScheme isn't self-hosted? Before looking at the implementation I expected that I'll see something similar to classical bootstrapping technique of writing compiler. However I found that the most of core implemented on C#.
Did you consider the idea about self-hosted implementation? If this idea was rejected what was the reasons?

--
Best regards,
halt

Hi halt

Thanks for your interest and excellent questions  :)

While IronScheme isnt self-hosted currently, it would certainly be possible. In fact, the whole syntax/library system is bootstrapped in Scheme it self. There are several reasons for this:
  • At first I didnt know Scheme, so I simply followed the semantics in C# (the language that I do know).
  • Interaction between IronScheme and the CLR is still a bit long winded to use (similar to pinvoke's definitions). I am working on making things easier.
  • IronScheme is still quite slow. I have been trying to move some code from C# to IronScheme, but some critical functions like assq and memq run a lot faster implemented in C#. I am slowly getting IronScheme's speed better.
Currently I know a bit more Scheme, but I am still not very fluent in it, but ideally in the end I would like to rewrite all possible procedures directly in IronScheme. This should not be so hard, as there are quite good correlation between the R6RS libraries and what the .NET framework provides. If anyone feels up to that job, I will be very grateful and will provide any guidance needed for the conversion (it might be a good idea to write a good unit testing framework as a side project).

That said, in the end I still rely on the DLR, so the system will never be completely self-hosted, unless I write that functionality in IronScheme. While it will serve as a good exercise, I dont think I can warrant the time I will need to do it :(.

Dont hesitate to ask for more info.

Cheers

leppie
Coordinator
Jan 24, 2009 at 5:46 PM
> Did you consider the idea about self-hosted implementation?

I would like to try this for version 2, write the whole thing in Scheme, using version 1 as the bootstrap.

Cheers

leppie
Dec 15, 2010 at 8:32 PM

Take your time man. I know it must be hard getting this all done, but I think your doing an amazing job and people are really excited about it. How many developers you got working on this?