(fwd)potential bug in REPL in newLISP-GS in newLISP v.10.0.1

Started by DekuDekuplex, March 10, 2009, 10:17:38 PM

Previous topic - Next topic

DekuDekuplex

[This message is being forwarded from the USENET newsgroup comp.lang.lisp, where it was originally posted.]



On Wed, 11 Mar 2009 14:02:16 +0900, in comp.lang.lisp Benjamin L. Russell <DekuDekuplex> wrote:



>[...]

>

>According to Section 7 of the "newLISP v.10.0.2 Manual and Reference"

>(see http://www.newlisp.org/newlisp_manual.html#expressions">http://www.newlisp.org/newlisp_manual.html#expressions), it

>should be possible to enter multiline expressions into the REPL as

>follows:

>

>>As shown in the following snippet from an interactive session, multiline expressions can be entered by enclosing them between [cmd] and [/cmd] tags:

>>

>>    > [cmd]

>>    (define (foo x y)

>>        (+ x y))

>>    [/cmd]

>>    (lambda (x y) (+ x y))

>>    > (foo 3 4)

>>    7

>>    > _

>>

>>Each [cmd] and [/cmd] tag is entered on a separate line. This mode is useful for pasting multiline code into the interactive console.

>

>This works fine in the command-line version of newLISP, as follows:

>

>>newLISP v.10.0.1 on Win32 IPv4, execute 'newlisp -h' for more info.

>>

>>> [cmd]

>>(define (foo x y)

>>    (+ x y))

>>[/cmd]

>>(lambda (x y) (+ x y))

>>> (foo 3 4)

>>7

>>>

>

>However, when I try to run the same command in the REPL in the

>GUI-based IDE, newLISP-GS, the following error occurs:

>

>>newLISP v.10.0.1 on Win32 IPv4, execute 'newlisp -h' for more info.

>>

>>> [cmd]

>>(define (foo x y)

>>    (+ x y))

>>[/cmd]

>>nil

>>

>>ERR: missing parenthesis : "...))n[cmd]n(define (foo x y)n    (+ x y248232""

>>>

>

>I am running newLISP v.10.0.1 on Windows XP Professional, Service Pack

>2.

>

>This problem has been persisting since v.9.4.5.  Is this a bug?  This

>problem does not seem to be documented in the above-mentioned manual.

>Have any other users been experiencing this problem?



Since the original message was posted in comp.lang.lisp, I would appreciate it if any replies to this message could also be forwarded to the relevant thread, entitled "[newLISP] potential bug in REPL in newLISP-GS in newLISP v.10.0.1," and dated "Wed, 11 Mar 2009 14:02:16 +0900," in that newsgroup as well.



There is a new movement there to start a new comp.lang.newlisp (or possibly comp.lang.lisp.newlisp) newsgroup, but in order to start the newsgroup, it is necessary to demonstrate sufficient interest in newLISP by posting a sufficient number of newLISP-related posts there; your cooperation in this matter would be greatly appreciated.



-- Benjamin L. Russell
--

Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com

http://dekudekuplex.wordpress.com/\">http://dekudekuplex.wordpress.com/

Translator/Interpreter / Mobile:  +011 81 80-3603-6725

\"Furuike ya, kawazu tobikomu mizu no oto.\"

-- Matsuo Basho^

DrDave

#1
I am running newLISP 10.0.0 on WIN 32 IPv4 and newLISP-GS 1.24 on Win XP pro SP2



Your code
[cmd]
(define (foo x y)
(+ x y))
[/cmd]
runs fine in both a console and in newLISP-GS.



According to the error message, it appears that when you run the code from GS, the two trailing right parentheses have somehow been moved to the start of the code and also possibly removed all charcters after the 'y', including a newline marker ,as if you entered the following code
))
[cmd]
(define (foo x y)
(+ x y


I have used prior releases of GS also without problems. Considering that you stated you have had this problem from many releases earlier
QuoteThis problem has been persisting since v.9.4.5.
I suspect there is a problem either with your XP installation or configuration of GS rather than with newLISP itself.



Are you using a Japanese version of Win XP, or perhaps have some other text-related problems due to Japanese? In other applications,  I sometimes run into anamolies (bugs) in character placement in right-to-left languages that disappear when I paste the same text into a pure English Win XP installation.



DrDave
...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.

\"Getting Started with Erlang\"  version 5.6.2

DekuDekuplex

#2
Quote from: "DrDave"[...]



Are you using a Japanese version of Win XP, or perhaps have some other text-related problems due to Japanese? In other applications,  I sometimes run into anamolies (bugs) in character placement in right-to-left languages that disappear when I paste the same text into a pure English Win XP installation.


Yes, in fact I am using a Japanese version of Windows XP, but this problem has not occurred in any other similar applications.  For example, I also use DrScheme, but this problem doesn't occur there (although DrScheme does have a problem with frequent intermittent hangs in the "Open File" dialog box).



Is there a way to solve this problem without replacing the OS?



-- Benjamin L. Russell
--

Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com

http://dekudekuplex.wordpress.com/\">http://dekudekuplex.wordpress.com/

Translator/Interpreter / Mobile:  +011 81 80-3603-6725

\"Furuike ya, kawazu tobikomu mizu no oto.\"

-- Matsuo Basho^

newBert

#3
Just to inform : no problems for me with newLISP v.10.0.2 on Win32 IPv4 (Windows XP-SP3,french version)  with both console and newlisp-GS
<r><I>>Bertrand<e></e></I> − <COLOR color=\"#808080\">><B>newLISP<e></e></B> v.10.7.6 64-bit <B>>on Linux<e></e></B> (<I>>Linux Mint 20.1<e></e></I>)<e></e></COLOR></r>

DekuDekuplex

#4
Quote from: "DekuDekuplex"
Quote from: "DrDave"[...]



Are you using a Japanese version of Win XP, or perhaps have some other text-related problems due to Japanese? In other applications,  I sometimes run into anamolies (bugs) in character placement in right-to-left languages that disappear when I paste the same text into a pure English Win XP installation.


Yes, in fact I am using a Japanese version of Windows XP, but this problem has not occurred in any other similar applications.  For example, I also use DrScheme, but this problem doesn't occur there (although DrScheme does have a problem with frequent intermittent hangs in the "Open File" dialog box).



Is there a way to solve this problem without replacing the OS?



-- Benjamin L. Russell


Interestingly, this problem does not occur if I simply cut and paste the multiline code from another application into the REPL in newLISP-GS, but only if I type it in directly.  The same problem occurs independently of whether the Japanese IME (Input Method Editor) is activated.



-- Benjamin
--

Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com

http://dekudekuplex.wordpress.com/\">http://dekudekuplex.wordpress.com/

Translator/Interpreter / Mobile:  +011 81 80-3603-6725

\"Furuike ya, kawazu tobikomu mizu no oto.\"

-- Matsuo Basho^

DekuDekuplex

#5
Quote from: "DekuDekuplex"
Quote from: "DekuDekuplex"
Quote from: "DrDave"[...]



Are you using a Japanese version of Win XP, or perhaps have some other text-related problems due to Japanese? In other applications,  I sometimes run into anamolies (bugs) in character placement in right-to-left languages that disappear when I paste the same text into a pure English Win XP installation.


Yes, in fact I am using a Japanese version of Windows XP, but this problem has not occurred in any other similar applications.  For example, I also use DrScheme, but this problem doesn't occur there (although DrScheme does have a problem with frequent intermittent hangs in the "Open File" dialog box).



Is there a way to solve this problem without replacing the OS?



-- Benjamin L. Russell


Interestingly, this problem does not occur if I simply cut and paste the multiline code from another application into the REPL in newLISP-GS, but only if I type it in directly.  The same problem occurs independently of whether the Japanese IME (Input Method Editor) is activated.



-- Benjamin


Apparently, carriage returns typed within the REPL in newLISP-GS are not being processed properly; viz.:



In the newLISP command prompt REPL, outside the IDE:


newLISP v.10.0.1 on Win32 IPv4, execute 'newlisp -h' for more info.

> [cmd]
1
[/cmd]
1
>


In the newLISP-GS REPL, inside the IDE:


> [cmd]
1
[/cmd]
nil
1
nil
1
>


-- Benjamin L. Russell
--

Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com

http://dekudekuplex.wordpress.com/\">http://dekudekuplex.wordpress.com/

Translator/Interpreter / Mobile:  +011 81 80-3603-6725

\"Furuike ya, kawazu tobikomu mizu no oto.\"

-- Matsuo Basho^

newBert

#6
Quote from: "DekuDekuplex"


Apparently, carriage returns typed within the REPL in newLISP-GS are not being processed properly; viz.:



In the newLISP command prompt REPL, outside the IDE:


newLISP v.10.0.1 on Win32 IPv4, execute 'newlisp -h' for more info.

> [cmd]
1
[/cmd]
1
>


In the newLISP-GS REPL, inside the IDE:


> [cmd]
1
[/cmd]
nil
1
nil
1
>


-- Benjamin L. Russell


Yes, I confirm, same problem on my computer ... :-/
<r><I>>Bertrand<e></e></I> − <COLOR color=\"#808080\">><B>newLISP<e></e></B> v.10.7.6 64-bit <B>>on Linux<e></e></B> (<I>>Linux Mint 20.1<e></e></I>)<e></e></COLOR></r>

DekuDekuplex

#7
It seems that the REPL in newLISP-GS is not compatible with the Japanese version of Windows XP Professional, Service Pack 2, because it does not recognize carriage returns properly.  Unless this problem is fixed, I wll be forced to copy and paste multiline entries via an editor, which is quite an inconvenience.



-- Benjamin L. Russell
--

Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com

http://dekudekuplex.wordpress.com/\">http://dekudekuplex.wordpress.com/

Translator/Interpreter / Mobile:  +011 81 80-3603-6725

\"Furuike ya, kawazu tobikomu mizu no oto.\"

-- Matsuo Basho^

DekuDekuplex

#8
Quote from: "DekuDekuplex"It seems that the REPL in newLISP-GS is not compatible with the Japanese version of Windows XP Professional, Service Pack 2, because it does not recognize carriage returns properly.  Unless this problem is fixed, I wll be forced to copy and paste multiline entries via an editor, which is quite an inconvenience.



-- Benjamin L. Russell


Incidentally, is there any way to move this discussion to the corresponding thread in comp.lang.lisp (see the thread http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/6de80f7fc19f9ef0#">potential bug in REPL in newLISP-GS in newLISP v.10.0.1 on comp.lang.lisp)?  I tend to engage in discussions concerning multiple implementations of Lisp and Scheme simultaneously, and whereas all my other discussions can take place in my newsreader, because this forum is not echoed onto any mailing list or newsgroup, I need to open my browser separately just for this discussion.



I'm actually trying to create a new newsgroup, comp.lang.lisp.newlisp (previously suggested as "comp.lang.newlisp"), as you can see in the thread http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/f6c5066346672b00#">RFD: comp.lang.newlisp on comp.lang.lisp and news.groups.  However, I am running into a lot of opposition from old-time comp.lang.lisp readers who claim that nobody on the USENET cares about newLISP, and am trying to prove them wrong.  They're currently watching responses to my newLISP-related posts on comp.lang.lisp to determine whether a newLISP newsgroup is likely to get any readership.



-- Benjamin L. Russell
--

Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com

http://dekudekuplex.wordpress.com/\">http://dekudekuplex.wordpress.com/

Translator/Interpreter / Mobile:  +011 81 80-3603-6725

\"Furuike ya, kawazu tobikomu mizu no oto.\"

-- Matsuo Basho^

Lutz

#9
In the newLISP-GS Java front-end the bottom monitor is only a minimal terminal implementation in a Java Swing text area. Only designed for simple one-liners and not designed to be as comfortable as a shell window (which on Mac OS X and other Unix also does tab-expansion to built-in functions).



There are keyboard shut-cuts (shown in the menus) to quickly open, clear or close a new editor in a tab, and then run the contents through the bottom monitor. This would be a typical workflow with Window key-strokes:



Shift-Ctrl-N -> open a new tab



... type your multiline code snippet ..



Alt-R -> evaluate the tab content in the monitor



Alt-Shift-R -> for a fresh monitor newLISP process, if required



Ctrl-N -> clear the tab or



Ctrl-W -> close the tab



You can close the tab with Ctrl-W and use Alt-1, Alt-2 to switch between the top tabbed editor area and the bottom monitor.



There is also a key-combination to switch tabs, but I don't recall them at the moment. They are part of the Java Swing tabbed window implementation.



Ps: welcome to newLISP, and I am also enjoying very much your blog at http://dekudekuplex.wordpress.com/">http://dekudekuplex.wordpress.com/ :)

cormullion

#10
Quote from: "DekuDekuplex"However, I am running into a lot of opposition from old-time comp.lang.lisp readers who claim that nobody on the USENET cares about newLISP, and am trying to prove them wrong.


What's Usenet?



(ducks :-)

xytroxon

#11
Quote from: "cormullion"
What's Usenet?



(ducks :-)


I foolishly posted exactly three messages to what I thought was a "safe" and fairly obscure usenet group (LUA programming language), 4 years ago...



I still get 150 to 200 spam-scam e-mails a month!!!!



------



I fear few Lispers will ever love or use newLISP....



After all, it took a lot of time, dedication, and sheer herculean effort to install and configure that 25 to 50 megabyte distro and getting it customized to work "just right"...



And that was just for emacs ;)



-- xytroxon
\"Many computers can print only capital letters, so we shall not use lowercase letters.\"

-- Let\'s Talk Lisp (c) 1976

DekuDekuplex

#12
Quote from: "xytroxon"
Quote from: "cormullion"
What's Usenet?



(ducks :-)


I foolishly posted exactly three messages to what I thought was a "safe" and fairly obscure usenet group (LUA programming language), 4 years ago...



I still get 150 to 200 spam-scam e-mails a month!!!!


That's a relatively low number.  I'm an administrator of a mailing list, and that mailing list gets about thirty spam e-mail messages PER DAY.



That's the reason that you need to purchase a Yahoo! Mail account with SpamGuard™ and unlimited space.  Of course, Yahoo! Mail also randomly drops incoming messages occasionally (I ran a test once and proved this to myself, so there is no doubt about this), so that's the reason that you need at least one other account that actually receives all the incoming mail, which will unfortunately have limited account space....


Quote
I fear few Lispers will ever love or use newLISP....



After all, it took a lot of time, dedication, and sheer herculean effort to install and configure that 25 to 50 megabyte distro and getting it customized to work "just right"...



And that was just for emacs ;)


Hmm ... DrScheme is easy to install, doesn't need configuration, doesn't need Emacs (although I do ;) ), and is loved by the Scheme community.  If DrScheme is loved by the Scheme community, then I can't see why newLISP can't be loved by the Lisp community....



