* GSOC: First update
@ 2015-06-07 17:39 Ian Price
2015-06-08 3:54 ` Nala Ginrut
2015-06-12 16:38 ` Ludovic Courtès
0 siblings, 2 replies; 3+ messages in thread
From: Ian Price @ 2015-06-07 17:39 UTC (permalink / raw)
To: Guile Users
Hi,
As some of you will know, I am implementing a guile->js backend as
part of Google Summer of Code. This is a small update so that those of
you who do hang out on the guile irc channel can see some of the
(small) progress.
A temporary git branch is available at
https://gitlab.com/ijp/guile/commits/compile-to-js
I'm not going to list all the reasons you shouldn't use this code yet,
suffice to say you shouldn't. It's so far before alpha it's not even
funny.
That said, code you can compile today includes multiple values [1],
mutual recursion [2] and using call/cc to escape early from a
loop [3].
1. scheme: http://shift-reset.com/pastes/merge.html
js: http://shift-reset.com/pastes/merge-js.html
2. scheme: http://shift-reset.com/pastes/even.html
js: http://shift-reset.com/pastes/even-js.html
3. scheme: http://shift-reset.com/pastes/product.html
js: http://shift-reset.com/pastes/product-js.html
To make the examples self-contained and runnable in node.js, I
included the code from module/language/js-il/runtime.js, assigned the
result to a var and call console.log, and beautified it with uglifyjs
for good measure. The actual output of "guild compile --to=javascript
foo.scm" can be found between the comments.
--
Ian Price -- shift-reset.com
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GSOC: First update
2015-06-07 17:39 GSOC: First update Ian Price
@ 2015-06-08 3:54 ` Nala Ginrut
2015-06-12 16:38 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Nala Ginrut @ 2015-06-08 3:54 UTC (permalink / raw)
To: Ian Price; +Cc: Guile Users
nice job!
I've read the code very quickly, my understand is to convert CPS to
plain JS code directly, right?
Do you have a plan to generate it according to asm.js spec?
On Sun, 2015-06-07 at 18:39 +0100, Ian Price wrote:
> Hi,
>
> As some of you will know, I am implementing a guile->js backend as
> part of Google Summer of Code. This is a small update so that those of
> you who do hang out on the guile irc channel can see some of the
> (small) progress.
>
> A temporary git branch is available at
> https://gitlab.com/ijp/guile/commits/compile-to-js
>
> I'm not going to list all the reasons you shouldn't use this code yet,
> suffice to say you shouldn't. It's so far before alpha it's not even
> funny.
>
> That said, code you can compile today includes multiple values [1],
> mutual recursion [2] and using call/cc to escape early from a
> loop [3].
>
> 1. scheme: http://shift-reset.com/pastes/merge.html
> js: http://shift-reset.com/pastes/merge-js.html
>
> 2. scheme: http://shift-reset.com/pastes/even.html
> js: http://shift-reset.com/pastes/even-js.html
>
> 3. scheme: http://shift-reset.com/pastes/product.html
> js: http://shift-reset.com/pastes/product-js.html
>
> To make the examples self-contained and runnable in node.js, I
> included the code from module/language/js-il/runtime.js, assigned the
> result to a var and call console.log, and beautified it with uglifyjs
> for good measure. The actual output of "guild compile --to=javascript
> foo.scm" can be found between the comments.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GSOC: First update
2015-06-07 17:39 GSOC: First update Ian Price
2015-06-08 3:54 ` Nala Ginrut
@ 2015-06-12 16:38 ` Ludovic Courtès
1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2015-06-12 16:38 UTC (permalink / raw)
To: guile-user
Ian Price <ianprice90@gmail.com> skribis:
> That said, code you can compile today includes multiple values [1],
> mutual recursion [2] and using call/cc to escape early from a
> loop [3].
>
> 1. scheme: http://shift-reset.com/pastes/merge.html
> js: http://shift-reset.com/pastes/merge-js.html
>
> 2. scheme: http://shift-reset.com/pastes/even.html
> js: http://shift-reset.com/pastes/even-js.html
>
> 3. scheme: http://shift-reset.com/pastes/product.html
> js: http://shift-reset.com/pastes/product-js.html
Excellent, thanks for the update!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-12 16:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07 17:39 GSOC: First update Ian Price
2015-06-08 3:54 ` Nala Ginrut
2015-06-12 16:38 ` Ludovic Courtès
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).