mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
_unK has quit [Remote host closed the connection]
thrasibule has joined #ocaml
enthymeme has quit [Quit: brb]
avsm has joined #ocaml
enthymeme has joined #ocaml
Yoric has quit [Quit: Yoric]
Amorphous has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
tmaedaZ is now known as tmaeda
Amorphous has joined #ocaml
sepp2k has quit [Quit: Leaving.]
yakischloba has quit [Quit: Leaving.]
{newbie} has quit [Quit: {newbie}]
_JFT_ has joined #ocaml
tmaeda is now known as tmaedaZ
<_JFT_> Hi, is it possible to declare a type with two type variables in OCAML? something like "type 'v 'f qedge = QEdge of 'v * 'v * 'f * 'f" ?
<mrvn> _JFT_: No, but with a tuple of type vars
<mrvn> # type ('v, 'f) qedge = QEdge of 'v * 'v * 'f * 'f;;
<mrvn> type ('a, 'b) qedge = QEdge of 'a * 'a * 'b * 'b
<_JFT_> oh! ok thank you!
<_JFT_> so any number of type variables can be "declared" as part of the variables tuples?
<mrvn> yes
<_JFT_> awesome, thanks again!
drk-sd has quit [Quit: dodo]
_JFT_ has quit [Quit: _JFT_]
* mrvn has seen a 5 tuple once.
tmaedaZ is now known as tmaeda
tmaeda is now known as tmaedaZ
jonafan_ has joined #ocaml
yakischloba has joined #ocaml
jonafan has quit [Ping timeout: 276 seconds]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
philtor has joined #ocaml
boscop has quit [Quit: Gxis revido!]
caligula__ has joined #ocaml
philtor has quit [Ping timeout: 248 seconds]
caligula_ has quit [Ping timeout: 276 seconds]
dark has joined #ocaml
yakischloba has quit [Quit: Leaving.]
<sc30317> hey all, I have to make a list of random numbers, how can I do that?
<sc30317> one of my friends told me I could do it recursively
<sc30317> I have a random function (will post if necessary)
<mrvn> let make_list n = let rec loop acc = function 0 -> acc | x -> loop (Random.integer :: acc) (x - 1) in loop [] n
<sc30317> mrvn, thanks! But that just returns 5 funs
<mrvn> Random.integer ()
<sc30317> so just put the () after Random.integer?
<sc30317> mrvn, so just put the () after Random.integer?
<mrvn> you have to put your function that gives your a random integer there
<mrvn> if your random function if actually called that and takes a unit then yes
<sc30317> mrvn, thanks a ton!
<sc30317> :D
<mrvn> Ocaml has Random.int, Random.int32, Radnom.nativeint, Ranom.int64, Random.float and Random.bool
dark has quit [Ping timeout: 260 seconds]
<sc30317> mrvn, I learned that, but I had to make a special random. It had to be between -0.5 and 0.5
<mrvn> Random.float seems to be the right thing then plus some adjustment.
<sc30317> mrvn, yea; thats what I ended up doing
dark has joined #ocaml
smimou has quit [Read error: Operation timed out]
<sc30317> mrvn, do you know where those random numbers get saved?
<mrvn> saved?
<sc30317> yea
<sc30317> like when I create that random vector
<mrvn> somewhere on the heap
<sc30317> ok
<sc30317> do you know how I could access that?
<mrvn> read the source for the random module
<sc30317> I have my code if you want to see it
<sc30317> ok I will
<mrvn> or rather check the interface first.
<mrvn> I know you can init the vector. Not sure if you can extract it too
<sc30317> ok
<sc30317> I will try and find it
<sc30317> I have been unsuccessful so far
<sc30317> you would be an awesome resource as a teacher or something
<mrvn> Does it matter? They are supposed to be random.
<sc30317> i wish I could screen with you to get some help on this program
<sc30317> well I need to use them to multiply with another vector
<mrvn> You mean the list you created earlier?
<sc30317> yes
<mrvn> oh, I thought you ment the randoms internal state.
<sc30317> nope, I just mean the random values
<mrvn> I think you should read some ocaml book or introduction.
<sc30317> I have been
<sc30317> this is my first OO programming
<sc30317> its extremely confusing
<sc30317> but obviously very helpful
<mrvn> OO is something else
<sc30317> what is this then
<mrvn> functional
MURBMURB has joined #ocaml
<sc30317> yea
smimou has joined #ocaml
joewilliams is now known as joewilliams_away
enthymeme has joined #ocaml
Modius has quit [Read error: Connection reset by peer]
Modius has joined #ocaml
bzzbzz has quit [Quit: leaving]
<sc30317> mrvn, can I ask you another question?
Mr_Awesome has quit [Read error: Connection reset by peer]
MURBMURB has quit [Quit: MURBMURB]
Mr_Awesome has joined #ocaml
<mrvn> can't stop you
jeff_s_ has joined #ocaml
pookleblinky has joined #ocaml
<sc30317> can someone tutor me in ocaml?
<mrvn> just ask and wait if someone answeres
<sc30317> ok, this is what I have right now in the program that I am working on
<sc30317> I have a list (called anddata)
<sc30317> I need to multiply anddata by the vector created in create_winit
<sc30317> how would I do so?
smimou has quit [Read error: Operation timed out]
<mrvn> Write a vector product or dot product function depending on what you mean
<mrvn> or itemwise skalar product
<sc30317> ok...
<sc30317> but where does the stuff from create_winit get stored?
<sc30317> so that I can use it for the dot product function?
<mrvn> sc30317: in whatever you bind it to
<sc30317> im confused
<mrvn> you can just pass it as argument
<sc30317> oh ok
<mrvn> or bind it to a name and then pass that
<sc30317> how could I bind it to a name?
<mrvn> let name = ...
<sc30317> but when I do this
<sc30317> let x = create_winit(trainData);;
<sc30317> it says that x is an unbounded value
<mrvn> the () are not needed
<sc30317> still gives same error
<mrvn> doubtfull it says that about x
<sc30317> File "sde3.caml", line 54, characters 21-30:
<sc30317> Error: Unbound value trainData
<mrvn> see, not x
<sc30317> yea
<sc30317> but it is coming from the line where I declare x
<mrvn> but trainData isn't bound
<sc30317> yea
<sc30317> how would I bound it in that case?
<mrvn> let traindata = ...
<sc30317> but traindata is something I am passing in?
<mrvn> you can only pass in what you have defined first
<sc30317> that is true
<sc30317> but I am passing in a List
<mrvn> you are not. you are passing in an unbound value.
<sc30317> ok, how do I pass in a bound value?
<mrvn> same way you do now
dark has quit [Remote host closed the connection]
smimou has joined #ocaml
<sc30317> mrvn, I have updated my code a bit. I feel like I am doing what you are saying but it doesn't seem to be working. Can you check it out? the recursive part of the fn is something I have been given
<sc30317> I have also been given a bunch of functions
<sc30317> here is anddata.caml
<mrvn> An if can never have different types in the then and else brnaches
<mrvn> oh, wait, nm.
<sc30317> those should be the same?
<sc30317> yea
<mrvn> val inner : float list * float list -> float = <fun>
<sc30317> yea
<sc30317> what is incorrect about that?
<mrvn> nothing.
<mrvn> at least syntactically
<sc30317> ok
<sc30317> but if you use the anddata.caml
<sc30317> and use anddata.caml and thatfile.caml
<sc30317> then you try to run inner(anddata, weight);;
<sc30317> you get this error
<sc30317> Error: This expression has type
<sc30317> float list list * ('a list list -> float list)
<sc30317> but an expression was expected of type float list * float list
<mrvn> Error: This expression has type float list list * float list but an expression was expected of type float list * float list
<sc30317> yup
<sc30317> thats the erro
<mrvn> You can't multiply a matrix by a vector with this
<sc30317> r
<sc30317> that was what I was told...
<mrvn> Then don't apply a dot product on a matrix and vector.
<sc30317> yea I wont
<sc30317> im figuring it out now :(
<sc30317> I have to take the last of each of the numbers in anddata
<mrvn> You might also want to read more about pattern matching instead of using List.hd/tl
<sc30317> and multiply it by that vector I created
<sc30317> I will
smimou has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
jeff_s_ has quit [Quit: jeff_s_]
smimou has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
Yoric has joined #ocaml
mal`` has quit [Ping timeout: 240 seconds]
ttamttam has joined #ocaml
oc13 has joined #ocaml
mal`` has joined #ocaml
enthymeme has joined #ocaml
ygrek has joined #ocaml
ttamttam has quit [Quit: Leaving.]
avsm has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
smimou has quit [Read error: Operation timed out]
ulfdoz has quit [Ping timeout: 265 seconds]
_zack has joined #ocaml
ttamttam has joined #ocaml
smimou has joined #ocaml
_zack has quit [Read error: Connection reset by peer]
Yoric has quit [Quit: Yoric]
f[x] has joined #ocaml
ikaros has joined #ocaml
Yoric has joined #ocaml
rwmjones is now known as rwmjones_biab
valross has quit [Quit: Ex-Chat]
munga has joined #ocaml
rwmjones_biab is now known as rwmjones
pimmhogeling has joined #ocaml
julm has quit [Quit: leaving]
julm has joined #ocaml
julm has quit [Client Quit]
ygrek has quit [Ping timeout: 245 seconds]
smimou has quit [Read error: Operation timed out]
julm has joined #ocaml
julm has quit [Quit: leaving]
smimou has joined #ocaml
julm has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
julm has quit [Quit: leaving]
boscop has joined #ocaml
julm has joined #ocaml
Gooffy has joined #ocaml
jcaose has joined #ocaml
jcaose_ has joined #ocaml
jcaose_ has quit [Client Quit]
jcaose has quit [Client Quit]
jcaose has joined #ocaml
jcaose has left #ocaml []
jcaose has joined #ocaml
jcaose has quit [Client Quit]
jcaose has joined #ocaml
jcaose has quit [Client Quit]
jcaose has joined #ocaml
_zack has joined #ocaml
jcaose has quit [Client Quit]
jcaose has joined #ocaml
jcaose has quit [Client Quit]
jcaose has joined #ocaml
_andre has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
smimou has quit [Read error: Operation timed out]
munga has quit [Ping timeout: 248 seconds]
avsm has quit [Quit: Leaving.]
pimmhogeling has quit [Remote host closed the connection]
smimou has joined #ocaml
oc13 has quit [Quit: Leaving.]
ygrek has joined #ocaml
javax_ has joined #ocaml
drk-sd has joined #ocaml
Gooffy has quit [Quit: Leaving.]
pimmhogeling has joined #ocaml
boscop has quit [Ping timeout: 245 seconds]
boscop has joined #ocaml
{newbie} has joined #ocaml
th5 has joined #ocaml
orbitz has quit [Ping timeout: 256 seconds]
jimmyb2187 has quit [Ping timeout: 240 seconds]
Mr_Awesome has quit [Ping timeout: 245 seconds]
mutewit has quit [Ping timeout: 264 seconds]
orbitz has joined #ocaml
jimmyb2187 has joined #ocaml
Mr_Awesome has joined #ocaml
derdon has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
thieusoai has joined #ocaml
thieusoai has quit [Client Quit]
thieusoai has joined #ocaml
tmaedaZ is now known as tmaeda
{newbie} has quit [Quit: {newbie}]
sc30317 has quit [Ping timeout: 260 seconds]
sc30317 has joined #ocaml
tmaeda has quit [Read error: Connection reset by peer]
pimmhogeling has quit [Ping timeout: 245 seconds]
AxleLonghorn has joined #ocaml
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
slash_ has joined #ocaml
_zack has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has left #ocaml []
slash_ has quit [Quit: leaving]
slash_ has joined #ocaml
<sc30317> how can I fix this error?
ccasin has joined #ocaml
<sc30317> Error: This expression has type float list list * float list
<sc30317> but an expression was expected of type float list * float list
<thelema> change your expression type or change your function type
<thelema> what you're trying to do is pass a list of fl's where a fl is expected.
<sc30317> well I would like to pass a list of fl's
<thelema> you either need to use a fl instead of a fl list, or change your function to accept a fl list.
<thelema> "fl" = "float list"
<sc30317> I thought my function did accept float lists
<thelema> your function accepts a pair of float lists
<thelema> you're trying to give it a float list list <- note the second "list"
<sc30317> yea I saw that
<sc30317> but I don't understand why it is making a second list
<thelema> how are you creating that expression?
<sc30317> the one that says (* this will be inner.caml *)
<orbitz> what's with all the (foo)'s?
<thelema> your tail function doesn't get the last row.
joewilliams_away is now known as joewilliams
<thelema> (on line 32)
<sc30317> don't worry about those now, those are for reference
<derdon> sc30317: indentations of 2 spaces are recommended
<orbitz> for reference?
<orbitz> sc30317: are you purposly passing tuples or just dnot realize you dn't writ eocaml like this?
<sc30317> orbitz, I didn't realize it
<orbitz> sc30317: what document are you learning ocaml from?
<thelema> let rec inner = function [],[] -> 0.0 | i::is,w::ws -> i*.w +. inner (is,ws) | _ -> failwith "different length lists"
<sc30317> thelema, what is that for?
<thelema> sc30317: that's just how I'd write [inner].
<sc30317> oh ok
<sc30317> what would I pass to it?
<thelema> there's no problem in the code you pasted: http://codepad.org/hd43gon5
<thelema> same as what you wrote - a pair of lists of floats.
<sc30317> ok
<sc30317> be back in a little!
<ttamttam> hello
<ttamttam> anybody having a 64 bit platform and bitstring installed ?
<thelema> hi
<thelema> not I, as much as I'd love to play with bitstring
<ttamttam> I'm wondering what BITSTRING { 1 lsl 30 - 1 : 31 } would return?
<thelema> this should be just fine in both 32 and 64-bit mode
<thelema> 1 lsl 30 - 1 = 0x7FFF
<ttamttam> Oups.
<thelema> err, more F's
<ttamttam> I was meaning BITSTRING { 1 lsl 31 - 1 : 31 }
<ttamttam> No. Should be ok. Sorry for the nois…
<thelema> my mistake too - 1 lsl 30 - 1 = 0x3FFFFFFF (in range without problems)
AxleLonghorn has left #ocaml []
<ttamttam> My concern is that in bitstring.ml there is a module named "I" for bitwises operations on ints, with int <= 31 bits
<ttamttam> But it makes use of max_int in some places
<thelema> your calculation overflows int31, but the final result is as intended.
Yoric_ has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
Yoric_ is now known as Yoric
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
deavid is now known as _deavid_old
mrvn has quit [Ping timeout: 246 seconds]
yakischloba has joined #ocaml
deavid has joined #ocaml
mrvn has joined #ocaml
jonafan_ is now known as jonafan
avsm1 has joined #ocaml
_deavid_old has quit [Quit: Goodbye.]
mutewit has joined #ocaml
ygrek has joined #ocaml
<sc30317> thelema, im back
<sc30317> are you there?
th5 has quit [Quit: th5]
<thelema> yes
<sc30317> I used that function you gave me
<sc30317> and I am passing in a list
<sc30317> and it is not working properly
<sc30317> here is the list I have to pass in
<sc30317> and here is my error
<sc30317> Error: This expression has type float list list * float list list
<sc30317> but an expression was expected of type float list * float list
<thelema> that's a list of lists.
<sc30317> same as before
<sc30317> yea
<sc30317> I have to pass in a list of lists
<sc30317> sorry if I wasn't clear before
<thelema> Then you need a different function.
<sc30317> ok
<thelema> Your current function (and my rewrite) only takes a float list, not a float list list
<sc30317> would I just need to change that inner function that you gave me?
<sc30317> yea that is what I am figuring out
<sc30317> how would I make it accept a float list listT?
<sc30317> *float list list
<thelema> You could change yours or mine.
<thelema> It depends on what you want it to do - do you want a matrix * vector multiply?
<sc30317> yes
philtor has joined #ocaml
<thelema> the result of that is not a float, but a vector.
<thelema> or even a matrix...
<sc30317> result of what?
<thelema> result of matrix*vector
<sc30317> I know
<sc30317> that is what I want in the end
<thelema> do you know how to multiply a vector by a matrix?
<sc30317> yes
<sc30317> in math, not in ocaml
<thelema> first you have to decide whether you want to left multiply or right-multiply
<sc30317> right multiply
<sc30317> so [a,b;c,d] *[d;e]
<sc30317> commas indicate rows, semicolons indicate columns
<thelema> = [a * d + b * e; c*d + d * e]
<sc30317> correct
<thelema> i.e. List.map (inner vect) matrix
<sc30317> so you can take that and convert the list to a matrix?
<sc30317> *take the list?
<thelema> let mult matrix vect = List.map (fun row -> inner row vect) matrix
<sc30317> thelema, you are confusing me
<thelema> fair enough. Do you know what List.map does?
<sc30317> im assuming it maps a List into a matrix
<thelema> no, it maps a list into another list
<sc30317> oh ok
<thelema> it applies a function to each element of a list to produce a new list
<sc30317> sounds good
<sc30317> sounds like what I need
<sc30317> so what does List.map (inner vect) matrix do?
<sc30317> it takes inner vect and moves it to a list matrix?
<thelema> oops, inner takes a pair, so you can't curry.
jcaose has left #ocaml []
<thelema> List.map (fun row -> inner (vect,row)) matrix
jcaose_ has joined #ocaml
<sc30317> should I have a function that does that?
philtor has quit [Ping timeout: 276 seconds]
<thelema> yes, you can use the inner function to do the matrix multiply
<sc30317> ok
<sc30317> so if I am given anddata
<sc30317> and I am creating a new vector using create_winit(anddata)
<sc30317> then I would do inner(anddata, create_winit(anddata)) to multiply the two together?
<thelema> no.
<thelema> you can use the inner function to multiply one row of the matrix by your vector to produce one entry in the output vector
<sc30317> how would I do so?
yakischloba has quit [Quit: Leaving.]
<thelema> for each row of your matrix, you'll produce one entry in the final vector, right?
<sc30317> correct
{newbie} has joined #ocaml
<thelema> let's write it out without List.map
<sc30317> ok sounds good
<sc30317> would it be easier to PM?
<thelema> let multiply (matrix,vector) =
<sc30317> or do you want to stay on this channel
<thelema> if matrix = [] then []
<sc30317> ok, im following you so far
<thelema> else inner(List.hd matrix,vector) :: multiply(List.tl matrix,vector)
<sc30317> ok
<sc30317> that appends the inner to the multiplication
<thelema> yup.
<sc30317> what comes next?
<thelema> you'll have to add [rec] to that because it's recursive
<sc30317> yea I was just about to mention that
<thelema> and try it to see if it does what you want.
f[x] has quit [Ping timeout: 248 seconds]
<sc30317> that gives me
<sc30317> Exception: failure "tl"
<sc30317> should that List.tl matrix be in parenthesis?
<thelema> no, there'd be a type error...
<sc30317> oh ok
<thelema> you included the if part?
<sc30317> yes
<sc30317> you want me to pastebin what I have?
<thelema> put it in codepad
<sc30317> okk
<thelema> ok, try using a match statement to deconstruct matrix instead of the if/else/hd/tl
<thelema> (as I did in my implementation of inner)
<sc30317> ok h/o
<sc30317> like this?
<sc30317> let rec multiply_test - function [].[] -> 0.0 | m::ms, w::ws -> m*.w +. multiply_test (ms, ws) | _ -> failwith "no"
yakischloba has joined #ocaml
<thelema> [],_ -> []
<sc30317> where does that go?
<sc30317> after function?
<thelema> m:ms, v -> inner m v :: multiply_test ms v
<sc30317> could you paste the whole line?
<sc30317> its difficult to understand the fragmentst
<sc30317> like this?
<sc30317> let rec multiply_test = function [].[] -> 0.0 | m::ms, v -> inner m v :: multiply_test ms v | _ -> failwith "no"
<thelema> that's closer.
<thelema> your first match case should be [],_ -> []
<sc30317> instead of [].[] -> 0.0
<thelema> yes
<thelema> the result of multiplying an empty matrix by any vector is an empty vector, no?
<sc30317> yes
<sc30317> this is true
<sc30317> so this is what I have now
<sc30317> let rec multiply_test = function [],_ -> [] | m::ms, v -> inner m v :: multiply_test ms v | _ -> failwith "no"
_zack has joined #ocaml
<thelema> Your match says an empty matrix times an empty vector is 0.0
<sc30317> not anymore :D
<thelema> You don't need the last match - your first two cover all cases now.
<sc30317> ok
<sc30317> so now it is
<sc30317> let rec multiply_test = function [],_ -> [] | m::ms, v -> inner m v :: multiply_test ms v
<thelema> looks good to me.
<sc30317> that comes up with
<sc30317> Error: This function is applied to too many arguments;
<sc30317> maybe you forgot a `;'
<thelema> ah, the last bit should be:
<thelema> multiply_test (ms,v)
<thelema> similarly for inner - [inner (m,v)]
_unK has joined #ocaml
avsm1 has quit [Ping timeout: 264 seconds]
jcaose_ has quit [Remote host closed the connection]
<sc30317> ok no errors now
drk-sd has quit [Quit: aw]
<sc30317> but I am still not sure it works
<thelema> test it.
<sc30317> working on it :)
tmaedaZ has joined #ocaml
tmaedaZ is now known as tmaeda
<sc30317> they have different length lists everytime
<sc30317> because you are always multiplyling a matrix by a vector
<thelema> how big is your matrix?
<thelema> 4x4?
<sc30317> yea 4x4
<thelema> how big is your vector?
<sc30317> never mind
<sc30317> it is a 3x4
<sc30317> and you are multiplying it by a 1x3
<thelema> each row of the matrix is 3 elements?
<sc30317> sorry 3x1
<thelema> the vector should be a row vector, even if it's being used as a column vector.
<sc30317> yea
<thelema> but the important thing is that the number of elements in each row (= list entry) of the matrix should be the same as the number of elements in the vector
<sc30317> yea
<thelema> the error you get indicates that isn't so.
<sc30317> oh ok
<sc30317> got it fixed! :)
<sc30317> I figured out my problem, but that brought on another problem
<sc30317> how would I take the last element of each List out?
<thelema> given a list, you want that list without its last element?
<thelema> you should be able to write a function to do this easily - it's not in any stdlib.
<sc30317> oh ok
<sc30317> I think I can write it
<sc30317> I will try
<sc30317> later, I need a break
avsm has joined #ocaml
ttamttam has quit [Quit: Leaving.]
oc13 has joined #ocaml
tmaeda has quit [Ping timeout: 245 seconds]
slash_ has quit [Quit: Lost terminal]
tmaeda has joined #ocaml
slash_ has joined #ocaml
slash_ has quit [Client Quit]
slash_ has joined #ocaml
_zack has quit [Quit: Leaving.]
Yoric has quit [Quit: Yoric]
slash_ has quit [Quit: Lost terminal]
slash_ has joined #ocaml
tmaeda is now known as tmaedaZ
enthymeme has joined #ocaml
Submarine has joined #ocaml
ttamttam has joined #ocaml
slash_ has quit [Quit: leaving]
slash_ has joined #ocaml
ikaros has joined #ocaml
<rwmjones> matthieu_, just replied to your email on bitstring, although google groups seems to have munched it (for now anyhow)
<thelema> rwmjones: ttamttam had the bitstring question earlier
<rwmjones> ok I saw it ... should be fine afaik
{newbie} has quit [Read error: Operation timed out]
bzzbzz has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
sepp2k has joined #ocaml
ztfw has joined #ocaml
{newbie} has joined #ocaml
pimmhogeling has joined #ocaml
enthymeme has joined #ocaml
Alpounet has quit [Ping timeout: 256 seconds]
tmaedaZ is now known as tmaeda
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 245 seconds]
<ygrek> rwmjones, btw bitstring.syntax doesn't have dependency on bitstring in META, is that intended?
<ygrek> it is contrary to guidelines on cocan wiki and to common practice
<rwmjones> ygrek, ummm ... I always throw my hands up in the air when there is a question about META files
<rwmjones> they are voodoo, particularly when they involve syntax extensions
<rwmjones> however if you want to send a patch ...
slash_ has quit [Quit: Lost terminal]
<ttamttam> rwmjones: thanks. I just received it ;-)
<ttamttam> About the META: I did some modifications locally, but tested only with the toplevel
<ttamttam> from memory : remove unix.cma, bitstring.cma from archives lines
<ttamttam> and added the dependency ygrek is suggesting
<ygrek> I am testing it currently, pity that ocamlfind doesn't put quotes properly around arguments to -pp
<ygrek> when printing I mean
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
slash_ has joined #ocaml
tmaeda has quit [Ping timeout: 264 seconds]
ReachingFarr has joined #ocaml
ulfdoz has joined #ocaml
_andre has quit [Quit: *puff*]
slash_ has quit [Quit: Lost terminal]
<ReachingFarr> So ocamlc is giving me an syntax error on the line 54 at characters 0-0, when my file only has 53 lines. I assume I'm doing something exceedingly wrong. Any ideas?
<ygrek> add -pp camlp4o - maybe the error will be better
tmaeda has joined #ocaml
<ygrek> probably `in` after `let`, try adding ;; betweed toplevel definitions to pinpoint the error location
<ReachingFarr> yrek: Thanks. That helped.
ccasin has quit [Quit: Leaving]
<ReachingFarr> So on Fedora when I install camlp4 I get a camlp4o.cma but no camlp4o executable. Any idea on why this might be?
<ygrek> fedora packagers try to minimize space needed (sacrificing speed) ?
<ygrek> interesting, is it possible to build camlp4o executable on user machine in postinstall? cause it basically is camlp4 + some cmo ....
Associat0r has joined #ocaml
<ReachingFarr> ygrek: I'll look into it later. More pressing concerns now :-)
<ReachingFarr> Like this line: fprintf ofile ("digraph " ^ file_name ^ " {\n");
<ReachingFarr> It doesn't like the type of the part in parentheses.
<Camarade_Tux> what does it say?
<ygrek> of course it doesn't, format string should be string literal
<ReachingFarr> ygrek: Ok. Got it.
Accidus has quit [Remote host closed the connection]
<ReachingFarr> This is what I get for writing my Ocaml code when I'm drunk. I have to redo all the crazy stuff I did later.
* Camarade_Tux blames his eyes for not seeing the error :P
oc13 has quit [Ping timeout: 276 seconds]
ttamttam has quit [Quit: Leaving.]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
drk-sd has joined #ocaml
Associat0r has quit [Quit: Associat0r]
matthieu_ has quit [Ping timeout: 260 seconds]
Submarine has quit [Ping timeout: 258 seconds]
slash_ has joined #ocaml
slash_ has quit [Client Quit]
jeddhaberstro has joined #ocaml
derdon has quit [Quit: derdon]
enthymeme has joined #ocaml
<rwmjones> ygrek, trouble is, I have no way to evaluate if that is better than the existing :-(
<ygrek> rwmjones, trust me :)
<rwmjones> ReachingFarr, what's the Fedora problem? can you open a bug about it (http://bugzilla.redhat.com/) too as I'm a bit busy just at this minute
<rwmjones> ygrek, I think I probably do
<ygrek> don't you have ocamlfind installed?
<rwmjones> yes, I always use ocamlfind
<rwmjones> I just don't understand META files
<rwmjones> I'll have a look, but it's going to be tomorrow, busy now
<ygrek> so, create some simple test ml file, old META - you need `-package bitstring, bitstring.syntax` to compile correctly, new ones - only `-package bitstring.syntax`
<ygrek> same goes for bitstring.persistent
<ygrek> there is nothing hard in METAs - from the user level - just the notation to manage dependencies
slash_ has joined #ocaml
<ygrek> ok
slash_ has quit [Quit: leaving]
slash_ has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
mutewit has quit [Quit: leaving]
slash_ has quit [Quit: leaving]
slash_ has joined #ocaml
WuJiang has quit [Ping timeout: 252 seconds]
joewilliams is now known as joewilliams_away
jcaose has joined #ocaml
ulfdoz has quit [Ping timeout: 246 seconds]
mutewit has joined #ocaml
fremo___ has quit [Ping timeout: 260 seconds]
fremo_ has joined #ocaml
avsm1 has quit [Quit: Leaving.]
rwmjones has quit [Ping timeout: 256 seconds]
rwmjones has joined #ocaml
<sc30317> why can I not do this?
pimmhogeling has quit [Ping timeout: 245 seconds]
<sc30317> (* REMOVE THE LAST ELEMENT OF EACH ROW *)
<sc30317> let last_element_remove(trainData)=
<sc30317> for i = 0 to length(trainData) do
<sc30317> List.nth (trainData) i
<sc30317> done
<sc30317> ;;
<sc30317> I get Exception: Failure "nth".
pimmhogeling has joined #ocaml
<thelema> yes, you can't get element #10 of a 10-element list.
<thelema> They're numbered 0 to 9
jcaose has quit [Remote host closed the connection]
boscop_ has quit [Read error: Connection reset by peer]
slash_ has quit [Quit: Lost terminal]
slash_ has joined #ocaml
_unK has quit [Remote host closed the connection]
dmarkey has quit [Ping timeout: 256 seconds]
dmarkey has joined #ocaml