Ed Watkeys on 29 Aug 2007 20:13:36 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[philly-lambda] Re: CPSCM Scheme compiler


Thanks for the post. I have got to get this client project out the
door so I can get back to work on Magic.

On Aug 28, 11:00 am, Dan Muresan <danm...@gmail.com> wrote:
> On Aug 24, 7:52 pm, Ed Watkeys <e...@poseur.com> wrote:
>
> > On Aug 19, 10:26 am, edw <e...@poseur.com> wrote:
> > > What I'd like to see is a way to call stuff in the underlying
> > > language. If I could make jQuery calls from within Scheme that is
> > > compiled to Javascript, CPSCM could be a powerful ally in my efforts
> > > to never touch a C-styled language again.
>
> > Apparently there is a way to call into the implementation language; I
> > didn't read the documentation closely enough.
>
> Hi folks,
>
> I am the author of CPSCM. I just wanted to say that it's easy to call
> Javascript functions from Scheme. You just need to provide a CPS-style
> wrapper -- e.g. to create an adder function callable as (jsfun x y)
> from Scheme, you need to provide
>
> var cpscmjsfun = cpscm__cpswrap (function (x, y) { return x + y; });
>
> There's a demo page that shows how to call JS from Scheme and Scheme
> from JS at
>
> http://www.omnigia.com/scheme/cpscm/bs-demo/
>
> It lets you to enter some numbers in a form, then sorts them using a
> bubble-sort algorithm implemented in Scheme, then displays the results
> via DHTML.
>
> If you have any questions, feel free to write me :)
>
> Best,
> Dan Muresanhttp://alumnus.caltech.edu/~muresan/
>
> P.S. The main problem with CPSCM is efficiency, as it converts
> *everything* to CPS style (even if you never use call/cc). I'd like to
> work on that sometime (the simplest fix is to provide "compilation
> pragmas" of some sort), but I haven't had many requests thus far.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Philly Lambda" group.
To unsubscribe from this group, send email to philly-lambda-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/philly-lambda?hl=en
-~----------~----~----~----~------~----~------~--~---