bluestorm has quit ["Konversation terminated!"]
mnemonic has quit ["leaving"]
joshuacook has joined #ocaml
smimou has quit ["bli"]
jeberle has left #ocaml []
joshuacook has quit [Client Quit]
Submarine has quit ["Leaving"]
datrus_ has joined #ocaml
<
datrus_>
hello. can anyone please tell me why why this doesnt work:
<
datrus_>
List.fold_right (fun (a,b)->a+b) [1,2,3] 4;;
<
datrus_>
This expression has type int but is here used with type 'a -> 'a
<
hcarty>
datrus_: Are you trying to use: List.fold_right (fun a b -> a + b) [1;2;3] 4;;
<
datrus_>
yes , thanks, that was the error
<
hcarty>
You're welcome
joshuacook has joined #ocaml
joshuacook has quit [Remote closed the connection]
bek has joined #ocaml
buluca has joined #ocaml
datrus_ has quit ["leaving"]
Shimei has joined #ocaml
mbishop has quit [Read error: 104 (Connection reset by peer)]
tautologico has joined #ocaml
shawn has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
maskd has quit ["leaving"]
stevan__ has joined #ocaml
stevan_ has quit [Read error: 110 (Connection timed out)]
pants1 has joined #ocaml
Smerdyakov has quit ["Leaving"]
tautologico has quit []
falconair_ has joined #ocaml
johnnowak has joined #ocaml
mbishop has joined #ocaml
johnnowak has quit []
bluestorm has joined #ocaml
diffbavis has quit [Read error: 104 (Connection reset by peer)]
diffbavis has joined #ocaml
bohanlon has joined #ocaml
velco has joined #ocaml
danly has quit [zelazny.freenode.net irc.freenode.net]
savanni has quit [zelazny.freenode.net irc.freenode.net]
mattam has quit [zelazny.freenode.net irc.freenode.net]
ozzloy has quit [zelazny.freenode.net irc.freenode.net]
danly has joined #ocaml
savanni has joined #ocaml
mattam has joined #ocaml
ozzloy has joined #ocaml
savanni has quit [zelazny.freenode.net irc.freenode.net]
danly has quit [zelazny.freenode.net irc.freenode.net]
mattam has quit [zelazny.freenode.net irc.freenode.net]
ozzloy has quit [zelazny.freenode.net irc.freenode.net]
danly has joined #ocaml
savanni has joined #ocaml
mattam has joined #ocaml
ozzloy has joined #ocaml
johnnowak has joined #ocaml
love-pingoo has joined #ocaml
ikaros has quit [Read error: 113 (No route to host)]
pango_ has quit [Remote closed the connection]
diffbavis has quit [Read error: 131 (Connection reset by peer)]
ikaros has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
ikaros has joined #ocaml
pango_ has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
johnnowak has quit []
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
diffbavis has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
bluestorm has joined #ocaml
bek has quit [Remote closed the connection]
zmdkrbou has quit [Read error: 110 (Connection timed out)]
bluestorm has quit ["Konversation terminated!"]
slipstream has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
stevan__ has quit [Read error: 113 (No route to host)]
Aradorn has joined #ocaml
stevan__ has joined #ocaml
Aradorn has quit []
Aradorn has joined #ocaml
bluestorm has joined #ocaml
Smerdyakov has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
ikaros has quit [Client Quit]
ikaros has joined #ocaml
jacobian has joined #ocaml
ikaros has quit [Client Quit]
ikaros has joined #ocaml
pants1 has quit ["Leaving."]
savanni has left #ocaml []
love-pingoo has quit ["Leaving"]
pattern- has joined #ocaml
Oatmeat|umn has quit ["Leaving"]
Oatmeat|umn has joined #ocaml
pattern has quit [Read error: 110 (Connection timed out)]
pattern- is now known as pattern
diffbavis has quit [Read error: 131 (Connection reset by peer)]
Shimei has quit [Success]
stevan__ has quit [Read error: 110 (Connection timed out)]
velco has quit ["<boris``> reduction ad absurdum is a fallacious method of proof"]
shawn has quit ["This computer has gone to sleep"]
Submarine has joined #ocaml
smimou has joined #ocaml
Shimei has joined #ocaml
shawn has joined #ocaml
love-pingoo has joined #ocaml
diffbavis has joined #ocaml
malc_ has joined #ocaml
postalchris has joined #ocaml
<
postalchris>
Am I crazy, or is there no easy way to convert from Int32 to Num?
<
malc_>
postalchris: you are not crazy
<
postalchris>
Well that stinks!
<
postalchris>
Anybody have code for the hard way already?
chi11 has joined #ocaml
<
malc_>
Int32 -> float -> Num, Int32 -> int -> Num, Int32 -> string -> Num
<
malc_>
pick your poison
chi11 is now known as velco
<
postalchris>
I may try to avoid Int32 altogether.
<
postalchris>
Only Int32->string->Num avoids potential precision loss...
<
postalchris>
No, that's not right... a float can handle an Int32, right?
<
malc_>
float is (IEEE) double in disguise so i would guess so
shawn has quit ["This computer has gone to sleep"]
pango__ has joined #ocaml
jiffyjeff has joined #ocaml
shawn has joined #ocaml
pango__ is now known as pango
pango_ has quit [Remote closed the connection]
gunark has joined #ocaml
<
vorago>
Is it normal to escape loops/recursions with exceptions?
<
vorago>
Does it generate unnecessary overhead?
<
malc_>
i wouldn't call it normal, yet Pervasives defines an exception Exit, so there are situations where it's being used
<
malc_>
yes there's overhead, both space/time
<
malc_>
small though
_JusSx_ has joined #ocaml
_JusSx_ has quit [Client Quit]
ikaros has quit [No route to host]
romanoffi has joined #ocaml
Aradorn has quit []
benny has joined #ocaml
stevan__ has joined #ocaml
benny_ has quit [Read error: 145 (Connection timed out)]
<
love-pingoo>
vorago: espacing loops/recursions is faster
<
love-pingoo>
you immediately jump back to the exception handler without unwinding every recursive call
<
vorago>
malc_, love-pingoo thanks.
<
hcarty>
love-pingoo:Sorry if I misunderstand - are you saying exceptions are faster?
<
love-pingoo>
I am.
<
hcarty>
Cool, thanks
<
love-pingoo>
At least for a deep enough recursion.
<
love-pingoo>
(Of course one has to take care not to install an exception handler at every recursive call..)
<
vorago>
(I've learned basics of ocaml last week and I start to love it. Therefore i'll hang around for a bit...)
jacobian has quit [Read error: 110 (Connection timed out)]
stevan__ has quit [Read error: 110 (Connection timed out)]
dark_light has quit [Read error: 104 (Connection reset by peer)]
postalchris has quit ["Leaving."]
gunark has quit [Remote closed the connection]
shawn__ has joined #ocaml
shawn has quit [Read error: 113 (No route to host)]
love-pingoo has quit ["Connection reset by pear"]
shawn__ has quit [Connection reset by peer]
Submarine has quit ["Leaving"]
er has quit ["Leaving"]
shawn has joined #ocaml
velco has quit ["I'm outta here ..."]
bluestorm has quit ["Konversation terminated!"]
malc_ has quit ["leaving"]
Submarine has joined #ocaml
ikaros has joined #ocaml
smimou has quit ["bli"]