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
The authors of C-- have implemented a Lua engine in OCaml, with a good,
high-level, type-safe interface for embedding it. Look for 'lua-ml'.
There is also an OCaml implementation of Scheme called 'ocs'; I do not
have experience with it, so I cannot speak to its API style. Finally,
there are OCaml bindings to the SpiderMonkey JavaScript engine.
So, it has been done, and ocs is probably closest to what you're looking
for.
- Michael
http://www.haskell.org/haskellwiki/Yi
Le 3 juil. 10 à 20:52, Lukasz Stafiniak a écrit :
Both lua-ml and ocs seem dead (their homepages are gone) :( Can't tell
if spidercaml is active or not; the page has a download link for
version 0.2 and no date.
martin
Chamo? I looked at it but they seem to be using gtksourceview as an
editor so it wouldn't work on a console. I actually want to write a
vim clone; I love vim but I can't stand vimscript and the other
languages it supports all seem distinctly second-class. I think a good
modal editor with an emacs architecture where as much as possible is
written in the "soft" layer would be a very nice thing to have.
Yeah :) My other option is to just learn enough Haskell and join Yi,
rather than trying to reinvent the wheel. I do think scheme would be a
nicer extension language than either Haskell (Yi) or Lua (yzis),
though.
For lua-ml this is a new development. The site was there within the
last few months, albeit with the last release some years ago (2007 or
so, I believe). The domain must have lapsed.
On OCS, it looks like a temporary failure from here. I do not know what
its development status is; it was a fairly young project last I looked
at it, IIRC.
- Michael
http://bitbucket.org/dpowers/luacaml
> Can't tell if spidercaml is active or not; the page has a download link for
> version 0.2 and no date.
SpiderCaml is alive and well - I submitted patches (which are in SVN) to Alain a few months ago for 0.2 but I don't think he's time to wrap it all into another release. I haven't tested against Mozilla's latest offering but I have it working very nicely with SpiderMonkey 1.7.0 on Windows 7. It's only because compiling MinGW builds of SpiderMonkey is non-trivial that I haven't tried it against the a 1.8 engine - on Linux (or possibly using the MSVC Windows branch) I expect it would be easy to do.
David
> By the way, there was once a project to rewrite Emacs in OCaml and use
> OCaml instead of ELisp as its scripting language, but I can't even
> google it now...
http://pauillac.inria.fr/cdrom_a_graver/prog/unix/efuns/eng.htm
[..snip..]
--
mailto:av1...@comtv.ru
Thanks, looks interesting. Even if it's old, I can get a lot of nice
ideas from the code.
> Has much work been done on adding a scripting language to an OCaml
> program? I googled about a bit, but no one seems to be even talking
> about this - for example, if I wanted to do something emacslike with a
> core in OCaml and (ideally) some sort of scheme as a scripting engine
> in place of elisp, would that be easily doable?
>
> martin
Yes. In bytecode you can run an ocaml toplevel and use ocaml as
scripting lanugage. Or you can implement a scheme interpreter quite
easily in ocaml. It is a verry simple language.
MfG
Goswin
there is schoca:
http://community.schemewiki.org/?Schoca
http://sourceforge.net/projects/chesslib/
I don't know if it's worth, I only know its name
--
cheers
> Has much work been done on adding a scripting language to an OCaml
> program? I googled about a bit, but no one seems to be even talking
> about this - for example, if I wanted to do something emacslike with a
> core in OCaml and (ideally) some sort of scheme as a scripting engine
> in place of elisp, would that be easily doable?
We (the nmag/nsim dev team - http://nmag.soton.ac.uk) kind-of had the
opposite problem, i.e. we had to extend a scripting language that is
easy to learn with something that has a bit more steam. We decided to
use Python+OCaml. There's a semi-abandoned debian package, pycaml,
that does this, but that's broken - it has memory management bugs
both oh the Python and OCaml side. Here is a fixed version that also
supports a few nice extensions:
http://nmag.soton.ac.uk/tf/pycaml/
I should say that being able to extend Python with fast code without
having to worry about allocating/destroying things and having the
convenience of simple callbacks both ways is a very nice thing.
--
best regards,
Thomas Fischbacher
t.fisc...@soton.ac.uk
uh… did you try to submit patches or report bugs against the package?
pycaml is known to be dead upstream. We¹ do our best to keep it in a good
shape. But, we don't receive bugreports against pycaml and is used
by only one package… that makes bug fixing not easy :)
> Here is a fixed version that also supports a few nice extensions:
>
> http://nmag.soton.ac.uk/tf/pycaml/
>
Is this released/linked/advertised somewhere? (other than this mail).
It would be nice to have your fixes packages so that others can benefit
from your work.
¹: I'm not aware of any pycaml user among Debian OCaml Maintainers.
Regards,
--
Mehdi Dogguy مهدي الدڤي
http://www.pps.jussieu.fr/~dogguy
Tel.: (+33).1.44.27.28.38
>> We (the nmag/nsim dev team - http://nmag.soton.ac.uk) kind-of had the
>> opposite problem, i.e. we had to extend a scripting language that is
>> easy to learn with something that has a bit more steam. We decided to
>> use Python+OCaml. There's a semi-abandoned debian package, pycaml, that
>> does this, but that's broken - it has memory management bugs both oh
>> the Python and OCaml side.
>
> uh… did you try to submit patches or report bugs against the package?
Yes. We did have some discussion about these things with the debian
ocaml maintainers quite a long time ago - but somehow our fixes never
were incorporated into the package.
Part of the problem is that the original pycaml package is fairly
awkward code no one is too proud of. But still, it works (at least
our fixed and extended version does), and it actually is quite useful.
The last thing I remember is that Guillaume had contacted me about
wanting to re-write it, but not much seems to have happened on that
front so far. I'd strongly suggest we just stick our heads together
and get our code into the debian package so that at least the serious
memory corruption problems are fixed. People might not exactly have
much fun starting to use it only to experience rude mm-related
surprises.
I think our pycaml patches were first mentioned here:
http://caml.inria.fr/pub/ml-archives/caml-list/2007/11/7a1c5726ab3d6661c233a7245fc6cca8.en.html
> pycaml is known to be dead upstream. We¹ do our best to keep it in a good
> shape. But, we don't receive bugreports against pycaml and is used
> by only one package… that makes bug fixing not easy :)
>
>> Here is a fixed version that also supports a few nice extensions:
>>
>> http://nmag.soton.ac.uk/tf/pycaml/
>>
>
> Is this released/linked/advertised somewhere? (other than this mail).
> It would be nice to have your fixes packages so that others can benefit
> from your work.
Replacing the code in the debian package with ours is quite
straightforward.
--
best regards,
Thomas Fischbacher
t.fisc...@soton.ac.uk
_______________________________________________
The only discussion I've found is:
http://lists.debian.org/debian-ocaml-maint/2007/11/msg00158.html
>
> Replacing the code in the debian package with ours is quite
> straightforward.
>
… if the interface is "compatible" (I didn't really check). I had a
quick look and noticed some changes for some type definitions. Did you
try to compile coccinelle¹ using your version of pycaml for example?
It's the single package using the pycaml library we have in our
archive. If it requires some changes, we'd prefer to get them integrated
by coccinelle's upstream before shipping the new pycaml.
Besides, having a version and listable directory with available versions
of pycaml would help to get the code packaged and integrated. Would you
accept to maintain it on forge.ocamlcore.org? We can provide you a
D?$VCS, a bugtracker, etc… there. If yes, please fill the form available at:
https://forge.ocamlcore.org/register/projectinfo.php
Regards,
--
Mehdi Dogguy مهدي الدڤي
http://www.pps.jussieu.fr/~dogguy
Tel.: (+33).1.44.27.28.38
_______________________________________________
You can embed a Perl interpreter and call out to Perl code using
perl4caml's Perl.eval function. The API is even "type safe" in as
much as you can construct and examine the values going between the
Perl and the OCaml code, and detect errors at runtime (at compile time
too in some circumstances).
Your users might not thank you for this ...
Rich.
--
Richard Jones
Red Hat
Probably not :) My primary concern is that the editor won't be snappy
enough - Yi definitely has that problem, for instance - which is why I
was hoping for a scripting language that people were using and
optimising for speed.
martin
Well, things have happened on this front so far. And a few people have
the code that I've written. Unfortunately, for rather awkward reasons, I
am not in a position to release it. But hope to be in the rather not
distant future.
It's basically a rewrite. It works, but isn't fully featured yet. I
believe memory management is done properly. There are also some C
varargs functions in the Python API that have been properly binded with
the libavr library (or something called like that). A (yet basic) syntax
extension allows to write things like:
module X = python module mypython module
It does introspection and dumps the OCaml code needed to access values
of the module. I've been hitting type inference issues in Python for
this. But there is some work (like shedskin) to capitalise in order to
make the syntax extension more interesting when it comes to typing.
And there's a Debian package, also.
Do not hold your breath on this code, as a release might take a while.
But if someone is willing to carve out of shedskin the code needed to do
type inference and bind it to OCaml, that would be a nice contribution
to the syntax extension.
I do not have much time available on this one, and I currently have
other interests. But if someone is interested in the code, please email
me to see what is possible to do...
All the best,
Guillaume Yziquel.
--
Guillaume Yziquel
http://yziquel.homelinux.org/
I mean: privately.
All the best,
> http://lists.debian.org/debian-ocaml-maint/2007/11/msg00158.html
>
>> Replacing the code in the debian package with ours is quite
>> straightforward.
Well... I just updated the directory at:
http://www.soton.ac.uk/~doctom/software/pycaml-patched/
When I debuild -us -uc the lot, this produces a working package
on my machine.
> … if the interface is "compatible" (I didn't really check).
I think so. Basically, I removed one function which never had worked
anyway and added a number of new ones.
> I had a
> quick look and noticed some changes for some type definitions. Did you
> try to compile coccinelle¹ using your version of pycaml for example?
I just gave it a try - please take a look at the log at:
http://www.soton.ac.uk/~doctom/software/coccinelle.log
> It's the single package using the pycaml library we have in our
> archive. If it requires some changes, we'd prefer to get them integrated
> by coccinelle's upstream before shipping the new pycaml.
>
> ¹: http://coccinelle.lip6.fr/
>
> Besides, having a version and listable directory with available versions
> of pycaml would help to get the code packaged and integrated. Would you
> accept to maintain it on forge.ocamlcore.org? We can provide you a
> D?$VCS, a bugtracker, etc… there. If yes, please fill the form available at:
>
> https://forge.ocamlcore.org/register/projectinfo.php
Yes, we could (and should) do that.
I'm just waiting for the account registration confirmation email.
--
best regards,
Thomas Fischbacher
t.fisc...@soton.ac.uk
_______________________________________________
Good.
>> I had a quick look and noticed some changes for some type
>> definitions. Did you try to compile coccinelle¹ using your version
>> of pycaml for example?
>
> I just gave it a try - please take a look at the log at:
>
> http://www.soton.ac.uk/~doctom/software/coccinelle.log
>
Looks fine.
>> https://forge.ocamlcore.org/register/projectinfo.php
>
> Yes, we could (and should) do that.
>
> I'm just waiting for the account registration confirmation email.
>
Perfect! As soon as the project is up (with a D?$VCS, a version and
versioned tarball), I'll package it and upload it in our archive.
Thanks!
--
Mehdi Dogguy مهدي الدڤي
http://www.pps.jussieu.fr/~dogguy
Tel.: (+33).1.44.27.28.38
_______________________________________________