> If think my hack is reasonable too, you just have to replace ocamlc and
> ocamlopt (if you already use ocaml 3.12.1) by the new compilers and it
> will work.
Indeed. It's just that in some cases (eg. you are no expert user
and/or use the ocaml binary packages of your distribution) the cost of
pa
Le jeudi 08 décembre 2011 à 22:39 +0100, Gabriel Scherer a écrit :
> Of course, the "right" way to print/marshal data without changing the
> language is to build a printer for your type from printer combinators.
> Such combinators are available for example:
> - in Jane Street Core library ( a Sexp
Le jeudi 08 décembre 2011 à 10:20 -0800, Martin Jambon a écrit :
> I understand that this feature could be replaced in the future by a more
> complete solution, but we would be happy if it were provided as an
> "experimental extension" of OCaml.
If you want to use it i can maintain it (and make i
Martin, in the meantime, you can use Extlib's (Std.dump : 'a ->
string) function, which is also integrated into Batteries. `dump` does
not require any modification to the compiler or toolchain.
For those that are not familiar with it, 'dump' uses the low-level
representation of OCaml values to pri
On 12/08/2011 04:00 AM, Romain Bardou wrote:
>>> 2) Could you imagine to generalize it to Format.formatter or to
>>> out_channel (without creating a string and concatenating)? Romain Bardou
>>> add in the mantis tracker (I can't give you the bugtracking number since
>>> mantis "is currently offline
>>> 2) Could you imagine to generalize it to Format.formatter or to
>>> out_channel (without creating a string and concatenating)? Romain
>>> Bardou
>>> add in the mantis tracker (I can't give you the bugtracking number
>>> since
>>> mantis "is currently offline for maintenance") a feature wish fo
2) Could you imagine to generalize it to Format.formatter or to
out_channel (without creating a string and concatenating)? Romain Bardou
add in the mantis tracker (I can't give you the bugtracking number since
mantis "is currently offline for maintenance") a feature wish for a new
conversion speci
And the SQL schema generation lib as well :o) ?
2011/12/8 Jonathan Protzenko
> Do you plan on opening up your automated gui generation library and have
> it distributed so that other users can take advantage of it? Say, make it
> rely on lablgtk and bundle it as a semi-official 3rd-party library
Do you plan on opening up your automated gui generation library and
have it distributed so that other users can take advantage of it? Say,
make it rely on lablgtk and bundle it as a semi-official 3rd-party
library that other people can reuse :-).
jonathan
On Thu 08 Dec 2011 11:32:28 AM CET, A
On 12/08/2011 10:24 AM, Gerd Stolpmann wrote:
http://www.lexifi.com/blog/runtime-types
Want it! Want it! Want it!
Any plans for including this into the official compiler?
Since the reception was not bad when I presented it to the Caml
Consortium meeting, yes, I'm proposing this as an extens
Le mercredi 07 décembre 2011 à 23:44 -0800, Martin Jambon a écrit :
> What do you think of moving the project to GitHub so we could follow its
> progress and contribute more easily?
This projet is just a quick hack. If i do something more serious i will
consider creating a real project.
> For now
> On 12/08/2011 03:33 AM, Edgar Friendly wrote:
>> On 12/07/2011 10:28 AM, Jérémie Dimino wrote:
>>> Hi,
>>>
>>> I have made a patch for ocaml 3.12.1 which allow to have a generic
>>> printing function. The patch is available here:
>>>
>>> external show : 'a -> string = "%show"
>>>
>>> Of course
On 12/08/2011 03:33 AM, Edgar Friendly wrote:
On 12/07/2011 10:28 AM, Jérémie Dimino wrote:
Hi,
I have made a patch for ocaml 3.12.1 which allow to have a generic
printing function. The patch is available here:
external show : 'a -> string = "%show"
Of course it is limited to what the compile
On 12/07/2011 10:52 PM, Jérémie Dimino wrote:
> Le mercredi 07 décembre 2011 à 21:26 -0800, Martin Jambon a écrit :
>> I would like to fetch the git repository but it won't let me:
>>
>> $ git clone 'http://www.dimino.org/git/ocaml-3.12.1-print.git'
>> Cloning into ocaml-3.12.1-print...
>> fatal:
Le 08/12/2011 03:33, Edgar Friendly a écrit :
I'm interested in having compile-time reflection like this, but maybe
with a bit more generality. Maybe an identifier can be built out of the
type in a generic way...
external show : 'a -> string = "%type_to_string"
external print : out_channel -> 'a
Le mercredi 07 décembre 2011 à 21:26 -0800, Martin Jambon a écrit :
> I would like to fetch the git repository but it won't let me:
>
> $ git clone 'http://www.dimino.org/git/ocaml-3.12.1-print.git'
> Cloning into ocaml-3.12.1-print...
> fatal: http://www.dimino.org/git/ocaml-3.12.1-print.git/inf
Thanks Jérémie for doing this, it's a very useful feature.
I would like to fetch the git repository but it won't let me:
$ git clone 'http://www.dimino.org/git/ocaml-3.12.1-print.git'
Cloning into ocaml-3.12.1-print...
fatal: http://www.dimino.org/git/ocaml-3.12.1-print.git/info/refs not
found: d
On 12/07/2011 10:28 AM, Jérémie Dimino wrote:
Hi,
I have made a patch for ocaml 3.12.1 which allow to have a generic
printing function. The patch is available here:
external show : 'a -> string = "%show"
Of course it is limited to what the compiler knows, for example the
following function
Le mercredi 07 décembre 2011 à 17:56 +0100, François Bobot a écrit :
> 1) If I understand well the "%show" command is expanded into the ocaml
> code (lambda-code) which can print the type. So, for instance, in the
> case of a list, your code generates a recursive function "aux" and it
> applies
Le mercredi 07 décembre 2011 à 11:46 -0500, Alex Rubinsteyn a écrit :
> Cool! Thanks for writing this. Can you explain how defining a custom
> printer works? The new language features still bewilder me.
If you want to define a custom printer for a type named foo, you have to
define a function name
Le 07/12/2011 16:28, Jérémie Dimino a écrit :
Hi,
I have made a patch for ocaml 3.12.1 which allow to have a generic
printing function. The patch is available here:
[...]
Of course it is limited to what the compiler knows, for example the
following function will always returns "[;]":
let f x
Cool! Thanks for writing this. Can you explain how defining a custom
printer works? The new language features still bewilder me.
On Dec 7, 2011 10:29 AM, "Jérémie Dimino" wrote:
> Hi,
>
> I have made a patch for ocaml 3.12.1 which allow to have a generic
> printing function. The patch is availabl
Hi,
I have made a patch for ocaml 3.12.1 which allow to have a generic
printing function. The patch is available here:
http://www.dimino.org/ocaml-3.12.1-generic-print.patch
Here is how to use it:
external show : 'a -> string = "%show"
let () = print_endline (show ([1; 2; 3], Some "foo")
23 matches
Mail list logo