Search found 18 matches

by IVShilov
Mon Sep 07, 2020 5:05 pm
Forum: newLISP and the O.S.
Topic: peek for WINDOWS
Replies: 0
Views: 69

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: 1667

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: 1667

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: 1667

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: 1667

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: 1667

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: 1448

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: 1236

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: 1236

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: 1236

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: 2097

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: 3042

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: 3544

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: 2155

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: 1977

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: 2097

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: 2097

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: 6734

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...