jeberle has left #ocaml []
jganetsk has quit ["Ex-Chat"]
ita is now known as ita|zzz
ita|zzz has quit ["Hasta luego!"]
[azoic] has joined #ocaml
CRathman has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
piggybox has joined #ocaml
mwc has joined #ocaml
seafoodX has joined #ocaml
buluca has quit ["Leaving."]
buluca has joined #ocaml
szsz has quit ["Leaving."]
seafoodX has quit []
seafoodX has joined #ocaml
szsz has joined #ocaml
seafoodX has quit []
CRathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
buluca has quit [Read error: 113 (No route to host)]
[azoic1 has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
jonafan has joined #ocaml
[azoic] has quit [Read error: 110 (Connection timed out)]
jonathanv has quit [Read error: 110 (Connection timed out)]
CRathman has joined #ocaml
piggybox_ has joined #ocaml
CRathman_ has joined #ocaml
CRathman has quit [heinlein.freenode.net irc.freenode.net]
crabstick has quit [heinlein.freenode.net irc.freenode.net]
jlouis has quit [heinlein.freenode.net irc.freenode.net]
Oatmeat has quit [heinlein.freenode.net irc.freenode.net]
balbinus has quit [heinlein.freenode.net irc.freenode.net]
cmeme has quit [heinlein.freenode.net irc.freenode.net]
gaja has quit [heinlein.freenode.net irc.freenode.net]
hcarty has quit [heinlein.freenode.net irc.freenode.net]
Sparkles has quit [heinlein.freenode.net irc.freenode.net]
Ycros has quit [heinlein.freenode.net irc.freenode.net]
ramkrsna has quit [heinlein.freenode.net irc.freenode.net]
l_a_m has quit [heinlein.freenode.net irc.freenode.net]
CRathman_ is now known as CRathman
Smerdyakov has quit ["Leaving"]
crabstick has joined #ocaml
jlouis has joined #ocaml
balbinus has joined #ocaml
Oatmeat has joined #ocaml
cmeme has joined #ocaml
gaja has joined #ocaml
hcarty has joined #ocaml
l_a_m has joined #ocaml
Ycros has joined #ocaml
Sparkles has joined #ocaml
ramkrsna has joined #ocaml
<
CRathman>
the last line gives error: This expression has type string but is here used with type D.key1type
<
CRathman>
but I was expecting string to match the set key1type
<
CRathman>
is there a way to get the inference to work properly? Thanks.
<
flux>
crathman, remove .. : DICT from the definition of module Dict?
<
CRathman>
flux: that works. let me try it on the full blown code.
<
CRathman>
ok. works on the full example as well.
<
CRathman>
my next question would be why?
<
flux>
crathman, the reason is that the signature you are narrowing the type to match DICT
<
flux>
crathman, and in DICT key1type is abstract
<
flux>
hm, that came out strange. let's try that again.
<
flux>
"crathman, the reason is that the signature you are narrowing to (DICT) has the key1type defined as an abstract type (via DICT_TYPES)"
<
CRathman>
ok. makes sense (especially since the example I'm translating is an abstract sml module).
<
CRathman>
the sml code has "where" in it... and I'm assuming that there's not a correlarry in O'Caml
<
flux>
hm, maybe it's the same as 'with', I don't know
<
flux>
have you read chapter 2 of ocaml documentation?
<
CRathman>
at one time or another... but I need to reread it. :-)
<
CRathman>
anyhow, thanks for the help... It now works, but I'll look to see if I can get it back to an abstract type.
<
flux>
crathman, 2.4 especially
<
flux>
"Functors and type abstraction"
<
CRathman>
flux: thanks!
[azoic] has joined #ocaml
seafoodX has joined #ocaml
piggybox has quit [Connection timed out]
piggybox has joined #ocaml
piggybox__ has joined #ocaml
piggybox_ has quit [Read error: 110 (Connection timed out)]
piggybox_ has joined #ocaml
piggybox_ has quit [SendQ exceeded]
piggybox_ has joined #ocaml
^authentic has joined #ocaml
piggybox has quit [Connection timed out]
authentic has quit [Read error: 110 (Connection timed out)]
piggybox__ has quit [Connection timed out]
CRathman has quit [Read error: 110 (Connection timed out)]
mwc has quit ["Lost terminal"]
piggybox has joined #ocaml
[azoic1 has quit ["Leaving."]
piggybox__ has joined #ocaml
piggybox_ has quit [Connection timed out]
piggybox_ has joined #ocaml
piggybox has quit [Read error: 110 (Connection timed out)]
piggybox__ has quit [Connection timed out]
acatout has joined #ocaml
seafoodX has quit []
G_ has joined #ocaml
G has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
Amorphous has quit ["shutdown"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
mav has quit [Read error: 110 (Connection timed out)]
rwmjones has joined #ocaml
Amorphous has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
mav has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
screwt8 has quit [Remote closed the connection]
Tetsuo has joined #ocaml
screwt8 has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
smimram has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
zmdkrbou has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
gene9 has joined #ocaml
seafoodX has joined #ocaml
seafoodX has quit [Client Quit]
buluca has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
gene9 has quit ["Client Exiting"]
^authentic has quit [Read error: 113 (No route to host)]
authentic has joined #ocaml
pantsd has joined #ocaml
lexko has joined #ocaml
aorihzaeorijhz has joined #ocaml
aorihzaeorijhz is now known as Amorphous
Dark-Side has joined #ocaml
Dark-Side has left #ocaml []
Amorphous has quit [Read error: 104 (Connection reset by peer)]
authentic has quit ["leaving"]
authentic has joined #ocaml
authentic has quit ["leaving"]
authentic has joined #ocaml
dmentre has joined #ocaml
pantsd has quit ["Leaving."]
Amorphous has joined #ocaml
ita has joined #ocaml
|Jedai| has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
jedai has quit [Read error: 110 (Connection timed out)]
seafoodX has joined #ocaml
|Jedai| is now known as jedai
[azoic1 has joined #ocaml
authentic has quit ["..."]
authentic has joined #ocaml
CRathman has joined #ocaml
[azoic] has quit [Nick collision from services.]
[azoic] has joined #ocaml
[azoic] has quit [Nick collision from services.]
[azoic1 is now known as [azoic]
[azoic]_ has joined #ocaml
[azoic] has quit ["Leaving."]
[azoic] has joined #ocaml
litb has joined #ocaml
litb has left #ocaml []
pango has quit [Remote closed the connection]
ktne has joined #ocaml
<
ktne>
how do i write a "switch" statement"
<
ktne>
does match x with works?
<
rwmjones>
ktne, use match
pango has joined #ocaml
<
ktne>
match x with | 0 -> 0 | 1 -> 1
<
ktne>
for some reason it doesn't work in f#
dmentre has quit ["Leaving."]
<
bluestorm>
ktne: what is your error ?
<
ktne>
it expects unit instead of int
<
ktne>
in pattern matching region
<
ktne>
match t.NodeType() with
<
ktne>
| XmlNodeType.Element -> 0
<
bluestorm>
could you show the code ?
<
ktne>
XmlNodeType.Element has value one
<
ktne>
when i type t.NodeType() in console
<
ktne>
i get a variable of type Element
<
ktne>
err, of value Element
<
ktne>
but it won't allow me to match it against Element
<
bluestorm>
could you paste the whoe block of code ?
<
bluestorm>
(i mean, some lines around)
[azoic] has left #ocaml []
mnsingh has joined #ocaml
<
bluestorm>
while foo do something
<
bluestorm>
something has do be of type unit
<
bluestorm>
while foo do 0 doesn't make sense
<
ktne>
i want it to return 0
<
bluestorm>
return 0 where ?
<
bluestorm>
who will get the return value ?
<
bluestorm>
a while doesn't return any value
<
ktne>
here is something interesting
<
ktne>
i removed the ()
<
bluestorm>
there is something wrong in your conception
<
ktne>
and i still get the same error in intellisense tooltip
<
ktne>
but it compiles the code this time
<
ktne>
but right, i guess i have to add some code there :)
<
bluestorm>
the basic idea to have it working would be to add an "ignore" around your return value
<
bluestorm>
ignore : 'a -> unit
<
bluestorm>
(defined in OCaml)
<
bluestorm>
something like
rwmjones has left #ocaml []
<
bluestorm>
while ... do ignore (match ... with ... )
<
ktne>
i have ignore here too
<
bluestorm>
i think that would work
<
bluestorm>
but it's only a quick fix
<
bluestorm>
you say you want to return 0
<
bluestorm>
so you want to return 0
_somewhere_
<
bluestorm>
with an ignore you won't be able to get your return value back
<
bluestorm>
where do you want to return your value ?
<
ktne>
well i'm fine now
<
ktne>
i know what i have to do from here now :)
<
ktne>
i'll have to use the return value somewhere :)
<
ktne>
is there a standard function x -> x?
<
ktne>
something like identity?
<
ktne>
i'm getting some error if i try to let v = match ...
<
ktne>
incorrect identation
<
bluestorm>
what are you trying to do actually ?
<
ktne>
i'm trying to pring the returned value
<
ktne>
for each readed component
<
bluestorm>
let v = match .... in print v
<
bluestorm>
(i guess you doesn't use "in" in your syntax)
<
ktne>
i keep getting incorrect identation
mnsingh has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
<
ktne>
your code works :)
<
ktne>
albeit with printf, no print defined it seems
<
bluestorm>
ocaml doens't have print either
<
ktne>
ok, mine works too now :)
<
ktne>
i used let v = match on the same line
<
ktne>
i guess it doesn't like that
<
ktne>
hmm, it actually works that way too
<
ktne>
i think i know why i've got the error
<
ktne>
because i haven't added yet printf at that moment
<
ktne>
so it interpreted the whole thing as missing a return value
<
ktne>
ok, thanks :)
Smerdyakov has joined #ocaml
<
ktne>
how does f# determine the type information required for formatting strings?
<
ktne>
is string formatting a part of the language?
<
flux>
it is in ocaml, so perhaps in f# too
<
ktne>
that doesn't seem too clean
<
ktne>
is there a format type?
<
Smerdyakov>
ktne, read the manual page of Printf.
<
ktne>
Printf.textwriter_format
<
ktne>
i guess the compiler treats this as a native type and recognizes it
<
flux>
there have been some similar systems written in pure SML, but for some reason I haven't seen ocaml-ports
azoic has quit [Remote closed the connection]
[azoic]_ has quit ["I came, I saw, I deleted all your files"]
seafoodX has quit []
screwt8 has quit [Remote closed the connection]
Amorphous has joined #ocaml
ygrek has joined #ocaml
ygrek has quit ["Leaving"]
ygrek has joined #ocaml
screwt8 has joined #ocaml
piggybox_ is now known as piggybox
buluca has quit [Read error: 113 (No route to host)]
lexko has quit ["Leaving"]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
slipstream has joined #ocaml
olegfink has quit [Read error: 104 (Connection reset by peer)]
slipstream-- has quit [Read error: 113 (No route to host)]
olegfink has joined #ocaml
piggybox_ has joined #ocaml
ygrek has quit ["Leaving"]
piggybox has quit [Connection timed out]
<
lde>
Why isn't my signal handler, set with Sys.signal, called when I compile my program with ocamlopt, though it is when I use ocamlc?
<
bluestorm>
the native code must trigger a lower level exception/signal
<
bluestorm>
iirc, on some architectures/OSes, Stack overflow is not handled by an OCaml exception in native code
<
lde>
It's Sys.sigint.
<
pango>
lde: is your program doing any syscalls at the time it should be interrupted?
buluca has joined #ocaml
G_ has quit [Connection timed out]
screwt8 has quit [Remote closed the connection]
screwt8 has joined #ocaml
smimram has quit [Read error: 110 (Connection timed out)]
smimou_ has joined #ocaml
CRathman has quit [Read error: 110 (Connection timed out)]
CRathman has joined #ocaml
Mr_Awesome has quit ["aunt jemima is the devil!"]
bluestorm has quit ["Konversation terminated!"]
rutlov has joined #ocaml
rutlov has left #ocaml []
G has joined #ocaml
G has quit [Client Quit]
G has joined #ocaml
rutlov has joined #ocaml
rutlov has left #ocaml []
Tetsuo has quit ["Leaving"]
mav has quit [Read error: 113 (No route to host)]
Smerdyakov has quit ["Bye-bye, Berkeley."]
piggybox has joined #ocaml
CRathman has quit [Connection timed out]