Page 1 of 1

enabling readline support

Posted: Mon Jun 16, 2008 7:41 pm
by tom
Hi guys,

I have a 64 bit amd processor, and I build newlisp with "make linux64LP64."
"make linux64" does not work...

I used to use "make linux_readline" but I don't think I can do that now that I'm 64 bit.

What, oh what ever shall I do?

Posted: Mon Jun 16, 2008 8:46 pm
by Lutz
Allthough your CPU is 64Bit with 99% probability it still is a system with mainly 32-but applications libraries.

Try:

make linux_readline

Then do:

make test

To do a whole test suite

If that fails, try:

make -f makefile_linux64ILP32

but edit the file first to uncomment the readline options, or use:

make linux_readline

but in makefile_linux_readline put a: -m32 switch in the CC compile line. That forces 32-bit on 64-bit systems.

Ps: you can use all make files directly doing a: makefile_xxxxx. Look into the makefiles and experiment, its no rocket science ;-)

Posted: Mon Jun 16, 2008 9:13 pm
by tom
ok
:-)

I actually do have 64 bit libraries, though. I'm using 64 bit Arch Linux.

Posted: Mon Jun 16, 2008 9:43 pm
by Lutz
Ok, if you have 64-bit libraries, you could use:

make -f makefile_linux64LP64

just make sure to add -DREADLINE to the CFLAGS line and -lreadline and perhaps one of -ltermcap and -lncurses to the CC line

64-Bit newLISP will be about 30% faster, but also use almost double the memory, trying to give you more than 4G of RAM. You may run into trouble if you have to import MySQL, SQLite etc. All the modules coming with newLISP are 32-bit interfaces, and so are most of these apps on 64-bit CPUs.

Posted: Mon Jun 16, 2008 10:06 pm
by tom
bingo. thanks.

Posted: Thu Jun 19, 2008 5:54 pm
by pjot
Or you can get 'rlwrap' from here:

http://utopia.knoware.nl/~hlub/uck/software/

Start your newlisp prompt as follows:
rlwrap newlisp
In your KSH/CSH/BASH profile add an alias which aliases newlisp always:

Code: Select all

alias newlisp='rlwrap newlisp'
The nice thing about this wrapper is, that it also points to opening and closing paranthesis while you are typing. Besides this, it also will remember all the lines you have typed in previous sessions with newLisp!

Regards
Peter

Posted: Thu Jun 19, 2008 8:06 pm
by tom
rlwrap looks cool, but it doesn't seem to work correctly with readline-enabled newlisp.

I tried it with a newlisp minus readline and the parens flashed at me; but with newlisp plus readline they didn't.

hmm.

Posted: Thu Jun 19, 2008 8:27 pm
by pjot
Well, for you it's easier compiling newLisp anyway.... no fuzz with editing Makefiles. In the future just run 'make' to compile newLisp, and let 'rlwrap' do all the work. It will create a '.newlisp_history' in your homedir with the complete history of commands entered in all your interactive newLisp sessions. Also the flashing of the parens is an advantage (at least for me it is).

Peter