New demo/test program for Yhc Javascript backend

Hi, For those of you who are interested in using Haskell in client-side web application programming: I have added a new demo/test program to this Wiki page ("Does it leak?"): http://haskell.org/haskellwiki/Yhc/Javascript This demo program shows some progress made since the first announcement of Yhc Javascript backend (Core to Javascript converter) was made about a year ago. Please test the demo for functionality and memory leaks in various browsers. Your feedback is appreciated. The demo program is self-contained (does not require any Haskell libraries beyond those included with Yhc). There is a darcs repo: http://www.golubovsky.org/repos/wsptest/ from which this demo program along with Makefile can be obtained if anybody wants to play with the code. Thanks. -- Dimitry Golubovsky Anywhere on the Web

This is very cool!
I will definitely be playing with this.
Safari 3.0.2 for windows gives an error though:
Maximum call stack size exceeded.
http://darcs.haskell.org/yhc/web/jsdemos/HsWTKDemo.html Line: 87
Sometimes it gives the same error but instead of line 87 with line
314, and other times line 224 or 422
Are you aware of this issue?
Thanks
On Nov 17, 2007 8:32 AM, Dimitry Golubovsky
Hi,
For those of you who are interested in using Haskell in client-side web application programming:
I have added a new demo/test program to this Wiki page ("Does it leak?"):
http://haskell.org/haskellwiki/Yhc/Javascript
This demo program shows some progress made since the first announcement of Yhc Javascript backend (Core to Javascript converter) was made about a year ago. Please test the demo for functionality and memory leaks in various browsers. Your feedback is appreciated.
The demo program is self-contained (does not require any Haskell libraries beyond those included with Yhc). There is a darcs repo: http://www.golubovsky.org/repos/wsptest/ from which this demo program along with Makefile can be obtained if anybody wants to play with the code.
Thanks.
-- Dimitry Golubovsky
Anywhere on the Web _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Bit,
On Nov 18, 2007 8:41 AM, Bit Connor
Safari 3.0.2 for windows gives an error though:
Maximum call stack size exceeded. http://darcs.haskell.org/yhc/web/jsdemos/HsWTKDemo.html Line: 87
This is in fact a huge progress for Safari ;) Year ago, Safari on Mac gave some weird error message "Type Error line 1". See http://osdir.com/ml/lang.haskell.yhc/2006-11/msg00033.html The problem is, I am not sure how it enumerates lines. Lines around 87 (ran with pr -n): 83 var consStr = function (s) { 84 if (s.length == 0) { 85 return new HSEOL (); 86 } else { 87 var hdc = mkChar (s.charCodeAt (0)); 88 return new HSCons (hdc, s.length > 1 ? s.substring (1) : consStr ("")); 89 }; 90 }; Nothing suspicious because mkChar is a wrapper around the Number constructor. Line 314: 312 function NEG_D(a) { 313 return -(exprEval(a)); 314 } and so on.
Sometimes it gives the same error but instead of line 87 with line 314, and other times line 224 or 422
But does it at least display the widgets? Or do these errors appear as you press buttons/type anything?
Are you aware of this issue?
Now I am ;) But to me not being an expert in Safari, these error messages do little help (or if at least I knew what actual lines they meant)... Thanks. -- Dimitry Golubovsky Anywhere on the Web

It would be really helpful if you could include this (and other)
examples in an /examples directory under
src/translator/js
in the yhc darcs distribution, with working makefiles that validate
against the buildbot.
Something seems a bit off for me, probably forgot a tilde somewheres.
t.
2007/11/17, Dimitry Golubovsky
Hi,
For those of you who are interested in using Haskell in client-side web application programming:
I have added a new demo/test program to this Wiki page ("Does it leak?"):
http://haskell.org/haskellwiki/Yhc/Javascript
This demo program shows some progress made since the first announcement of Yhc Javascript backend (Core to Javascript converter) was made about a year ago. Please test the demo for functionality and memory leaks in various browsers. Your feedback is appreciated.
The demo program is self-contained (does not require any Haskell libraries beyond those included with Yhc). There is a darcs repo: http://www.golubovsky.org/repos/wsptest/ from which this demo program along with Makefile can be obtained if anybody wants to play with the code.
Thanks.
-- Dimitry Golubovsky
Anywhere on the Web _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Bit Connor
-
Dimitry Golubovsky
-
Thomas Hartman