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
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
<
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>
I could find everything I needed except strftime
<
mr_bubbs>
not exactly portable
<
exarkun>
Heh. Oh well ;)
hurdman has quit ["[x]chat"]
<
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";
_Yurik_ has joined #ocaml
<
_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_>
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. :)
* 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.
<
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
<
Dybbuk>
Yeah, they just fake it. :)
<
exarkun>
/read/log
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?