From: Kenny Tilton
Subject: Cello update: Web info, and a feature
Date: 
Message-ID: <6F_5c.26883$tP6.7052338@twister.nyc.rr.com>
Well, someone broke in yesterday and stole a draft of the info I was 
going to put up and, well, put it up:

   http://www.common-lisp.net/project/cello/

Some of that is vaporware: the widget set needs doing, the ports need 
doing, and the bit about Cello being a scene graph manager needs to be 
de-hyped since that is not even intended, tho there will always be a 
pull in that functional direction... anyway, it will be easier to 
correct now that it exists, and who knows, maybe some of it will come 
true before I get around to correcting it.

Meanwhile, back on the functional front, Cello now has a nice new 
feature. I gave up (for now) on its ultimate incarnation in order to 
focus on higher-priority things (the widgets), but I still get a big 
kick out of this:...wait, it should have a name...OK:

Just Shoot Me!(tm)
------------------
The Cello GUI ( http://www.common-lisp.net/project/cello/ ) now offers a 
hook by which developers can trigger screen shots on the fly, to JPEG, 
GIF, PDF, and lord knows what else we can beat out of ImageMagick (it 
covers about eighty formats). It /almost/ can "film" itself directly (to 
animated GIF and QT movies, who knows what else) but I must have a bit 
set wrong somewhere because they just play one frame even though I can 
see they have all the frames in there. Anyway, it /is/ possible to 
"film" your application with every frame written out to a separate file 
and then combine them with some other tool (including command-line 
ImageMagick). The other thing I punted on because I did not need it was 
figuring out how to limit the screenshot to just one pane instead of the 
whole window. But that again is probably just a one-line fix.

In a day or two the above link will sport screen shots and the ftp area 
will have a (possibly humongous) movie of Cello, all generated by Just 
Shoot Me! technology.

Don't ask me why I love this feature, but I do. One reason is how easy 
it was, given two powerful libraries: OpenGL and ImageMagick. OK, and 
Cells/Cello. But aside from the obvious screen capture capability, I 
think the functionality will find a lot of use. But the above technical 
issues really need to be worked out to get the most oomph out of JSM!.

kt



-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application

From: Peter Seibel
Subject: Re: Cello update: Web info, and a feature
Date: 
Message-ID: <m3wu5j74fp.fsf@javamonkey.com>
Kenny Tilton <·······@nyc.rr.com> writes:

> Well, someone broke in yesterday and stole a draft of the info I was
> going to put up and, well, put it up:
>
>    http://www.common-lisp.net/project/cello/

Cool. Where's the code? I didn't see a link on the project page and
browsing the common-lisp.net CVS archives found only a basically empty
tarball.

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp
From: Kenny Tilton
Subject: Re: Cello update: Web info, and a feature
Date: 
Message-ID: <Ln26c.27239$tP6.7118559@twister.nyc.rr.com>
Peter Seibel wrote:

> Kenny Tilton <·······@nyc.rr.com> writes:
> 
> 
>>Well, someone broke in yesterday and stole a draft of the info I was
>>going to put up and, well, put it up:
>>
>>   http://www.common-lisp.net/project/cello/
> 
> 
> Cool. Where's the code? I didn't see a link on the project page ...

welllll, I guess it was an oversight, but... right now it exists only 
for those brave souls interested in porting a pile of code which only 
its mother could love. You need to sign a disclaimer saying you know 
that it is an ungodly mess whose only virtue is that Kenny can get it to 
run under ACL and LW on win32, god help the rest of you. You must also 
be braced for hours of work building free (as in your time is worth 
nothing) software libraries such as FreGlut, FTGL, and ImageMagick.

The good news is that Frank Goenninger did shock the world with a port 
to Linux in a relatively few days, blindsided mostly by hardcoded 
pathnames and font names, so I guess it ain't that bad. But he cheated 
and used the same commercial Lisp I used, AllegroCL, missing out on all 
the fun of getting cmucl to handle callbacks into Lisp from C.

But then you have a third of the widgets you should have, a horrendous 
memory leak (I think I just found!) loading JPGs, and zero documentation 
other than the working examples.

Can I sell or can I sell? If you want to try a port, or run LW or ACL on 
win32, there exists a zip named appropriately "PortaCello2":

      ftp://common-lisp.net/pub/project/cello

Aside: The trick for any of the common-lisp.net sites that have not done 
their web pages is to start at the cln home page and hit the ftp or 
view-repositories links and work down into the project directory.

kenneth

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Ng Pheng Siong
Subject: Re: Cello update: Web info, and a feature
Date: 
Message-ID: <c3cm6m$lh0$2@reader01.singnet.com.sg>
According to Kenny Tilton  <·······@nyc.rr.com>:
> Well, someone broke in yesterday and stole a draft of the info I was 
> going to put up and, well, put it up:
> 
>    http://www.common-lisp.net/project/cello/

It seems the Cincom Smalltalk people are building a new GUI framework
called Pollock:

  http://www.cincomsmalltalk.com/userblogs/pollock/blogView 

In my mind, when people are ready to graduate from tcl, Python, Perl, etc.
the next level up is Common Lisp or Smalltalk. Kenny's competition may not
come from the Lisp space at all. ;-)


