Re: [Haskell-cafe] Re: Has Try Haskell! An interactive tutorial in your browser been announced yet?

2010-03-28 Thread Christopher Done
Hi Benjamin,

Thanks for testing it and providing a detailed report. I've since done
more work on Try Haskell, but not too much. (My job has taken up a
very large amount of my time and energy. I am moving to another one
currently.) I will address your points just to clear it up and maybe
we can discuss where it's going in the future.

On 1 March 2010 12:03, Benjamin L. Russell dekudekup...@yahoo.com wrote:

 Apparently, there is a time limit for this tutorial.

 I just tried it out again in Safari 4.0.4 on Mac OS X 10.5.8 Leopard,
 and the tutorial run by the help command worked perfectly; however,
 when I then tried it out again in Firefox 3.5.8, the same tutorial
 stopped just after I entered the 'a' : [] expression with the
 following error:

  Time limit exceeded.

 This occurred approximately ten minutes after starting the tutorial in
 Safari.

 But then I tried the same tutorial approximately four minutes later in
 SeaMonkey 2.0.3, and this time the tutorial ran perfectly again.

I have since updated the Time limit exceeded message to be something
more friendly. The cause of this message is that some expressions take
too long to evaluate. Even simple expressions can sometimes take too
long and be killed. To confirm: there is no time limit for the
tutorial.

 So then, approximately four minutes after Firefox had returned the above
 error message, I returned to Firefox, clicked on the Reset button in the
 upper-right corner of the page, and restarted the tutorial.  This time,
 the tutorial behaved slightly different from before:  Earlier, I typed
 the following sequence of commands (listed in the first step of the
 tutorial):

  23*36
  reverse hello

 At that point, the tutorial had not started automatically.  However, for
 some reason, this time it did; then, I was able to continue with the
 tutorial until completion.  Then I started the tutorial again with the
 help command, and it workd fine again, too.

This was a bug. The cause is simple; the tutorial picks up the types
returned by the REPL and triggers the right tutorial page. Hitting the
reset button, wrongly, did not reset these hooks. I believe this bug
still exists.


 Then, about thirty-eight minutes after starting the second tutorial in
 Firefox (during which time I tried to run the tutorial in Camino 2.0.1,
 but Camino froze during the auto-update to 2.0.2, and when I manually
 updated it to 2.0.2, Camino 2.0.2 froze upon startup as well, so I
 finally gave up on trying the tutorial in Camino), I tried out the
 tutorial in Opera 10.10.

 For some reason, Opera inserted spaces after typing certain characters,
 and the spaces could not be deleted without also deleting the character
 just before the space as well.  Then I entered the above following sequence
 of commands again:

  23*36
  reverse hello

 Although the tutorial in Opera returned the correct responses to these
 statements, it did not move on to the next step automatically
 afterwards, so I had to type help to start the tutorial.  However, I
 was then able to complete the entire tutorial successfully (although the
 extra space bug manifested itself a few times during this tutorial as
 well).

I test on Opera 10.01 on Ubuntu Karmic, but I have seen this bug
elsewhere as someone demonstrated problems with Opera to me at
Zurihac. Opera is quite a fiddly browser compared to Firefox, Webkit
and IE.

I have personally developed it based on the following browsers:

Internet Explorer 6  7
Opera 10.01
Chromium 4.0.237.0 (Ubuntu build 31094)
Firefox 3.5.8

But indeed, hopefully I will have more time for testing and
development in the future.

Regarding future work, I hope to integrate Raphael[1] (which I already
did, but is disabled at the moment), exercises the answers to which
are checked by Smallcheck or QuickCheck, access to online feeds a bit
like Yahoo pipes, but one could use Tagsoup, RSS/Atom feeds, etc. to
access some limited set of feeds. I intend on changing the interface
to be like DrScheme, with a code frame and a REPL frame.

I have already added top-level definition of functions, types,
classes, etc. support to the JSON service. For example, here is how we
evaluate an expression, calling the eval method:

http://tryhaskell.org/haskell-eval.json?jsonrpc=2.0method=evalid=1params={expr:24*42}

=  {jsonrpc:2.0,id:1,result:{result:1008,type:(Num
t) = t,expr:24*42}}

Then we can provide it a Haskell file with contents: x=1

http://tryhaskell.org/haskell-eval.json?jsonrpc=2.0method=loadid=1params={contents:x
= 1}
= {jsonrpc:2.0,id:1,result:{success:}}

And then evaluate the top level value x:

http://tryhaskell.org/haskell-eval.json?jsonrpc=2.0method=evalid=1params={%22expr%22:%22x%22}
= 
{jsonrpc:2.0,id:1,result:{result:1,type:Integer,expr:x}}

The only security measure I take is to parse the module with
Language.Haskell.Parser or whatnot and then strip out imports.

Regarding development, I have uploaded everything to Github:

http://github.com/chrisdone/tryhaskell

