dev-serveez
[Top][All Lists]
Advanced

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

[dev-serveez] switching to guile


From: Raimund 'Raimi' Jacob
Subject: [dev-serveez] switching to guile
Date: Tue, 2 Jan 2001 17:30:55 +0100 (CET)

hello!

i just had a look at the public guile c interface. i still dont have a
good idea on how to provide serveez' functionality in a guile/scheme
program.

guile is missing hashes as far as i can see. that makes it rater
complicated. we need an elegant way to set named fields of a structure
(in C) from something else (in scheme). Hashes were a good way.

a different way would be to use a list of name - value pairs (a hashmap
without hash). but i am not sure how to do it in scheme. if a cell is
(car, cdr), can it be a structure/scheme expression like

(define-server "foo-server1" "foo" (("bar", 100),
                                    (("reply", "booo"))))
                                    
the function "define-server" defines a server of the "foo" type and calls
it "foo-server1". The new foo server is configured with bar => 100
(int) and reply => boo (string). the 3rd argument to define-server is a
list. each car contains a pair with car=name and cdr=value. the cdr
contains a list of the same format.

what is the correct syntax for such a constructor in guile ? (mgrabmue?)
do you think it is practical? there are quite a lot of parenthesises. or
does anyone (mgrabmue) want to implement hashes for guile? with a
syntax as convenient as the one of sizzle is ?

any suggestions ?

Bye,
    Raimi

--
      __/\     _/\    _____/\.___/\
     /   /    /  /___/   ____/  __/\     Name    : Raimi
    /   /  __/    __/   / __/  / _\/     Contact : address@hidden
   /   /__/ /     \/   /_/_/  /_/        Visit   : http://www.lkcc.org
  /________/___/\._\._____/_____/\       3.141592653589793238462643383
  \._______\.__\/__/\.____\.____\/       27950288419716939937510582097





reply via email to

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