Lisp HUG Maillist Archive

REPL working on browser

Hello.

I'm trying to make a Common Lisp REPL that works on browser.

And I found this article.
https://blog.jeaye.com/2015/09/27/parenscript-ajax/

Could you tell me how to evaluate the code in the textfield?

When I type (print "go") and send it, It returns "echo: (print "go")".

I'd like to evaluate the expression, and I hope it would return the evaluated value "GO".

Maybe I need to change some parts on this function:

 (defun on-click ()
                (chain smackjack (echo (chain document
                                              (get-element-by-id "data")
                                              value)
                                       callback)))


I'd appreciate your help.

Regards,

- Hiroki

Re: REPL working on browser

I haven't used Parenscript in a while, but I don't think it has an EVAL function, not even a READ function. It doesn't even have conses, it translates Lisp lists to Javascript arrays.
Parenscript is not really a subset of Common Lisp, it just has the same syntax.
I would like to have a proper Lisp in the browser, and Parenscript sure is a great starting point. There was another project at some point, jslisp or jsrepl or something, I don't remember.

On 11 January 2017 at 04:04, Noguchi Hiroki <padds1st@gmail.com> wrote:
Hello.

I'm trying to make a Common Lisp REPL that works on browser.

And I found this article.
https://blog.jeaye.com/2015/09/27/parenscript-ajax/

Could you tell me how to evaluate the code in the textfield?

When I type (print "go") and send it, It returns "echo: (print "go")".

I'd like to evaluate the expression, and I hope it would return the evaluated value "GO".

Maybe I need to change some parts on this function:

 (defun on-click ()
                (chain smackjack (echo (chain document
                                              (get-element-by-id "data")
                                              value)
                                       callback)))


I'd appreciate your help.

Regards,

- Hiroki

Re: REPL working on browser

Alessio Stalla <alessiostalla@gmail.com> wrote:

> I would like to have a proper Lisp in the browser, and Parenscript
> sure is a great starting point. There was another project at some
> point, jslisp or jsrepl or something, I don't remember.

  What about cl-jupyter ?

-- 
Resistance is futile. You will be jazzimilated.

Lisp, Jazz, Aïkido: http://www.didierverna.info

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: REPL working on browser


Am 11.01.2017 um 10:12 schrieb Alessio Stalla <alessiostalla@gmail.com>:

I haven't used Parenscript in a while, but I don't think it has an EVAL function, not even a READ function. It doesn't even have conses, it translates Lisp lists to Javascript arrays.
Parenscript is not really a subset of Common Lisp, it just has the same syntax.
I would like to have a proper Lisp in the browser, and Parenscript sure is a great starting point. There was another project at some point, jslisp or jsrepl or something, I don't remember.


https://github.com/jscl-project/jscl



On 11 January 2017 at 04:04, Noguchi Hiroki <padds1st@gmail.com> wrote:
Hello.

I'm trying to make a Common Lisp REPL that works on browser.

And I found this article.
https://blog.jeaye.com/2015/09/27/parenscript-ajax/

Could you tell me how to evaluate the code in the textfield?

When I type (print "go") and send it, It returns "echo: (print "go")".

I'd like to evaluate the expression, and I hope it would return the evaluated value "GO".

Maybe I need to change some parts on this function:

 (defun on-click ()
                (chain smackjack (echo (chain document
                                              (get-element-by-id "data")
                                              value)
                                       callback)))


I'd appreciate your help.

Regards,

- Hiroki


Re: REPL working on browser


Am 11.01.2017 um 10:44 schrieb Rainer Joswig <joswig@lisp.de>:


Am 11.01.2017 um 10:12 schrieb Alessio Stalla <alessiostalla@gmail.com>:

I haven't used Parenscript in a while, but I don't think it has an EVAL function, not even a READ function. It doesn't even have conses, it translates Lisp lists to Javascript arrays.
Parenscript is not really a subset of Common Lisp, it just has the same syntax.
I would like to have a proper Lisp in the browser, and Parenscript sure is a great starting point. There was another project at some point, jslisp or jsrepl or something, I don't remember.


https://github.com/jscl-project/jscl

A REPL in the browser:

https://jscl-project.github.io





On 11 January 2017 at 04:04, Noguchi Hiroki <padds1st@gmail.com> wrote:
Hello.

I'm trying to make a Common Lisp REPL that works on browser.

And I found this article.
https://blog.jeaye.com/2015/09/27/parenscript-ajax/

Could you tell me how to evaluate the code in the textfield?

When I type (print "go") and send it, It returns "echo: (print "go")".

I'd like to evaluate the expression, and I hope it would return the evaluated value "GO".

Maybe I need to change some parts on this function:

 (defun on-click ()
                (chain smackjack (echo (chain document
                                              (get-element-by-id "data")
                                              value)
                                       callback)))


I'd appreciate your help.

Regards,

- Hiroki



Re: REPL working on browser

Dare I suggest ClojureScript? I've used it with Emacs+CIDER and it is very very productive...

On 11 January 2017 at 09:49, Rainer Joswig <joswig@lisp.de> wrote:

