Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.lisp

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 04-27-2012, 06:55 AM
Tamas Papp
Guest
 
Posts: n/a
Default GUI library/toolkit recommendation

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.

In case anyone is wondering: I want to use this for LCD testing.

Best,

Tamas
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 04-27-2012, 10:25 AM
Morten Nygaard Åsnes
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

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.
Reply With Quote
  #3 (permalink)  
Old 04-27-2012, 10:30 AM
Madhu
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation


* Tamas Papp <jndfs5$7gc$1@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

Reply With Quote
  #4 (permalink)  
Old 04-27-2012, 12:07 PM
Rupert Swarbrick
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

Madhu <enometh@meer.net> writes:
> * Tamas Papp <jndfs5$7gc$1@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).


Rupert

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iJwEAQECAAYFAk+ai/8ACgkQRtd/pJbYVobe7gP+Kc5UKJAo/qwG0vldISQzCm/9
p/j92ZGf0JRJlJk+F8XJm/9Psv/q93+3M2+cXxzg5BR+6TPNX+xLq7HUu8feKhTY
Gks5hWzpS/bdYcEr6bpOxLjMBYb30q1ktUFwe9/dxQOye3GMtMQM33UEjhuOo27/
6fjYSZt9nn3KFiG9szg=
=Dftl
-----END PGP SIGNATURE-----
Reply With Quote
  #5 (permalink)  
Old 04-27-2012, 02:19 PM
Madhu
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation


* Rupert Swarbrick <s5lq69xt92.ln2@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



Reply With Quote
  #6 (permalink)  
Old 04-27-2012, 02:44 PM
Tamas Papp
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

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:

http://paste.lisp.org/display/129192#1

Maybe I'll make it standalone, there is no comparable utility that I
could find for Linux.

Best,

Tamas
Reply With Quote
  #7 (permalink)  
Old 04-27-2012, 02:52 PM
Tamas Papp
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

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.

Best,

Tamas
Reply With Quote
  #8 (permalink)  
Old 04-27-2012, 03:17 PM
Rupert Swarbrick
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

Tamas Papp <tkpapp@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.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iJwEAQECAAYFAk+auJ0ACgkQRtd/pJbYVoawUwP/cdZ9G1LDEfmRQuzb+ViuDLG2
NHztUahPIZJDC+TX+y8xqlqw9C+Hr8Fx/jnMiXiGsmm9V0I5uFbbYl/c9/qwiFaN
LsMtZ8FKTnPZZ850xPo+iiW8BJjpOAKFjUEMzucwU/Ex1wD3A/TOWly5p4eJKKd+
d7LvahHU7J5u/e+IlUc=
=bjRD
-----END PGP SIGNATURE-----
Reply With Quote
  #9 (permalink)  
Old 04-28-2012, 01:03 AM
Zach Beane
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

D Herring <dherring@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
Reply With Quote
  #10 (permalink)  
Old 04-28-2012, 01:04 AM
Zach Beane
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

Zach Beane <xach@xach.com> writes:

> D Herring <dherring@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.

Zach


Reply With Quote
  #11 (permalink)  
Old 04-28-2012, 01:52 AM
Madhu
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation


* D Herring <jnff9t$4h6$1@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.

--- Madhu






Reply With Quote
  #12 (permalink)  
Old 04-28-2012, 12:11 PM
D Herring
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

On 04/27/2012 09:04 PM, Zach Beane wrote:
> Zach Beane<xach@xach.com> writes:
>
>> D Herring<dherring@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.

- Daniel
Reply With Quote
  #13 (permalink)  
Old 04-28-2012, 06:05 PM
antirealist
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

On Friday, April 27, 2012 9:52:49 PM UTC-4, Madhu wrote:
> It would have done those greeks well to look up the Trojan horse at the
> mouth.


Actually, the Greeks were inside the horse. A common misconception.
Reply With Quote
  #14 (permalink)  
Old 04-30-2012, 02:16 PM
polos.ruetz@gmail.com
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

> Thanks! LTK is fantastic. Here is the script that I wrote as a solution:
>
> http://paste.lisp.org/display/129192#1


sweet! here's a cute (aka Qt) solution:

http://paste.lisp.org/+2RPS

--

WJ: it's your turn, at the usual conditions:

time: max 5 years
size: max 5 LOC
lang: anything less rich than CL

(Can't wait to read you in ....2017?)
Reply With Quote
  #15 (permalink)  
Old 04-30-2012, 03:25 PM
Marco Antoniotti
Guest
 
Posts: n/a
Default Re: GUI library/toolkit recommendation

On Monday, April 30, 2012 4:16:03 PM UTC+2, polos...@gmail.com wrote:
> > Thanks! LTK is fantastic. Here is the script that I wrote as a solution:
> >
> > http://paste.lisp.org/display/129192#1

>
> sweet! here's a cute (aka Qt) solution:
>
> http://paste.lisp.org/+2RPS
>
> --
>
> WJ: it's your turn, at the usual conditions:
>
> time: max 5 years
> size: max 5 LOC
> lang: anything less rich than CL
>
> (Can't wait to read you in ....2017?)


Only 5 years. Come on! It has taken him longer for shorter programs

MA
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 07:56 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.