unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Compilation to JS
@ 2017-06-05 16:11 Ian Price
  2017-06-06  2:52 ` Mike Gerwitz
  2017-06-06  9:08 ` Arne Babenhauserheide
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Price @ 2017-06-05 16:11 UTC (permalink / raw)
  To: guile-user@gnu.org

Hello Everyone,

This summer I am following up on the work of two years ago to compile
Guile to JS. As some of you may remember from irc back then, I was
making good progress until personal circumstances intervened. This
year I intend to get it into shape where we can consider including it
in Guile.

You can read my GSOC Proposal at http://shift-reset.com/tmp/gsoc3.pdf,
but a summary is in order. I was able to compile a large portion of
the CPS language (as it existed two years ago) to a Javascript
intermediate language, and some transformations, particularly
inlining, were performed to improve the readability of the Javascript
before emitting it. A boot.js script was written which implemented all
the necessary VM primitives in Javascript. The majority of boot-9 was
supported, and I had written, compiled (and with some manual tweaking
ran) a bunch of programs that handled a large range of what we would
expect from Guile, and could handle mutual recursion, keyword
arguments, case-lambda, continuations, etc. You can see some of the
programs that were compiled and their (very hideous js output) on my
site at http://shift-reset.com/pastes/ (e.g.
http://shift-reset.com/pastes/mergesort_new_inliner.html was the
output of http://shift-reset.com/pastes/merge.html)

The main work that needs to be done
1. Move from the previous cps representation to the new cps soup
   representation
2. Complete porting boot-9 to js (in particular, the guile module
   system)
3. Cheney on the MTA to handle tail calls for browsers that do not
   support tail call optimisation.
4. An addition to (scripts) to allow compilation to js, bundling in
   the new boot.js and necessary libraries.

Initially I am working on (1), as this will allow me to take advantage
of the work from two years ago. In order to rebase on a current Guile,
I think as a stopgap measure it makes sense to bring back the the
original cps representation first, and then to change the compiler I
wrote to use the new representation afterwards. Once this has been
accomplished I will feel comfortable posting a link to let you all
play with the stuff from previous years.

I will likely then proceed in numerical order.

On a personal note, it's good to be back here, paying attention to the
Guile project after a hiatus.

--
ijp


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compilation to JS
  2017-06-05 16:11 Compilation to JS Ian Price
@ 2017-06-06  2:52 ` Mike Gerwitz
  2017-06-06 14:37   ` Christopher Allan Webber
  2017-06-06  9:08 ` Arne Babenhauserheide
  1 sibling, 1 reply; 4+ messages in thread
From: Mike Gerwitz @ 2017-06-06  2:52 UTC (permalink / raw)
  To: Ian Price; +Cc: guile-user@gnu.org

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

On Mon, Jun 05, 2017 at 17:11:35 +0100, Ian Price wrote:
> This summer I am following up on the work of two years ago to compile
> Guile to JS. As some of you may remember from irc back then, I was
> making good progress until personal circumstances intervened. This
> year I intend to get it into shape where we can consider including it
> in Guile.

This is something I'm very much looking forward to---it's important work!
Thanks again for taking it on, and thanks for the update.

-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compilation to JS
  2017-06-05 16:11 Compilation to JS Ian Price
  2017-06-06  2:52 ` Mike Gerwitz
@ 2017-06-06  9:08 ` Arne Babenhauserheide
  1 sibling, 0 replies; 4+ messages in thread
From: Arne Babenhauserheide @ 2017-06-06  9:08 UTC (permalink / raw)
  To: Ian Price; +Cc: guile-user@gnu.org

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

Hi Ian,

Ian Price <ianprice90@gmail.com> writes:

> This summer I am following up on the work of two years ago to compile
> Guile to JS. This year I intend to get it into shape where we can
> consider including it in Guile.

This sounds great! I’m excited to see you take it up again! The past
year I repeatedly wished I had your JS backend at hand.

Welcome back!

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compilation to JS
  2017-06-06  2:52 ` Mike Gerwitz
@ 2017-06-06 14:37   ` Christopher Allan Webber
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Allan Webber @ 2017-06-06 14:37 UTC (permalink / raw)
  To: Mike Gerwitz; +Cc: guile-user@gnu.org, Ian Price

Mike Gerwitz writes:

> On Mon, Jun 05, 2017 at 17:11:35 +0100, Ian Price wrote:
>> This summer I am following up on the work of two years ago to compile
>> Guile to JS. As some of you may remember from irc back then, I was
>> making good progress until personal circumstances intervened. This
>> year I intend to get it into shape where we can consider including it
>> in Guile.
>
> This is something I'm very much looking forward to---it's important work!
> Thanks again for taking it on, and thanks for the update.

Ditto ;)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-06 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05 16:11 Compilation to JS Ian Price
2017-06-06  2:52 ` Mike Gerwitz
2017-06-06 14:37   ` Christopher Allan Webber
2017-06-06  9:08 ` Arne Babenhauserheide

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).