Search found 32 matches

by iNPRwANG
Mon May 21, 2018 6:47 am
Forum: newLISP in the real world
Topic: Source funtion could not get the corresponding result
Replies: 0
Views: 3787

Source funtion could not get the corresponding result

Source funtion could not get the corresponding result while nest list element type of arrays, code like this: > (array 1) (nil) > (setq *a* (array 1)) (nil) > (setf (nth 0 *a*) '(1 2 3)) (1 2 3) > (source '*a*) "(set '*a* (array 1 (flat '(\r\n (1 2 3)))))\r\n\r\n" > The *a* symbol's value is: ((1 2 ...
by iNPRwANG
Mon May 14, 2018 6:43 am
Forum: So, what can you actually DO with newLISP?
Topic: Some tips and examples for remote debug with newLisp
Replies: 0
Views: 4721

Some tips and examples for remote debug with newLisp

Here are some share tips of doing remoting debug with newLisp : ) Before, I suggested to add a "debugConsole" function for embedded newLisp library debugging, that can establish a new console window for windows GUI applications and can do the step debug in the window. Now, I want to step debug the n...
by iNPRwANG
Mon Feb 12, 2018 3:11 am
Forum: newLISP Graphics & Sound
Topic: newLisp compile to webassembly (newlisp-js)
Replies: 1
Views: 2722

newLisp compile to webassembly (newlisp-js)

Use this makefile can compile newLisp to newlisp-js in emscripten v1.37 by enable webassembly support. Notice of the "-s WASM=1" option let the emscripten generate webassembly, and should use the " -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' " for function exporting (the "ccall" and "cwra...
by iNPRwANG
Wed Jan 10, 2018 1:31 am
Forum: newLISP Graphics & Sound
Topic: Guiserver can not load internal image under jre 9.0.1
Replies: 3
Views: 2970

Re: Guiserver can not load internal image under jre 9.0.1

I'v tried to traced into guiserver, and found that the "cls.getClass().getResource()" call get a null point result in Jre 9.0.1, I changed the code to "cls.getResource()" and the result is corrected. The code looks like this: guiserver.java:180 public static Image getImageFromPath(String path, Class...
by iNPRwANG
Thu Jan 04, 2018 9:36 am
Forum: newLISP Graphics & Sound
Topic: Guiserver can not load internal image under jre 9.0.1
Replies: 3
Views: 2970

Guiserver can not load internal image under jre 9.0.1

OS version is win10 x64 1709 (Chinese simplified). After I upgraded Jre from 8.x to 9.0.1, and running any newLisp script that used guiserver(such as the widgets-demo.lsp), all of the program that use the internal image (such as gs:image-button that use a image "/local/newLISP32.png") will cause a e...
by iNPRwANG
Thu Jan 19, 2017 5:08 am
Forum: newLISP in the real world
Topic: Why this forum's link not exists in newlisp's home page?
Replies: 2
Views: 2275

Why this forum's link not exists in newlisp's home page?

Why this forum's link not exists in newlisp's home page?
by iNPRwANG
Mon Nov 03, 2014 4:22 am
Forum: Anything else we might add?
Topic: Ability to import C functions from a function pointer?
Replies: 11
Views: 10740

Re: Ability to import C functions from a function pointer?

The newlisp module has exported a function named "newlispCallback", that's able to make a callback from a C function pointer, and then call it from newlisp.

For more reference to:
http://www.newlisp.org/downloads/CodePatterns.html
by iNPRwANG
Tue Oct 21, 2014 6:37 am
Forum: newLISP in the real world
Topic: Crashed while step debug
Replies: 4
Views: 2522

Re: Crashed while step debug

And in the debugging state, the code's behavior is different from direct run. Such as this example: (define (test) (setq *a* (array 1)) (rest *a*)) (test) By direct run this code, the rest function apply to an 1 element array, it throw the error: ERR: array index out of bounds in function rest : 1 c...
by iNPRwANG
Tue Oct 21, 2014 3:23 am
Forum: newLISP in the real world
Topic: Crashed while step debug
Replies: 4
Views: 2522

Crashed while step debug

I have obtain newlisp.exe from: http://www.newlisp.org/downloads/UTF-8_win32/ Verion is 10.6.0. And let it run this program: (define (db-clear-sync-queues-vlog clearlist) (let ((conds '()) (sql "")) (dolist (_item clearlist) (if (and (> (length _item) 1) (string? (nth 0 _item)) (number? (nth 2 _item...
by iNPRwANG
Wed May 22, 2013 5:50 am
Forum: newLISP in the real world
Topic: Int type FFI problem between newLisp10.4.5 and newLisp10.5.0
Replies: 4
Views: 1629

Re: Int type FFI problem between newLisp10.4.5 and newLisp10

Lutz wrote:... and you also should try:

Code: Select all

(import "msvcrt.dll" "sscanf" "cdecl") ; <- C-calling conventions for varargs
C-calling conventions may handle variable number of arguments in sscanf better.
Well, I had found the issue just now.
by iNPRwANG
Wed May 22, 2013 5:48 am
Forum: newLISP in the real world
Topic: Int type FFI problem between newLisp10.4.5 and newLisp10.5.0
Replies: 4
Views: 1629

Re: Int type FFI problem between newLisp10.4.5 and newLisp10

I had met some problem with my compiled newLisp,such as http://newlispfanclub.alh.net/forum/viewtopic.php?f=16&t=4099 and this problem. Now I packed my compiler, libs and uploaded it: http://211.95.60.98:9090/ Mingw.7z my used compiler libffi-3.0.10.7z my libffi(no changed) newlisp10.5.0.7z my compi...
by iNPRwANG
Wed May 22, 2013 2:16 am
Forum: newLISP in the real world
Topic: Int type FFI problem between newLisp10.4.5 and newLisp10.5.0
Replies: 4
Views: 1629

Int type FFI problem between newLisp10.4.5 and newLisp10.5.0

OS is windows xp sp3, these code works better on newLisp 10.4.5:

Code: Select all

(import "msvcrt.dll" "sscanf")
	
(let ((day 0) (mon 0) (year 0))
	(sscanf "1990-01-01" "%d-%d-%d" (address year) (address mon) (address day)))
But crashed on newLisp 10.5.0, is any changes of the int datatype address?
by iNPRwANG
Fri Sep 28, 2012 1:40 am
Forum: newLISP in the real world
Topic: net-eval multi thread
Replies: 1
Views: 1010

Re: net-eval multi thread

My solution is use a http server which has the reverse proxy feature, such as Nginx. First, start multipile newLisp instance as local http servers, let them listening for http request. Second, configure the Nignx as a reverse proxy, it can hold the http request from user, and dispatch the request to...
by iNPRwANG
Thu Jun 14, 2012 9:24 am
Forum: newLISP in the real world
Topic: Catch form problem
Replies: 2
Views: 1192

Re: Catch form problem

Please close this subject, I known what's my mistake :)
by iNPRwANG
Thu Jun 14, 2012 9:23 am
Forum: newLISP in the real world
Topic: Catch form problem
Replies: 2
Views: 1192

Catch form problem

The newLisp document said: In the second syntax, catch evaluates the expression exp, stores the result in symbol, and returns true. If an error occurs during evaluation, catch returns nil and stores the error message in symbol. This form can be useful when errors are expected as a normal potential o...
by iNPRwANG
Fri Apr 20, 2012 7:05 am
Forum: newLISP in the real world
Topic: Runtime error while compile with mingw gcc(4.6.1)
Replies: 2
Views: 1176

Re: Runtime error while compile with mingw gcc(4.6.1)

I use the default makefile named "makefile_mingw_utf8_ffi", and did not to modity it. (just use the -01)
My system is Windows XP sp3 32bit, lib ffi also compile with gcc 4.6.1.
Use newlisp version is 10.4.2 in-progress. : )

