Version française
Home     About     Download     Resources     Contact us    
Browse thread
Dynamic loading. Again.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Max Skaller <skaller@o...>
Subject: Re: Dynamic loading. Again.
Vitaly Lugovsky wrote:
> 
>  I think there is a reason to implement dynamic loading of native compiled
> code for Ocaml (e.g. PIC code generation for some platforms),
> as well as dynamycally linked runtime code (I just managed to link
> bytecode runtime dynamically, so, it's not so impossible). It's just a
> way to kill Java. 

	My problem was different: in writing my Python interpreter, 
I needed to provide emulations for a set of dynamically loadable Python
extensions. 
I had to link them all in statically, even though every 'module' has the
same
signature: when I added modules, I had to update a string -> function
table.
No way I would want clients adding extensions to have to mess with the
source of the interpreter.

	Funny thing is, I can actually dynamically load and execute
_Python_ extensions under my Ocaml written interpreter! They're
written in C, and it's not so hard to write an Ocaml/C interface
that can do dynamic loading. 

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net