[Yhc] YHC build finished successfully, but install is not "fairly trivial"

Neil Mitchell ndmitchell at gmail.com
Thu Dec 22 15:25:18 EST 2005


Hi Jared,

> > There is an interpreter being written in Python, and there is one
> > written in Java, so they would probably be a better starting point
> > than the C runtime. The Java one is on the web
> > (http://www.brianweb.net/personal/blog/entry.php?id=18), but the
> > python one is still in development.
>
> Do you know who is working on the Python interpreter? I could get in
> touch with them. I think Python is the most similar to JavaScript
> anyway (dynamic typing, everything an object). Plus I'm a lot more
> fluent in Python than Java (and of course I enjoy it more). But I bet
> both will help.

The person working on the Python one is Andrew Wilkinson,
http://www-users.cs.york.ac.uk/~aw/ - he'll certainly have his python
version in the darcs after new years, but if you email him he might be
able to give you what he's got so far.


> > You would probably want to write a hbc -> Javascript convertor
>
> I also thought this would be a good idea. Ultimately you want a
> program that takes an hbc file and gives you an HTML file that you
> plop on the web and just use (pointing to or embedding the RTS
> JavaScript core for you.)
Since Haskell compiles to modules, and each module is a separate .hbc
file, you might want to have a single .js for each module and then an
HTML file that just does <script src="file.js"> for each javascript
module.


> Definitely a great place to get started. Plus any improvements on my
> end can go back into this API. :-)
The API is going to be massively improved - the ultimate idea is to
write a really good bytecode library, and then have the compiler use
that one, so people can easily write utilities that operate on .hbc
files. The library as it stands today has a pretty printer in it,
tweaking that will probably give you the Javascript output you need
without too much difficulty.


> > Then write a Javascript interpeter for the instructions.
>
> This is the hard part (I don't know anything about JavaScipt IDEs but
> I suspect debugging will be ... interesting).
If you are using Firefox or Mozilla, then Venkmann is a competent
enough debugger - its available as an extension - google for it
because it usually doesn't show up in teh Firefox extensions list.

> Maybe that's a good
> place to start out... looking for a good IDE for JavaScript.
> <wondering out loud>I wonder if Visual J# is a reasonable choice
> (already installed on my system) or is this a dangerous place to
> go...</wondering>
J# is Microsofts version of Java, stay well clear! However, they do
have JScript, which is Microsoft's version of Javascript, and that may
work in the same IDE, if you have the right options installed.

My personal choice of Javascript IDE is Visual Interdev, but that got
discountinued some time ago - most of the functionality should be in
Visual Studio .NET, but I've never checked.

Merry Christmas to you too,

Neil


More information about the Yhc mailing list