sharplispers / clx

a fork of crhodes' fork of danb's fork of the CLX library, an X11 client for Common Lisp
Other
114 stars 46 forks source link

Default wait and demo #134

Closed dkochmanski closed 5 years ago

dkochmanski commented 5 years ago
dkochmanski commented 5 years ago

@rtoy I've backported some changes from CMU.

dkochmanski commented 5 years ago

As of what works and what doesn't: works: qix, petal, *hanoi, recurrence, plaid empty window: shove-bounce, bounce, bouncing-ball (I don't know what these are supposed to do)

This behavior is consistent on implementations I've tried (ecl, ccl, sbcl).

dkochmanski commented 5 years ago

also do-all-demos doesn't work as I would expect it to work. I'd remove the function whatsoever since we have menu now. what do you think?

rtoy commented 5 years ago

For me do-all-demos just hangs now with the first demo. (I only waited a short time, staring at a blank window.) So removing is ok.

The bouncing-ball demo is exactly that. It creates a window and there are a few bouncing balls (like if you dropped a ball onto a floor, slowly coming to a rest). For whatever reason, this works on cmucl's contrib demo, but not with clx-demo.

Not sure what shove bounce does, but the cmucl contrib demo has the window moving all over very quickly, so I'm not sure if that's right.

dkochmanski commented 5 years ago

I've fixed remaining demos (added delays and replaced copy-area with copy-plane in bouncing balls). Now all demos work for me.

rtoy commented 5 years ago

I think it's ok to commit what you have now.

For cmucl, qix just shows a bunch of lines, as if it ran super fast but didn't remove old lines.

Hanoi still has artifacts.

Shove-bounce doesn't move any windows around, and leaves a bunch of windows in the same place. Bounce does nothing.

Bouncing-ball nows shows balls (bombs) dropping, but there are artifacts.

I looked and there are some differences in qix. Don't know how significant these differences are.

And in case you're looking for more demos, the greynetic demo from demos.lisp works with cmucl. :-)

dkochmanski commented 5 years ago

Thanks. greynetic indeed works if taken from there. I'm merging this now then. as of bouncy and bouncy shove they work /most of the time/ for me, sometimes window refuses to move. probably a bug somewhere (i.e we query bottom position in racy condition with window creation or something in this spirit).

Thank you for working with me on this piece.

rtoy commented 5 years ago

No problem. greynetic (from clx-demos) works in cmucl too! It's a bit slow (I think delay should be lower for cmucl. It's set to 0.01 in demos.lisp) Greynetic definitely is faster.

One nice enhancement from cmu demos.lisp is that many demos use colors on a black background instead black on white. (Greynetic, qix, petal use colors.)