The fatal error message with a msvcrt.dll callstack, function is longjump.
by iNPRwANG
Fri Apr 20, 2012 1:28 am
Forum: newLISP in the real world
Topic: Runtime error while compile with mingw gcc(4.6.1)
Replies: 2
Views: 1176

Runtime error while compile with mingw gcc(4.6.1)

While I compile newlisp 10.4.2 on windows mingw gcc(4.6.1), and run the target, it looks good for all test. But if only cause a error in code, like run a undefine function: (aa) That will show a error message, and make a fatal error messagebox, then program will crash. I try to build a version with ...
by iNPRwANG
Wed Apr 18, 2012 4:37 am
Forum: newLISP in the real world
Topic: The length of nil value
Replies: 3
Views: 1211

Re: The length of nil value

OK, thx.
The difference with common lisp is: In common lisp the (length 'nil) is zero, and in newlisp is the symbols length.
by iNPRwANG
Wed Apr 18, 2012 3:10 am
Forum: newLISP in the real world
Topic: The length of nil value
Replies: 3
Views: 1211

The length of nil value

This is code:

Code: Select all

(setq mylst '(nil nil nil nil nil nil nil nil nil nil nil nil))
(dolist (item mylst) (println (length item)))
Why the result is:

3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
by iNPRwANG
Wed Apr 11, 2012 7:47 am
Forum: newLISP in the real world
Topic: Some minor errors about manual and ....
Replies: 7
Views: 2399

Re: Some minor errors about manual and ....

I use the chinese locale,too. And I think that's not the newlisp's problem, because of the cmd.exe can only display characters of cp936 in general. Write these examples in a utf-8 encoded text file and run it, will get the right result. The "set-locale" function of newlisp is no use to change the cm...
by iNPRwANG
Wed Apr 11, 2012 7:22 am
Forum: newLISP in the real world
Topic: process function cause handle leak?
Replies: 0
Views: 1486

process function cause handle leak?

System is Windows xp, while loop call of the "process" function of newlisp 10.4.2, you may saw that the "Handle Count" of Task manager increment every call. I have readed the source of win32-util.c:69, the "CreateProcess" systemcall return a PROCESS_INFORMATION struct, the function call return the h...
by iNPRwANG
Sat Mar 10, 2012 2:01 pm
Forum: newLISP in the real world
Topic: Auto call a function when no references to object
Replies: 2
Views: 1135

Re: Auto call a function when no references to object

newLISP is single threaded , the 'fork' and 'spawn' built-in functions launch new processes not in-process threads. When a newLISP process dies, all its resources are freed. When a newLISP process calls an imported function, there is now way it could reenter this imported function again, as newLISP...
by iNPRwANG
Fri Mar 09, 2012 2:45 am
Forum: newLISP in the real world
Topic: Auto call a function when no references to object
Replies: 2
Views: 1135

Auto call a function when no references to object

For I was often to call some OS native API in newlisp, and alloc some kernel handle. While I alloc the native handle, I should free then. Or it will cause the leak. I known the Steel Bank Common Lisp has a extend function named "finalize", it can bind a designated function to a object and let it to ...
by iNPRwANG
Thu Mar 01, 2012 12:38 am
Forum: newLISP in the real world
Topic: Debug feature bracket match error?
Replies: 4
Views: 1432

Re: Debug feature bracket match error?

From the manual description of the 'trace' function: If an expression occurs more than once in a function, the first occurrence of the executing function will always be highlighted (bracketed). This only affects the highlighting, the debugger will always execute expressions in correct order. For in...