
Hi Jared,
BTW I added some notes to the YHC/Building wiki about YHC_BASE_PATH, copying Data/Ratio.hbc, and how things are in flux. Thanks!
Crazy Idea: ----------------- I have a slightly ambitious idea but I think it could really rock. I haven't worked through all the subtleties yet, but basically I would love to see Haskell deployable in //the most// widely portable platform ever: the browser. My crazy idea: port the YHC runtime to JavaScript! It's so crazy it just might work. I figure if people ported it to Python and Java, why not go for the gold and get it deployable on any machine!
The truth is, I was thinking about how to compile Haskell to JavaScript for the last few weeks, and I was sort of intimidated at the idea of even starting hacking the GHC RTS or writing a GHC backend... but then I heard about YHC, and how it compiles to a clean, small bytecode with a carefully separated VM/RTS and now it's actually a possibility. It makes really small binaries (.HBC), it looks like: hundreds of bytes, in the size range of Python .PYC files. These could //definitely// be embedded into a webpage.
I would really love to be able to write dynamic webpages in Haskell (totally natively, i.e. no combinator library or special embedded language, but in actual Haskell 98!), or be able to run a Haskell interpreter in a web browser for people to play with (e.g. on Haskell.org), to make the best interactive learning tool / tutorial---all without the website visitor having to download anything or even think about that!
Thats a cool idea! Also, because Yhc is written in Haskell and can be compiled to an HBC file, you could even run the compiler in the browser (although probably quite slowly). 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. Documentation on various stuff is available at: http://www.haskell.org/hawiki/Yhc_2fRTS http://www-users.cs.york.ac.uk/~ndm/yhc/bytecodes.html You would probably want to write a hbc -> Javascript convertor in a language that wasn't Javascript, probably in Haskell. I recommend using: http://www.haskell.org//pipermail/yhc/2005-November/000004.html Then write a Javascript interpeter for the instructions. Thanks, and good luck - just ask any further questions. Neil