Subject: [clisp-list] General question regarding adding new features to clisp

From: Scott Williams <[email-masked]>
Date: Sun Mar 3 17:10:22 2002

Before I ask my question, I should introduce myself. I am Scott Williams, a
Senior in High School from Loveland Colorado. I've been programming for a
long time (too long to really make a difference how long), and I recently picked
up Lisp as a language. And now I'm hooked. (The story is longer, but of
dubious interest to the real world :o) I've been watching the list for a while
and keeping up with CVS versions of clisp.

But I'm disappointed by the lack of imaging support in Lisp, and rather than
just complain, I think it would make an interesting learning experience and
possibly a useful contribution to the clisp community if I were to endow
clisp with some image processing bindings (such as load, blur, composite, and so
forth). To avoid the long ordeal of inventing for myself the whole art of
imaging, I'm inclined to integrate ImageMagick into the project (though I
haven't looked too far into the licenses of either clisp or ImageMagic yet and
can't say if this is even possible... perhaps someone already knows?).

As for the question: Is there any demand at all for this in the wider world?
Has someone already done it? (I looked around and couldn't really find
anything that would allow one to load an image and manipulate it painlessly.)
Should I integrate it into the clisp source tree as a module, or distribute it as
a seperate module and have the user link it in after lisp.run has already
been installed? Or (the horror) write everything natively in Lisp?

-Scott

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

---

From: Sam Steingold <[email-masked]>
Date: Sun Mar 3 19:42:11 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] General question regarding adding new features to clisp"
> * Sent on Mon, 4 Mar 2002 02:09:33 +0100 (MET)
> * Honorable Scott Williams <[email-masked]> writes:
>
> Before I ask my question, I should introduce myself. I am Scott
> Williams, a Senior in High School from Loveland Colorado. I've been
> programming for a long time (too long to really make a difference how
> long), and I recently picked up Lisp as a language. And now I'm
> hooked.
welcome to the club!

> (The story is longer, but of dubious interest to the real world :o)
you'd be surprised! :-)

> I've been watching the list for a while and keeping up with
> CVS versions of clisp.
what is your platform?
did you build today to pre-test the release?

> But I'm disappointed by the lack of imaging support in Lisp, and
> rather than just complain, I think it would make an interesting
> learning experience and possibly a useful contribution to the clisp
> community if I were to endow clisp with some image processing bindings
> (such as load, blur, composite, and so forth). To avoid the long
> ordeal of inventing for myself the whole art of imaging, I'm inclined
> to integrate ImageMagick into the project (though I haven't looked too
> far into the licenses of either clisp or ImageMagic yet and can't say
> if this is even possible... perhaps someone already knows?).

CLISP is under GPL, ImageMagic under a BSD-style license (IIUC).
at any rate, there should not be a problem to interface CLISP with
ImageMagic.

> As for the question: Is there any demand at all for this in the wider
I thought about it - and decided that this is a great idea.
I did not have time then, unfortunately.
I have even less time now. :-(

> anything that would allow one to load an image and manipulate it
> painlessly.)  Should I integrate it into the clisp source tree as a
> module, or distribute it as a seperate module and have the user link
> it in after lisp.run has already been installed?

I suggest that you make it a CLISP module and contribute it to CLISP.
have a look at modules/regexp/

> Or (the horror) write everything natively in Lisp?

I don't think this is useful.  reimplementing everything one more time
in yet another language is for learning that other language, not for
the "real life".

good luck!

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
I don't have an attitude problem. You have a perception problem.

---

From: Scott Williams <[email-masked]>
Date: Sun Mar 3 21:23:02 2002

> > long), and I recently picked up Lisp as a language. And now I'm

Thank you :o)

> > (The story is longer, but of dubious interest to the real world :o)

[ Beginning long story :o) ]
Well, I started in GW-Basic on an ancient 8086 when I was in 3rd grade, and
stopped programming for a while because it was soo frusterating. I changed to
QBasic (found a version of 4.5 laying around) and spent a long time playing
with event loop style gui's. Got fed up with QB's lack of sockets support,
moved to DJGPP with Allegro and did some more event loop gui stuff (I don't
think I ever finished a project, but I never really had a goal in mind either).
I still used QB because it had strings support. I messed around with
 C++ for a while but decided i really didn't like it very much (just a
personal style preference). I moved to windows 2000 and found out that DJGPP
wasn't happy there, so i switched to cygwin... Windows 2000 crashed and that was
the last straw: I moved to linux (mandrake 7.2 was current when I moved) and
found that Allegro was too slow in X, so I gave up and just used GTK. With the
GUI taken care of, I needed a real project to work on. At that time, I had
been trying to give a presentation in class and found out that Powerpoint just
/sucked/ when it came to syncing sound and video. So I thought I'd just
write a little program... it would take stills or text and blur/rotate/fade them
and render them to an MPEG stream. It went through 3 incarnations in C, one
in C++, and when I got serious and started using GTK, it went through 2 more,
and I stopped because i was thinking about extensibility... which is how I
got into Lisp: At first I was thinking only extension language... but I tried
writing a little feasibility test using CLOS and got much farther than I had
ever gotten before. So I just need a way to manipulate images with Lisp.
[ End long story ]

> did you build today to pre-test the release?
I did... I'm on an i586-linux-gnu running gcc 3.1 (libc 6). It built
beautifully, all tests passed. Configured:
# -*- Makefile -*- for the CLISP binaries
# DO NOT EDIT! GENERATED AUTOMATICALLY!
# This file was created on host scott.dgroup as the output of the command:
# ./makemake --with-readline --with-gettext --with-dynamic-ffi
--with-dynamic-modules --with-export-syscalls --with-module=wildcard --with-module=regexp
--with-module=bindings/linuxlibc6

MODULES =  wildcard regexp bindings/linuxlibc

> I have even less time now. :-(

I am still in school, but now I have a clear project in mind and will
probably implement it slowly but consistently as I learn exactly how CLISP
internals work. I still need to try to understand how i will manage the memory, since
images could get quite large... perhaps i might have to disobey basic lisp
principles and do destructive surgury on picture data to avoid constant data
copying and garbage collection?
 
> have a look at modules/regexp/

Thanks... Should I keep a current CVS copy of CLISP until my module works
reliably and then trouble you to merge it? 

> in yet another language is for learning that other language, not for

I agree... thanks for the support! 

> _______________________________________________
> clisp-list mailing list
> [email-masked]
> https://lists.sourceforge.net/lists/listinfo/clisp-list
>

---

From: Sam Steingold <[email-masked]>
Date: Mon Mar 4 06:17:03 2002

> * In message <[email-masked]>
> * On the subject of "Re: [clisp-list] General question regarding adding new features to clisp"
> * Sent on Mon, 4 Mar 2002 06:22:03 +0100 (MET)
> I still need to try to understand how i will manage the memory, since
> images could get quite large... perhaps i might have to disobey basic
> lisp principles and do destructive surgury on picture data to avoid
> constant data copying and garbage collection?

you will need to learn how the FFI works.
lots of reading ahead!

> Thanks... Should I keep a current CVS copy of CLISP until my module
> works reliably and then trouble you to merge it?

yes.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
"A pint of sweat will save a gallon of blood."          -- George S. Patton