Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ggeorgalis

#1
Has taken me a couple passes to make sense of this.... main thing I didn't realize: "The operator/functor part of a list expression gets evaluated first" but the other examples, I'll be returning to when my brain becomes flexible again. :-) Thanks, -George
#2
What's wrong here? Isn't evaluation done inside out???



newLISP v.10.3.0 on BSD IPv4/6 UTF-8, execute 'newlisp -h' for more info.

> (numbers (set 'numbers (sequence 1 100)) 5)

ERR: invalid function : (numbers (set 'numbers (sequence 1 100)) 5)
>  (set 'numbers (sequence 1 100))
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100)
> (numbers 5)
6
> (numbers (set 'numbers (sequence 1 100)) 5)
Memory fault

returns to shell.



-George
#3
newLISP in the real world / Re: script invocation
November 16, 2010, 03:32:00 PM
okay, excellent, that's resolved. I wasn't expecting the exit function as a requirement.



do you know anyway to coerce options into interpreter without using the full path? Is there a possibility of setting them within the script, like the shell set function? I'd like to use



#!/usr/bin/env newlisp -s 100000 -m 10



but that fails, env is somehow interpreting the options as part of the filename. "#!/usr/bin/env newlisp" works fine.



#!/usr/local/newlisp-10.2.8./bin/newlisp-10.2.8 -s 100000 -m 10



works but I don't want to hard code the path in the script.



-George
#4
newLISP in the real world / script invocation
November 16, 2010, 01:34:12 PM
How is a newlisp script invoked?



newlisp <demo.lsp



works as expected; but creating demo.lsp as an executable file starting with "#!/usr/bin/env newlisp" is not intrepeting the content???



./demo.lsp

newlisp demo.lsp



it goes interactive. does the interpreter require newlisp scripts to be fed as stdin?



-George
#5
newLISP and the O.S. / Re: NetBSD build failure
November 16, 2010, 11:38:28 AM
Okay, I can manage PATH issues :) and I manually copied over the newLISP-10.2.8-Release.html file. (I think NetBSD does something "non-legacy" with regard to terminals, seems readline is the most common build issue)

Best regards,

George
#6
newLISP and the O.S. / Re: NetBSD build failure
November 16, 2010, 11:07:47 AM
I changed the makefile_build from configure, observing the 'without readline lib' comments and it built fine with gmake.



...so what is the configure / configure-alt incompatibility?
#7
newLISP and the O.S. / Re: NetBSD build failure
November 16, 2010, 10:55:06 AM
What do you mean the configure and configure-alt installs are not compatible? In what way are they incompatible?



geo@bonnie:/home/geo/tmp/newlisp-10.2.8 gmake -f makefile_bsd
gcc -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD newlisp.c
newlisp.c:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PARAMS'
newlisp.c: In function 'getToken':
newlisp.c:3287: warning: array subscript has type 'char'
newlisp.c:3303: warning: array subscript has type 'char'
newlisp.c:3309: warning: array subscript has type 'char'
gmake: *** [newlisp.o] Error 1
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 gmake clean          
rm -f *~ *.bak *.o *.obj *.map *.core core *.tgz guiserver/java/._* TEST newlisp-universal
rm -f guiserver/*.class doc/*~ util/*~ examples/*~ modules/*~
rm -f doc/*.bak util/*.bak examples/*.bak modules/*.bak
chmod 644 *.h *.c *.lsp Makefile makefile*
chmod: *.lsp: No such file or directory
gmake: [clean] Error 1 (ignored)
chmod 755 configure configure-alt examples/*
chmod 644 doc/* modules/*.lsp examples/*.lsp examples/*.html
chmod 644 guiserver/*
chmod 755 guiserver/images
chmod 644 guiserver/images/*
chmod 755 guiserver/java
chmod 644 guiserver/java/*
rm -f makefile_build makefile_install config.h test-*
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 gmake -f makefile_netbsd                                                                                                      
gcc -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD newlisp.c
newlisp.c:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PARAMS'
newlisp.c: In function 'getToken':
newlisp.c:3287: warning: array subscript has type 'char'
newlisp.c:3303: warning: array subscript has type 'char'
newlisp.c:3309: warning: array subscript has type 'char'
gmake: *** [newlisp.o] Error 1
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 uname -a
NetBSD bonnie 5.0_STABLE NetBSD 5.0_STABLE (BONNIE) #0: Sat Feb 13 00:52:48 PST 2010  root@bonnie:/usr/obj/sys/arch/i386/compile/BONNIE i386
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 uname    
NetBSD


BTW I noticed this from my install log the other day...

....
install -m 644 doc/newLISPdoc.html /usr/local/newlisp-10.2.8./share/doc/newlisp/newLISPdoc.html
install -m 644 doc/newLISP-10.2.6-Release.html /usr/local/newlisp-10.2.8./share/doc/newlisp/newLISP-10.2.6-Release.html
install: doc/newLISP-10.2.6-Release.html: stat: No such file or directory
*** Error code 1 (ignored)
install -m 644 doc/newlisp.1 /usr/local/newlisp-10.2.8./man/man1/newlisp.1
....


here is the makefile_build diff, the individual files are attached

geo@bonnie:/home/geo/tmp/newlisp-10.2.8 diff makefile_build*txt
1c1,10
< # makefile for newLISP v. 10.1.x generated by the configure script (configure-alt)
---
> # makefile for newLISP v. 10.x.x on BSDs: FreeBSD, OpenBSD and NetBSD with UTF8 support
> #
>
> OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o
>         nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
>
> CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD -DSUPPORT_UTF8
> # or without readline lib
> #CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D_BSD -DSUPPORT_UTF8
>
3,9d11
< CFLAGS =  -Wall -pedantic -Wno-uninitialized -Wno-long-long -fno-strict-aliasing -O2 -c
< LDFLAGS = -lm
< OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o  nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o
< STRIP = strip
< TARG = newlisp
< RLFLAGS =
< ARCHFLAGS = -m32
12,13c14,17
<         $(CC) $(OBJS) $(ARCHFLAGS) $(LDFLAGS) $(RLFLAGS) -o $(TARG)
<         $(STRIP) $(TARG)
---
>         $(CC) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
> # or without readline lib
> #       $(CC) $(OBJS) -m32 -g -lm -o newlisp
>         strip newlisp
16c20,22
<         $(CC) $(ARCHFLAGS) $(CFLAGS) -DNEWCONFIG $<
---
>         $(CC) $(CFLAGS) $<
>
> $(OBJS): primes.h protos.h makefile_bsd_utf8
18d23
< $(OBJS): primes.h protos.h config.h makefile_build


oops, the forum said .txt extension not allowed, I removed the extension and it said 'the extension is not allowed' ...the files are here http://iuxta.com/tmp28/101116-newlisp/">http://iuxta.com/tmp28/101116-newlisp/ files there with an atime over 28 days are purged.



-George
#8
newLISP and the O.S. / NetBSD build failure
November 15, 2010, 11:45:21 PM
Hi, I'm new to lisp here, hope this is the best forum. I get some errors when I build on NetBSD:


                                                                                                                     
 geo@bonnie:/home/geo/tmp/newlisp-10.2.8 ./configure

removing old objects and setting correct permissions ...
chmod: *.lsp: No such file or directory
*** Error code 1discovering platform and default memory model ...

detected memory model ILP32
detected Operating System _BSD
creating makefile_build ...

to make for ILP32 on _BSD type:
    make
to make for any other system do:
    make -f makefile_xxx
where makefile_xxx is one of the preconfigured makefiles


Ignoring the error, I get the same failure with make and gmake.



geo@bonnie:/home/geo/tmp/newlisp-10.2.8 make        
make -f makefile_build
gcc -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD -DSUPPORT_UTF8 newlisp.c
newlisp.c:855: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PARAMS'
newlisp.c: In function 'getToken':
newlisp.c:3287: warning: array subscript has type 'char'
newlisp.c:3303: warning: array subscript has type 'char'
newlisp.c:3309: warning: array subscript has type 'char'
*** Error code 1

Stop.
make: stopped in /usr/home/geo/tmp/newlisp-10.2.8
*** Error code 1

Stop.
make: stopped in /usr/home/geo/tmp/newlisp-10.2.8


building and install with configure-alt works fine... (accept says to use make when I need gmake)



I don't really understand why there is an alt configure, but I am glad that it works! is there an issue system better for reporting things like this? I'm happy to run any diagnostic commands, but the error is over my head :-}



-George