-- 
Ng Pheng Siong <····@netmemetic.com> 

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL
From: Kenny Tilton
Subject: Cello "Just Shoot Me!" shots on c-l.net [was Re: Cello update: Web info, and a feature]
Date: 
Message-ID: <405A1175.4000907@nyc.rr.com>
Brought to you by the miracle of Cello's new Just Shoot Me!(tm) embedded 
frame capture capability:

    ftp://common-lisp.net/pub/project/cello

Look for cello-shots.zip or the signed cello-shots.asc (if I did that 
right, which I doubt).

Not worth the trouble if you have been to my web site, unless you want 
to enter the Find-the-Celebrities contest (find two to win the right to 
port Cello to OS X).

As advertised, not many diff widgets yet. Just buttons, check boxes, and 
sliders (but checkout the 2-D slider). Unless you count static widgets: 
one-line text and images. The focus to date instead has been:

   - portability: all code and libs are portable. In principle, and in 
fact to ACL/win32, LW/win32, and ACL/Linux.

   - fonts: done. bitmapped, pixmapped, texture, polygon, polygon 
extruded and outlie. One shot shows a polygon extruded string in 
wireframe mode. Neato. It was a real pain calculating and typing in the 
coordinates of all those vertices, tho.

   - pretty pictures: check. very pretty in the shot which happens also 
