[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dev-serveez] Patch for using Guile
From: |
stefan |
Subject: |
Re: [dev-serveez] Patch for using Guile |
Date: |
Sat, 6 Jan 2001 16:08:40 +0100 (CET) |
On Sat, 6 Jan 2001, Martin Grabmueller wrote:
> I already mentioned my hack at using Guile for the config file. Now
> Raimi told me that he wanted to play with that, so here's a diff for
> what I did to get the stuff running (without much functionality yet,
> of course!). Have a look for educational purposes.
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.
I have ported the libguile to MinGW32 and MSVC. Both are dynamic link
libraries. But i would like to verify if it works or not.
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?) 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 ?
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"
})
============================================================
Paste it here...
============================================================
And what will replace this:
============================================================
(if have-win32
(println "* This is the Win32 port, good luck."))
(set! serveez-pass "secret")
(primitive-load "otherfile.cfg")
============================================================
Paste it here...
============================================================
Can this achieved with the current release of libguile (1.4) with the core
functionality only (Win32 port) ?
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...
3. Adapt raimi's config magic to Guile (copying in/out of values).
Mgrabmue demonstrated this in his patch i guess !?!
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 ?
Thanks for your efforts so far, MGrabMue,
address@hidden