Re: [polyml] suppressing compiler output

2013-04-15 Thread David Matthews
On 09/04/2013 12:44, Alex Merry wrote: On 08/04/13 12:07, David Matthews wrote: I don't like usestring myself. eval is definitely better. I see what you mean about having to escape the string if it has unusual characters in it. I don't really like the idea of having a special load file

Re: [polyml] suppressing compiler output

2013-04-11 Thread David Matthews
On 10/04/2013 20:03, Phil Clayton wrote: In Linux that basically means not listed in /etc/ld.so.conf so the simplest solution is to add your location there. You're right, I should really do that. In fact, on Fedora, I would add the file /etc/ld.so.conf.d/polyml-${version}.conf that

Re: [polyml] suppressing compiler output

2013-04-11 Thread Makarius
On Thu, 11 Apr 2013, David Matthews wrote: I misunderstood the motivation for polyc. I thought that it was to allow those without compiling/linking knowledge to easily build executables, i.e. to de-skill the process. Whilst such users may realize that ./configure --prefix non-standard

Re: [polyml] suppressing compiler output

2013-04-11 Thread Phil Clayton
On 11/04/13 16:11, David Matthews wrote: On 11/04/2013 11:44, Makarius wrote: On Thu, 11 Apr 2013, David Matthews wrote: I misunderstood the motivation for polyc. I thought that it was to allow those without compiling/linking knowledge to easily build executables, i.e. to de-skill the

Re: [polyml] suppressing compiler output

2013-04-10 Thread Phil Clayton
On 09/04/13 11:28, David Matthews wrote: On 08/04/2013 21:22, Phil Clayton wrote: On 08/04/13 12:21, David Matthews wrote: I have found something called config.rpath which seems to be part of the GNU portability library. This appears to calculate potentially useful values for passing rpath to

Re: [polyml] suppressing compiler output

2013-04-09 Thread David Matthews
On 08/04/2013 21:22, Phil Clayton wrote: On 08/04/13 12:21, David Matthews wrote: I have found something called config.rpath which seems to be part of the GNU portability library. This appears to calculate potentially useful values for passing rpath to linkers. acl_cv_hardcode_libdir_flag_spec

Re: [polyml] suppressing compiler output

2013-04-08 Thread David Matthews
Thanks for trying that out and letting me have your comments. On 07/04/2013 23:55, Phil Clayton wrote: polyc looks very useful. I just tried it out for 1723 and noticed a few things: 1. -L${LIBDIR} is missing in the case when -o is not specified, causing the error: /usr/bin/ld: cannot find

Re: [polyml] suppressing compiler output

2013-04-08 Thread Phil Clayton
On 08/04/13 12:21, David Matthews wrote: 3. In the polyc that was built, I see EXTRA= As it stands, the Poly/ML lib directory is not added to the linker path so I presume (for Linux) that this was meant to contain something like -Wl,-rpath ${LIBDIR} so that it is not necessary to set

Re: [polyml] suppressing compiler output

2013-04-05 Thread David Matthews
I've added a polyc script that is generated from the build process. The idea of this is to provide the similar sort of functionality that users of C expect from the cc command. It's very simple at the moment and is limited to a few options. It compiles an ML source file and exports the main

Re: [polyml] suppressing compiler output

2013-04-05 Thread David Matthews
Alex, I don't know if you intended to send this to the list as well but I'm copying it back there because I think it might be of general interest. While I was playing around with the polyc script I wondered about adding a --usestring option, similar to --use but with the actual ML in there

Re: [polyml] suppressing compiler output

2013-04-03 Thread David Matthews
On 02/04/2013 14:36, David Matthews wrote: Perhaps one can also pour in the gcc-compile phase already, so it's one step from ML-file to executable. I don't know how that works so perhaps that's for later. So, in summary, it should look like: -c option: Compile a source file which must

Re: [polyml] suppressing compiler output

2013-04-02 Thread Makarius
On Tue, 2 Apr 2013, David Matthews wrote: Well, that was the intention behind the changes I made with version 5.0. 5.0 originally only had PolyML.export as the way of exporting the state. PolyML.SaveState was added later. People have occasionally pointed out to me that the bias of Poly/ML to

Re: [polyml] suppressing compiler output

