Search found 23 matches

by IVShilov
Tue Sep 21, 2021 10:29 am
Forum: newLISP in the real world
Topic: How to apply list of xml parse settings to xml-type-tags in a function? (solution: use eval)
Replies: 1
Views: 556

Re: How to apply list of xml parse settings to xml-type-tags in a function?

A solution found (sorry, attach a picture because of forum internal errors).
by IVShilov
Mon Sep 13, 2021 3:26 pm
Forum: Anything else we might add?
Topic: Need a peek for WINDOWS
Replies: 0
Views: 492

Need a peek for WINDOWS

Hello. It was big PITA when I found that win-version of newlisp have no peek. But I found a workaround (http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=9&t=5139) : (define (peek-pipe fd) (letn (pos (seek fd) size (seek fd -1)) (seek fd pos) size )) May be it's better place for posting that.
by IVShilov
Mon Sep 13, 2021 11:31 am
Forum: newLISP in the real world
Topic: How to apply list of xml parse settings to xml-type-tags in a function? (solution: use eval)
Replies: 1
Views: 556

How to apply list of xml parse settings to xml-type-tags in a function? (solution: use eval)

Hi. I try to wrap (xml-type-tags) and (xml-parse) into one safe function without side effects. So I have to pass params to it. Problem with applying param to (xml-type-tags) in function: (xml-type-tags nil nil nil nil) (xml-parse {<br/>} 31) returns ((br)) but (apply xml-type-tags '(nil nil nil nil)...
by IVShilov
Mon Sep 13, 2021 9:28 am
Forum: newLISP in the real world
Topic: (xml-parse xml-source d) put result in context (bug or feature?)
Replies: 0
Views: 269

(xml-parse xml-source d) put result in context (bug or feature?)

Hi all. When wrapper sxml:parse called from external function, all symbols goes to context "sxml": ((define (sxml:parse xml-source d) (xml-type-tags nil nil nil nil) (xml-parse xml-source d) ) {<br/>} 31 ) returns ((br)) , but: ((define (some-function xml-source) (sxml:parse xml-source 31) ) {<br/>}...
by IVShilov
Wed Nov 11, 2020 9:11 am
Forum: newLISP newS
Topic: Stable Release newLISP v.10.7.5
Replies: 10
Views: 9354

Re: Stable Release newLISP v.10.7.5

Hi. Bug found, process crashes by regex call: r:\bin\newlisp>newlisp.exe -n newLISP v.10.7.5 64-bit on Windows IPv4/6 UTF-8 libffi, options: newlisp -h > (sys-info) (428 576460752303423488 399 1 0 2048 0 6316 10705 1414) > (regex {\Ed\Q} {1} 0) r:\bin\newlisp>
by IVShilov
Mon Sep 07, 2020 5:05 pm
Forum: newLISP and the O.S.
Topic: peek for WINDOWS
Replies: 0
Views: 2907

peek for WINDOWS

Hi there. I found that it works like peek on WINDOWS: (define (peek-pipe fd) (letn (pos (seek fd) size (seek fd -1)) (seek fd pos) size )) so now we can safely read a pipe from a subprocess without risk of blocking: (define (read-pipe fd) (letn (buf "") (read fd buf (peek-pipe fd)) buf )) Can it be ...
by IVShilov
Fri Apr 12, 2019 2:45 pm
Forum: newLISP in the real world
Topic: Are '(true nil) and '(true) is equal?
Replies: 9
Views: 4573

Re: Are '(true nil) and '(true) is equal?

Ok, thanks, question was silly.
by IVShilov
Fri Apr 12, 2019 2:06 pm
Forum: newLISP in the real world
Topic: Are '(true nil) and '(true) is equal?
Replies: 9
Views: 4573

Re: Are '(true nil) and '(true) is equal?

Ok, I understand and agree with you, add a nil to make args properly for transposition is right decision - I can filter this nil later. But today I found that data lost because of args not matrix: > (transpose '((1) (1 2))) ((1 1)) > (transpose (transpose '((1) (1 2)))) ((1) (1)) transpose throw awa...
by IVShilov
Thu Apr 11, 2019 9:51 pm
Forum: newLISP in the real world
Topic: Are '(true nil) and '(true) is equal?
Replies: 9
Views: 4573

Re: Are '(true nil) and '(true) is equal?

Thanks for the discovery of this bug. Fixed here: http://newlisp.nfshost.com/downloads/development/inprogress/ Thank you for nifty tool, Lutz! NL is my pet language. Two more questions: 1. does (letn (L '((1 2 3) (1 2 ))) (= L (transpose (transpose L)))) -> nil have the same roots? Because L is not...
by IVShilov
Thu Apr 11, 2019 8:49 am
Forum: newLISP in the real world
Topic: Are '(true nil) and '(true) is equal?
Replies: 9
Views: 4573

Re: Are '(true nil) and '(true) is equal?

Thank you for exhaustive answer!
by IVShilov
Wed Apr 10, 2019 2:22 pm
Forum: newLISP in the real world
Topic: Are '(true nil) and '(true) is equal?
Replies: 9
Views: 4573

Are '(true nil) and '(true) is equal?

May be I don't understand recursive comparision doing by "=", but I see no logic in this : newLISP v.10.7.1 32-bit on Windows IPv4/6 UTF-8 libffi, options: newlisp -h > (= '(true) '(true nil)) nil > (= '(true nil) '(true)) true And another case on numbers: > (= '(1 0) '(1)) #-> true? nil > Bug or fe...
by IVShilov
Sat Apr 06, 2019 8:59 am
Forum: newLISP in the real world
Topic: Not Enough Memory trap - is it normal behaviour?
Replies: 0
Views: 3724

Not Enough Memory trap - is it normal behaviour?

Trying to understand how dump work on variable which not set newLISP v.10.7.1 32-bit on Windows IPv4/6 UTF-8 libffi, options: newlisp -h # (WindowsXP) > (setq R '()) (time (push (dump x) R -1) 10 )(map unique (transpose R)) ((5249584) (256) (5243024) (5243024) (5243024)) I get in such odd situation:...
by IVShilov
Sat Mar 30, 2019 11:14 am
Forum: newLISP in the real world
Topic: Catching output (for make iNewLisp, like iPython)
Replies: 2
Views: 2235

Re: Catching output (for make iNewLisp, like iPython)

At first, trace usual way of interpretation: (setq LOG '() row '() ) ; whole tracelog and one variable for trace REPL once ;; As I understand interpretation process, when I type a str-IN and press ENTER, ;; 1. command-event catch str-IN and can returns empty string to stop interpretation in usual wa...
by IVShilov
Sat Mar 30, 2019 11:12 am
Forum: newLISP in the real world
Topic: Catching output (for make iNewLisp, like iPython)
Replies: 2
Views: 2235

Re: Catching output (for make iNewLisp, like iPython)

Ok, I read forum and see many post with self made REPL. Despite of this posts dated more than five years ago, it takes away half of my fear to broke normal interpretation process :) Problem statement: have data structure in memory like a table with columns: timestamp | IN | timestamp | OUT | timesta...
by IVShilov
Fri Mar 29, 2019 3:15 pm
Forum: newLISP in the real world
Topic: Catching output (for make iNewLisp, like iPython)
Replies: 2
Views: 2235

