[racket] Using MzCOM

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jul 6 10:49:54 EDT 2012

At Fri, 06 Jul 2012 10:51:33 +0200, heraklea at gmx.de wrote:
> Hello friends,
> 
> My name is Murat and I am from Germany.

Hi, Murat!

> I am pretty new to racket and scheme. I play arround with the
> MzCOM modul in a c++ Application and have some questions.
> 
> 1. What is the status for this Modul(usable for serious use?)

We expect to continue supporting it... despite the apparent lack of
recent users.

See also

 http://lists.racket-lang.org/users/archive/2012-February/050591.html

I received no responses to that poll. I also didn't yet get around to
changing "MzCOM" to "RacketCOM" for the next release.


> 2. I use this modul in conjunction with a self written REPL (gui app in 
> qt4/c++) for eval expressions.
>    IS this the best direction or fastest eval method on racket.

It should work fine --- and if it doesn't work, please let us know.


> 3. In MzCOM I have no error output. As far as I can imagine, when an eval goes 
> correct
>  I get an #<void>, but when it comes to error there is nothing.

Errors are reported through the SchemeError() event. That is, Eval()
produces #<void> while SchemeError() receives the message string.


> 4. I would like to use this modul for config purposes in c++ app. Does anybody 
> have done/try this before

I doubt that anyone has used MzCOM this way, but it sounds like the a
good use. The only issue I see is whether MzCOM is lightweight enough
(and that depends on your application).

> or use it for extraction some c++ functions to scheme procedures.

I'm not sure I understand that part, but I think MzCOM is less suitable
for accessing C++ function from Scheme/Racket code. Either the FFI for
embedding is more common for that case.

For more information on embedding, which is not so easy:

 http://docs.racket-lang.org/inside/overview.html#(part._embedding)


> 5. Does MzCOM read/provide an file like .emacs in Emacs.

No, you'd have to do that manually by sending a `load' expression to
MzCOM as your first step.


Posted on the users mailing list.