2013-04-02 Thread René Neumann
Am 02.04.2013 14:02, schrieb David Matthews: On 02/04/2013 12:50, Makarius wrote: On Tue, 2 Apr 2013, David Matthews wrote: Do you has something else in mind apart from PolyML.export? Perhaps some form of separate compilation of modules? I'm not familiar with OCaml. Actual separate

Re: [polyml] suppressing compiler output

2013-04-02 Thread David Matthews
On 02/04/2013 13:25, René Neumann wrote: Am 02.04.2013 14:02, schrieb David Matthews: This would definitly be a great help for people new to Poly/ML. When I had to produce a standalone executable from an ML-file it took me quite some time before figuring out how it works. Actually it's

Re: [polyml] suppressing compiler output

2013-04-02 Thread Makarius
On Tue, 2 Apr 2013, David Matthews wrote: --skip-first-line option: Skip the first line of the input stream. Used with scripts with #! at the start. You should probably insist in an actual #! before skipping the first line, just as a sanity check. Makarius

Re: [polyml] suppressing compiler output

2013-04-02 Thread Matthew Fluet
On Tue, Apr 2, 2013 at 8:51 AM, Makarius makar...@sketis.net wrote: On Tue, 2 Apr 2013, Gergely Buday wrote: An ML script could be just tailored rewriting those critical parts in ML itself and compiled with mlton if necessary. I hear that part about Mlton occasionally, and wonder if it is

Re: [polyml] suppressing compiler output

2013-04-01 Thread David Matthews
On 29/03/2013 20:24, Rob Arthan wrote: Quite a common thing to do in UN*X applications is not to prompt if the input isn't a terminal. Obviously, I can write my own read-eval-print loop that does that (indeed the read-eval-print loop in my earlier post on this topic doesn't prompt at all), but

Re: [polyml] suppressing compiler output

2013-04-01 Thread Peter Chubb
David == David Matthews david.matth...@prolingua.co.uk writes: David On 29/03/2013 20:24, Rob Arthan wrote: Quite a common thing to do in UN*X applications is not to prompt if the input isn't a terminal. Obviously, I can write my own read-eval-print loop that does that (indeed the

Re: [polyml] suppressing compiler output

2013-03-29 Thread Gergely Buday
Sorry, I did not make it clear what I want. I want ML scripts to invoke from the command line, without compiling them. I made it work, see how. There is an shc [1] translator that compiles shell scripts to C code. I have used a one-liner [2]: $ cat polyscript.sh #!/bin/bash tail -n +2 $1 | poly

Re: [polyml] suppressing compiler output

2013-03-29 Thread Rob Arthan
On 29 Mar 2013, at 08:42, Gergely Buday gbu...@gmail.com wrote: Back to the original question: this is why I would like to suppress any compiler message. The function PolyML.compiler lets you write your own customised read-eval-print loop. In the code below, the fun

Re: [polyml] suppressing compiler output

2013-03-29 Thread Makarius
On Fri, 29 Mar 2013, Gergely Buday wrote: I want ML scripts to invoke from the command line, without compiling them. As Phil has already pointed out, you can produce standalone executables from some Poly/ML program that do whatever you want them to do. For that ML part of the executable

Re: [polyml] suppressing compiler output

2013-03-29 Thread David Matthews
On 29/03/2013 08:42, Gergely Buday wrote: Back to the original question: this is why I would like to suppress any compiler message. I did not find such a flag in the manual, would it be possible to add one, David? There have been a few suggestions for how to write your own top level and

Re: [polyml] suppressing compiler output

2013-03-29 Thread Rob Arthan
David, On 29 Mar 2013, at 11:50, David Matthews david.matth...@prolingua.co.uk wrote: On 29/03/2013 08:42, Gergely Buday wrote: Back to the original question: this is why I would like to suppress any compiler message. I did not find such a flag in the manual, would it be possible to add

Re: [polyml] suppressing compiler output

2013-03-28 Thread Phil Clayton
I'm not sure what your exact requirements are but a possible solution may be to create an executable. Then compile-time output would not be mixed with run-time output. It's straightforward: wrap everything into a toplevel function and export that, e.g. [pclayton@rizzo ~]$ cat hello.sml fun