Catching output (for make iNewLisp, like iPython)

On python I work with ipython IDE and found it very useful. Does it possible to have for newlisp have a table of pairs: - IN with input command, - OUT with saved corresponding output for analyse it and get useful snippets written in past? Input can be catched in reader-event, but I have no idea how ...
by IVShilov
Tue Mar 26, 2019 8:44 pm
Forum: newLISP and the O.S.
Topic: Encoding surrealism in WIN10: UTF-8-NEWLISP in CMD.EXE
Replies: 3
Views: 3939

Post for who have interest about this problem.

Two days out of luck. Much more days out of luck, but some light illuminates the darkness. Many (all?) UTF8-apps, starts from (in?) CMD.EXE, have problems in Windows environment (python too) Full view about whats under the hood from (depths of) MS: https://devblogs.microsoft.com/commandline/windows...
by IVShilov
Sun Mar 17, 2019 11:03 pm
Forum: newLISP in the real world
Topic: How to determine type of variable/value?
Replies: 4
Views: 4490

Re: How to determine type of variable/value?

There is no built-in function that I know of that can return the type of any newLISP expression. At best, you may be able to construct your own function that uses the existing predicate functions to return a string that is unique for each cell type. Despite of (define (type x) (let (types '("bool" ...
by IVShilov
Sun Feb 17, 2019 9:11 pm
Forum: newLISP newS
Topic: Documentation example error for import...
Replies: 3
Views: 5467

Re: Documentation example error for import...

oofoe wrote: Any possibility of getting the "(import LIBRARY)" syntax in Windows too? With maybe some way to list the symbols in the library?
Use DependencyWalker.
I see all exported functions, but still cannot understand why newlisp crashes with first call of function imported from libiconv.dll.
by IVShilov
Sun Feb 17, 2019 10:39 am
Forum: newLISP and the O.S.
Topic: (directory) in Windows and UTF8
Replies: 6
Views: 4365

Re: (directory) in Windows and UTF8

Hello, I have a problem with importing iconv in WinXP (old notebook) - newlisp terminates right after first function call, libiconv_open. [img]2019-02-17_133151%20-%20FS-capture%20-%20newlisp%20CRASH%20iconv.jpg[/img] Importing from kernel32.dll, user32.dll, works fine, but with iconv from GnuWin32 ...
by IVShilov
Sat Aug 11, 2018 5:52 pm
Forum: newLISP newS
Topic: rotate bug on WIN7 x64
Replies: 1
Views: 3376

rotate bug on WIN7 x64

See this: newLISP v.10.7.1 64-bit on Windows IPv4/6 UTF-8 libffi, options: newlisp -h > (rotate (sequence 0 24) -25 ) # BUG: (0) > (rotate (sequence 0 24) -24 ) # all OK: (24 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23) > (rotate (sequence 0 24) -26 ) # all OK again: (1 2 3 4 5 6 7...
by IVShilov
Thu Apr 05, 2018 11:25 am
Forum: newLISP and the O.S.
Topic: Encoding surrealism in WIN10: UTF-8-NEWLISP in CMD.EXE
Replies: 3
Views: 3939

Re: Encoding surrealism in WIN10: UTF-8-NEWLISP in CMD.EXE

Diagram is pure handmade, not script fabricated. In cmd.exe encoding INPUT and for OUTPUT for a started process can be change by a command "chcp" (CHange Code Page, https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/chcp ): > (exec "chcp") # get current code page ("Activ...
by IVShilov
Wed Apr 04, 2018 9:13 am
Forum: newLISP and the O.S.
Topic: Encoding surrealism in WIN10: UTF-8-NEWLISP in CMD.EXE
Replies: 3
Views: 3939

Encoding surrealism in WIN10: UTF-8-NEWLISP in CMD.EXE

I spent 8 hours figuring out HOW it works in windows cmd.exe and found a paradox. Two paradoxes. Try this by yourself, all code in this post is copy and paste from cmd.exe window. Starts CMD.EXE, and newlisp.exe without any init.lsp, and put him a valid cyrillic filepath as first parameter: D:\tmp>r...
by IVShilov
Tue Apr 18, 2017 2:43 am
Forum: newLISP newS
Topic: Stable maintenance release newLISP v.10.7.1
Replies: 11
Views: 11209

Re: Stable maintenance release newLISP v.10.7.1

Hello! I upgrade v10.6.2 to v10.7.1 and found that it cannot start. Tryed newlisp.exe -h and got the same error. Using procmon.exe founded that problem is in reading old init.lsp, moving it out - newlisp starts fine. IMHO "newlisp.exe -h" must not read init.lsp, especially because it output helps wi...