Search found 12 matches

by neil456
Sat Mar 21, 2015 9:56 pm
Forum: Anything else we might add?
Topic: Function to display test coverage
Replies: 1
Views: 5347

Function to display test coverage

I found this function valuable in determining that the existing Postgres module test code did not cover very many of the functions. It would be handy to have this someplace in the core. It probably needs to be cleaned up. But here it is, for you to use as you see fit. Permission is given to use for ...
by neil456
Sat Feb 21, 2015 8:13 pm
Forum: newLISP and the O.S.
Topic: Windows 8.1 short file names fail on import
Replies: 12
Views: 10782

Re: Windows 8.1 short file names fail on import

Yeah, I was confused by this in the download section, but should have known better. Win32 installer v.10.6.2 (also runs on Windows 7/8 64-bit) The meaning of which is obvious now, but it would have been clearer with: Win32 installer v.10.6.2 (also runs on Windows 7/8 64-bit, in 32-bit mode with only...
by neil456
Fri Feb 20, 2015 8:40 pm
Forum: newLISP and the O.S.
Topic: Windows 8.1 short file names fail on import
Replies: 12
Views: 10782

Re: Windows 8.1 short file names fail on import

OK, fixed.

I was using the 64-bit version of PostgreSQL, by uninstalling it and installing the 32-bit version everything seems to work.

Does anyone know of an easy way to detect 32-bit versus 64-bit libs on Windows?

Of course assuming that newLISP does not work with 64-bit libs?

Neil
by neil456
Fri Feb 20, 2015 8:03 pm
Forum: newLISP and the O.S.
Topic: Windows 8.1 short file names fail on import
Replies: 12
Views: 10782

Re: Windows 8.1 short file names fail on import

OK, lets start over and make it really simple. Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\nt>pg_config --libdir C:/PROGRA~1/POSTGR~1/9.4/lib C:\Users\nt>newLISP -n newLISP v.10.6.2 32-bit on Win32 IPv4/6 libffi, options: newlisp -h > (import {C...
by neil456
Thu Feb 19, 2015 11:55 pm
Forum: newLISP and the O.S.
Topic: Windows 8.1 short file names fail on import
Replies: 12
Views: 10782

Re: Windows 8.1 short file names fail on import

This should be the complete test code for Windows to produce the error; ; get pg_config if available (set 'pg_lib_dir (exec "pg_config --libdir")) (if pg_lib_dir (set 'files (list (append (first pg_lib_dir) "/libpq.dylib") ; shared Mac OS X libs (append (first pg_lib_dir) "/libpq.so") ; loadable elf...
by neil456
Thu Feb 19, 2015 10:51 pm
Forum: newLISP and the O.S.
Topic: Windows 8.1 short file names fail on import
Replies: 12
Views: 10782

Re: Windows 8.1 short file names fail on import

The following code works fine. It correctly finds libpq.dll and sets its path: (println files) ("C:/PROGRA~1/POSTGR~1/9.4/lib/libpq.dylib" "C:/PROGRA~1/POSTGR~1/9.4/lib/libpq.so" "C:/PROGRA~1/POSTGR~1/9.4/lib/libpq.dll") ; find the library file (set 'library (files (or (find true (map file? files)) ...
by neil456
Thu Feb 19, 2015 9:36 pm
Forum: newLISP and the O.S.
Topic: Windows 8.1 short file names fail on import
Replies: 12
Views: 10782

Windows 8.1 short file names fail on import

Unfortunately PostgreSQL Windows install reports file names in the short 8dot3 format. C:\Users\nt>pg_config --libdir C:/PROGRA~1/POSTGR~1/9.4/lib When I try to use this to create a path to the dll the following error occurs. ERR: problem loading library in function import : "C:/PROGRA~1/POSTGR~1/9....
by neil456
Thu Feb 19, 2015 4:18 pm
Forum: newLISP and the O.S.
Topic: Windows 8.1 Can't pin newLISP-GS to task bar
Replies: 1
Views: 5551

Windows 8.1 Can't pin newLISP-GS to task bar

In windows 8.1 the options to pin newLISP-GS to task bar never appears. Windows will allow it pinning to the start view. newLISP can pin to either the task bar or start view. Anyway start view sucks and so I usually use the desktop which does have a shortcut, so all is not lost. This is the current ...
by neil456
Sun Feb 08, 2015 8:09 pm
Forum: newLISP in the real world
Topic: How to determine if function is defined
Replies: 4
Views: 3582

Re: How to determine if function is defined

Still having a problem with this. Consider the following example:

Code: Select all

(dolist (symb (symbols PgSQL))
	(if (lambda? symb)
		(println "found function: " symb)))
This does not work, so how do I get a list of symbols in a context that have lambda expressions assigned to them?
by neil456
Thu Feb 05, 2015 11:37 pm
Forum: newLISP in the real world
Topic: How to determine if function is defined
Replies: 4
Views: 3582

Re: How to determine if function is defined

Excellent, thanks
Neil
by neil456
Thu Feb 05, 2015 10:28 pm
Forum: newLISP in the real world
Topic: How to determine if function is defined
Replies: 4
Views: 3582

How to determine if function is defined

What is the correct way to determine that a function is defined. I am conditionally importing from a C lib and need to determine if the function was actually imported. This is the import function. (define (pg_import_warn fun_name) (if (not (catch (import library fun_name "cdecl") 'pg_load_error)) (p...