From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: "Sébastien Hinderer" <Sebastien.Hinderer@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlnat
Date: Fri, 15 Jul 2016 16:47:14 +0200 [thread overview]
Message-ID: <1468594034.25014.129.camel@e130.lan.sumadev.de> (raw)
In-Reply-To: <20160714192653.GA17159@pema>
[-- Attachment #1: Type: text/plain, Size: 3342 bytes --]
Am Donnerstag, den 14.07.2016, 21:26 +0200 schrieb Sébastien Hinderer:
> Hi Gerd,
>
> Gerd Stolpmann (2016/07/12 23:39 +0200):
> > Hi,
> >
> > I've tried to reactivate the ocamlnat tool that comes with OCaml but
> > isn't built (and even isn't buildable). This repo was tested against
> > 4.02.3:
> >
> > https://gitlab.camlcity.org/gerd/ocamlnat
> >
> > Since recently I'm quite interested in this, and would like to make it
> > fully working, including ocamlfind support. For my use case the
> > disadvantages of the ocamlnat approach (i.e. that it requires toolchain
> > support for dynlinking, and that the executable continuously grows) do
> > not matter - I really want it for interactive work, and not for
> > scripting.
>
> I just wanted to mention that ocamltest's "toplevel" builtin test runs a
> test-file in both the byte-code and the native toplevel.
>
> For some tests the results are a bit different in the two toplevels, but
> for most of them they are similar.
In deed, the native toplevel seems to run fine. So far I made the
following adjustments in my repo:
- renamed the modules so that the same names as for the bytecode
version are used (e.g. Opttoploop becomes just Toploop)
- added the missing definitions so that the interfaces are
identical to the bytecode version
- now, findlib already worked when I loaded cmxs files instead
of cma files
- there was a bug that -linkall was not set when the cmxs files
were on-the-fly generated
- I also changed the error paths a little bit so that ocamlnat
no longer crashes when a symbol isn't found. The error paths
probably require more work.
Now you can do:
OCAMLFIND_CONF=/opt/opam-4.02/4.02.3/lib/findlib.conf ./ocamlnat
OCaml version 4.02.3 - native toplevel
# #use "/home/gerd/pub/lib-findlib/src/findlib/topfind";;
- : unit = ()
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
- : unit = ()
# #require "yojson";;
/opt/opam-4.02/4.02.3/lib/easy-format: added to search path
/opt/opam-4.02/4.02.3/lib/easy-format/easy_format.cmx: loaded
/opt/opam-4.02/4.02.3/lib/biniou: added to search path
/opt/opam-4.02/4.02.3/lib/biniou/biniou.cmxa: loaded
/opt/opam-4.02/4.02.3/lib/yojson: added to search path
/opt/opam-4.02/4.02.3/lib/yojson/yojson.cmx: loaded
# Yojson.version;;
- : string = "1.3.2"
(Using the "ocamlnat" branch of findlib.)
It is interesting that only very little work was needed to get there.
I'll test that more out in the next days, and I think there will be a PR
soon.
Gerd
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de
My OCaml site: http://www.camlcity.org
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-07-15 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 21:39 Gerd Stolpmann
2016-07-12 22:28 ` Gabriel Scherer
2016-07-13 9:50 ` Jeremie Dimino
2016-07-13 12:22 ` Gerd Stolpmann
2016-07-13 13:45 ` Fabrice Le Fessant
2016-07-14 19:26 ` Sébastien Hinderer
2016-07-15 14:47 ` Gerd Stolpmann [this message]
2016-07-18 8:14 ` Sébastien Hinderer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468594034.25014.129.camel@e130.lan.sumadev.de \
--to=info@gerd-stolpmann.de \
--cc=Sebastien.Hinderer@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox