I've just spent the best part of a day combining my two favorite hobbies
(photography and Lisp), typing stuff like
(defun mangle (name)
(let ((image (png:decode-file name)))
(png:encode-file (dotimes (i (array-dimension image 0) image)
(dotimes (j (array-dimension image 1))
(setf (aref image i j)
(lognot (aref image i j)))))
(concatenate 'string "new" name))))
(and some much more baroque formulae) into SLIME and seeing what happens.
Hours of fun guaranteed ;-)
You can see one of the results here:
http://www.abstractnonsense.com/tap.jpg
http://www.abstractnonsense.com/newtap.jpg
Lisp is just *so* cool for this kind of thing. Sure, I could have done
this stuff in pretty much any language, but without a REPL I wouldn't have
had the instant "and what happens if I pull this lever?" factor.
Just wanted to share that.
Cheers,
Bill.
--
Dr. William Bland.
It would not be too unfair to any language to refer to Java as a
stripped down Lisp or Smalltalk with a C syntax. (Ken Anderson).
William Bland <·······@abstractnonsense.com> writes:
> I've just spent the best part of a day combining my two favorite hobbies
> (photography and Lisp), typing stuff like
>
> (defun mangle (name)
> (let ((image (png:decode-file name)))
> (png:encode-file (dotimes (i (array-dimension image 0) image)
> (dotimes (j (array-dimension image 1))
> (setf (aref image i j)
> (lognot (aref image i j)))))
> (concatenate 'string "new" name))))
>
> (and some much more baroque formulae) into SLIME and seeing what happens.
>
> Hours of fun guaranteed ;-)
>
> You can see one of the results here:
> http://www.abstractnonsense.com/tap.jpg
> http://www.abstractnonsense.com/newtap.jpg
>
> Lisp is just *so* cool for this kind of thing. Sure, I could have done
> this stuff in pretty much any language, but without a REPL I wouldn't have
> had the instant "and what happens if I pull this lever?" factor.
>
> Just wanted to share that.
Fine! Now I can dump gimp and do my photo processing with Common-Lisp :-)
--
__Pascal Bourguignon__ http://www.informatimago.com/
To vote Democrat or Republican, it's like changing of cabin in the Titanic.
Pascal Bourguignon wrote:
> Fine! Now I can dump gimp and do my photo processing with Common-Lisp :-)
Grab the cl-magick bindings to GraphicksMagick and you have a good
start. Then you just need a good gui framework to create some tools, and
voila cl-photoshop.
:)
kt
--
Cells? Cello? Celtik?: http://www.common-lisp.net/project/cells/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
On Sun, 03 Oct 2004 04:33:58 +0200, Pascal Bourguignon wrote:
>
> Fine! Now I can dump gimp and do my photo processing with Common-Lisp :-)
Well this was certainly more fun than the one time I wrote a gimp
plugin (that was a few years ago though, so it may have become easier).
Cheers,
Bill.
--
Dr. William Bland.
It would not be too unfair to any language to refer to Java as a
stripped down Lisp or Smalltalk with a C syntax. (Ken Anderson).
William Bland <·······@abstractnonsense.com> writes:
> You can see one of the results here:
> http://www.abstractnonsense.com/tap.jpg
> http://www.abstractnonsense.com/newtap.jpg
The latter picture shows that Lisp is the Philosopher's Stone: it
turns everything into gold.
Paolo
--
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
Recommended Common Lisp libraries/tools (see also http://clrfi.alu.org):
- ASDF/ASDF-INSTALL: system building/installation
- CL-PPCRE: regular expressions
- UFFI: Foreign Function Interface
William Bland <·······@abstractnonsense.com> writes:
> I've just spent the best part of a day combining my two favorite hobbies
> (photography and Lisp), typing stuff like
>
> (defun mangle (name)
> (let ((image (png:decode-file name)))
> (png:encode-file (dotimes (i (array-dimension image 0) image)
> (dotimes (j (array-dimension image 1))
> (setf (aref image i j)
> (lognot (aref image i j)))))
> (concatenate 'string "new" name))))
>
> (and some much more baroque formulae) into SLIME and seeing what happens.
Cute! Where does the png package come from?
>
> Hours of fun guaranteed ;-)
No doubt!
Andras
Andras Simon <······@math.bme.hu> wrote:
> Cute! Where does the png package come from?
a search on CLiki shows a library, which could be the used one:
http://www.ljosa.com/~ljosa/software/cl-png/
--
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
On Sun, 03 Oct 2004 12:59:52 +0000, Frank Buss wrote:
> Andras Simon <······@math.bme.hu> wrote:
>
>> Cute! Where does the png package come from?
>
> a search on CLiki shows a library, which could be the used one:
>
> http://www.ljosa.com/~ljosa/software/cl-png/
Yes, that's the one. Now I'm using Gentoo, all I had to do was
"emerge cl-png". One of the best things about Gentoo for me is the huge
number of Lisp packages available for it.
Cheers,
Bill.
--
Dr. William Bland.
It would not be too unfair to any language to refer to Java as a
stripped down Lisp or Smalltalk with a C syntax. (Ken Anderson).
Frank Buss <··@frank-buss.de> writes:
> Andras Simon <······@math.bme.hu> wrote:
>
> > Cute! Where does the png package come from?
>
> a search on CLiki shows a library, which could be the used one:
>
> http://www.ljosa.com/~ljosa/software/cl-png/
Thanks!
Andras
"William Bland" <·······@abstractnonsense.com> wrote in message
···································@abstractnonsense.com...
> I've just spent the best part of a day combining my two favorite hobbies
> (photography and Lisp), typing stuff like
>
> (defun mangle (name)
> (let ((image (png:decode-file name)))
> (png:encode-file (dotimes (i (array-dimension image 0) image)
> (dotimes (j (array-dimension image 1))
> (setf (aref image i j)
> (lognot (aref image i j)))))
> (concatenate 'string "new" name))))
>
> (and some much more baroque formulae) into SLIME and seeing what happens.
>
> Hours of fun guaranteed ;-)
I'm currently working on a little image manipulation library called IMAGO.
So far it handles PNG, PNM and TGA file formats, and offers a few utilities
for stuff like that (and image composition, convolution-based filters,
etc.) For example, the equivalent of the above code could be:
(defun mangle (name)
(let ((image (read-png name)))
(do-image-pixels (image x y color)
(setf color (invert-color color)))
(write-png image (concatenate 'string "new" name))))
I'm planning on releasing a first version on common-lisp.net in a few days
(maybe a couple of weeks), but until then feel free to email me if you
want the code in its current state.
--
Matthieu Villeneuve
"Matthieu Villeneuve" <·····················@freeDOTfr> wrote in message
······························@news.free.fr...
> I'm currently working on a little image manipulation library called IMAGO.
> So far it handles PNG, PNM and TGA file formats, and offers a few
utilities
> for stuff like that (and image composition, convolution-based filters,
> etc.)
Check out the following page for a few (very simple) examples:
http://matthieu.villeneuve.free.fr/dev/imago/examples.html
Regards,
--
Matthieu Villeneuve
On Tue, 12 Oct 2004 11:22:27 +0200, Matthieu Villeneuve wrote:
> "Matthieu Villeneuve" <·····················@freeDOTfr> wrote in message
> ······························@news.free.fr...
>> I'm currently working on a little image manipulation library called IMAGO.
>> So far it handles PNG, PNM and TGA file formats, and offers a few
> utilities
>> for stuff like that (and image composition, convolution-based filters,
>> etc.)
>
> Check out the following page for a few (very simple) examples:
> http://matthieu.villeneuve.free.fr/dev/imago/examples.html
>
Thanks, I did - it looks very cool! I'm going to switch to using it
rather than cl-png when I get a few spare cycles (Real Soon Now).
Cheers,
Bill.
--
"If you give someone Fortran, he has Fortran. If you give someone Lisp,
he has any language he pleases." -- Guy Steele