dev-serveez
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dev-serveez] Patch for using Guile


From: Martin Grabmueller
Subject: Re: [dev-serveez] Patch for using Guile
Date: Mon, 8 Jan 2001 18:38:49 +0100 (MET)

> From: stefan <address@hidden>
> Date: Sat, 6 Jan 2001 16:08:40 +0100 (CET)
> 
> On Sat, 6 Jan 2001, Martin Grabmueller wrote:

[mgrabmue-blurb snipped]

> Great! Thank you for this patch. But: I would like to test my port to
> Win32. Therefore I would like you to write a simple `example.c' which
> uses Guile to parse a file including the some functionality.

Okay, I'll do that.

> I would like to release version 0.0.20 of Serveez in the next few days.
> That's why i think we postpone switching to Guile to a later version.
> 
> Moreover I would like to determine how Serveez will be build then. My
> suggestion is to rely on a installed Guile using guile-config
> (mgrabmue?) 

That is the Right Thing (TM) to do.
 
>             to find out linker and compiler flags. On Win32 we do the
> same. I will just provide the binaries.
> 
> Another question is: Is Guile known to run and compile on other systems
> than GNU/Linux and Windows ? I mean Serveez loses portability if not. But
> I guess everything able to work on Win32 will be able to run on *all*
> Unices ? 

I recently read that it probably does not run on Crays anymore, but I
think that is okay for us.  At least with --disable-posix, it should
run fine everywhere, though there is no compatibility-list or anything
like that.

> To the "switch" steps:
> ^^^^^^^^^^^^^^^^^^^^^^
> 1. Define a new syntax for instantiating servers.
> 
> What syntax do we want ? I would like to have something *very* similiar to
> the old syntax with Sizzle. As I noticed that is not possible because
> Guile does not have a hash syntax. So what syntax do we actually use ? I
> would like you to paste here something appropriate: What will replace
> that:
> 
> ============================================================
> ;; Definition of a fake ident server.
> (define fakeident-server1 '#{
>                              "port" => #{
>                                          "proto"  => "tcp"
>                                          "port"   => 113
>                                          "ipaddr" => "*"
>                                         }
>                              "systemtype" => "UNIX"
>                              "username"   => "supa-raimi"
> })
> ============================================================

My pseudo-patch implements the following:

(define-server! "fakeident" "fakeident-server1"
  '((port . ((proto  . "tcp")
             (port   . 113)
             (ipaddr . "*")))
    (systemtype . "UNIX")
    (username   . "supa-raimi")))

> ============================================================
> 
> And what will replace this:
> 
> ============================================================
> (if have-win32
>     (println "* This is the Win32 port, good luck."))
> (set! serveez-pass "secret")
> (primitive-load "otherfile.cfg")
> ============================================================

This is the same.

 (if have-win32
     (println "* This is the Win32 port, good luck."))
 (set! serveez-pass "secret")
 (primitive-load "otherfile.cfg")

> ============================================================
> 
> Can this achieved with the current release of libguile (1.4) with the core
> functionality only (Win32 port) ? 

I think so, yes.

> 2. Implement the instantiating procedures in C.
>    (this requires more changes. 'bind_server' becomes 'add_server'.
> 
> That is quite some work. But i think mgrabme made a start. As noted above
> i would really like mgrabmue to write a little test program...

I think most of the work is buried in Serveez internals, not in the
configuration layer.  Or am I mistaken?

> 3. Adapt raimi's config magic to Guile (copying in/out of values).
> 
> Mgrabmue demonstrated this in his patch i guess !?!

Yow.

> 4. If supporting older versions of Guile, we'll need to wrap the
>    main() function, because Guile expects that.  (I've been using a
>    current CVS Guile)
> 
> What do you mean by older version ?

Well, older than current CVS, I am afraid.  I think plain 1.4 does not
have the feature I use, but I will use the older method for the test
program, so you can judge if it is feasible for Serveez.

'mgrabmue
-- 
Martin Grabmueller              address@hidden
http://www.pintus.de/mgrabmue/  address@hidden on EFnet



reply via email to

[Prev in Thread] Current Thread [Next in Thread]