gl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list | http://icfpcontest.org/ !!
GreyLensman has joined #ocaml
ez4 has joined #ocaml
bzzbzz has left #ocaml []
Smerdyakov has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Anvil_Vapre has quit [Read error: 60 (Operation timed out)]
* Smerdyakov is having a helluva time getting ocaml to build with labltk in Cygwin.
_shawn has quit [Ping timeout: 14400 seconds]
Anvil_Vapre has joined #ocaml
buggs has quit [Read error: 110 (Connection timed out)]
ez4 has left #ocaml []
vezenchio has joined #ocaml
cjohnson has quit [Read error: 60 (Operation timed out)]
eno has joined #ocaml
fab_ has quit [Read error: 60 (Operation timed out)]
eno has quit ["BitchX: no additives or preservatives"]
fab_ has joined #ocaml
GreyLensman has quit ["Leaving"]
xolution has joined #ocaml
mrsolo has quit [Connection timed out]
mrsolo has joined #ocaml
Smerdyakov has quit ["sleep"]
Anvil_Vapre has quit [Read error: 60 (Operation timed out)]
Anvil_Vapre has joined #ocaml
Submarine has quit [Read error: 60 (Operation timed out)]
taco2 has joined #ocaml
<taco2> hi there, so i'll try one last time :/
<taco2> i just want to load a float data file into a bigarray.array2, so i tried this :
<taco2> let myFile = openfile "matrix01.data" [ O_RDONLY ] 0;;
<taco2> let m = Array2.map_file myFile float32 c_layout false 4 3;;
<taco2> but it doesnt work ://
monotonom has quit ["Don't talk to those who talk to themselves."]
<Banana> taco2: hang on i'm tring your code...
<taco2> thanx !
<taco2> its really odd, because the elements of m seem to be random float numbers
<Banana> ok i think i know.
<Banana> what is the layout of your file ?
<Banana> i mean is it human readable ?
<taco2> yes, i wrote it with vim, here's the 1st line
<Banana> ok that cannot work then.
<taco2> 1.0 5.0 6.0
<taco2> uh ???
xolution has quit [Operation timed out]
<taco2> why not ?
<Banana> map_file read and write as if it was memeory...
<taco2> ooooooooooooooh
<Banana> the file must be in binary format.
<taco2> damn... i thought "cool, i can load my data in 2 lines of code"
<taco2> :///
<Banana> it's not intended to be a "parser" but as a utility to cache data to disk and read them i think.
<Banana> taco2: it's not that hard...
<taco2> ok i understand... so i guess i have to fscanf then
<taco2> i hope its not, im a fresh newbie
cjohnson has joined #ocaml
taco2 has quit ["Leaving"]
cedricshock has quit ["Good Night"]
Iter has joined #ocaml
wolfman8k has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
<wolfman8k> "No, I was shot and stabbed by friends during rough housing. We did a lot of bad things to each other when bored. Also have been blown up, set on fire, electrocuted, knocked off a three story buildings roof onto concrete, etc. Hrm.. I'm probably a good example of why parents shouldn't tell their kids to go play outside."
GreyLensman has joined #ocaml
mij has quit [Read error: 110 (Connection timed out)]
karryall_ has quit [zelazny.freenode.net irc.freenode.net]
det has quit [zelazny.freenode.net irc.freenode.net]
Hipo has quit [zelazny.freenode.net irc.freenode.net]
Demitar has quit [zelazny.freenode.net irc.freenode.net]
simon- has quit [zelazny.freenode.net irc.freenode.net]
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
vezenchio has quit [zelazny.freenode.net irc.freenode.net]
yella has quit [zelazny.freenode.net irc.freenode.net]
fab_ has quit [zelazny.freenode.net irc.freenode.net]
slashvar1ejcp] has quit [zelazny.freenode.net irc.freenode.net]
maihem has quit [zelazny.freenode.net irc.freenode.net]
cmeme has quit [zelazny.freenode.net irc.freenode.net]
p0lartype has quit [zelazny.freenode.net irc.freenode.net]
vegai has quit [zelazny.freenode.net irc.freenode.net]
srv has quit [zelazny.freenode.net irc.freenode.net]
mmc has quit [zelazny.freenode.net irc.freenode.net]
gl has quit [zelazny.freenode.net irc.freenode.net]
smkl has quit [zelazny.freenode.net irc.freenode.net]
mrsolo has quit [zelazny.freenode.net irc.freenode.net]
mattam has quit [zelazny.freenode.net irc.freenode.net]
Anvil_Vapre has quit [zelazny.freenode.net irc.freenode.net]
Iter has quit [zelazny.freenode.net irc.freenode.net]
buggs has joined #ocaml
Iter has joined #ocaml
Anvil_Vapre has joined #ocaml
mrsolo has joined #ocaml
fab_ has joined #ocaml
vezenchio has joined #ocaml
mattam has joined #ocaml
yella has joined #ocaml
slashvar1ejcp] has joined #ocaml
maihem has joined #ocaml
gl has joined #ocaml
Hipo has joined #ocaml
simon- has joined #ocaml
Hadaka has joined #ocaml
karryall_ has joined #ocaml
det has joined #ocaml
Demitar has joined #ocaml
cmeme has joined #ocaml
p0lartype has joined #ocaml
vegai has joined #ocaml
smkl has joined #ocaml
mmc has joined #ocaml
srv has joined #ocaml
mrsolo has quit [zelazny.freenode.net irc.freenode.net]
mattam has quit [zelazny.freenode.net irc.freenode.net]
Anvil_Vapre has quit [zelazny.freenode.net irc.freenode.net]
Iter has quit [zelazny.freenode.net irc.freenode.net]
karryall_ has quit [zelazny.freenode.net irc.freenode.net]
det has quit [zelazny.freenode.net irc.freenode.net]
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
Demitar has quit [zelazny.freenode.net irc.freenode.net]
simon- has quit [zelazny.freenode.net irc.freenode.net]
Hipo has quit [zelazny.freenode.net irc.freenode.net]
yella has quit [zelazny.freenode.net irc.freenode.net]
vezenchio has quit [zelazny.freenode.net irc.freenode.net]
fab_ has quit [zelazny.freenode.net irc.freenode.net]
buggs has quit [zelazny.freenode.net irc.freenode.net]
slashvar1ejcp] has quit [zelazny.freenode.net irc.freenode.net]
maihem has quit [zelazny.freenode.net irc.freenode.net]
srv has quit [zelazny.freenode.net irc.freenode.net]
p0lartype has quit [zelazny.freenode.net irc.freenode.net]
gl has quit [zelazny.freenode.net irc.freenode.net]
mmc has quit [zelazny.freenode.net irc.freenode.net]
cmeme has quit [zelazny.freenode.net irc.freenode.net]
vegai has quit [zelazny.freenode.net irc.freenode.net]
smkl has quit [zelazny.freenode.net irc.freenode.net]
Riastradh has quit [Killed by ballard.freenode.net (Nick collision)]
Oniroi has quit [Killed by ballard.freenode.net (Nick collision)]
Oniroi has joined #ocaml
Riastradh has joined #ocaml
smkl has joined #ocaml
mmc has joined #ocaml
srv has joined #ocaml
vegai has joined #ocaml
p0lartype has joined #ocaml
cmeme has joined #ocaml
Demitar has joined #ocaml
det has joined #ocaml
karryall_ has joined #ocaml
Hadaka has joined #ocaml
simon- has joined #ocaml
Hipo has joined #ocaml
gl has joined #ocaml
maihem has joined #ocaml
slashvar1ejcp] has joined #ocaml
yella has joined #ocaml
vezenchio has joined #ocaml
fab_ has joined #ocaml
buggs has joined #ocaml
Iter has joined #ocaml
Anvil_Vapre has joined #ocaml
mrsolo has joined #ocaml
mattam has joined #ocaml
kosmikus1away has joined #ocaml
skylan has quit [Remote closed the connection]
GreyLensman has quit [Read error: 104 (Connection reset by peer)]
kosmikus|away has quit [Connection reset by peer]
skylan has joined #ocaml
ayrnieu has quit [Connection timed out]
cjohnson has joined #ocaml
bk_ has joined #ocaml
<wolfman8k> argh, i'm trying to code my first real OCaml program, but I can't stop myself from thinking object-oriented/C++ =(
<simon-> I found an old book on calculus that mentioned functions of multiple arguments without mentioning that they were less pure
<wolfman8k> should i try to right pure functions as much as possible?
<wolfman8k> like, instead of doing work inside a function, instead return a result?
Iter has quit ["Leaving"]
mij has joined #ocaml
lordodo has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
mij has quit [Connection timed out]
lordodo is now known as mij
Smerdyakov has joined #ocaml
kosmikus1away is now known as kosmikus
<simon-> wolfman8k, sorry, that was not directed towards you. I'd say currying is very useful and makes code more straight-forward
<simon-> wolfman8k, was merely wondering, because prior to noticing this paragraph in the book I didn't think functions with multiple arguments were used at all in mathematics outside of computers :)
Riastrad1 has joined #ocaml
Smerdyakov has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
Riastradh has quit [Read error: 110 (Connection timed out)]
<wolfman8k> simon-: i didn't think that it was directoed toward me :) yeah... currying seems to be good stuff, but it seems that it's limited by the order of the function arguments and also with labeled arguments
<Demitar> Anyone having a good tree module lying around?
cjohnson has quit [Read error: 110 (Connection timed out)]
<simon-> wolfman8k, the convenience is limited
cjohnson has joined #ocaml
<simon-> Demitar, there's one in the oreilly book, I don't know how usable it actually is
<wolfman8k> small anonymous functions can be used to get around currying limitations, right?
<Demitar> It depends on what limitations you are trying to get around, but yes, that's how it's usually done I think.
<wolfman8k> like, a simple case might be: let sub a b = a - b
<wolfman8k> then you could do: let sub_from_1 x = sub 1
<wolfman8k> but you would have to do: let sub_one x = sub x 1 (currying not used)
<Demitar> Yes, (minus the x in the first example).
<wolfman8k> oops, yeah
<Demitar> let sub ~a ~b = a - b;; :) But that's not as flexible (since the unused argument would be named).
<wolfman8k> you can't then use this sub function where needed is int -> int -> int, right?
mayhem has joined #ocaml
mayhem has quit [Remote closed the connection]
mayhem has joined #ocaml
monotonom has joined #ocaml
<Demitar> What am I missing?
<Demitar> File "tree.ml", line 21, characters 11-40:
<Demitar> This expression has type ('a * 'a t list) * 'b list
<Demitar> but is here used with type 'a * 'a t list
<Demitar> let rec map f tree =
<Demitar> match tree with
<Demitar> Leaf x -> Node (f x)
<Demitar> | Node (x, lst) ->
<Demitar> Node (f x, (List.map (map f) lst))
Riastrad1 is now known as Riastradh
<Demitar> Well apart from the obviously naive implementation. :)
<Demitar> (The last line is 21 btw.)
<Demitar> Gah!
<Demitar> I knew it had to be a typo, but I never thought to look there.. :)
<wolfman8k> Demitar: are you using ocamlsdl?
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
<wolfman8k> should i use some hungarion notation for variable names that are supposed to hold functions, like f_foo?
<Demitar> wolfman8k, I have used ocamlsdl.
<Demitar> wolfman8k, there are no variable... *eerie voice*
<wolfman8k> Demitar: cool, i'm using it now for my first ocaml program =)
<wolfman8k> Demitar: hm?
<wolfman8k> i meant, for like function arguments
<Demitar> Well ignore that. And I'd say hungarian notation is ugly. :)
maihem has quit ["Read error: 54 (Connection reset by chocolate)"]
<Riastradh> There certainly are variables. There are not _mutable_ variables.
<Demitar> Riastradh, the way you said it is definitely contradicting. :)
<Demitar> mutable
<Demitar> adj : capable of or tending to change in form or quality or
<Demitar> nature;
<Demitar> variable
<Demitar> 4: a symbol (like x or y) that is used in mathematical or
<Demitar> logical expressions to represent a variable quantity
<Demitar> Wasn't there an option to ocamlrun to get a backtrace on a fatal exception?
<Demitar> Hmm... was merely missing from the manpage...
<Riastradh> Demitar, no. Mutability in the context of computer science refers to _assignment_.
<Riastradh> Variables that are not assignable are immutable, but that does not mean they always refer to the same value; their value depends on the input to the function.
<Demitar> Guess that does make sense. Even though my brain works a bit slowly.
<Riastradh> People very often confuse mutability and variability.
cedricshock has joined #ocaml
<Demitar> That's because there are more programmers than computer scientists. A programmer doesn't really care. :)
koa has joined #ocaml
Anvil_Vapre has quit [Read error: 60 (Operation timed out)]
Snark has joined #ocaml
<Snark> slt
<Demitar> Anyone sitting on a neat text -> html generator? wiki / stx / ...
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
ringman has joined #ocaml
skylan_ has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
segphault has joined #ocaml
skylan has quit [Connection timed out]
mattam has quit [Read error: 60 (Operation timed out)]
mattam has joined #ocaml
gim has joined #ocaml
vezenchio has quit ["look at you, hacker, a pathetic creature of meat and bone, panting and sweating as you run through my corridors; how can you ]
<Snark> good night
Snark has left #ocaml []
koa has left #ocaml []
bk_ has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
mayhem has quit [Remote closed the connection]
p0lartype is now known as mayhem
cjohnson has quit [Connection timed out]
<wolfman8k> anyone know about linear cellular automata?
wolfman8k has quit ["Leaving"]
wolfman8k has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Smerdyakov has quit ["eat"]
<buggs> wolfman8k, what interests you about CA ?
<wolfman8k> i'm looking for ways to randomly generate "cool" data sets
<buggs> you looked at wolfram's A New Kind of Science ?
<wolfman8k> no
<buggs> the coolest data i've seen lately came from grammars that described picuters
<buggs> *pictures
<wolfman8k> cool stuff
<wolfman8k> actually, i don't think i need CA yet
<wolfman8k> i'm just gonna start with a randomly generated Catmull-Rom spline
<wolfman8k> are the floats in tuple tuple float * float * float boxed or unboxed?
ne1 has joined #ocaml
Oniroi has quit [Remote closed the connection]
Oniroi has joined #ocaml
GreyLensman has joined #ocaml
* Demitar uses the camlp4 regexp syntax extension and is stunned at it's beauty...
algo has joined #ocaml
<algo> hi
<Demitar> Now we just need something similar for xml.
<Demitar> Hello algo.
GreyLensman has quit [Read error: 104 (Connection reset by peer)]
GreyLensman has joined #ocaml
Smerdyakov has joined #ocaml
magnus has joined #ocaml
<magnus> is it possible create .dlls with ocaml that adhere to a given C interface?
<magnus> or to use ocaml code from within C code
cjohnson has joined #ocaml
<gl> ttp://caml.inria.fr/ocaml/htmlman/manual032.html
<gl> ah
<Demitar> In general it's simpler to make the calls the other way.
<gl> too late.
<Demitar> gl, you were close enough. :)
kosmikus is now known as kosmikus|away
<magnus> in this case i can't make the call the other way
<magnus> because i want to make a plugin in form of a .dll
<Demitar> Actually it might be nastier than you think. I don't have a clue how much you need to do to initalize the caml module and keep the gc happy and all that. (Could be easy but I wouldn't know.)
<magnus> I see...
<magnus> So perhaps time is not ripe yet to use ocaml in plugins
<Demitar> Well OCaml isn't exactly a scripting language. Embedding an ocaml interpreter in an ocaml app isn't trivial either (no doubt implementing you own language is simple since that's one thing it's really good at).
<magnus> i was thinking of using ocaml for programming musical digital signal processing plugins
<magnus> this is what i ordinarily do. I use C++ now but i'm getting frustrated by some language limitations
<Demitar> Well if you want a more authoritive answer I suggest you search the mailing list archives and if you turn up nothing ask on it.
<Demitar> After all, I'm hardly representative for the OCaml community. :-)
<magnus> hehe
<magnus> I'll have a look in the archives, i did some googling earlier
<wolfman8k> hm... should i use a class to make a ring buffer?
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
algo has quit ["Il faut mieux se taire et passer pour un con que de parler et ne laisser aucun doute à ce sujet"]
algo has joined #ocaml
algo has quit [Client Quit]