[Caml-list] Re: Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Sylvain Le Gall
On 06-07-2010, Guillaume Yziquel guillaume.yziq...@citycable.ch wrote:
 Paolo Donadeo a écrit :

 If anyone is interested in my prototype I could clean up the source,
 remove comments in Italian and publish it on GitHub or OCamlCore.

 I'm always interested in language bindings... And I think a few other 
 people are interested in an Lua binding.


I think Guillaume is refering to me. I am indeed quite interested in
this kind of binding, especially to measure the performance of the Lua
language interacting with OCaml. I would use Lua to create functions
to process huge amount of data and to replace a DSL I created.

So far, we have:
http://bitbucket.org/dpowers/luacaml by David Powers
a prototype by Paolo Donadeo
lua-ml by Christian Lindig

Maybe we can join our forces to create a common binding to Lua from
OCaml.

I propose to host it at http://forge.ocamlcore.org, we can even have an
hg repository if needed.

If anyone is interested, I think more forces to this effort are welcome.

I would be glad that at least David, Paolo and Christian join ;-)

Regards,
Sylvain Le Gall

ps: right now I can provide some time to setup the forge account and web
pages, but I will have to dedicate a lot of time to real life starting
on Friday (or before -- depending the time my daughter will choose to
born).

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Re: Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Martin DeMello
On Wed, Jul 7, 2010 at 7:20 PM, Sylvain Le Gall sylv...@le-gall.net wrote:

 I think Guillaume is refering to me. I am indeed quite interested in
 this kind of binding, especially to measure the performance of the Lua
 language interacting with OCaml. I would use Lua to create functions
 to process huge amount of data and to replace a DSL I created.

I'm very interested too, mainly because a hobby DSL of mine is stalled
for lack of a good way to take a user specified function f : String -
String and map it over an OCaml list of strings. Depending on how the
bindings look, I might invert control altogether and write it as a lua
dsl tied to an OCaml engine.

martin

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] OCaml 3.12.0+beta1 on Cygwin 1.7.5

2010-07-07 Thread Romain Beauxis
Hi !

Le mardi 6 juillet 2010 16:36:05, Taylor Venable a écrit :
 Hi there, I'm thinking of writing some programs in OCaml to assist a
 custom build infrastructure (currently 95% Tcl, 5% external Lua
 programs) that we use at work.  Since we build on Windows, Mac, and
 Linux I have to make sure that whatever I end up writing works in all
 three.  I haven't written much OCaml in my life, and the little that I
 did was probably five years ago, but any tools I write will have to be
 usable for a while.  So I tried compiling OCaml 3.12.0+beta1 in Cygwin
 1.7.5 -- the information I found about it seemed to imply that it
 should work.  I put flexdll in the PATH and I was able to use the
 configure script and make world.opt with only a single problem:
 there were lots of linker errors when it came to building
 tools/objinfo_helper.exe, symbols like _lbasename, _sch_istable, and
 _objalloc_free could not be found.  [I'd paste the full error but I
 forgot to email it to my private address today and the machine is in
 corporate lockdown mode, so I can't access it right now, but I can
 obtain it tomorrow at work if anybody would like to see the full
 message.]  The way to fix it, for me anyway, was to modify the
 definition of LIBBFD_LINK in config/Makefile (which started out as
 -lbfd -ldl) to append to it -lintl -lz /usr/lib/libiberty.a; and
 after that everything worked.  I don't know if that constitutes a
 problem with the configure script or just something about how my
 Cygwin is installed, but I wanted to mention it somewhere in case it
 was a bug.

I have no clue about cygwin, but there is a branch of the mingw32-ocaml 
crosscompiler package for Debian where ocaml 3.12.1 is ported and that 
is waiting for some testings:
  
http://git.debian.org/?p=pkg-ocaml-maint/packages/mingw32-ocaml.git;a=shortlog;h=refs/heads/3.12.0%2Bbeta1

Maybe this can be useful to you ?

Romain

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] Re: Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Paolo Donadeo
On Wed, Jul 7, 2010 at 15:50, Sylvain Le Gall gil...@centi wrote:
 So far, we have:
 http://bitbucket.org/dpowers/luacaml by David Powers
 a prototype by Paolo Donadeo
 lua-ml by Christian Lindig

I didn't know! I spent a lot of time searching for material on the
topic and I concluded to be the only one OCamler interested in Lua.


 Maybe we can join our forces to create a common binding to Lua from
 OCaml.

I completely agree.


 I propose to host it at http://forge.ocamlcore.org, we can even have an
 hg repository if needed.

Ahem... git or subversion? :-) Not an holy war here, it's only that I
never used hg.


 I would be glad that at least David, Paolo and Christian join ;-)

It's ok for me. First thing, I'll publish my GIT repository with the
prototype ASAP, even with some words and comments in Italian, so to
have something concrete to discuss for.


 but I will have to dedicate a lot of time to real life starting on Friday (or
 before -- depending the time my daughter will choose to born).

Congratulations! :-)


-- 
Paolo ⠠⠵

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Paolo Donadeo
 How about translating a program in lua (or lua bytecode) to OCaml
 sourcecode automatically? Would that be possible?

I see two problems with an approach like this:

1) it's complicated: consider that Lua was designed in the first place
to be extremely simple to be embedded in a C program, and also simple
to exchange data to and from the host program. The *only* problem I
found was the interaction with the OCaml GC which of course is not a
problem in C;

2) can the Lua program, statically translated into OCaml, be loaded
and reloaded at run time? I need a scripting language to give a user a
configuration/simple plugin language to be loaded and executed at
runtime, and Lua is ideal because it's trivial to sandbox it.


-- 
Paolo ⠠⠵

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] Re: Binding the Lua library [was: adding a scripting language to an ocaml program]

2010-07-07 Thread Paolo Donadeo
 It's ok for me. First thing, I'll publish my GIT repository with the
 prototype ASAP, even with some words and comments in Italian, so to
 have something concrete to discuss for.

Just published on GitHub: http://github.com/pdonadeo/lua_lib

If the joint project will start, I of course advocate hosting it on
forge.ocamlcore.org.


-- 
Paolo ⠠⠵

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs