patc has quit [Read error: 110 (Connection timed out)]
hsuh has quit [Remote closed the connection]
hsuh has joined #ocaml
buluca has joined #ocaml
seafood_ has joined #ocaml
hsuh has quit [Remote closed the connection]
hsuh has joined #ocaml
seafood_ has quit []
hsuh has quit [Remote closed the connection]
hsuh has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
seafood_ has joined #ocaml
hsuh has left #ocaml []
rayno has quit [Connection timed out]
rayno has joined #ocaml
rayno has quit [Remote closed the connection]
yminsky has joined #ocaml
seafood__ has joined #ocaml
<eck>
does OCAMLRUNPARAM work with programs compiled with ocamlopt?
yminsky has quit []
brooksbp has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has quit ["aunt jemima is the devil!"]
mordaunt has left #ocaml []
<flux>
eck, I don't know, but I would assume it does; note that for example backtrace isn't available for ocamlopt prior 3.10.0
buluca has quit [Read error: 113 (No route to host)]
seafood__ has quit [Read error: 110 (Connection timed out)]
ertai has quit [Read error: 110 (Connection timed out)]
love-pingoo has joined #ocaml
ertai has joined #ocaml
vincenz has quit [Read error: 110 (Connection timed out)]
ttamttam has joined #ocaml
JohnnyL has quit ["Leaving"]
gim has quit [Read error: 104 (Connection reset by peer)]
gim_ has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
vincenz has joined #ocaml
marmottine has joined #ocaml
filp has joined #ocaml
patc has joined #ocaml
patc has quit [Read error: 104 (Connection reset by peer)]
brooksbp has quit []
thesnowdog has joined #ocaml
tsuyoshi has quit ["Lost terminal"]
hsuh has joined #ocaml
hsuh has left #ocaml []
jlouis_ has joined #ocaml
netx has joined #ocaml
ertai has quit [Read error: 110 (Connection timed out)]
jlouis has quit [Read error: 110 (Connection timed out)]
tsuyoshi has joined #ocaml
m3ga has joined #ocaml
Tetsuo has joined #ocaml
Torment is now known as Jedai
smimou has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
hkBst has joined #ocaml
buluca has joined #ocaml
Yoric[DT] has joined #ocaml
seafood_ has joined #ocaml
Torment has joined #ocaml
seafood_ has quit []
Abo-Marwan60 has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
buluca has joined #ocaml
thesnowdog has quit [Connection timed out]
sergez has quit [Read error: 113 (No route to host)]
<Yoric[DT]>
hi
<smimou>
hi
smimram has joined #ocaml
smimou has quit [Nick collision from services.]
smimram is now known as smimou
crathman has joined #ocaml
bluestorm_ has joined #ocaml
JohnnyL has joined #ocaml
pango has quit [Remote closed the connection]
bongy has joined #ocaml
pango has joined #ocaml
<bongy>
hi *, i'm newbie ocaml programmer and i have a doubt about looping recursion. I write a simple fact reursive function that not checks if the actual parameter is < 0. If i invoke `fact (-1)` in the interactive environment it looping recursion tell me, rightly: Stack overflow during evaluation (looping recursion?). But my answer is: the interactive env. really performs the fact and fills the stack or it know a priori that my fact wrongs?
<bluestorm_>
is suppose he performs it
<zmdkrbou>
if it says this, then it didn't notice the problem and performed the execution, yes
<bluestorm_>
because if you write a tail-recursing fac, it will loop endlessly, raising no overflow
<bluestorm_>
(because the tail calls are optimized away)
<zmdkrbou>
just write let rec f x = f x and try to apply f ;)
<bongy>
ok thanks you *
bluestorm_ has quit [Remote closed the connection]
filp has quit ["Bye"]
bongy has quit ["Leaving"]
ttamttam has left #ocaml []
<Yoric[DT]>
40 "pass", 23 "fail"
<Yoric[DT]>
And gottago...
Yoric[DT] has quit ["Ex-Chat"]
rillig has joined #ocaml
rillig has left #ocaml []
david_koontz has joined #ocaml
kelaouchi has joined #ocaml
Abo-Marwan60 has quit [Read error: 104 (Connection reset by peer)]
screwt8 has quit [Read error: 104 (Connection reset by peer)]
ita has joined #ocaml
Abo-Marwan60 has joined #ocaml
david_koontz has quit []
screwt8 has joined #ocaml
Mr_Awesome has joined #ocaml
fbvortex has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
ttamttam has joined #ocaml
sergez_ has quit [kubrick.freenode.net irc.freenode.net]
joshcryer has quit [kubrick.freenode.net irc.freenode.net]
joshcryer has joined #ocaml
sergez_ has joined #ocaml
ttamttam has quit [Client Quit]
ttamttam has joined #ocaml
kelaouch1 has joined #ocaml
<fbvortex>
Hey all. I'm relatively new to OCaml and of course still trying to get my head around functional programming. I have a numerical code in C which performs several iterative steps and I'd appreciate some help trying to re-write them in the right style for OCaml.
<fbvortex>
this snippet is called multiple times in the enclosing function, and q increases as it is called later and later; values (c1...cq) are different each time the loop is called
olleolleolle has joined #ocaml
olleolleolle has left #ocaml []
<fbvortex>
Intuition tells me there should be a way to have a function that takes a list of constants c and a list of vectors k and then do the multiplication and summation stuff so that in the end I could do some kind of summing map2 to reduce out the final answer list
<fbvortex>
But I'm not coming up with an elegant way to do it...
<flux>
why is cx not an array c in the original code?
<fbvortex>
because the values of c vary differ based on the order of the invocation
<fbvortex>
rather, based on when that loop is invoked; at each invocation the list of constants has different values
kelaouchi has quit [Read error: 110 (Connection timed out)]
<fbvortex>
Sorry that should be: ynew[i] = y[i] + h * (c1*k1[i] + c2*k2[i] + ... + cq*kq[i])
ttamttam has left #ocaml []
filp has joined #ocaml
brooksbp has joined #ocaml
crathman has quit ["ChatZilla 0.9.79 [Firefox 2.0.0.10/2007111504]"]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
brooksbp has quit []
jeremiah has joined #ocaml
ygrek has quit [Remote closed the connection]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
marmottine has quit ["Quitte"]
filp has quit ["Bye"]
david_koontz has joined #ocaml
brooksbp has joined #ocaml
mbishop_ has joined #ocaml
jeremiah has joined #ocaml
mbishop__ has joined #ocaml
mbishop has quit [Nick collision from services.]
mbishop__ is now known as mbishop
brooksbp has quit []
mrsolo has joined #ocaml
jlouis_ has joined #ocaml
mbishop_ has quit [Read error: 113 (No route to host)]
hkBst has quit ["Konversation terminated!"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
seafood_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
mrsolo_ has joined #ocaml
seafood_ has quit []
mrsolo has quit [Read error: 110 (Connection timed out)]
Jeff_123_ has joined #ocaml
<Jeff_123_>
ocaml's type system pisses me off after I get used to a dynamic language ><
<Yoric[DT]>
I know the feeling, but it's for the greater good :)
* Yoric[DT]
programs mostly in OCaml and JavaScript, so feels the difference quite a lot.
<ita>
Yoric[DT]: it is a way to screw up javascript code in a very nasty manner :-)
<Yoric[DT]>
:)
<Yoric[DT]>
Yeah, I assume so.
<ita>
one call to this and you can be certain any third party library will break, and that {} cannot be trusted anymore
<Jeff_123_>
let a = "hello Yoric" in (Obj.magic a) + 1;;
<ita>
Jeff_123_: i have a big project in a popular dynamic language and i'm craving for a type system
<Yoric[DT]>
JS2 might help you there.
<Jeff_123_>
which langauge?
<Yoric[DT]>
Well, not quite yet.
<ita>
i would almost rewrite the thing in a subset :-/
<ita>
Yoric[DT]: not at all
<Yoric[DT]>
Why not ?
<Yoric[DT]>
Dynamic language + optional static types ?
<ita>
Yoric[DT]: look at the grammar :-)
* Yoric[DT]
slaps ita with every sort of wet trouts.
<ita>
i have spent one week cleaning js code, and js2 leaves more open holes
<Jeff_123_>
you can hack a dynamic langauge to be static I would think
<Jeff_123_>
just takes a bit of extra work
* Yoric[DT]
has spent several weeks cleaning-up the *official* syntax of JS2.
<ita>
not counting the implementation problems such as memory leaks and people mis-using the features because the grammar definition is just too complicated
<Yoric[DT]>
Anyway, gottago.
<Yoric[DT]>
Have a good night.
<Jeff_123_>
g'night
<ita>
Yoric[DT]: have fun
<Yoric[DT]>
:)
Yoric[DT] has quit ["Ex-Chat"]
<ita>
Jeff_123_: yeah, in other words i will make another compiler - great :-)
<Jeff_123_>
Now I'm thikning I have to reorganize my code to get the types to work the way I want. arg
<Jeff_123_>
well, not really
<ita>
Jeff_123_: you are the kind of guy who returns different thing from functions just because polymorphism is great, arent' you ? :-)
<Jeff_123_>
I'm not sure exactly what you mean?
<ita>
here it returns a list, there an int
kelaouch1 has quit [Read error: 110 (Connection timed out)]
<Jeff_123_>
polymorphism is great btw, I wish I had polymorphic exceptions
<ita>
with lots of branches
<Jeff_123_>
oh
<Jeff_123_>
that's easy to do in caml though --- `List l, `Int i
<Jeff_123_>
dont even need to define a time if you're being lazy
<Jeff_123_>
er, type
<ita>
that's difficult enough to discourage one to do that
<Jeff_123_>
Why not do that? In a lot of cases something similar very useful.
Tetsuo has quit ["Leaving"]
<Jeff_123_>
or do you mean discourage using variant types?
pattern has quit [Remote closed the connection]
<ita>
it is complicated enough newbies do not start immediately using that everywhere
<Jeff_123_>
oh
<Jeff_123_>
I'm not a newbie though.
<ita>
whereas in python .. here a return, there other return, variable amount of arguments .. (spaghettis grow immediately)
<fbvortex>
I came up with a solution to the problem I'd mentioned before. let map_wrapper f ci ki = List.map (f ci) ki List.map2 (map_wrapper ( *. )) c k;; This takes care of generating the list of vectors of products, which can then be folded to yield the vector which needs to be multiplied by h and then added to the y vector...
<Jeff_123_>
also I wouldn't teach newbies about variant types
<Jeff_123_>
I like ocaml's variable argument structure :)
<ita>
Jeff_123_: that's what i say hehe - caml has it all right :-)