GnuVince has joined #ocaml
mr_bubbs has quit [vinge.openprojects.net irc.openprojects.net]
exarkun has quit [vinge.openprojects.net irc.openprojects.net]
scipient has quit [vinge.openprojects.net irc.openprojects.net]
Belgarion has quit [vinge.openprojects.net irc.openprojects.net]
themus has quit [vinge.openprojects.net irc.openprojects.net]
exarkun has joined #ocaml
themus has joined #ocaml
Belgarion has joined #ocaml
mr_bubbs has joined #ocaml
scipient has joined #ocaml
gl has joined #ocaml
gl has quit ["La foule est une somme d'erreurs qu'il faut corriger"]
gl has joined #ocaml
gl has quit [vinge.openprojects.net irc.openprojects.net]
Belgarion has quit [vinge.openprojects.net irc.openprojects.net]
gl has joined #ocaml
Belgarion has joined #ocaml
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
hurdman has joined #ocaml
<hurdman> hi there
Demitar has joined #ocaml
malc has joined #ocaml
Demitar has quit []
malc has quit ["no reason"]
TimFreeman has joined #ocaml
TimFreeman has left #ocaml []
<exarkun> How do I convince ocamldebug to look in paths other than ./ to find source listings?
Demitar has joined #ocaml
Demitar has quit []
gene9 has joined #ocaml
<exarkun> hi gene9
<gene9> hi exarkun
<gene9> hm. and where is Yurik...
gene9 has quit [Client Quit]
Demitar has joined #ocaml
e^pi has joined #ocaml
e^pi has left #ocaml []
Demitar has quit [Read error: 113 (No route to host)]
gl has quit ["La foule est une somme d'erreurs qu'il faut corriger"]
<exarkun> is there a time module? or something that will give me access to sub-second precision time info?
<mr_bubbs> Unix :|
<mr_bubbs> I could find everything I needed except strftime
<exarkun> cool
<mr_bubbs> not exactly portable
<exarkun> Heh. Oh well ;)
hurdman has quit ["[x]chat"]
<exarkun> hrm
<exarkun> If I have a function that takes a sum type, is there a way to elide the constructor name when passing in literals? for example
<exarkun> type foo = Bar of int | Baz of string; let fooFunc = function Bar b -> "bar" | Baz b -> "baz"; fooFunc "hello";
<exarkun> ?
_Yurik_ has joined #ocaml
<_Yurik_> re
<exarkun> hi
<_Yurik_> exarkun: hi
<exarkun> I have a sum type question. Want to field it? :)
<Dybbuk> exarkun: Spit it out!
<_Yurik_> sum type?
<exarkun> Dybbuk: the one I just asked ;p
<exarkun> _Yurik_: i think that's what they're called... like "type x = A of b | C of d;"
<_Yurik_> ah
<_Yurik_> and what is the question?
<exarkun> when I define a function that takes something of type x, I'd like to be able to pass in variables of type "b" or "d" instead of "A" or "C"
<exarkun> is there any way to do that?
<_Yurik_> probably not
<_Yurik_> since if you define it as x -> ...
<_Yurik_> sorry, 've to go
_Yurik_ has quit ["Leaving"]
<Dybbuk> exarkun: You can't really do that in a strictly typed language, I don't think.
<exarkun> statically typed, anyway
<Dybbuk> But you can still do 'fooFunc (Bar 55);;'
<Dybbuk> Yeah, that's what I meant. :)
<exarkun> yea..
* Dybbuk isn't that great with vocabulary.
<exarkun> I wanted to avoid something like [ Bar 1; Bar 2; Bar 3; Bar 4; Bar 5; Bar 6; Bar 7; Bar 8; Bar 9; Bar 10 ] ;)
<Dybbuk> However, you can use polymorphism, I think.
<exarkun> hmm, I don't think I've figured out polymorphism in ocaml yet
<Dybbuk> Me neither.
<exarkun> hehe
<Dybbuk> But I think you can use it for this kind of thing. :)
<exarkun> hmm. Can you List.map a constructor? Maybe I should just "List.map Bar (range 10)"
<Dybbuk> I don't see why not.
<smkl> exarkun: you need to do (fun x -> Bar x) instead because constructors are not real functions
<exarkun> ah, ok
<Dybbuk> Yeah, they just fake it. :)
<exarkun> /read/log
<exarkun> oops
arghhh has joined #ocaml
GnuVince has quit [Read error: 104 (Connection reset by peer)]
arghhh has quit [Client Quit]
malc has joined #ocaml
malc has quit ["no reason"]
<exarkun> What's a good way to initialize an Array that's of a sum type? Just pick a particular value of a particular type?