gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
krankkatze has quit [Quit: leaving]
krankkatze has joined #ocaml
ulfdoz has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
ulfdoz has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
krankkatze has quit [Quit: leaving]
krktz has joined #ocaml
Edward_ has quit [Ping timeout: 264 seconds]
philtor has joined #ocaml
<albacker> while trying to compile this http://ocamlgraph.lri.fr/demo.ml i get this error : http://pastebin.com/rA6RcPjq . what am i doing wrong?
<gildor> albacker: you are probably missing an include directory
<gildor> ocamlc -I +ocamlgraph graph.cma kot.ml
cthuluh has quit [Read error: Operation timed out]
cthuluh has joined #ocaml
<xl0> Forgice my ignorance, I'm only evaluating the language's features. Is it possible to have "ato-generating" lists? Like, a list that gets symbols from a stream as needed?
<xl0> Probably, throgh the C interface?
<orbitz> any lwt experts here?
Amorphous has quit [Ping timeout: 252 seconds]
<schmrkc> xl0: You mean something like a lazy list?
<schmrkc> xl0: Obviously you can get stuff from a stream and append to a list.
<schmrkc> xl0: I'm confused by the "as needed" bit.
<schmrkc> xl0: oh sorry
<schmrkc> xl0: I thought I was in #lisp :D
<schmrkc> you can get stuff from a stream anyway. dunno what the "as needed" bit is ;)
<xl0> Say, I'd like to parse the input stream using pattern matcing over a list.
<orbitz> xl0: a list, no, the list type is eager in ocaml, but the stream module lets you make lazily evaluate dobjects, and it has camlp4 syntax that look sliek lists [< .. >]
<orbitz> xl0: use the recursive descent parser then
<orbitz> not sure if it's proper style but works out
<xl0> Thanks, I'll look into this after I read about camlp4. ;)
Amorphous has joined #ocaml
<orbitz> you don't need to know anything abotu camlp4 to do this
<xl0> I don't understand the [< .. >] syntax yet, but I've only started looking at ocaml.
BiDOrD has quit [Ping timeout: 252 seconds]
<orbitz> you just quote things that aren't streams with '
BiDOrD has joined #ocaml
<orbitz> 'f' becuse ''fe'
Amorphous has quit [Ping timeout: 276 seconds]
<xl0> So, these objects aren't lists, but you can use the same syntax to access/manipulate them?
<xl0> Sorry, I should probably start reading before asking more questions. ;)
<orbitz> xl0: not quite
<orbitz> to get the next element in a stream you do Stream.next or Stream.peek
<orbitz> xl0: the parser syntax lets you do pattern matching to extract avlues out, for parsing
eldragon has quit [Ping timeout: 245 seconds]
Amorphous has joined #ocaml
eldragon has joined #ocaml
dark has quit [Remote host closed the connection]
joewilliams is now known as joewilliams_away
khia0 has joined #ocaml
khia0 has left #ocaml []
valross has joined #ocaml
cthuluh has quit [Read error: Operation timed out]
cthuluh has joined #ocaml
<strlen> i am a little confused by this error message---
<strlen> Values do not match:
<strlen> val resolve_conflict_vc : '_a V.t list -> '_a
<strlen> is not included in
<strlen> val resolve_conflict_vc : 'a V.t list -> 'a
<strlen> what is different between '_a and 'a?
<strlen> this was intended to be a partial application
<strlen> (currying)
<strlen> bitbckt: thanks!
<strlen> bitbckt: appreciate it. got it figured out
<strlen> and bookmarking that faq
<bitbckt> No problem. Enjoy. :)
kmicinski has joined #ocaml
lewis1711 has joined #ocaml
LionMadeOfLions has quit [Ping timeout: 265 seconds]
LionMadeOfLions has joined #ocaml
lewis1711 has quit [Quit: Leaving.]
lewis1711 has joined #ocaml
ulfdoz has joined #ocaml
ygrek has joined #ocaml
philtor has quit [Ping timeout: 245 seconds]
valross has quit [Quit: Ex-Chat]
ulfdoz has quit [Ping timeout: 265 seconds]
Yoric has joined #ocaml
lewis1711 has left #ocaml []
Man_of_Wax has quit [Ping timeout: 250 seconds]
dsturnbull has quit [Ping timeout: 252 seconds]
ygrek has quit [Ping timeout: 245 seconds]
Tianon has quit [Ping timeout: 255 seconds]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
ygrek has joined #ocaml
Yoric has quit [Quit: Yoric]
ikaros has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
yezariaely has joined #ocaml
th5 has joined #ocaml
rixed_ has quit [Remote host closed the connection]
Tianon has quit [Ping timeout: 260 seconds]
DimitryKakadu has joined #ocaml
Snark has joined #ocaml
ftrvxmtrx has joined #ocaml
Yoric has joined #ocaml
kmicinski has left #ocaml []
<strlen> okay, my first ocaml project. just for fun, vector clocks: https://github.com/afeinberg/ocaml-vclock
<strlen> probably lot of poor practices there, but i am very curious to hear criticisms and suggestions on how to improve
<flux> what -is- vector clock?-)
DimitryKakadu has quit [Read error: Connection reset by peer]
DimitryKakadu has joined #ocaml
<strlen> flux: a take on leslie lamport's algorithm of finding happened-before relations in distributed systems
<strlen> you use it to determine a partial order e.g., between multiple versins of data in a distributed file system or database
ygrek has quit [Ping timeout: 245 seconds]
<strlen> the advantage over using a wall clock time is that you don't have to worry about synchronizing a clock between systems (there's always some clock skew) and it can also let you know if two versions are concurrent to each other (e.g., if there's a network split)
kakadu has joined #ocaml
DimitryKakadu has quit [Read error: Connection reset by peer]
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 264 seconds]
<albacker> I did like gildor told me yestarday to compile http://ocamlgraph.lri.fr/demo.ml and i get http://pastebin.com/CfXhAnYk
<adrien> you need to install graphviz
ttamttam has joined #ocaml
ygrek has joined #ocaml
<albacker> oh thanks
<albacker> i installed graphviz-dev graphviz ocamlgraph-editor libgv-ocaml and it's still showing the "sh: gv not found" part of the error. the dot lines has disapeared.
<adrien> gv is ghostview
<adrien> it's a ps (postscript) viewer
<albacker> ok it works.
<albacker> that's awsome.
<albacker> thankyou adrien
<adrien> :-)
stdDoubt has joined #ocaml
<stdDoubt> how to create a matrix in ocaml? (specificType array array)?
<adrien> stdDoubt: Array.make_matrix :p
kakadu_ has quit [Quit: Konversation terminated!]
kakadu_ has joined #ocaml
<stdDoubt> and if we wanted with 3 dimensions how would we do it?
<adrien> 'a array array array
<adrien> note that all columns/lines/... don't have to have the same length
<stdDoubt> my doubt is in the argument to Array.create numberOfPositions (what we would put here to initialize the array?)
<stdDoubt> suppose we want to create int array array (without using the make matrix)... how would we create the first array? Array.create desiredLength (??)
<adrien> see Array.make and Array.init, and read their documentation/description
th5 has quit [Ping timeout: 276 seconds]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
<stdDoubt> thanks
<stdDoubt> doubt solved
<adrien> :-)
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
<stdDoubt> I have one doubt I have two functions that return unit. I want to use an invariant calculation before constructing the object. When I do the let ... in bindings followed by two commands (separated by ;) I get a syntax error but if put those commands like let a = command in let b = command in the compiler does not complain
<adrien> code :P
<adrien> (pastebin?)
<stdDoubt> going to paste it
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
<stdDoubt> here it is
<adrien> what's the issue?
<adrien> and /me late
<stdDoubt> my doubt is instead of writing the let a = (...) in let b = (...) in I do calculateTimeDerivateExpressionMatrix model timeDerivateExpressionVector; calculateJacobianExpressionMatrix model jacobianExpressionMatrix; let odeModelFun = (... ) in object.... I get a syntax error
<stdDoubt> why do I have to write let a = function (that changes the array and returns unit) in (the same goes for let = b) and cannot write a sequence of commands (separated by ; without using the let)
<adrien> so, you don't use the variables "a" and "b"? (first, in these case, you could use "let ()" instead)
<adrien> and, I don't know and have to run
yezariaely has left #ocaml []
<stdDoubt> wouldn't be more correct to use the sequence operator?
<stdDoubt> like in the printf?
<stdDoubt> when are we forced to use let () ?
<stdDoubt> it works with let () (by the way)
_mpu has joined #ocaml
_mpu has left #ocaml []
avsm has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
rks has quit [Quit: cours]
Man_of_Wax has joined #ocaml
seafood has joined #ocaml
seafood has quit [Quit: seafood]
joewilliams_away is now known as joewilliams
stdDoubt has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
decaf has joined #ocaml
philtor has joined #ocaml
avsm has joined #ocaml
boscop_ is now known as boscop
<joko> Hello, I want to create a record type whose field is a Map structure. So, I define the module (e.g. module IntMap = Map.Make ...) and then the tpye would be sth like type new_t = { t_intmap : IntMap ; t_otherfield : int } or what???
<joko> type *
<orbitz> the key is your record?
<orbitz> or the value?
<orbitz> ohh nevermind
<joko> orbitz: right, forget about the key of my map structure (the name suggests an int as a key)
<orbitz> type new_t = { t_intmap : IntMap.t ; ... }
<orbitz> i ebleive
<joko> orbitz: it mentions that the type constructor expects 1 argument
joewilliams is now known as joewilliams_away
<orbitz> joko: wut?
<orbitz> what type constructor?
<hcarty> joko: You need something like "type 'a t = { 'a t_intmap : 'a IntMap.t ; ... }
<orbitz> ohh 'a yes i forgot that
<hcarty> joko: I may have the syntax a bit off, but it's something close to that.
<orbitz> i think it's just
<orbitz> type 'a t = { t_intmap : 'a IntMap.t }
<hcarty> orbitz: I think you're right
<joko> Thank you very much both
<joko> Could you help me understand why I have to write it this way/
<joko> ? *
<hcarty> joko: 'a is the type of the map's value
<hcarty> (value as in "key, value pair")
<hcarty> 'a IntMap.t will always have integers as keys
<orbitz> but anything as value
<hcarty> But you can create a string IntMap.t or a int IntMap.t
<joko> I see
<thelema> type 'a ne_t = {t_intmap: 'a IntMap.t; ...}
<joko> Hm, maybe I should ask about this, too. If I want my function to produce two results (e.g. a map and an int), how would you implement it? Use a record, a list or a tuple?
<thelema> (sorry, thought I was at end of irc log)
<thelema> tuple
<thelema> to return two unrelated things, use a tuple
<orbitz> you can't fit a map and an int in a list
<joko> orbitz: this is correct, my bad :)
joewilliams_away is now known as joewilliams
drunK has joined #ocaml
ikaros has joined #ocaml
avsm has quit [Quit: Leaving.]
Yoric has quit [Read error: Connection reset by peer]
Yoric_ has joined #ocaml
avsm has joined #ocaml
yezariaely has joined #ocaml
Yoric_ has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
ikaros_ has joined #ocaml
ttamttam has quit [Remote host closed the connection]
ikaros has quit [Ping timeout: 265 seconds]
BiDOrD has quit [Remote host closed the connection]
BiDOrD has joined #ocaml
avsm has quit [Quit: Leaving.]
lamawithonel_ has quit [Remote host closed the connection]
ikaros_ has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
lamawithonel has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Yoric has quit [Quit: Yoric]
init1 has joined #ocaml
<flux> bah... been coding c++ lately, now back to an ocaml project, and the first thing I do is write a bug where I use != instead of <>..
<hcarty> flux: I've been tempted, when switching between OCaml and C, to let ( =! ) = () so that it always generates type errors :-)
<hcarty> I doubt that's a good idea
<hcarty> But it's been tempting
<flux> those eeevil operators should need to be open'ed ;)
avsm has joined #ocaml
ygrek has joined #ocaml
ulfdoz has joined #ocaml
_andre has quit [Quit: *puff*]
<hcarty> The Lwt toplevel seems cooler and cooler the more I learn about it.
<hcarty> The history is far superior to rlwrap/ledit + ocaml
<hcarty> And the editing seems on-par with either of those options
<hcarty> Sadly, it seems to die if the terminal holding the session is resized
<mfp> does it support vi bindings, or is it still emacs-style?
<hcarty> mfp: I'm not sure what you mean - I didn't know it supported either :-)
kakadu_ has quit [Ping timeout: 250 seconds]
<hcarty> mfp: What sort of vi/emacs keybindings in particular?
<mfp> at least what you'd get with set editing-mode vi in .inputrc
<adrien> b, w, h, j, k, l, d*, c* ? :p
<adrien> oh, and a and i, these could be useful one day ;p
<mfp> that is, modal input to begin with
ccasin has joined #ocaml
<hcarty> mfp: It does not appear to be modal out of the box at least
<mfp> !!! Lwt is now using libevent instead of select(2)
<adrien> \o/
<adrien> (I think I was actually about to reach the fd limit)
<mfp> it's supported > 1024 fds for a while, but I don't know if the hack it used was portable
<mfp> (more than FD_SETSIZE for the purists)
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
iris1 has quit [Ping timeout: 276 seconds]
_unK has joined #ocaml
drunK has quit [Ping timeout: 245 seconds]
init1 has quit [Quit: Quitte]
Snark has quit [Quit: Ex-Chat]
lpereira has joined #ocaml
<adrien> is something wrong with ssh on the forge? I can't connect (it might be on my end though)
_unK is now known as drunK
ulfdoz has quit [Ping timeout: 276 seconds]
elehack has joined #ocaml
yezariaely has left #ocaml []
<gildor> adrien: I can connect to ssh.ocamlcore.org
<gildor> adrien: do you still have this issue?
<adrien> gildor: nope, just checked, and it's gone
<adrien> :-)
<adrien> probably magic :p
<gildor> indeed
lpereira has quit [Quit: Leaving.]
fraggle_laptop has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
rks has joined #ocaml
iris1 has joined #ocaml