error in newlisp 10.7.1

For the Compleat Fan
Locked
pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

error in newlisp 10.7.1

Post by pda »

sometimes newlisp 10.7.1 gets mad and is not able to parse s-expressions

I'm using newlisp-gs in windows 10 utf8 version, and sometimes when writting code in newlisp-gs editor it doen't match parenthesis properly and refuses to parse the expressions with weird error aparently related to encoding (even when typeing directly in editor!)

for example I got error like ERR: missing parenthesis : "...oin fline \",\"))\r\n(close fo)\r\n(close f�F�"

the strange encoding reads (close fh) in code

same behaviour in console repl, with newlisp 10.7.1 run from windows cmd

anyone with similar problems?

pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

Re: error in newlisp 10.7.1

Post by pda »

same behaviour in 10.7.4

kosh
Posts: 72
Joined: Sun Sep 13, 2009 5:38 am
Location: Japan
Contact:

Re: error in newlisp 10.7.1

Post by kosh »

for example I got error like ERR: missing parenthesis : "...oin fline \",\"))\r\n(close fo)\r\n(close f�F�"
Please check that the number of parentheses in the file you are editing is balanced.

It would be safer to edit with an alternative editor (e.g. Notepad++)

pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

Re: error in newlisp 10.7.1

Post by pda »

parenthesis are balanced and code is checked both in several editors and repl

tests:
- code typed in newlisp GS editor and run from it
- code typed in external editor (geany and SciTE) and pasted into newlisp GS editor to run from it
- code typed in newlisp GS repl
- code type in newlisp repl (started from cmd.exe console)
- code loaded in newlisp repl from text file edited in external editor, with command : newslip.exe file.lsp

allways parenthesis are balanced and allways I get the same error

kosh
Posts: 72
Joined: Sun Sep 13, 2009 5:38 am
Location: Japan
Contact:

Re: error in newlisp 10.7.1

Post by kosh »

1. Could you show me that code?
https://pastebin.com/, https://gist.github.com/, etc

2. Also, please make sure again that newlisp.exe supports UTF-8
C:\>newlisp.exe -v
---
I'm not using newLISP GS. However, it doesn't seem to fully support UTF-8.
For example: Run "guiserver/widget-demo-jp.lsp", you can see the garbled text in bellow screenshot

Image

pda
Posts: 20
Joined: Fri Sep 25, 2020 10:42 am

Re: error in newlisp 10.7.1

Post by pda »

here you are https://pastebin.com/25z78mp3

it's ugly buggy code but not for the issue, you can see parens are balanced

kosh
Posts: 72
Joined: Sun Sep 13, 2009 5:38 am
Location: Japan
Contact:

Re: error in newlisp 10.7.1

Post by kosh »

Well.. From the looks of it, the code seems to be fine.
And the code is parsed correctly in my environment. Of course the execution will fail, but not raise parse error.

Code: Select all

C:>curl -o file.lsp https://pastebin.com/raw/25z78mp3
C:>newlisp.exe .\file.lsp

ERR: value expected in function read-line : f
called from user function (fline fh)
How about reinstalling newlisp.exe and newLISP-GS?
Sorry I'm not sure I can think of a better solution.

Locked