dylan changed the topic of #ocaml to: OCaml 3.09.1 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
smimou has quit ["bli"]
samx has quit ["Leaving"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
pango__ has joined #ocaml
pango_ has quit [Read error: 110 (Connection timed out)]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
malc_ has quit ["leaving"]
ski has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
Revision17 has quit ["Leaving"]
Herrchen has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Herrchen_ has quit [Read error: 110 (Connection timed out)]
ramkrsna has quit [Read error: 110 (Connection timed out)]
ramkrsna has joined #ocaml
kryptt has joined #ocaml
ramki has joined #ocaml
kryptt has quit ["Download Gaim: http://gaim.sourceforge.net/"]
kryptt has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
kryptt has quit [clarke.freenode.net irc.freenode.net]
ski has quit [clarke.freenode.net irc.freenode.net]
zmdkrbou has quit [clarke.freenode.net irc.freenode.net]
descender has quit [clarke.freenode.net irc.freenode.net]
lispy has quit [clarke.freenode.net irc.freenode.net]
bzzbzz has quit [clarke.freenode.net irc.freenode.net]
tom_p has quit [clarke.freenode.net irc.freenode.net]
tristram has quit [clarke.freenode.net irc.freenode.net]
kryptt has joined #ocaml
ski has joined #ocaml
zmdkrbou has joined #ocaml
descender has joined #ocaml
lispy has joined #ocaml
bzzbzz has joined #ocaml
tom_p has joined #ocaml
tristram has joined #ocaml
bzzbzz has quit [Connection reset by peer]
tristram has quit [clarke.freenode.net irc.freenode.net]
lispy has quit [clarke.freenode.net irc.freenode.net]
kryptt has quit [clarke.freenode.net irc.freenode.net]
descender has quit [clarke.freenode.net irc.freenode.net]
tom_p has quit [clarke.freenode.net irc.freenode.net]
zmdkrbou has quit [clarke.freenode.net irc.freenode.net]
ski has quit [clarke.freenode.net irc.freenode.net]
tristram has joined #ocaml
kryptt has joined #ocaml
ski has joined #ocaml
zmdkrbou has joined #ocaml
descender has joined #ocaml
lispy has joined #ocaml
tom_p has joined #ocaml
bzzbzz has joined #ocaml
zmdkrbou has quit [Connection timed out]
zmdkrbou has joined #ocaml
__DL__ has joined #ocaml
kryptt has quit ["Download Gaim: http://gaim.sourceforge.net/"]
quamaretto has quit ["bye"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Snark has joined #ocaml
danly has quit [Read error: 54 (Connection reset by peer)]
danly has joined #ocaml
smimou has joined #ocaml
jo_l_apache has joined #ocaml
jo_l_apache has quit ["leaving"]
Skal has joined #ocaml
Raziel has quit [Read error: 110 (Connection timed out)]
pango__ is now known as pango
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
malc_ has joined #ocaml
Raziel has joined #ocaml
Raziel has quit [Read error: 110 (Connection timed out)]
Raziel has joined #ocaml
jo_l_apache has joined #ocaml
<taw> uhm, what's the standard way of saving potentially complex data structures to a file and loading them
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
clog has joined #ocaml
smimou has quit ["bli"]
ivans has left #ocaml []
Raziel has quit ["Yo soy goma. Tú eres cola."]
Raziel has joined #ocaml
polux has joined #ocaml
<polux> hi
<zmdkrbou> lo
<polux> i'm just begining to use ocaml as a real language and not like a toy to learn about lambda calcul
<polux> i was wondering if there is possible to notify the compiler than an if..else scope is over without writing else ();
<zmdkrbou> a toy .... mmh that's a funny way to see it
<zmdkrbou> ERF
mauke has quit [Remote closed the connection]
<zmdkrbou> polux: yes
mauke has joined #ocaml
<zmdkrbou> but that's baaad
<polux> zmdkrbou: i mean before today i was just playing with it now i want to use it :)
<polux> zmdkrbou: ok no pb then
<zmdkrbou> mmh wait, i'm not sure you can
<polux> i was just wondering if i was missing some syntax thing
<zmdkrbou> polux: why do you use ocaml if you code things such as "if bla then bli ;" ?
<zmdkrbou> if-then without else is not functionnal programming !!
<pango> polux: what about parenthesis or begin .. end pair around the whole thing ?
<polux> zmdkrbou: i know :)
<polux> pango: ok trying
<polux> zmdkrbou: but is Bigarray.Array2 functionnal programming ?
<polux> i've tried to use it like a inductive structure but it isn't..or i missed something
<zmdkrbou> i never used this ...
<pango> arrays are usually mutable
<zmdkrbou> as it is a two-dimensional *array* it is not really functionnal programming
<pango> (or rather, array contents)
<polux> zmdkrbou: you'd use lists of lists then ?
<pango> I'd use what match the problem at hand
<zmdkrbou> same for me
<zmdkrbou> maybe you have to use Array2 because your problem is not really functionnal
<polux> yes it is not
<polux> but since i'm going to use ocaml a lot
<polux> i wanted to train a bit
<polux> and i etched some problem a friend had written in C
<polux> and tried to write it in ocaml
<malc_> zmdkrbou: i wonder what are you doing here at all.. haskell/clean/whatever seem like a better pick for you
<zmdkrbou> yep, but maybe you can modify the way you're seeing the problem in order to make functionnal programming fit it
<zmdkrbou> malc_: ....
<polux> zmdkrbou: i can describe the problem so you can see if it could be functionnal but i didn't find a way to see it like this
<polux> you have to fill a pyramid
<zmdkrbou> polux: yep
<polux> (is pyramid ok in english ?)
<zmdkrbou> i think so
<polux> i give and example of what kind of pyramid :
<polux> 1 6 4
<polux> 5 2
<polux> 3
<polux> where 5 = abs(1-6)
<polux> 2 = abs(6-4)
<polux> and 3 = abs(5-2)
<zmdkrbou> malc_, btw, are you saying this because i seem to prefer functionnal style when using ocaml ?
<polux> when i saw the pb i thought
<polux> cool a recursive problem
<zmdkrbou> it looks like
<malc_> zmdkrbou: because you sound overzelaous
<polux> let's use ocaml recursive super skills :)
<polux> but i didn't find a functionnal structure to represent it
<pango> polux: the problem is to compute last cell, given first line ?
<polux> pango: no the problem is to fill any pyramid with a height of n
<polux> if there is a solution
<zmdkrbou> malc_: sorry i don't understand this word :s
<pango> I guess they're other constraints you didn't talk about yet
<polux> i tried with lists of lists because it was the only inductive structure i found to represent it
<zmdkrbou> polux: what is given to you at the beginning ?
<zmdkrbou> the first line ?
<malc_> One who is zealous; one who engages warmly in any cause, and
<malc_> pursues his object with earnestness and ardor; especially,
<malc_> one who is overzealous, or carried away by his zeal; one
<malc_> absorbed in devotion to anything; an enthusiast; a fanatical
<malc_> partisan.
<polux> zmdkrbou: the height of the pyramid
<polux> zmdkrbou: i got this problem from a friend in the first year of the computer science school i'm studying in, so it's a basic recursive problem
<polux> they made a java version with the teacher
<zmdkrbou> malc_: ok, thx ... i'm not that much of a "fanatical partisan" (but a little, i admit it)
<polux> he wrote a C version
<polux> and i said him "ocaml has better results in recursive programms because of stack optimisation, etc.."
<polux> and now i'd like to verify it :)
<zmdkrbou> i think he's right
<pango> like, using numbers in 1 .. n * (n+1) / 2 once and only once
<polux> who's right ?
<zmdkrbou> polux: excuse me, you are :)
<zmdkrbou> polux: how do you build the first line ?
<polux> oh ok, i should have written "i told him" maybe
<polux> zmdkrbou: in fact i see the pyramid stuck to the right
<polux> like :
<polux> xxx
<polux> xx
<polux> damn irc
<polux> you see what i mean :)
<polux> first column 1 element
<polux> etc.
<polux> and i fill the first column
<polux> then i try recursively to fill the second
<zmdkrbou> ok so you have 1
<zmdkrbou> then you fill the column 6 5
<zmdkrbou> etc
<polux> etc.
<zmdkrbou> ok
<zmdkrbou> hmm
<zmdkrbou> i don't get the way you obtain the top element of the next column
<zmdkrbou> when you have [1], why do you choose 6 ?
<polux> by picking it in the number not yet used
<pango> zmdkrbou: you don't, you have to try all unused values (with backtracking)
<polux> yes
<zmdkrbou> apfffff backtracking :\
<polux> that's functional !
<pango> you could use continuations for that