guile-user
[Top][All Lists]
Advanced

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

The Romance project


From: Lamy Jean-Baptiste
Subject: The Romance project
Date: Tue, 2 Apr 2002 13:20:17 +0200

Hi everyone !

I want to introduce Romance.

Romance is an heterogeneous vision of programming / hacking. It relies on
a light dynamic object sharing protocol for sharing between different
programmic languages and programs (such as desktop applications).

In the future Romance will be more than that. It may provide a full
library, including even a graphic toolkit !

Romance is a free (GPL'ed) alternative to .NET, CORBA / Bonobo or
XML-RPC. It allows to share objects between languages, but keeps the
each language's interpreter (contrary to .NET) and look-and-feel (you
code Python, not C#).

Romance currently support Guile (WITH THREAD SUPPORT), Python and C. Future
versions will support other scripts languages (Perl, Ruby, ...), Lisp /
Scheme (ELisp, ...) and other dynamic languages (Smalltalk, OCaml)...

Romance is available at :
http://oomadness.tuxfamily.org/romance/en/index.html
http://savannah.gnu.org/projects/romance


Here is an example of a Romance server :

; Step 1: import and init Romance !
(use-modules (romance))

; Step 2: create our stuff : the Person factory
(define (Person name proof)
  (romance:make-object
   'name            name
   'proof           proof
   'get_description (lambda (self) (string-append (self 'name) " is a "
(self 'proof) "."))
   )
  )

; Step 3: make it available to any Romance app as "romance.Person" or
(romance 'Person)
(romance 'set! (list 'Person Person))

; Step 4: wait for client !
(romance:serve-forever)


And the client :

; Step 1: import and init Romance !
(use-modules (romance))

; Step 2: access to Romance lib and data (and modify them if you want !!!)
;         Here, create me as a person !
(define jiba (romance 'Person (list "Jiba" "hacker")))

(display "My name is : ")
(display (jiba 'name)) (newline)

(display "More precision : ")
(display (jiba 'get_description ())) (newline)

(newline)
(display "Server is in ") (display (jiba 'impl-language)) (newline)


=> My name is : Jiba
=> More precision : Jiba is a hacker.
=>
=> Server is in guile


Both example are in Guile, but of course, any "romantic" language can be
used !

Romance-Guile doesn't currently use GOOPS, but future version may do so, if
i can figure how to write an object wrapper (= a stub) in GOOPS
(__getattr__ in python, AUTOLOAD in Perl, does_not_understand in Smalltalk,
but what is the GOOPS equivalent ?). Please help me !

Jiba



reply via email to

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