Recent posts

#41
newLISP in the real world / Input "ё" crashes newlisp in n...
Last post by IVShilov - October 23, 2023, 01:04:58 AM
Also, UTF8 letter crash newlisp capturing keypress in non-blocking mode :

(while (!= 3 (print (read-key true))) (print ":" (read-key true) "|"))
0:0|0:0| ...
after input "ё" newlisp stuck and cmd window close.
#42
newLISP in the real world / Reading keyboard input
Last post by IVShilov - October 22, 2023, 07:29:32 AM
Hi.
[windows 10, newLISP v.10.7.5 64-bit on Windows IPv4/6 UTF-8 libffi]

Found, that non-blocking mode (read-key true) cannot get F1-F12 keycodes because return 0 when nothing pressed, when, for example, F1 key is (0 59):
> (read-key) (read-key)
0
59
- first call returns 0, second call returns 59. 

Under the hood read-key use kbhit() and getch():

/* thanks to Peter van Eerten for contributing this function */
/* included non-blocking ability 10.7.3, LM */

CELL * p_readKey(CELL * params)
{

#if defined(WINDOWS) || defined(OS2)
if(!isNil(evaluateExpression(params)) )
{
if(kbhit())
return(stuffInteger(getch()));
else
[b][u]return(stuffInteger(0));[/u][/b]
}
else
return(stuffInteger(getch()));
#else
...
 /* not Windows or OS2 */
}

As I understand in this place
 return(stuffInteger(0));
(read-key true) returns 0 when nothing has pressed.
I think it must returns nil in this case .

The questions:
1) Is it right place to change behavior and nil is right solution?
2) How to do it right, which C-code must be there and how to rebuild sources?
#43
newLISP and the O.S. / Windows clipboard
Last post by cameyo - October 09, 2023, 06:00:10 AM
Do you known a way to manage windows clipboard (cut, copy, paste)?
I have tried to use clipboard.dll with no luck.
Thanks.

cameyo
#44
newLISP newS / Re: newLISP Github?
Last post by iacore - August 07, 2023, 09:59:52 AM
I added to doc/CHANGES and to the release page.
#45
newLISP newS / Re: I'd like to offer to take ...
Last post by itistoday - August 07, 2023, 09:20:47 AM
Quote from: marchildmann on August 07, 2023, 07:51:56 AMThank you Greg for managing the new forums!
Just re-registered because my previous nickname "hilti" was taken.

Cheers
Marc

Welcome back @marchildmann!

FYI your previous username should still belong to you. Try resetting the password for that username. If you still have control over that email you should get an email letting your reset it.
#46
newLISP newS / Re: I'd like to offer to take ...
Last post by marchildmann - August 07, 2023, 07:51:56 AM
Thank you Greg for managing the new forums!
Just re-registered because my previous nickname "hilti" was taken.

Cheers
Marc
#47
newLISP newS / Re: newLISP Github?
Last post by itistoday - August 03, 2023, 09:36:23 AM
Quote from: iacore on July 31, 2023, 01:21:52 AMI have fixed some bugs of newLISP here: https://git.envs.net/iacore/newerlisp
I also added `(write-expr x)`. May you find this useful.

Have you considered putting out some release notes? Feel free to take inspiration from how Lutz does it or create your own method (e.g. a simple `HISTORY.md` file is often useful).
#48
newLISP newS / Re: newLISP Github?
Last post by iacore - July 31, 2023, 01:21:52 AM
I have fixed some bugs of newLISP here: https://git.envs.net/iacore/newlisp
I also added `(write-expr x)`. May you find this useful.
#49
newLISP newS / Re: Who has the raw data for g...
Last post by itistoday - July 19, 2023, 10:14:13 AM
I know there's a `newlispdoc` utility that creates documentation based on code comments. I'm not sure if that's used to build the full manual though.
#50
newLISP newS / Re: newLISP Github?
Last post by itistoday - July 19, 2023, 10:13:02 AM
Yeah we need someone to act as an active maintainer who can continue the newLISP spirit / way of doing things.