Subject: [clisp-list] help

From: Anil Sorathiya <[email-masked]>
Date: Thu Apr 22 22:16:06 2004

hi all
i have some problem related to file format...
is any body know the XML and lisp talk....
is there any package in lisp which use to read and write xml file or
maintain xml files...
actually i am working with chemistry related things...so i have xml file
which i have to parse and give input to my system...so i need xml
package for clisp.

-anil

On Fri, 2004-04-23 at 08:30, [email-masked]
wrote:
> Send clisp-list mailing list submissions to
> 	[email-masked]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.sourceforge.net/lists/listinfo/clisp-list
> or, via email, send a message with subject or body 'help' to
> 	[email-masked]
> 
> You can reach the person managing the list at
> 	[email-masked]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of clisp-list digest..."
> 
> 
> Today's Topics:
> 
>    1. A GUI for clisp (=?iso-8859-1?Q?=22Kalsbach=2C_J=F6rg=2C_fiscus_GmbH=2C_Bonn=22?=)
>    2. Re: A GUI for clisp (Sam Steingold)
>    3. Re: binding to Unix domain sockets (Sam Steingold)
> 
> --__--__--
> 
> Message: 1
> From: =?iso-8859-1?Q?=22Kalsbach=2C_J=F6rg=2C_fiscus_GmbH=2C_Bonn=22?=
> 	 <[email-masked]>
> To: "[email-masked]'"
> 	 <[email-masked]>
> Date: Thu, 22 Apr 2004 13:13:26 +0200
> Subject: [clisp-list] A GUI for clisp
> 
> Hello,
> 
> I just ported a script that enables clisp to work with a gui server
> (gtk-server). The architecture is a bit clumsy but it works. Perhaps =
> anyone
> is interested in gui programming with clisp.
> 
> Regards
> 
> J=F6rg Kalsbach
> 
> Please don' t write to this mails adress but to:
> 
> [email-masked]
> 
> ;;start of file
> ;;
> ;; Demonstration on how to use the GTK-server with clisp
> ;; Tested with clisp-2.33 on WinXP
> ;; Requirements: gtk-server installion in this scripts' directory
> ;; http://www.turtle.dds.nl/gtk-server/
> ;; April 22, 2004 by J=F6rg Kalsbach ported from:
> ;;
> ;; Demonstration on how to use the GTK-server with NEWLISP by FIFO.
> ;; Tested with newLISP 7.5.12 on Slackware Linux 9.1.
> ;;
> ;; March 28, 2004 by Peter van Eerten.
> ;;
> ;;------------------------------------------------
> 
> ;; Start the gtk-server
> (ext:run-program "gtk-server" :arguments '("localhost:50000") :wait =
> nil)
> 
> ;; Define communication function
> (defun gtk (str)
>   (princ str socket)
>   (read-line socket))
> 
> 
> ;; Wait a little so the server can initialize
> (sleep 1)
> 
> ;; get a communication channel
> (defconstant socket (socket:socket-connect 50000))
> 
> ;; Design the GUI
> (gtk "gtk_init(NULL, NULL)")
> (set 'win (gtk "gtk_window_new(0)"))
> (gtk (concatenate 'string "gtk_window_set_title (" win ", This is a
> title)"))
> (gtk (concatenate 'string "gtk_window_set_default_size (" win ", 100,
> 100)"))
> (gtk (concatenate 'string "gtk_window_set_position (" win ", 1 )"))
> (set 'table (gtk "gtk_table_new(30, 30, 1 )"))
> (gtk (concatenate 'string "gtk_container_add (" win "," table ")"))
> (set 'button1 (gtk "gtk_button_new_with_label (Exit)"))
> (gtk (concatenate 'string "gtk_table_attach_defaults(" table ", " =
> button1 ",
> 17, 28, 20, 25)"))
> (set 'button2 (gtk "gtk_button_new_with_label (Print text)"))
> (gtk (concatenate 'string "gtk_table_attach_defaults (" table ", " =
> button2
> ", 2, 13, 20, 25)"))
> (set 'entry (gtk "gtk_entry_new()"))
> (gtk (concatenate 'string "gtk_table_attach_defaults (" table ", " =
> entry ",
> 2, 28, 5, 15)"))
> (gtk (concatenate 'string "gtk_widget_show_all(" win ")"))
> 
> ;; This is the mainloop
> (do ((event1 "0"(set 'event1 (gtk (concatenate 'string
> "gtk_server_callback(" button1 ")"))))=20
>      (event2 "0" (set 'event2 (gtk (concatenate 'string
> "gtk_server_callback(" win ")")))))
>     ((not (and (=3D (parse-integer event1) 0) (=3D (parse-integer =
> event2) 0))))
>     (gtk "gtk_main_iteration()")
>     (set 'tmp (gtk (concatenate 'string "gtk_server_callback(" button2
> ")")))
>     (if (> (parse-integer tmp) 0)
> 	(progn
> 	  (set 'tmp (gtk (concatenate 'string "gtk_entry_get_text(" entry
> ")")))
> 	  (print (concatenate 'string "This is the contents: " tmp))))
>     )
> 
> ;; Exit GTK explicitly only with a write
> (princ "gtk_exit(0)" socket)
> ;;end of file
> 
> 
> --__--__--
> 
> Message: 2
> To: [email-masked],
>         =?utf-8?q?Kalsbach=2C_J=C3=B6rg=2C_fiscus_GmbH=2C_Bonn?=
>  <[email-masked]>
> Reply-to: [email-masked]
> From: Sam Steingold <[email-masked]>
> Date: Thu, 22 Apr 2004 10:06:20 -0400
> Subject: [clisp-list] Re: A GUI for clisp
> 
> > * Kalsbach, J=C3=B6rg, fiscus GmbH, Bonn <[email-masked]> [2004-0=
> 4-22 13:13:26 +0200]:
> >
> > I just ported a script that enables clisp to work with a gui server
> > (gtk-server). The architecture is a bit clumsy but it works.
> 
> Thanks, I will add a reference to the CLISP FAQ!
> 
> some stylistic notes to make your code more like Common Lisp:
> 
> 1.  define SOCKET before GTK to avoid compiler warning, define it with
>     DEFVAR or DEFPARAMETER and name it with stars: *SOCKET*
> 
> 2.  use SETQ instead of SET:
>         (setq win (gtk "gtk_window_new(0)"))
> 
> 3.  replace (if ... (progn ...)) with (when ... ...)
> 
> --=20
> Sam Steingold (http://www.podval.org/~sds) running w2k
> <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
> <http://www.mideasttruth.com/> <http://www.honestreporting.com>
> If you think big enough, you'll never have to do it.
> 
> 
> --__--__--
> 
> Message: 3
> To: [email-masked],
>         Richard M Kreuter
>  <[email-masked]>
> Reply-to: [email-masked]
> From: Sam Steingold <[email-masked]>
> Date: Thu, 22 Apr 2004 20:42:03 -0400
> Subject: [clisp-list] Re: binding to Unix domain sockets
> 
> > * Richard M Kreuter <[email-masked]> [2004-04-20 17:57:25 -0400]:
> >
> > Is it possible create and bind a pathname to a Unix domain socket with
> > clisp? If so, how?
> 
> check out CVS head (see SF for instructions)
> $ ./configure --with-module=rawsock --build build-rawsock
> $ ./build-rawsock/clisp -K full
> > (rawsock:open-unix-socket "/tmp/.X11-unix/X0")
> 3
>

---

From: Sam Steingold <[email-masked]>
Date: Fri Apr 23 06:37:09 2004

> * Anil Sorathiya <[email-masked]> [2004-04-23 10:47:43 +0500]:

I recommend CLOCC/CLLIB/xml.lisp (I wrote and use it).
see also <http://www.cliki.net/XML>

>> 	[email-masked]

WTF?!

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
usually: can't pay ==> don't buy. software: can't buy ==> don't pay