to show a few of the fonts on my system (in texture mode, btw, the 
fastest, prettiest, and most flexible in re rotations, rescaling, etc etc.

   - stupid OpenGL tricks (so youse guys won't have to figure them out, 
and because they look so cool). Well, to a degree this is also about 
performance, because figuring out textures (to the poor degree I have) 
means much better performance. And this is why Cello methinks belongs in 
the "scene graph Lite" category, because one design imperative is that a 
user should not have to understand OpenGL to build a normal GUI with Cello.

[aside: speaking of tricks, check out orange-tea.jpg where I turned down 
all the lights (the 3d buttons pretty much disappear, but you still see 
the labels because I elected to turn lighting off for text display) and 
played with the OpenGL parameters on the remaining light to create a 
spotlight effect. The funny thing is that I have to move my little 
flashlight back over the light control panel to wind the sliders to turn 
the lights back up. (Is it OK that this is so much fun?) If I get the 
movie-making thing going satisfactorily I will post a demo of me looking 
aound the gui with the flashlight--it will be a little jumpy because I 
am always laughing so hard when I do that.

btw, thanks-nehe.jpg is lovely (thanks to his own cool logo) and is 
actually a tutorial-by-example of basic Cello widget geometry. It is 
dedicated to him because without his web site Cello might not exist. The 
uneven row of widgets at the top all have the same vertical position, 
with local bounds tweaked to make them appear as if they do not. The 
origin is the little dot near the topleft corner, invisible in the 
middle widget because it is on the TL corner. You cannot see it, but the 
bottom widget circles its origin, which is stationary. Check out the 
last box:

(thekids
  (mkPart :box(tu-box)
    :px 50 :py -100
    :color +red+
    :lL -25 :lT (ups 25))
  (mkPart :box(tu-box)
    :px 300 :py -100
    :color +green+
    :lL 0 :lT 0)
  (mkPart :box(tu-box)
    :px 500 :py -100
    :color +yellow+
    :lL 25 :lT (ups -25))
  (mkPart :box(tu-box)
    :px 300 :py -500
    :color +yellow+
    :md-value (c? (degree-radians (mod (frame-ct .w.) 360)))
    :lL (c? (+ -62.5 (* 62.5 (cos (^md-value)))))
    :lT (c? (+ 62.5 (* -62.5 (sin (^md-value)))))))

Classic cells. rendering code for the window ends with:

      (incf (frame-ct self))

That causes the lower tu-box instance to compute a new md-value ("model 
value" as in "model-view", md-value being a useful bucket every instance 
has which can be used for whatever) causing the ll and lt (local-left 
and local top) to be recalculated. The echo function on these slots 
trigger a re-render by calling glut-post-redisplay. Second verse, same 
as the first.

Not shown is that this in turn causes the lr and lb to recalculate. 
Well, here ya go:

(defmodel tu-box (image)
   ((color :initarg :color :accessor color :initform nil))
   (:default-initargs
       :lR (C? (^lr-width 125))
     :lb (C? (^lb-height (downs 125)))
     :layers (c? (list :off (gloff GL_TEXTURE_2D)
                   (xlout 200) (color self)
                   '(:line-width 3) :line-lr))))

The ^lr-width maco expands to: (+ (lL self) <value>)

downs ("down screen") expands to (- 0 <values>*) because it was a pain 
switching over from the usual gui model in which positive is down.

The layers slot is funny, a slot which invented itself. I gave it an 
inch and it will probably end up being the only way to render. The 
really cool thing is that OpenGL itself will compile any sequence of 
OpenGL drawing commands and transformations into what it calls display 
lists, so I am not too embarrassed to be rendering complex things by a 
list of commands. In fact (and leading to another point about Cells) 
here is the dedicated rendering method:

(defmethod ix-render ((self tu-box))
   (trc nil "drawing tu-box" (gbox self))
   (gl-polygon-mode GL_FRONT_AND_BACK GL_FILL)
   (gl-line-width 4)
   (gl-rectf -2 2 2 -2))

Hell, if I just extend my layers language with :poly-mode and :rect 
operators I can lose the special method, and if I sneak the color into 
the skin slot on the image class (not completely unreasonable) I do not 
even need the class, and here is how I make the kids (including the 
close button this time):

(flet ((tu-box (name &rest deets)
          (apply 'make-instance 'image
            :md-name name
            :lR (C? (^lr-width 125))
            :lb (C? (^lb-height (downs 125)))
            :layers (c? (list
                         (gloff gl_texture_2d)
                         :off
                         '(:line-width 3)
                         (skin self)
                         :line-lr
                         `(:poly-mode ,gl_front_and_back ,gl_fill)
                         '(:rect -2 2 2 -2)))
            deets)))
   (thekids
    (tu-box :ftgrow
      :px 50 :py -100
      :skin +red+
      :lL -25 :lT (ups 25))
    (tu-box :ftgrow
      :px 300 :py -100
      :skin +green+
      :lL 0 :lT 0)
    (tu-box :ftgrow
      :px 500 :py -100
      :skin +yellow+
      :lL 25 :lT (ups -25))
    (tu-box :ftgrow
      :px 300 :py -500
      :skin +yellow+
      :md-value (c? (degree-radians (mod (frame-ct .w.) 360)))
      :lL (c? (+ -62.5 (* 62.5 (cos (^md-value)))))
      :lT (c? (+ 62.5 (* -62.5 (sin (^md-value))))))
    (mkPart :bye (CTButton)
      :px (c? (/ (lwidth .w.) 2))
      :py (c? (downs (/ (lheight .w.) 2)))
      :text$ "Close"
      :controlAction (lambda (self event &aux (gw (glutw .w.)))
                       (declare (ignorable event))
                       (glut-Destroy-Window gw)))))

The point about Cells is that it delivers on object reuse, as defined in 
a recent painful thread: the generic image widget serves nicely inan 
unanticipated role because so much code has been moved out to rules 
which can be specified differently for different slots of instances of 
the same (more) generic class.


Ng Pheng Siong wrote:
> According to Kenny Tilton  <·······@nyc.rr.com>:
> 
>>Well, someone broke in yesterday and stole a draft of the info I was 
>>going to put up and, well, put it up:
>>
>>   http://www.common-lisp.net/project/cello/
> 
> 
> It seems the Cincom Smalltalk people are building a new GUI framework
> called Pollock:
> 
>   http://www.cincomsmalltalk.com/userblogs/pollock/blogView 
> 
> In my mind, when people are ready to graduate from tcl, Python, Perl, etc.
> the next level up is Common Lisp or Smalltalk. Kenny's competition may not
> come from the Lisp space at all. ;-)

Once they chose Lisp over Smalltalk, Cello should have no problem 
whipping Pollock's butt. :) Cello just keeps people from passing up Lisp 
because it has (had) no GUI. They won't know how much fun is Cello until 
they have seen enough Lisp that they will already be converted.

But I think I know the masses, and I wager the first thing they will 
want to play with after they finish Practical Lisp is a GUI, so 
newby-level Cello doc will be essential (hence Peter's follow-up 
bestseller, Practical Cello <g> [please note everyone that the entire 
second half of this sentence is a joke]). I will approach the Black Book 
people about doing The Cello Black Book. (I like that approach to doc.)


kt

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application