And I know 

Re: [Haskell-cafe] Re: Has Try Haskell! An interactive tutorial in your browser been announced yet?

2010-03-01 Thread Roel van Dijk
I think these reddit posts are relevant:

First announcement:
http://www.reddit.com/r/haskell/comments/b58rk/try_haskell/

Second announcement:
http://www.reddit.com/r/haskell/comments/b7dil/try_haskell_now_with_t_and_wip_interactive/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Has Try Haskell! An interactive tutorial in your browser been announced yet?

2010-03-01 Thread Benjamin L. Russell
Hector Guilarte hector...@gmail.com writes:

 span class=Apple-style-span style=font-family: arial, sans-serif;
 font-size: 13px; border-collapse: collapse; Nice!I tried it and it
 worked perfectly, however I tried it again 45 minutes later and when I
 pressed Enter nothing happened. I couldn#39;t enter any expressions
 except for: help, step1, ... stepN but that#39;s it. I tried on
 Google Chrome and Firefox, another friend tried it too and it
 didn#39;t work for him either, only the same expressions I mentioned
 before. Any ideas?

Apparently, there is a time limit for this tutorial.

I just tried it out again in Safari 4.0.4 on Mac OS X 10.5.8 Leopard,
and the tutorial run by the help command worked perfectly; however,
when I then tried it out again in Firefox 3.5.8, the same tutorial
stopped just after I entered the 'a' : [] expression with the
following error:

 Time limit exceeded.

This occurred approximately ten minutes after starting the tutorial in
Safari.

But then I tried the same tutorial approximately four minutes later in
SeaMonkey 2.0.3, and this time the tutorial ran perfectly again.

So then, approximately four minutes after Firefox had returned the above
error message, I returned to Firefox, clicked on the Reset button in the
upper-right corner of the page, and restarted the tutorial.  This time,
the tutorial behaved slightly different from before:  Earlier, I typed
the following sequence of commands (listed in the first step of the
tutorial):

 23*36
 reverse hello

At that point, the tutorial had not started automatically.  However, for
some reason, this time it did; then, I was able to continue with the
tutorial until completion.  Then I started the tutorial again with the
help command, and it workd fine again, too.

Then, about thirty-eight minutes after starting the second tutorial in
Firefox (during which time I tried to run the tutorial in Camino 2.0.1,
but Camino froze during the auto-update to 2.0.2, and when I manually
updated it to 2.0.2, Camino 2.0.2 froze upon startup as well, so I
finally gave up on trying the tutorial in Camino), I tried out the 
tutorial in Opera 10.10.

For some reason, Opera inserted spaces after typing certain characters,
and the spaces could not be deleted without also deleting the character
just before the space as well.  Then I entered the above following sequence
of commands again:

 23*36
 reverse hello

Although the tutorial in Opera returned the correct responses to these
statements, it did not move on to the next step automatically
afterwards, so I had to type help to start the tutorial.  However, I
was then able to complete the entire tutorial successfully (although the
extra space bug manifested itself a few times during this tutorial as
well).

I do not use Google Chrome on my Mac at home, so I have not tested it in
that browser (the tab layout of Google Chrome reminds me of that of
Internet Explorer 7.0, which is relatively slow and which I do not like,
so I personally have not used Chrome at home so far; I may use it as
some point in the future, especially if the layout changes).

Apparently, the tutorial behaves slightly differently in different
browsers, and has a built-in time limit.  You may wish to experiment
with different browsers as well, and to press the Reset button in the
upper-right corner of the page after completing the tutorial.

-- Benjamin L. Russell
-- 
Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile:  +011 81 80-3603-6725
Furuike ya, kawazu tobikomu mizu no oto. -- Matsuo Basho^ 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Has Try Haskell! An interactive tutorial in your browser been announced yet?

2010-02-28 Thread Benjamin L. Russell
Andrew Coppin andrewcop...@btinternet.com writes:

 Benjamin L. Russell wrote:
 There is a link to Try Haskell! -- an interactive, online Haskell
 interpreter (see http://tryhaskell.org/) under February 2010 under 1
 Headlines on the Haskell - HaskellWIki Web page (see
 http://www.haskell.org/).

 While I could be mistaken, there do not seem to be any announcements
 for February 2010 concerning this interactive tutorial on either the
 Haskell
 or Haskell-Cafe mailing lists.  Has it been announced yet?  If not, can
 I go ahead and announce it on the Haskell mailing list?
   

 I discovered this approximately 17 seconds ago, and I was just about
 to ask the exact same thing... This should *definitely* make it into
 the HWN. ;-)

 The tutorial is quite nice too, although rather incomplete.

Then I'll go ahead and announce this on the Haskell mailing list.

-- Benjamin L. Russell
-- 
Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile:  +011 81 80-3603-6725
Furuike ya, kawazu tobikomu mizu no oto. -- Matsuo Basho^ 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe