<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
<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]
<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
<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)
<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