Search found 733 matches

by pjot
Thu Dec 20, 2007 8:26 pm
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

Lutz, Now I found another issue but I also found the cause. It seems that your change in (ends-with) crashes newlisp when calling this line from a program: (ends-with "newlisp" "LISP" nil) However, running in interactive mode, this line work well. But running from a program with shebang "#!/usr/bin/...
by pjot
Thu Dec 20, 2007 7:19 pm
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

Thanks, this works now! The (rand) function is surviving the test. One remarks though:

1) There is still a redefinition in 'newlisp.h' of RAND_MAX at line 99-101, can you remove it?

Thanks!

Peter
by pjot
Thu Dec 20, 2007 6:43 pm
Forum: newLISP and the O.S.
Topic: COM in newLISP
Replies: 25
Views: 22715

Well I am not using it yet, but I find this idea really useful! In the past I did a lot of things with VBscript, it is cool that it can be embedded in newLisp now.

Peter
by pjot
Thu Dec 20, 2007 3:07 pm
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

In the headerfile 'stdlib.h' on Tru64Unix I see this: #ifdef _BSD #define RAND_MAX 2147483647 /* max value returned by rand */ #else #define RAND_MAX 32767 /* max value returned by rand */ #endif Now, if I add -D_BSD to the makefile, and recompile, I get this: [peter@olga]# make ./build Discovered T...
by pjot
Thu Dec 20, 2007 2:44 pm
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

Thanks, please make sure the redefinition occurs AFTER the '#include <stdio>' statement. Compilation becomes very ugly but it works correct now: cc -ieee -pedantic -c -O3 -DSOLARIS -DTRU64 -DNEWLISP64 -D_POSIX_PII_SOCKET newlisp.c cc: Warning: newlisp.h, line 478: The redefinition of the macro "RAND...
by pjot
Thu Dec 20, 2007 1:34 pm
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

Hi Lutz, Thanks for the reply. This is the result of your code: [peter@olga]# ./newlisp newLISP v.9.2.10 64-bit on Tru64Unix, execute 'newlisp -h' for more info. > (rand 2) scale=2.000000 testRand=2078917053 RAND_MAX=32767 scale * testRand=4157834106.000000 8747 Hope it helps...? Maybe the variable ...
by pjot
Thu Dec 20, 2007 12:13 pm
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

Phew found the cause. The value of RAND_MAX is different in Linux and Tru64Unix.

Linux:
RAND_MAX = 2147483647

Tru64Unix:
RAND_MAX = 32767


Therefore the result of the calculation ((scale * random())/(RAND_MAX - 1)) is much higher. And the test for (rand) fails.

Peter
by pjot
Thu Dec 20, 2007 10:08 am
Forum: newLISP and the O.S.
Topic: Slashes
Replies: 1
Views: 2846

Slashes

Hi, In the release notes of 9.2.10 I see the following: On Win32 function 'directory?' now will accept training slahes '\' or '/' before it would always fails on trailing slashes If I test it: c:\Scripts>newlisp newLISP v.9.2.10 on Win32, execute 'newlisp -h' for more info. > (directory? "c:\\temp")...
by pjot
Thu Dec 20, 2007 8:09 am
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

The (rand) test fails because of this: newLISP v.9.2.10 64-bit on Tru64Unix, execute 'newlisp -h' for more info. > (set 'sum 0) 0 > (dotimes (x 1000)(inc 'sum (rand 2))) 65385830 > (and (<sum> sum 400)(list? (rand 10 100)))) nil The 'rand' function does not work: > (rand 2) 33878 In the sourcecode o...
by pjot
Thu Dec 20, 2007 7:37 am
Forum: newLISP newS
Topic: development release newLISP v.9.2.10
Replies: 24
Views: 10378

This release compiles fine in Tru64 5.x but on 4.x I see the following (minor) issues: Discovered Tru64 Unix, please read doc/TRU64BUILD cc -ieee -pedantic -c -O3 -DSOLARIS -DTRU64 -DNEWLISP64 -D_POSIX_PII_SOCKET newlisp.c cc -ieee -pedantic -c -O3 -DSOLARIS -DTRU64 -DNEWLISP64 -D_POSIX_PII_SOCKET n...
by pjot
Wed Dec 19, 2007 8:44 pm
Forum: Anything else we might add?
Topic: (ends-with) regex issue
Replies: 3
Views: 2609

You are right, and if it is not a bug, at least it is inconcistent:
> (starts-with "12345" "1|2" 1)
true
> (starts-with "12345" "2|1" 1)
true
> (ends-with "12345" "5|4" 1)
true
> (ends-with "12345" "4|5" 1)
nil

So indeed (starts-with) is working correctly.

Peter
by pjot
Wed Dec 19, 2007 7:31 pm
Forum: Anything else we might add?
Topic: (ends-with) regex issue
Replies: 3
Views: 2609

(ends-with) regex issue

Hi, The other day I was stumbling into this problem (and newdep: yes I've read the manual now :-) ) newLISP v.9.2.10 on Linux, execute 'newlisp -h' for more info. > (set 'S "abc.def.ghi") "abc.def.ghi" > (ends-with S "ghi" 1) true > (ends-with S "def|ghi" 1) nil > As is visible from above, I try to ...
by pjot
Tue Dec 18, 2007 2:25 pm
Forum: Anything else we might add?
Topic: newLisp competition 2007
Replies: 68
Views: 47100

