dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
shawn has joined #ocaml
hikozaemon has joined #ocaml
dbueno has quit [Read error: 110 (Connection timed out)]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- The future of IRC"]
jcreigh has joined #ocaml
jcreigh has quit ["bedtime"]
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
ski has quit [Read error: 104 (Connection reset by peer)]
smimou has joined #ocaml
oracle1 has quit [Read error: 110 (Connection timed out)]
oracle1 has joined #ocaml
piggybox has joined #ocaml
piggybox has left #ocaml []
alek has joined #ocaml
alek is now known as alek2
pango is now known as pangoafk
pangoafk is now known as pango
love-pingoo has joined #ocaml
Revision17 has joined #ocaml
revision17_ has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
m3ga has joined #ocaml
smimou has quit ["bli"]
m3ga has quit ["disappearing into the sunset"]
slipstream-- has quit [Read error: 110 (Connection timed out)]
<flux__> hm.. fun idea for a language extension: way to 'optionify' a record, and an automatically generated 'deoptionifying' function
<flux__> so type t = { value : string } could be converted into t'option = { value : string option }
<dylan> that's possible with one ocaml variant, IIRC.
<flux__> and a function t_of_t'option : t'option -> t
<flux__> (or maybe t option)
mikeX has joined #ocaml
<flux__> I just have this piece of code where I want to fill record in pieces (loading from a configuration), and finally return the configuration which has all the fields filled
<flux__> infact some kind of type function would be nice, so I could express convert : optionified(t) -> t option :-)
<flux__> (but that would be quite a big extension I'd say)
<flux__> dylan, what do you mean 'with one ocaml variant'?
<love-pingoo> flux__: do you know the where thing ?
<love-pingoo> { struct where field = new_value }
<zmdkrbou> s/where/with/ or are you talking of something else ?
<love-pingoo> you can start with your struct filled with default values, then "modify" it like that
<love-pingoo> zmdkrbou: with, sorry
<flux__> yes, I know
<flux__> but now I have type t = { a : int; b : string; c : float } type t' = { a' : int option; b' : string option; c' : float option } let load () = let rec parse_config cfg = ... in let config = parse_config { a' : None; b' : None; c' : None } in match config with { Some a' = a; .. } -> { a = a; .. } | _ -> failwith "Argh"
<flux__> the parse_config-function itself will use { config with a = Some 42 } -syntax
<flux__> with a neat extension it would be like type t = { a : int .. } with option let load () = .. let config = parse_config empty_t'option in t_of_t'option config
Aradorn has joined #ocaml
Aradorn has quit ["Leaving"]
Aradorn has joined #ocaml
<dylan> flux__: I think gcaml or something can do it.
<pango> or tywith maybe
alek2 has left #ocaml []
<flux__> tywith could be extended probably
hikozaemon has quit ["Leaving..."]
Snark has joined #ocaml
love-pingoo has quit ["Leaving"]
finelemon has joined #ocaml
khaladan has joined #ocaml
finelemo2 has quit [Read error: 110 (Connection timed out)]
love-pingoo has joined #ocaml
pango is now known as pangoafk
Schmurtz has joined #ocaml
pangoafk is now known as pango
Boojum has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
shawn_ has joined #ocaml
Boojum has quit ["Leaving"]
shawn__ has joined #ocaml
shawn has quit [Read error: 110 (Connection timed out)]
Aradorn has quit ["This computer has gone to sleep"]
_fab has joined #ocaml
chessguy has joined #ocaml
slipstream has quit [Remote closed the connection]
_coder_ has joined #ocaml
_coder_ has quit [Client Quit]
_coder_ has joined #ocaml
_coder_ has quit ["Leaving"]
_fab has quit [Remote closed the connection]
dbueno has joined #ocaml
smimou has joined #ocaml
Aradorn has joined #ocaml
shawn__ is now known as shawn
Aradorn has quit ["This computer has gone to sleep"]
Schmurtz has quit ["L'énergie semble manquer : dodo !"]
mikeX_ has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- The professional IRC Client"]
mikeX__ has joined #ocaml
smimou has quit ["bli"]
mikeX has quit [Read error: 110 (Connection timed out)]
_coder_ has joined #ocaml
mikeX_ has quit [Read error: 110 (Connection timed out)]