Need help with installing gtk (SBCL)

Discussion of Common Lisp
Post Reply
paul4936
Posts: 4
Joined: Wed Oct 06, 2010 11:28 am
Location: Russia,Krasnoyarsk

Need help with installing gtk (SBCL)

Post by paul4936 » Tue Oct 12, 2010 7:46 am

Can someone please explain or give some links to information about how install gtk with SBCL with out Slime and Emacs(I'm hear what SBCL have some problems with Slime,so i'm think to install gkt on clear SBCL, save core,and load it when install emacs.So i get rid of unnecessary things in core(like Slime)).
Or i'm wrong and slime(and other) dont remains in core image when i'm install gtk(or smth else) with SBCL+Slime+Emacs?
Give advice please how to be. :oops:

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: Need help with installing gtk (SBCL)

Post by ramarren » Tue Oct 12, 2010 9:39 am

GTK is a graphical user interface toolkit written in C. It has nothing to do with Lisp. If you means some particular CL binding to it, the specify which one and what exactly are you trying to achieve.

paul4936
Posts: 4
Joined: Wed Oct 06, 2010 11:28 am
Location: Russia,Krasnoyarsk

Re: Need help with installing gtk (SBCL)

Post by paul4936 » Fri Oct 15, 2010 10:50 am

i'm think to use cl_gtk.
If i'm install it while use lispcabinet it have troubles, but work.
But if use clear SBCL ,have problems with installing.
I'm trying to achieve :
  • 1)
    To use gtk with SBCL(or not sbcl if 2 is unreal,
    in this chance please give advance which Lisp realisation use(i'm want some common lisp but maybe better use scheme (drRacket)))
    2)
    Create stand alone executable file with normal size(one i can create with LicpCabinet(sbcl+Slime+emacs) have size near 68mb(and does not work )),need to create file with size not bigger 15-25mb (with graphic interface),better put some in to dinamic libraries, this will allow to distribute size from one file to few.
    3)
    User must not have access to source code to avoid troubles, or user сan simply break programm(i'm trying to create teach programm for students).

Even if final version be not on Common Lisp but on C or C++ ,i'm presume what
Lisp is very useful for making prototype programm.
At least with it simplier to test all basic functions and algoritms for new program.

So i need non commercial Common lisp ,and some graphic libraries for it.
i pick gtk because gtk exist for linux and windows ,so students dont need to install another operating system. For it i'm think to create 2 versions(windows & linux) ,because SBCL exist for linux and windows too ,i can do it with minimal changes or without them. And i read what SteelBankCommonLisp is faster other free compilers.

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: Need help with installing gtk (SBCL)

Post by ramarren » Sat Oct 16, 2010 11:41 am

paul4936 wrote:i'm think to use cl_gtk.
Which one exactly? The one called just cl-gtk is fairly old and probably doesn't work with current libraries. The other one cl-gtk2 is current and I think pretty good, especially if you already know how to use GTK+.
paul4936 wrote:But if use clear SBCL ,have problems with installing.
What kind of problems? But, in general using foreign (that is, non Lisp) code from a saved core is problematic, since the core does not usually contain foreign memory, and addresses can move. You usually want to load your foreign libraries after the core is started, not try to save them.
paul4936 wrote:1)
To use gtk with SBCL(or not sbcl if 2 is unreal,
in this chance please give advance which Lisp realisation use(i'm want some common lisp but maybe better use scheme (drRacket)))
2)
Create stand alone executable file with normal size(one i can create with LicpCabinet(sbcl+Slime+emacs) have size near 68mb(and does not work )),need to create file with size not bigger 15-25mb (with graphic interface),better put some in to dinamic libraries, this will allow to distribute size from one file to few.
SBCL is designed to be fairly monolithic. Standard core with only the base system is nearly 30 MB. If you want really small executables then the only option are commercial implementations. Other than that CLISP produces fairly small cores, but is significantly slower then SBCL.

There is ECL which compiles through C/C++. I believe it is possible to split code into dynamic libraries using this. It integrates better with C/C++ libraries. If you can make it work on your systems this might be the best option. I haven't used it significantly though, so you would have to ask someone else if you encounter any problems.

Post Reply