-- Benjamin L. Russell
--

Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com

http://dekudekuplex.wordpress.com/\">http://dekudekuplex.wordpress.com/

Translator/Interpreter / Mobile:  +011 81 80-3603-6725

\"Furuike ya, kawazu tobikomu mizu no oto.\"

-- Matsuo Basho^

Lutz

#13
The problem with [cmd][/cmd] tags in the newLISP-GS Java front-end has been fixed. Download a new guiserver.jar from:



http://www.newlisp.org/downloads/development/guiserver.jar">http://www.newlisp.org/downloads/develo ... server.jar">http://www.newlisp.org/downloads/development/guiserver.jar



and install on Win32 as: $PROGRAMFILES/newlisp/guiserver.jar



or install on Mac OS X and other Unix as: /usr/share/newlisp/guiserver.jar



ps: corrected URL, thanks Dave

DrDave

#14
Quote from: "Lutz"The problem with [cmd][/cmd] tags in the newLISP-GS Java front-end has been fixed. Download a new guiserver.jar from:



http://www.newlisp.org/download/development/guiserver.jar">http://www.newlisp.org/download/develop ... server.jar">http://www.newlisp.org/download/development/guiserver.jar



and install on Win32 as: $PROGRAMFILES/newlisp/guiserver.jar



or install on Mac OS X and other Unix as: /usr/share/newlisp/guiserver.jar

Lutz,



there is a typo in your URL. It should be this:

http://www.newlisp.org/downloads/development/guiserver.jar">http://www.newlisp.org/downloads/develo ... server.jar">http://www.newlisp.org/downloads/development/guiserver.jar
...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.

\"Getting Started with Erlang\"  version 5.6.2