Subject: [clisp-list] Call for volunteers: CLISP FFI & SWIG

From: Sam Steingold <[email-masked]>
Date: 11 Jun 2001 15:26:35 -0400

Volunteers are needed to make SWIG (http://www.swig.org/) support CLISP FFI
http://sourceforge.net/tracker/?func=detail&atid=351645&aid=429122&group_id=1645

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Stupidity, like virtue, is its own reward.

---

From: Erik Arneson <[email-masked]>
Date: Mon, 11 Jun 2001 13:11:40 -0700

> http://sourceforge.net/tracker/?func=detail&atid=351645&aid=429122&group_id=1645

Sam,

To your knowledge, has anybody written a set of GTK+ bindings for CLISP?
If so, what about GLADE?

-- 
# Erik Arneson <[email-masked]>    AARG Net <http://www.aarg.net/> #
# GPG Key ID: 1024D/43AD6AB8           <http://erik.arneson.org/> #
# "Resistance to tyrants is obediance to God!" - Thomas Jefferson #

---

From: Bruce Lambert <[email-masked]>
Date: Mon, 11 Jun 2001 15:36:49 -0500

Sam and others:

First of all, thanks for the pointers about editors under win98. Now I've 
upgraded to 2.26 and I am running into a stack overflow problem. The 
program extracts and sorts word n-grams with a variable window. I ran the 
program under ACL and I got the following results for time/space:

cl-user(8): (time (main-extract-bigrams "cpmathsci-turns.txt"
"cpmathsci-trigrams.txt" "stop.wrd" 3 5))

Reading turns from file.
Read 36318 turns.
Extracting windowed bigrams from each turn.
9701824 bytes have been tenured, next gc will be global.
See the documentation for variable *global-gc-behavior* for more information.
9430232 bytes have been tenured, next gc will be global.
See the documentation for variable *global-gc-behavior* for more information.

Ranking bigrams by frequency.
; cpu time (non-gc) 67,330 msec (00:01:07.330) user, 350 msec system
; cpu time (gc)     20,730 msec user, 180 msec system
; cpu time (total)  88,060 msec (00:01:28.060) user, 530 msec system
; real time  89,281 msec (00:01:29.281)
; space allocation:
;  7,398,544 cons cells, 95,625,640 other bytes, 0 static bytes

When I run it under clisp-2.26, I get a stack overflow error as follows:

*** - Program stack overflow. RESET
Real time: 32.24 sec.
Run time: 32.24 sec.
Space: 46003476 Bytes
GC: 24, GC time: 5.65 sec.

What can I do to increase my stack size or otherwise manage this memory 
problem?

-bruce

---

From: Sam Steingold <[email-masked]>
Date: 11 Jun 2001 17:14:56 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] how to avoid stack overflow error?"
> * Sent on Mon, 11 Jun 2001 15:36:49 -0500
> * Honorable Bruce Lambert <[email-masked]> writes:
>

try

editbin /stack:<N> lisp.exe

where <N> is a large enough number (default is 3145728).

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Please wait, MS Windows are preparing the blue screen of death.

---

From: Sam Steingold <[email-masked]>
Date: 11 Jun 2001 17:19:17 -0400

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] Call for volunteers: CLISP FFI & SWIG"
> * Sent on Mon, 11 Jun 2001 13:11:40 -0700
> * Honorable Erik Arneson <[email-masked]> writes:
>
http://www.uni-karlsruhe.de/~unk6/export/cl-gtk-1999-01-19.tar.gz

> If so, what about GLADE?
nope.

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
All extremists should be taken out and shot.

---

From: Peter Wood <[email-masked]>
Date: Tue, 12 Jun 2001 09:51:07 +0200

> To your knowledge, has anybody written a set of GTK+ bindings for CLISP?

Hi,

There are bindings, but they didn't work, last I tried (sorry, I can't
even remember where I found them - a search should find them
eventually).

On Linux, it is possible to compile CLISP as a GTK program, by putting
in a call to gtk_init() after main. (Do this in src/spvw.d.)  With a
CLISP compiled like this, you can write external GTK functions in C,
and compile them into CLISP with clisp-link.  I used GLADE to generate
C stubs, and then wrote a few simple FFI lisp functions to
call/manipulate the GTK functions.

I was only playing around, so I don't know how robust this method
would be.  Also, having to arse around with GLADE and C is not that
much fun.  However, I was able to run a simple repl in a GTK window
with some simple editing functions.  I repeat - I was only playing
around, and it was enough work that it would probably be better to
just write GTK bindings from scratch.

Regards,
Peter