* [Caml-list] ocamlnat @ 2016-07-12 21:39 Gerd Stolpmann 2016-07-12 22:28 ` Gabriel Scherer 2016-07-14 19:26 ` Sébastien Hinderer 0 siblings, 2 replies; 8+ messages in thread From: Gerd Stolpmann @ 2016-07-12 21:39 UTC (permalink / raw) To: caml-list [-- Attachment #1: Type: text/plain, Size: 928 bytes --] 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. 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 --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlnat 2016-07-12 21:39 [Caml-list] ocamlnat Gerd Stolpmann @ 2016-07-12 22:28 ` Gabriel Scherer 2016-07-13 9:50 ` Jeremie Dimino 2016-07-14 19:26 ` Sébastien Hinderer 1 sibling, 1 reply; 8+ messages in thread From: Gabriel Scherer @ 2016-07-12 22:28 UTC (permalink / raw) To: Gerd Stolpmann; +Cc: caml-list, Thomas Refis [-- Attachment #1: Type: text/plain, Size: 1708 bytes --] Thomas Réfis and Jérémie Dimino have been working on ocamlnat in trunk recently, and ocamlnat builds on either the "trunk" branch or, I believe, the 4.03 release. You should talk to them. Let me take this an opportunity to advertise the "runtop" target in the compiler distribution's Makefile, which runs a toplevel from an (uninstalled) build of the compiler distribution: make runtop make natruntop I added them during the 4.03+dev release cycle, but didn't mention it in the Changelog (they're not user-facing features) so most people keep doing weird incantations of (./byterun/ocamlrun ./ocaml -I nostdlib ...) instead. On Tue, Jul 12, 2016 at 5:39 PM, Gerd Stolpmann <info@gerd-stolpmann.de> wrote: > 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. > > 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: Type: text/html, Size: 2592 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlnat 2016-07-12 22:28 ` Gabriel Scherer @ 2016-07-13 9:50 ` Jeremie Dimino 2016-07-13 12:22 ` Gerd Stolpmann 0 siblings, 1 reply; 8+ messages in thread From: Jeremie Dimino @ 2016-07-13 9:50 UTC (permalink / raw) To: Gabriel Scherer; +Cc: Gerd Stolpmann, caml-list, Thomas Refis [-- Attachment #1: Type: text/plain, Size: 1939 bytes --] ocamlnat indeed builds with 4.03 but is not built by default On Tue, Jul 12, 2016 at 11:28 PM, Gabriel Scherer <gabriel.scherer@gmail.com > wrote: > Thomas Réfis and Jérémie Dimino have been working on ocamlnat in trunk > recently, and ocamlnat builds on either the "trunk" branch or, I believe, > the 4.03 release. You should talk to them. > > Let me take this an opportunity to advertise the "runtop" target in the > compiler distribution's Makefile, which runs a toplevel from an > (uninstalled) build of the compiler distribution: > > make runtop > make natruntop > > I added them during the 4.03+dev release cycle, but didn't mention it in > the Changelog (they're not user-facing features) so most people keep doing > weird incantations of (./byterun/ocamlrun ./ocaml -I nostdlib ...) instead. > > On Tue, Jul 12, 2016 at 5:39 PM, Gerd Stolpmann <info@gerd-stolpmann.de> > wrote: > >> 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. >> >> 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 >> ------------------------------------------------------------ >> >> > -- Jeremie [-- Attachment #2: Type: text/html, Size: 3284 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlnat 2016-07-13 9:50 ` Jeremie Dimino @ 2016-07-13 12:22 ` Gerd Stolpmann 2016-07-13 13:45 ` Fabrice Le Fessant 0 siblings, 1 reply; 8+ messages in thread From: Gerd Stolpmann @ 2016-07-13 12:22 UTC (permalink / raw) To: Jeremie Dimino; +Cc: Gabriel Scherer, caml-list, Thomas Refis [-- Attachment #1: Type: text/plain, Size: 3335 bytes --] Thanks for the info. I'll also copy that code to my separate repository, so that everybody can easily start experimenting with it. I keep you posted on what we find. Gerd Am Mittwoch, den 13.07.2016, 10:50 +0100 schrieb Jeremie Dimino: > ocamlnat indeed builds with 4.03 but is not built by default > > On Tue, Jul 12, 2016 at 11:28 PM, Gabriel Scherer > <gabriel.scherer@gmail.com> wrote: > Thomas Réfis and Jérémie Dimino have been working on ocamlnat > in trunk recently, and ocamlnat builds on either the "trunk" > branch or, I believe, the 4.03 release. You should talk to > them. > > > Let me take this an opportunity to advertise the "runtop" > target in the compiler distribution's Makefile, which runs a > toplevel from an (uninstalled) build of the compiler > distribution: > > > make runtop > > make natruntop > > > I added them during the 4.03+dev release cycle, but didn't > mention it in the Changelog (they're not user-facing features) > so most people keep doing weird incantations of > (./byterun/ocamlrun ./ocaml -I nostdlib ...) instead. > > > On Tue, Jul 12, 2016 at 5:39 PM, Gerd Stolpmann > <info@gerd-stolpmann.de> wrote: > 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. > > 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 > ------------------------------------------------------------ > > > > > > > > -- > Jeremie -- ------------------------------------------------------------ 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 --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlnat 2016-07-13 12:22 ` Gerd Stolpmann @ 2016-07-13 13:45 ` Fabrice Le Fessant 0 siblings, 0 replies; 8+ messages in thread From: Fabrice Le Fessant @ 2016-07-13 13:45 UTC (permalink / raw) To: Gerd Stolpmann, Jeremie Dimino; +Cc: Gabriel Scherer, caml-list, Thomas Refis [-- Attachment #1: Type: text/plain, Size: 3510 bytes --] See also https://github.com/ocaml/ocaml/pull/648/files#diff-3c407d7b5a833ffbd112b654e2c59fa0L116 for a patch on opttopdirs.ml On Wed, Jul 13, 2016 at 2:23 PM Gerd Stolpmann <info@gerd-stolpmann.de> wrote: > Thanks for the info. I'll also copy that code to my separate repository, > so that everybody can easily start experimenting with it. I keep you > posted on what we find. > > Gerd > > Am Mittwoch, den 13.07.2016, 10:50 +0100 schrieb Jeremie Dimino: > > ocamlnat indeed builds with 4.03 but is not built by default > > > > On Tue, Jul 12, 2016 at 11:28 PM, Gabriel Scherer > > <gabriel.scherer@gmail.com> wrote: > > Thomas Réfis and Jérémie Dimino have been working on ocamlnat > > in trunk recently, and ocamlnat builds on either the "trunk" > > branch or, I believe, the 4.03 release. You should talk to > > them. > > > > > > Let me take this an opportunity to advertise the "runtop" > > target in the compiler distribution's Makefile, which runs a > > toplevel from an (uninstalled) build of the compiler > > distribution: > > > > > > make runtop > > > > make natruntop > > > > > > I added them during the 4.03+dev release cycle, but didn't > > mention it in the Changelog (they're not user-facing features) > > so most people keep doing weird incantations of > > (./byterun/ocamlrun ./ocaml -I nostdlib ...) instead. > > > > > > On Tue, Jul 12, 2016 at 5:39 PM, Gerd Stolpmann > > <info@gerd-stolpmann.de> wrote: > > 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. > > > > 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 > > > ------------------------------------------------------------ > > > > > > > > > > > > > > > > -- > > Jeremie > > -- > ------------------------------------------------------------ > 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: Type: text/html, Size: 5544 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlnat 2016-07-12 21:39 [Caml-list] ocamlnat Gerd Stolpmann 2016-07-12 22:28 ` Gabriel Scherer @ 2016-07-14 19:26 ` Sébastien Hinderer 2016-07-15 14:47 ` Gerd Stolpmann 1 sibling, 1 reply; 8+ messages in thread From: Sébastien Hinderer @ 2016-07-14 19:26 UTC (permalink / raw) To: caml-list 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. Sébastien. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlnat 2016-07-14 19:26 ` Sébastien Hinderer @ 2016-07-15 14:47 ` Gerd Stolpmann 2016-07-18 8:14 ` Sébastien Hinderer 0 siblings, 1 reply; 8+ messages in thread From: Gerd Stolpmann @ 2016-07-15 14:47 UTC (permalink / raw) To: Sébastien Hinderer; +Cc: caml-list [-- 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 --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlnat 2016-07-15 14:47 ` Gerd Stolpmann @ 2016-07-18 8:14 ` Sébastien Hinderer 0 siblings, 0 replies; 8+ messages in thread From: Sébastien Hinderer @ 2016-07-18 8:14 UTC (permalink / raw) To: Gerd Stolpmann; +Cc: caml-list Hi Gerd, Gerd Stolpmann (2016/07/15 16:47 +0200): > 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 [...] > - 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. I find all this awesome, thanks a lot for this work. > 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. I'd say, do not hesitate to split your work in several (smaller) PRs if that makes sense. The smaller the PR, the easier the review process. Sébastien. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-07-18 8:14 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-07-12 21:39 [Caml-list] ocamlnat 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 2016-07-18 8:14 ` Sébastien Hinderer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox