Recent posts

#1
Whither newLISP? / Strange behavior
Last post by cameyo - April 19, 2024, 12:28:25 PM

(define (test a) (extend '() (sequence 1 a)))
(test 4)
;-> (1 2 3 4)
(test 4)
;-> (1 2 3 4 1 2 3 4)
(test 4)
;-> (1 2 3 4 1 2 3 4 1 2 3 4)
test
;-> (lambda (a) (extend '(1 2 3 4 1 2 3 4) (sequence 1 a)))
#2
Quote from: pber on April 15, 2024, 07:13:47 AMMany thanks, itistoday, for you effort on newLISP.

🙇�♂️

Quote from: pber on April 15, 2024, 07:13:47 AMI`m studing his codebase and I`m starting to feel a profound feeling of respect and regard for him and his code, which is great (IMHO).

I hope to publish something about my project (Ike) in order to find help from you Lisp coders.

😎👍
#3
newLISP in the real world / fuzzy logic
Last post by vashushpanov - April 17, 2024, 02:06:20 AM
Luis Argüelles Méndez

A Practical Introduction
to Fuzzy Logic using LISP

Very good book!
Describes fuzzy logic using NewLisp.
#4
So, what can you actually DO with newLISP? / (send 'Hello 'to World)
Last post by pber - April 15, 2024, 07:13:47 AM
Many thanks, @itistoday, for you effort on newLISP.

I hope Lutz is in great form, today, just... elsewhere. I`m studing his codebase and I`m starting to feel a profound feeling of respect and regard for him and his code, which is great (IMHO).

I hope to publish something about my project (Ike) in order to find help from you Lisp coders.
I'm a f* C/C++ coder. I know lisp from decades (because I tried to use Xemacs/Emacs for at least 15 years), but I`m still not able to think, in Lisp.
I understand I think just in C, C++ or Smalltalk, but not in Lisp...
#5
Anything else we might add? / Re: v10.76 ffi interface does ...
Last post by sjain59 - March 13, 2024, 11:41:57 PM
I apoligize humbly. I have reproduced your result. I must have done something wrong to get the segfault. Many thanks.
#6
Anything else we might add? / Re: v10.76 ffi interface does ...
Last post by vashushpanov - March 13, 2024, 09:19:57 PM
(import "libc.so.6" "strtof" "float" "char*")
(println (strtof "2,07"))

result 2,069999933242798
(with comma)

(import "libc.so.6" "strtof" "float" "char*")
(println (strtof "2.07"))

result 2

(import "libc.so.6" "strtod" "double" "char*")
(println (strtod "2,07"))

result 2,07

(import "libc.so.6" "strtod" "double" "char*")
(println (strtod "2.07"))

result 2




#7
Anything else we might add? / Re: v10.76 ffi interface does ...
Last post by sjain59 - March 13, 2024, 08:11:45 AM
Try with value 2.07. It gives segmentation fault here. I was aware that 3.14 is reported as 3.14 (with some fractional error) but thought it fit only to report the segfault. Thanks. Kindly help.
#8
Anything else we might add? / Re: v10.76 ffi interface does ...
Last post by vashushpanov - March 12, 2024, 07:19:05 PM
(import "libc.so.6" "strtof" "float" "char*")
(println (strtof "3.07"))
result = 3

With comma:
(import "libc.so.6" "strtof" "float" "char*")
(println (strtof "3,07"))
result = 3,069999933242798


#9
Anything else we might add? / v10.76 ffi interface does not ...
Last post by sjain59 - March 09, 2024, 10:33:24 PM
There is a library, called exodriver downloadable from 'labjack' which gives its library version (2.07) as a 32 bit float through it's function LJUSB_GetLibraryVersion().This I have verified by importing this function in another programming language.

But newLisp v10.76 returns a value 0 instead of 2.07 when the following expression is used:

(import "liblabjackusb.so" "LJUSB_GetLibraryVersion" "float") followed by (LJUSB_GetLibrarVersion) returns a value 0 instead of 2.07.

Perhaps that is because "float" is a cut down version of "double"?

I just checked that there is segmentation fault reading a flost from libc on linux 64 bit, as follows:

(import "libc.so.6" "strtof" "float" "char*")
(strtof "2.07")
yields segmentation fault.

I would appreciate if this issue is resolved.
#10
newLISP in the real world / Re: Lint and/or code formattin...
Last post by dukester - February 22, 2024, 07:41:57 AM
Yes! That works well now. Thank you. What was wrong with the code?