Am 11.01.2017 um 10:44 schrieb Rainer Joswig <joswig@lisp.de>:


Am 11.01.2017 um 10:12 schrieb Alessio Stalla <alessiostalla@gmail.com>:

I haven't used Parenscript in a while, but I don't think it has an EVAL function, not even a READ function. It doesn't even have conses, it translates Lisp lists to Javascript arrays.
Parenscript is not really a subset of Common Lisp, it just has the same syntax.
I would like to have a proper Lisp in the browser, and Parenscript sure is a great starting point. There was another project at some point, jslisp or jsrepl or something, I don't remember.


https://github.com/jscl-project/jscl

A REPL in the browser:

https://jscl-project.github.io





On 11 January 2017 at 04:04, Noguchi Hiroki <padds1st@gmail.com> wrote:
Hello.

I'm trying to make a Common Lisp REPL that works on browser.

And I found this article.
https://blog.jeaye.com/2015/09/27/parenscript-ajax/

Could you tell me how to evaluate the code in the textfield?

When I type (print "go") and send it, It returns "echo: (print "go")".

I'd like to evaluate the expression, and I hope it would return the evaluated value "GO".

Maybe I need to change some parts on this function:

 (defun on-click ()
                (chain smackjack (echo (chain document
                                              (get-element-by-id "data")
                                              value)
                                       callback)))


I'd appreciate your help.

Regards,

- Hiroki




Re: REPL working on browser

+1 for ClojureScript. Whilst it isn't a CL or a Scheme, it has nice features that are fun to work with, and the new spec work is ace. Additionally, it's pretty close to Clojure proper, so most of your code can go Desktop <=> Web pretty easily. 

On Wed, Jan 11, 2017 at 5:44 AM, emacstheviking <objitsu@gmail.com> wrote:
Dare I suggest ClojureScript? I've used it with Emacs+CIDER and it is very very productive...

On 11 January 2017 at 09:49, Rainer Joswig <joswig@lisp.de> wrote:

Am 11.01.2017 um 10:44 schrieb Rainer Joswig <joswig@lisp.de>:


Am 11.01.2017 um 10:12 schrieb Alessio Stalla <alessiostalla@gmail.com>:

I haven't used Parenscript in a while, but I don't think it has an EVAL function, not even a READ function. It doesn't even have conses, it translates Lisp lists to Javascript arrays.
Parenscript is not really a subset of Common Lisp, it just has the same syntax.
I would like to have a proper Lisp in the browser, and Parenscript sure is a great starting point. There was another project at some point, jslisp or jsrepl or something, I don't remember.


https://github.com/jscl-project/jscl

A REPL in the browser:

https://jscl-project.github.io





On 11 January 2017 at 04:04, Noguchi Hiroki <padds1st@gmail.com> wrote:
Hello.

I'm trying to make a Common Lisp REPL that works on browser.

And I found this article.
https://blog.jeaye.com/2015/09/27/parenscript-ajax/

Could you tell me how to evaluate the code in the textfield?

When I type (print "go") and send it, It returns "echo: (print "go")".

I'd like to evaluate the expression, and I hope it would return the evaluated value "GO".

Maybe I need to change some parts on this function:

 (defun on-click ()
                (chain smackjack (echo (chain document
                                              (get-element-by-id "data")
                                              value)
                                       callback)))


I'd appreciate your help.

Regards,

- Hiroki







--
====
Q. How many Prolog programmers does it take to change a lightbulb?
A. No.

Re: REPL working on browser

Thanks Rainer, that was the one I was thinking about.

On 11 January 2017 at 10:49, Rainer Joswig <joswig@lisp.de> wrote:

Am 11.01.2017 um 10:44 schrieb Rainer Joswig <joswig@lisp.de>:


Am 11.01.2017 um 10:12 schrieb Alessio Stalla <alessiostalla@gmail.com>:

I haven't used Parenscript in a while, but I don't think it has an EVAL function, not even a READ function. It doesn't even have conses, it translates Lisp lists to Javascript arrays.
Parenscript is not really a subset of Common Lisp, it just has the same syntax.
I would like to have a proper Lisp in the browser, and Parenscript sure is a great starting point. There was another project at some point, jslisp or jsrepl or something, I don't remember.


https://github.com/jscl-project/jscl

A REPL in the browser:

https://jscl-project.github.io





On 11 January 2017 at 04:04, Noguchi Hiroki <padds1st@gmail.com> wrote:
Hello.

I'm trying to make a Common Lisp REPL that works on browser.

And I found this article.
https://blog.jeaye.com/2015/09/27/parenscript-ajax/

Could you tell me how to evaluate the code in the textfield?

When I type (print "go") and send it, It returns "echo: (print "go")".

I'd like to evaluate the expression, and I hope it would return the evaluated value "GO".

Maybe I need to change some parts on this function:

 (defun on-click ()
                (chain smackjack (echo (chain document
                                              (get-element-by-id "data")
                                              value)
                                       callback)))


I'd appreciate your help.

Regards,

- Hiroki




Updated at: 2020-12-10 08:31 UTC