For Win32 users I made a ZIP package with the full application. Installation: 1) Install a GTK Runtime Environment from here or here (either one will do). 2) Unzip the ZIP file in a directory of your choice. It is assumed you have the newlisp binary in your PATH, and if not, copy it to the same dire...
by pjot
Mon Dec 17, 2007 6:21 pm
Forum: Anything else we might add?
Topic: newLisp competition 2007
Replies: 68
Views: 47100

You have to admit that's the best "something's wrong" post ever, no matter what the problem is... That's true! I fully agree :-) Lets just hope then one day GTK offers binaries for OS X, just like they do for Windows. Indeed, I hope so too... as soon as it happens I'll support MacOSX as well. Cheer...
by pjot
Mon Dec 17, 2007 10:48 am
Forum: Anything else we might add?
Topic: newLisp competition 2007
Replies: 68
Views: 47100

Runs in Unix/Linux/Win32. I do not own a Mac so I cannot support MacOSX.... sorry! If you want me to support MacOSX, please donate €600,= so I can buy one :-) From your error it seems newLisp is unable to load the GTK-server DLL. Did you compile it from scratch? It should be possible to run GTK on ...
by pjot
Sun Dec 16, 2007 3:12 pm
Forum: Anything else we might add?
Topic: newLisp competition 2007
Replies: 68
Views: 47100

Folks, It's time for my contribution: a comicbook reader. It is able to handle .cbr, .cbz and .rar formats, reads JPG, PNG and GIF files. Written with GTK-server because I am porting the newlisp code to another language as well. Runs in Unix/Linux/Win32. Users of the infamous Win32 platform need to ...
by pjot
Fri Dec 14, 2007 5:08 pm
Forum: Anything else we might add?
Topic: (directory?) inconsistency
Replies: 7
Views: 3479

Thanks, but unfortunately it is not that easy in my program :-(

...which is my contribution for the contest, by the way ;-)
by pjot
Fri Dec 14, 2007 5:00 pm
Forum: Anything else we might add?
Topic: (directory?) inconsistency
Replies: 7
Views: 3479

Oops I overlooked that... creating my sources in Linux, and after that running in Windows, but never looking into the manual again because it is working in Linux, right? ;-) Anyway, this situation causes the code to be less portable. So in a Win32 situation, you always have to explicitly add a "/" b...
by pjot
Fri Dec 14, 2007 4:08 pm
Forum: Anything else we might add?
Topic: (directory?) inconsistency
Replies: 7
Views: 3479

Your examples do not use actual directories...
c:\Scripts>newlisp
newLISP v.9.2.0 on Win32, execute 'newlisp -h' for more info.

> (directory? "c:/")
true
> (directory? "c:/temp")
true
> (directory? "c:/temp/")
nil
>
Why?
by pjot
Fri Dec 14, 2007 1:52 pm
Forum: Anything else we might add?
Topic: (directory?) inconsistency
Replies: 7
Views: 3479

(directory?) inconsistency

Hi, In Linux, this code works: newLISP v.9.2.0 on Linux, execute 'newlisp -h' for more info. > (directory? "/tmp") true > (directory? "/tmp/") true However, in Win32 we see this: newLISP v.9.2.0 on Win32, execute 'newlisp -h' for more info. > (directory? "C:\\Temp") true > (directory? "C:\\Temp\\") ...
by pjot
Tue Dec 11, 2007 4:53 pm
Forum: Anything else we might add?
Topic: (delete-file) does not accept wildcards?
Replies: 2
Views: 2139

Code: Select all

(dolist (x (directory temp_dir)) (delete-file (append temp_dir "/" x)))
...but the wildcard is more easy.

Peter
by pjot
Tue Dec 11, 2007 2:42 pm
Forum: Anything else we might add?
Topic: (delete-file) does not accept wildcards?
Replies: 2
Views: 2139

(delete-file) does not accept wildcards?

Hi,

It seems that this code is not working:
> (delete-file "somedir/*.*")
nil
Why not? Do I first have to setup a list of files in that directory, and then walk through that list to delete them one-by-one...? :-(

Regards
Peter
by pjot
Sun Dec 02, 2007 2:32 pm
Forum: Anything else we might add?
Topic: Advanced Programming Language Design
Replies: 3
Views: 2875

For all language geeks
Well, I am such a geek... interesting book! Thanks!

Peter
by pjot
Thu Nov 08, 2007 7:26 pm
Forum: Anything else we might add?
Topic: Vim compiler plugin
Replies: 5
Views: 3360

Hi gloodnc, Well, by default gVim for Windows uses an external CMD window to run a newLisp program. I guess you need to recompile gVim in Windows to get a different functionality, if this is possible at all. Unfortunately I do all my work in Unix- and Linux based environments, so I cannot check it f...
by pjot
Mon Nov 05, 2007 5:41 pm
Forum: newLISP newS
Topic: release newLISP version 9.2.0
Replies: 4
Views: 2533

It took some time but it is here: the SETLD installpackage of newLisp 9.2 for Tru64Unix.

I have left out all guiserver stuff, as Tru64Unix 4.0f uses Java 1.1.7b and Tru64Unix 5.1 uses Java 1.3.1.

It can be downloaded from here:

http://www.turtle.dds.nl/newlisp/


Regards
Peter