I want to write a very simple app in CL that does the following:
- creates a fullscreen window with a white background,
- left clicks paint the whole window with a color that is calculated
from the (x,y) coordinates
- right clicks exit.
It should work on X11, but other platforms would be nice too. I am
looking for recommendations on what library to use for this -- I don't
know much about GUI programming in CL.
In case anyone is wondering: I want to use this for LCD testing.
Check out Ltk: http://www.peter-herth.de/ltk/ Should be available anywhere you can install Tcl/Tk, and is probably the most straightforward Gui to get started with in Common Lisp.
* Tamas Papp <jndfs5$7g...@dont-email.me> :
Wrote on Fri, 27 Apr 2012 06:55:01 +0000 (UTC):
| Hi,
|
| I want to write a very simple app in CL that does the following:
|
| - creates a fullscreen window with a white background,
|
| - left clicks paint the whole window with a color that is calculated
| from the (x,y) coordinates
|
| - right clicks exit.
|
| It should work on X11, but other platforms would be nice too. I am
| looking for recommendations on what library to use for this --
| I don't know much about GUI programming in CL.
That didn't stop you from producing several substandard GUI libraries
for CL, IIRC CL-cairo and cl-2d , a few years ago?
Madhu <enom...@meer.net> writes:
> * Tamas Papp <jndfs5$7g...@dont-email.me> :
> Wrote on Fri, 27 Apr 2012 06:55:01 +0000 (UTC):
> | Hi,
> |
> | I want to write a very simple app in CL that does the following:
> |
> | - creates a fullscreen window with a white background,
> |
> | - left clicks paint the whole window with a color that is calculated
> | from the (x,y) coordinates
> |
> | - right clicks exit.
> |
> | It should work on X11, but other platforms would be nice too. I am
> | looking for recommendations on what library to use for this --
> | I don't know much about GUI programming in CL.
> That didn't stop you from producing several substandard GUI libraries
> for CL, IIRC CL-cairo and cl-2d , a few years ago?
Whoah! Impoliteness seems fine on this newsgroup but flat-out
unpleasantness isn't necessary.
Note that cl-2d is for plotting, using Cairo (via cl-cairo). Neither of
these is concerned with questions like "Where is the mouse?" or "Has
someone clicked recently?" or ...
This sounds like you'd probably like a lighter-weight solution than all
of CLG, but if you're interested there's a not-quite-so-broken version
at my Github repository (https://github.com/rswarbrick/clg). It
definitely compiles and loads with SBCL; I haven't tested other
implementations. Playing a slo-mo game of whack-a-mole to try and fix
assumptions that the original author made that aren't true in 2012
(either because of changes in SBCL or in Gtk).
I don't believe the question was asked in good faith, but was asked in
anticipation of Xach's reply, and subsequently to correlate
quicklisp/github bandwidth in response to the postings on this
newsgroup. aka an exercise in "advertising/market research"
--- Madhu (well aware of the quality and limitations of pappware)
Madhu <enom...@meer.net> writes:
> I don't believe the question was asked in good faith, but was asked in
> anticipation of Xach's reply, and subsequently to correlate
> quicklisp/github bandwidth in response to the postings on this
> newsgroup. aka an exercise in "advertising/market research"
> --- Madhu (well aware of the quality and limitations of pappware)
Madhu,
You chose to remove the quote of you being offensive when you answered
(I presume) my post. You have also given no evidence for your claim that
Tamas's post is advertising. In fact, he even explained what he wanted
to use the library for.
You speak of the "quality and limitations of pappware" without giving
any indication of what you mean (except for maybe some vague implication
that you believe it's rubbish). But this is irrelevant to the
conversation: as I explained in the previous post (which you also didn't
quote), as far as I know Tamas hasn't written any software that could
help him do what he's asking about.
In gnus-speak: M-2 0 0 0 L a s p <edit contents to "Madhu">. Probably
you shouldn't expect another answer from me on this subject.
* Rupert Swarbrick <s5lq69xt92....@hake.rswarbrick.dnsalias.com> :
Wrote on Fri, 27 Apr 2012 14:56:41 +0100:
| In gnus-speak: M-2 0 0 0 L a s p
I suggest you use the kill file faciliuty instead to avoid seeing any
messages from me, and that would help avoid both of us wasting any more
time on each other --- Madhu
On Fri, 27 Apr 2012 12:25:29 +0200, Morten Nygaard Ĺsnes wrote:
> Check out Ltk: http://www.peter-herth.de/ltk/ Should be available
> anywhere you can install Tcl/Tk, and is probably the most
> straightforward Gui to get started with in Common Lisp.
Thanks! LTK is fantastic. Here is the script that I wrote as a solution:
On Fri, 27 Apr 2012 13:07:26 +0100, Rupert Swarbrick wrote:
> Note that cl-2d is for plotting, using Cairo (via cl-cairo). Neither of
> these is concerned with questions like "Where is the mouse?" or "Has
> someone clicked recently?" or ...
Indeed :-)
> This sounds like you'd probably like a lighter-weight solution than all
> of CLG, but if you're interested there's a not-quite-so-broken version
> at my Github repository (https://github.com/rswarbrick/clg). It
CLG definitely looks interesting, but I ended up solving the problem
with LTK. Now I have my dead pixel tester utility - in CL!
> definitely compiles and loads with SBCL; I haven't tested other
> implementations. Playing a slo-mo game of whack-a-mole to try and fix
> assumptions that the original author made that aren't true in 2012
> (either because of changes in SBCL or in Gtk).
I noticed that the library has some Cairo bindings. If you happen to
find maintaining that part burdensome, you might want to take a look
at cl-cairo2 -- it definitely underwent a period of neglect (I wasn't
using it), but Ryan Pavlik has taken over recently and he has been
very active.
Tamas Papp <tkp...@gmail.com> writes:
> CLG definitely looks interesting, but I ended up solving the problem
> with LTK. Now I have my dead pixel tester utility - in CL!
Cool!
>> definitely compiles and loads with SBCL; I haven't tested other
>> implementations. Playing a slo-mo game of whack-a-mole to try and fix
>> assumptions that the original author made that aren't true in 2012
>> (either because of changes in SBCL or in Gtk).
> I noticed that the library has some Cairo bindings. If you happen to
> find maintaining that part burdensome, you might want to take a look
> at cl-cairo2 -- it definitely underwent a period of neglect (I wasn't
> using it), but Ryan Pavlik has taken over recently and he has been
> very active.
Indeed! I've actually used them myself with some (very incomplete)
poppler bindings. CLG is a reasonably old project and I'm quite new to
it. There's a huge amount of cruft to do with supporting different
implementations, seemingly reimplementing CFFI, BORDEAUX-THREADS,
CLOSER-MOP etc. etc. [1]
As such, my grand plan is to gently take an axe to the codebase,
replacing such brittle stuff with calls to portability wrappers. And
also make the library a bit more rock solid. And maybe even add some
docstrings... And, of course, move to Gtk3.
The plan is to end up with a smaller library with the same functionality
and one that I (or someone else) could plausibly keep in shape.
If I can find a way to replace the Cairo bindings with calls to
cl-cairo2, I'll definitely do so. That's probably some way down the list
though, since I'm not using much of Cairo for the application I'm trying
to write with it at the moment.
Rupert
[1] To be fair, I haven't checked: these might not have existed when
some of CLG was written.
> I don't believe the question was asked in good faith, but was asked in
> anticipation of Xach's reply, and subsequently to correlate
> quicklisp/github bandwidth in response to the postings on this
> newsgroup. aka an exercise in "advertising/market research"
Good grief! Paranoid much?
While I've publicly disagreed with a couple things Quicklisp does, and I'm disappointed that my own distribution experiment didn't go as well, I still have a lot of respect for what Xach has done.
Hint: Xach isn't making money off of Quicklisp; it really is a volunteer effort to help the community. He does some advertising -- that's how to spread a message -- but fake plants disguised as a question that comes up every year or so? That's quite the stretch.
In the US, we have an old saying about "don't look a gift horse in the mouth".
Madhu, if you want to contribute, that's one thing. But hatching conspiracy theories and spreading unfounded rumors about open projects? That's a whole other game. Look in the mirror.
D Herring <dherr...@at.tentpost.dot.com> writes:
> Hint: Xach isn't making money off of Quicklisp; it really is a
> volunteer effort to help the community.
I do make some money off Quicklisp. I accept donations, and people have
donated. I've use that money to go to Lisp meetings, buy computer
hardware, and buy a beer or lunch occasionally.
Zach Beane <x...@xach.com> writes:
> D Herring <dherr...@at.tentpost.dot.com> writes:
>> Hint: Xach isn't making money off of Quicklisp; it really is a
>> volunteer effort to help the community.
> I do make some money off Quicklisp. I accept donations, and people have
> donated. I've use that money to go to Lisp meetings, buy computer
> hardware, and buy a beer or lunch occasionally.
Oh, and to pay for hosting, too, though the price for hosting is pretty
low. Amazon has a pretty great deal going for my Quicklisp needs.
* D Herring <jnff9t$4h...@dont-email.me> :
Wrote on Fri, 27 Apr 2012 20:57:32 -0400:
| In the US, we have an old saying about "don't look a gift horse in the
| mouth".
It would have done those greeks well to look up the Trojan horse at the
mouth. What is "Free" usually has a 10 million budget from stanford
capital.
| Madhu, if you want to contribute, that's one thing. But hatching
| conspiracy theories and spreading unfounded rumors about open
| projects? That's a whole other game. Look in the mirror.
You should stop being naive, or you should stop working for satan.
The library market isnt an honest about software, it is about bandwidth
advertising and about getting 3rd-party-controlled-infrastructure on the
customers machine on the google "people" model.
It would appear that the only people left here are the marketing types
whose value for the NWO comes from their loudness in shaping uninformed
opinion on this newsgroup. and marketing. So far we have an endorsment
for Amazon.
>> D Herring<dherr...@at.tentpost.dot.com> writes:
>>> Hint: Xach isn't making money off of Quicklisp; it really is a
>>> volunteer effort to help the community.
>> I do make some money off Quicklisp. I accept donations, and people have
>> donated. I've use that money to go to Lisp meetings, buy computer
>> hardware, and buy a beer or lunch occasionally.
> Oh, and to pay for hosting, too, though the price for hosting is pretty
> low. Amazon has a pretty great deal going for my Quicklisp needs.
Hi Zach,
My original statement left room for misinterpretation.
By my understanding, you are accepting donations for a serious hobby project and are not making any "real money" that you can rely on.
I wouldn't mind if you are making a small profit. You might want to make an announcement if you do start pulling in substantial donations (comparable to pay for the time and resources you put in each month). Transparency helps people have fair expectations. Showing that the community supports core projects is a success story for CL in its own way.
I have a feeling the above would simply be shorter, simpler and more straightforward as a C/C++ program...
BTW, I was under the impression that LTK would be some Lisp wrapper for TCL's TK. That would make far more sense as far as high level GUI programming goes.
> * D Herring <jnff9t$4h...@dont-email.me> :
> Wrote on Fri, 27 Apr 2012 20:57:32 -0400:
> | In the US, we have an old saying about "don't look a gift horse in the
> | mouth".
> It would have done those greeks well to look up the Trojan horse at the
> mouth. What is "Free" usually has a 10 million budget from stanford
> capital.
> | Madhu, if you want to contribute, that's one thing. But hatching
> | conspiracy theories and spreading unfounded rumors about open
> | projects? That's a whole other game. Look in the mirror.
> You should stop being naive, or you should stop working for satan.
> The library market isnt an honest about software, it is about bandwidth
> advertising and about getting 3rd-party-controlled-infrastructure on the
> customers machine on the google "people" model.
> It would appear that the only people left here are the marketing types
> whose value for the NWO comes from their loudness in shaping uninformed
> opinion on this newsgroup. and marketing. So far we have an endorsment
> for Amazon.
* namekuseijin <29134876.455.1335806238049.JavaMail.geo-discussion-forums@ynce8> :
Wrote on Mon, 30 Apr 2012 10:17:17 -0700 (PDT):
| you're quite insane, dude.
And you are quite the brainwashed schemer who passed (really "failed")
the Scheme Personality Test. Please quit polluting this newsgroup with
your inane posts.
> I have a feeling the above would simply be shorter, simpler and more straightforward as a C/C++ program...
let's clear some points:
- a GUI is always an *illusion* (it's not real)
- real things (like the chair you're probably sitting on) are made out of real physics
- the above means: you can *experience* them with your common senses, allowing you to discern from phantasy
but:
- computer programs are *not* *real*
- they fake physics creating a (quite perfect) illusion using a perfect philosophy (mathematics)
- when a computer program works, that doesn't mean anything *real* (as any illusion is possible in our phantasy)
so:
- yes, Lisp would allow for a perfect *simplicity* solution
- but that would be an illusion in it's own way, because:
- we all are made out of different, not interchangeable physical experiences
conclusion:
(sorry, I'm real, so I don't have the illusion to be of any value to your real, physical existence)
polos.ru...@gmail.com writes:
>> I have a feeling the above would simply be shorter, simpler and more
>> straightforward as a C/C++ program...
> let's clear some points:
> - a GUI is always an *illusion* (it's not real)
> - real things (like the chair you're probably sitting on) are made out
> of real physics
> - the above means: you can *experience* them with your common senses,
> allowing you to discern from phantasy
> but:
> - computer programs are *not* *real*
> - they fake physics creating a (quite perfect) illusion using a
> perfect philosophy (mathematics)
> - when a computer program works, that doesn't mean anything *real* (as
> any illusion is possible in our phantasy)
I object to both points.
Physics tells us that nothing is real. Energy is only some
concentration of information; mater is only some concentration of
energy.
So your "real" chair, is no more real than a chair "simulated" in a
computer system.
And on the other hand, the things you have in a computer systems have a
physical base, as electrical charges around semicondutors in your
computer processor and memory, and as electrical charges and photons in
your LCD display. The image of the GUI window you see on your screen is
as physical as the image you may see of the chair on which you sit.
> so:
> - yes, Lisp would allow for a perfect *simplicity* solution
> - but that would be an illusion in it's own way, because:
> - we all are made out of different, not interchangeable physical
> experiences
I fail to see how that's relevant to the post you answered to, thought.
> conclusion:
> (sorry, I'm real, so I don't have the illusion to be of any value to
> your real, physical existence)
You're not anymore real than your chairs or your computer programs:
you're just some mathematical construct in God's mind.