flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
<DMA> I'll try that with a newer OCaml package and tell u
gildor has quit [Quit: leaving]
jayprich has quit [Quit: jayprich]
vpit3833` has joined #ocaml
vpit3833 has quit [Ping timeout: 255 seconds]
jerkbot1 has joined #ocaml
ollehar1 has quit [Ping timeout: 255 seconds]
jerkbot1 has quit [Remote host closed the connection]
vpit3833` is now known as venk
mattrepl has quit [Quit: mattrepl]
osnr has quit [Quit: Leaving.]
Neros_ has quit [Ping timeout: 256 seconds]
Drup has quit [Quit: Leaving.]
Drup has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
shinnya has quit [Read error: Operation timed out]
dsheets has quit [Ping timeout: 260 seconds]
DMA has quit [Quit: Mindwall!!]
darkf has joined #ocaml
Drup has quit [Quit: Leaving.]
cdidd has joined #ocaml
fraggle_laptop has quit [Remote host closed the connection]
q66 has quit [Remote host closed the connection]
talzeus has joined #ocaml
weie has joined #ocaml
gautamc has quit [Quit: Leaving.]
csakatoku has joined #ocaml
gautamc has joined #ocaml
bkpt has quit [Quit: Leaving]
es917 has joined #ocaml
mattrepl has joined #ocaml
bkpt has joined #ocaml
bkpt has quit [Client Quit]
breakds has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ggole has joined #ocaml
es917 has quit [Quit: es917]
ulfdoz has joined #ocaml
mattrepl has quit [Quit: mattrepl]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
pootler_ has quit [Quit: leaving]
ulfdoz has quit [Ping timeout: 256 seconds]
Watcher7 is now known as Watcher7|off
weie_ has joined #ocaml
weie has quit [Ping timeout: 260 seconds]
Yoric has joined #ocaml
thizanne has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
csakatok_ has joined #ocaml
ontologiae has joined #ocaml
ttamttam has joined #ocaml
csakatoku has quit [Ping timeout: 260 seconds]
raichoo has joined #ocaml
cago has joined #ocaml
raichoo has quit [Ping timeout: 276 seconds]
ontologiae has quit [Ping timeout: 276 seconds]
raichoo has joined #ocaml
cago has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 248 seconds]
mika1 has joined #ocaml
djcoin has joined #ocaml
spanish has joined #ocaml
cago has joined #ocaml
djcoin has quit [Read error: Operation timed out]
ontologiae has joined #ocaml
gautamc has quit [Ping timeout: 240 seconds]
djcoin has joined #ocaml
Kakadu has joined #ocaml
mfp_ has quit [Ping timeout: 256 seconds]
mika1 has quit [Quit: Leaving.]
mika1 has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
gautamc has joined #ocaml
ollehar has joined #ocaml
cago has quit [Quit: Leaving.]
mfp_ has joined #ocaml
flx_ has joined #ocaml
troydm has quit [Read error: Connection reset by peer]
troydm has joined #ocaml
flux has quit [Ping timeout: 240 seconds]
flx_ is now known as flux
mfp_ has quit [Ping timeout: 276 seconds]
skchrko has quit [Quit: Leaving]
troydm has quit [Read error: Connection reset by peer]
troydm has joined #ocaml
eikke has joined #ocaml
mfp_ has joined #ocaml
<flux> soo, has someone done something useful with ocaml-ctypes?-)
<orbitz> Not yet
<flux> planning to?
<orbitz> Does ocaml-ctypes have a .h processor so I don't have to write them by hand?
<flux> afaik no .h-processor
<orbitz> shame
<orbitz> Nothing really yet, considering wrapping up libssh2 in it
watermind has joined #ocaml
<gasche> flux: a while ago I had written some very very partial OpenCV bindings
<gasche> that were quite bug-ridden
<gasche> I'm considering reimplementing this small thing with ocaml-ctypes and camlIDL for a comparison
<flux> ah, opencv-bindings is indeed something ocaml is lacking
<gasche> it was only the part I was interested in, that is colorspace handling
<gasche> but yeah
<gasche> too busy with real work and the OCaml bugtracker right now
<flux> I think when you get the basic infrastructure for binding opencv around, the rest comes easy(easier :))
<flux> at least the ocaml opencl-bindings were easy enough to extend and fix
<flux> (..I really should my fixes back to the upstream)
ggole has quit [Ping timeout: 241 seconds]
ygrek has joined #ocaml
Kakadu has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
ggole has joined #ocaml
pootler_ has joined #ocaml
Yoric has joined #ocaml
eikke has quit [Remote host closed the connection]
skchrko has joined #ocaml
mika1 has quit [Quit: Leaving.]
ggole has quit [Ping timeout: 240 seconds]
mika1 has joined #ocaml
eikke has joined #ocaml
ggole has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
mika1 has quit [Quit: Leaving.]
mika1 has joined #ocaml
mika1 has quit [Read error: Connection reset by peer]
mika1 has joined #ocaml
ttamttam has quit [Quit: ttamttam]
Tobu_ has joined #ocaml
Tobu has quit [Ping timeout: 256 seconds]
Tobu_ is now known as Tobu
q66 has joined #ocaml
dsheets has joined #ocaml
rwmjones has quit [Read error: Operation timed out]
mika2 has joined #ocaml
mika1 has quit [Read error: Connection reset by peer]
spanish has quit [Quit: Leaving]
rwmjones has joined #ocaml
Drup has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
ollehar has quit [Ping timeout: 240 seconds]
beckerb has joined #ocaml
_andre has joined #ocaml
Yoric has joined #ocaml
madroach has quit [Quit: leaving]
ollehar has joined #ocaml
madroach has joined #ocaml
Watcher7|off is now known as Watcher7
csakatok_ has quit [Remote host closed the connection]
talzeus has quit [Remote host closed the connection]
ttamttam has joined #ocaml
testcocoon has quit [Read error: Connection reset by peer]
Drup has quit [Ping timeout: 255 seconds]
ontologiae has quit [Quit: WeeChat 0.4.0]
ontologiae has joined #ocaml
caligula_ has quit [Read error: Connection reset by peer]
caligula_ has joined #ocaml
Neros has joined #ocaml
testcocoon has joined #ocaml
Drup has joined #ocaml
<avsm> mrnumber had some face detection code using opencv here; https://github.com/tovbinm/ocaml-faces
breakds has joined #ocaml
talzeus has joined #ocaml
wagle has quit [Remote host closed the connection]
pootler_ has quit [Quit: leaving]
pootler_ has joined #ocaml
mattrepl has joined #ocaml
shinnya has joined #ocaml
ollehar1 has joined #ocaml
wagle has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
Yoric has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
Yoric has joined #ocaml
<ontologiae> hi
<ontologiae> I have a function which has type in_channel -> out_channel -> unit
<companion_cube> hello
<ontologiae> and I would like to rewrite in to : string -> string -> unit
<ontologiae> what is the simplest way to do that
<ontologiae> string ie. to take a string instead a file and put the ouput in a string
<ontologiae> ?
<flux> the type would be string -> string. but you cannot use the standard channel stuff for that as they lack interoperability with strings. for example Batteries comes with its own channels that support string channels as well
<flux> (should be pretty much plug'n play)
Cypi_ is now known as Cypi
smondet has joined #ocaml
<ontologiae> thx flux
djcoin has quit [Ping timeout: 260 seconds]
rwmjones has quit [Ping timeout: 240 seconds]
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
rwmjones has joined #ocaml
Netfeed has left #ocaml []
wagle has quit [Remote host closed the connection]
wagle has joined #ocaml
wagle has quit [Ping timeout: 260 seconds]
wagle has joined #ocaml
chambart has joined #ocaml
fayden has quit [Read error: Operation timed out]
chambart__ has joined #ocaml
chambart has quit [Ping timeout: 276 seconds]
raichoo has quit [Quit: leaving]
<gasche> ontologiae: for the output you want Buffer rather than String
mika2 has quit [Quit: Leaving.]
<gasche> avsm: it doesn't bind any openCV function, though
<gasche> (it's using Swig; another choice I hadn't considered)
hkBst has quit [Quit: Konversation terminated!]
pootler_ has quit [Quit: Lost terminal]
venk has quit [Ping timeout: 246 seconds]
mfp_ has quit [Read error: Connection reset by peer]
pootler_ has joined #ocaml
pootler__ has joined #ocaml
pootler__ has quit [Client Quit]
pootler_ has quit [Client Quit]
pootler_ has joined #ocaml
pootler__ has joined #ocaml
talzeus has quit [Remote host closed the connection]
venk has joined #ocaml
chambart__ has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Ping timeout: 256 seconds]
mfp_ has joined #ocaml
csakatoku has joined #ocaml
mfp_ is now known as mfp
shinnya has quit [Ping timeout: 260 seconds]
bkpt has joined #ocaml
raichoo has joined #ocaml
raichoo has quit [Quit: leaving]
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
ttamttam has quit [Client Quit]
tane has joined #ocaml
csakatoku has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
djcoin has joined #ocaml
rwmjones has quit [Read error: Operation timed out]
raichoo has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
spanish has joined #ocaml
ollehar has joined #ocaml
beckerb has quit [Ping timeout: 240 seconds]
<spanish> if I need mtasc's lexer/parser to store two unsigned ints for each file it processes what would be the best option? I need to kee track of how many preprocessor directives the file had, and what the last line number it is, as per cpp
<spanish> so that I can compute offsets and hence, actual line number within the file seen on the editor
skchrko has quit [Quit: Leaving]
travisbrady has joined #ocaml
rwmjones has joined #ocaml
<ggole> Pass an argument in which you record that information?
darkf has quit [Quit: Leaving]
csakatoku has joined #ocaml
<spanish> wouldn't I need a hash table or something? I need to access those two fields in the case of error or warning, for the specified file
<ggole> A hash table might work, yeah
<ggole> It's your problem: what would fit the bill? You can just pass whatever you like to the lexer to be populated.
<spanish> well the problem in that case is how would you store that for each file, in a retrievable way
<ggole> A table mapping file name to a record of that info seems reasonable
<spanish> thanks, gonna read on tables and see
<ggole> That doesn't really affect the lexer though
<ggole> I mean, the lexer can just count preprocessor defs and line numbers, and needs know nothing about how you wish to record that info.
<spanish> yes, that's what Iḿ doing, counting them up on the lexer
<ggole> Ah, right, for some reason I thought you were having trouble with the lexer interface
<spanish> no, that's done, the problem is
pootler_ has quit [Ping timeout: 252 seconds]
pootler__ has quit [Ping timeout: 246 seconds]
<ggole> You want to record information per file, right
<ggole> So a hash table or map.
<spanish> it first parses everything, and then on a module called typer, it complains about errors
<spanish> ok, thanks
<spanish> actually I'd say it interperses lexing and parsing for different files, but I'm still trying to make sense of this so I might be wrong
csakatoku has quit [Ping timeout: 260 seconds]
ollehar1 has quit [Read error: Operation timed out]
toolslive has joined #ocaml
skchrko has joined #ocaml
tane has quit [Read error: Connection reset by peer]
tani has joined #ocaml
dezzy_ has joined #ocaml
alang has quit [Read error: Operation timed out]
dezzy has quit [Read error: Connection reset by peer]
alang has joined #ocaml
pootler_ has joined #ocaml
Drup has quit [Ping timeout: 256 seconds]
pootler__ has joined #ocaml
Kakadu has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
gautamc has quit [Read error: Connection reset by peer]
SanderM has joined #ocaml
gautamc has joined #ocaml
csakatoku has joined #ocaml
Drup has joined #ocaml
yacks has joined #ocaml
contempt has quit [Ping timeout: 248 seconds]
csakatoku has quit [Ping timeout: 264 seconds]
tani has quit [Quit: Verlassend]
contempt has joined #ocaml
tobiasBora has quit [Read error: No route to host]
tobiasBora has joined #ocaml
mcclurmc has joined #ocaml
ttamttam has joined #ocaml
tobiasBora has quit [Ping timeout: 260 seconds]
tobiasBora has joined #ocaml
tane has joined #ocaml
ggole has quit []
djcoin has quit [Quit: WeeChat 0.4.0]
ttamttam has quit [Quit: ttamttam]
pootler_ has quit [Ping timeout: 240 seconds]
pootler__ has quit [Ping timeout: 260 seconds]
Kakadu has quit [Ping timeout: 246 seconds]
csakatoku has joined #ocaml
ygrek has joined #ocaml
SanderM has quit [Remote host closed the connection]
csakatoku has quit [Ping timeout: 252 seconds]
<spanish> if I have a type like this: type algo { file : string; pmin : int; }, how would I declare such a variable?
<spanish> I'm trying like `let somehting = ({ "filename", 10 } : Module_name.algo)' but the compiler doesn't like it
<toolslive> try a semi-colon iso a ,
<toolslive> {file="filename";pmin=10}
<spanish> thanks, let me see
<Drup> spanish: My intention is not to be rude, but sometimes, the manual is indeed the solution to your problem :)
<spanish> sure, I'm looking at that very page, but I think it's because I'm using an expression instead of a plain int, it doesn't like it
<spanish> I always get operator expected, perhaps the problem is such expression is not really returning an int
<toolslive> type algo = {file:string;pmin:int}
rly has joined #ocaml
<toolslive> let bla = {file="xxxx";pmin=10}
<rly> This depends on extlib, does batteries provide something similar? Std.input_list chan
<toolslive> gives val bla : algo = {file = "xxxx"; pmin = 10}
<toolslive> works perfectly
<rly> In Haskell I can just write readLines "file" and I get a list of lines; simple and straight forward. How can I do the same in OCaml?
<toolslive> it's not a good idea to do that ... OCaml isn't lazy
<toolslive> but pervasives provides input_line : in_channel -> string
<toolslive> so building it requires a simple loop ...
<spanish> and is it possible to know current line number from within a rule in the lexer?
ygrek has quit [Ping timeout: 264 seconds]
<toolslive> yes it is.
<spanish> the problem above was that I wasn't doing pmin=10, but isntead pmin = (expr), but I corrected that already
<spanish> how? hehe
<toolslive> take a look at Lexing.lexbuf
<spanish> thanks, let me see
ontologiae has joined #ocaml
<toolslive> @rly from the top of my head:
<toolslive> let read_lines n =
<toolslive> let ic = open_in n in
<toolslive> let rec loop acc =
<toolslive> try
<toolslive> let line = input_line ic in
<toolslive> loop (line :: acc)
<toolslive> with
<toolslive> End_of_file -> List.rev acc
<toolslive> in
<toolslive> loop []
<toolslive> although some library somewhere might provide that for you....
structuralist has joined #ocaml
speredenn has joined #ocaml
emmanuelux has joined #ocaml
ygrek has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
eikke has quit [Ping timeout: 264 seconds]
<rgrinberg> batteries provides this
<rgrinberg> so does core
dezzy_ is now known as dezzy
dezzy has quit [Changing host]
dezzy has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
ygrek has quit [Ping timeout: 276 seconds]
_andre has quit [Quit: leaving]
dsheets has joined #ocaml
eikke has joined #ocaml
chambart__ has joined #ocaml
<rly> I got that part to work, but now it cannot find my utilities library.
<rly> It says that it is installed, but ocamlfind list cannot find it.
raichoo has quit [Quit: leaving]
Snark has quit [Ping timeout: 245 seconds]
<rly> is not a compiled interface for this version of OCaml. It seems to be for an older version ...
<rly> Versioned interfaces probably were too much work?
transfinite has quit [Remote host closed the connection]
<adrien> gasche: btw, cross-compilation support for 4.02.0 is definitely impossible and has not been something I actually considered; however, having several of the patches integrated so that the number of patches needed to build a cross-compiler is lower was and still is a goal
transfinite has joined #ocaml
osnr has quit [Quit: Leaving.]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<rly> How can I make sure that I won't ever get that error message ever again?
<rly> I thought that using a build system like oasis would solve this problem, but it apparently doesn't rebuild even when there is another compiler on $PATH.
<rly> I haven't verified that, but that seems rather bad.
eikke has quit [Ping timeout: 252 seconds]
spanish has quit [Quit: Leaving]
<orbitz> what issue are you ahving rly ?
<rly> orbitz: currently a different one, I just want to do let a=f<newline>let b=g<newline>command_a; command_b; command_c
ollehar1 has joined #ocaml
eikke has joined #ocaml
<orbitz> rly: i'm not sure what you're asking...
emmanuelux has quit [Read error: Operation timed out]
<rly> orbitz: bind some variables, execute some commands, that's all I wanbt.
<rly> orbitz: want
<rly> orbitz: but that syntax is wrong.
<orbitz> in what context is this?
<orbitz> if what you just said isin a file, then you need a bunch of ;;'s
<orbitz> or a let () = ... nad a few 'in's
speredenn has quit [Quit: Leaving]
<rly> orbitz: like this? let a=1;;let b=2;;print_int (a +b);print_int a
<orbitz> another ;;, but sure
<rly> orbitz: I already made it work with in, but this is just for reference.
<rly> orbitz: instead of ; you mean? or after the last a?
<orbitz> all ; need to be ;; in this case
<orbitz> like on the repl
csakatoku has joined #ocaml
<rly> orbitz: and how can I redirect all the output from a process I called to stdout?
csakatoku has quit [Ping timeout: 260 seconds]
malo has joined #ocaml
Yoric has quit [Ping timeout: 248 seconds]
malo_ has joined #ocaml
toolslive has quit [Quit: Leaving]
nlucaroni has joined #ocaml
nlucaroni has quit [Client Quit]
malo has quit [Ping timeout: 264 seconds]
nlucaroni has joined #ocaml
rwmjones has quit [Read error: Operation timed out]
valatar has joined #ocaml
malo_ has quit [Ping timeout: 252 seconds]
malo has joined #ocaml
valatar has quit [Ping timeout: 252 seconds]
talzeus has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
smondet has quit [Quit: leaving]
rwmjones has joined #ocaml
malo_ has joined #ocaml
<orbitz> rly: i don't understand your question
malo has quit [Ping timeout: 268 seconds]
valatar has joined #ocaml
malo has joined #ocaml
malo_ has quit [Ping timeout: 252 seconds]
valatar has quit [Ping timeout: 276 seconds]
<amiller_> is there anything like a guide for type-conv
<amiller_> i'm trying to write a project type-directed language extension and so type-conv seems like it would be preferable to camlp4/5
csakatoku has joined #ocaml
malo has quit [Ping timeout: 276 seconds]
structuralist has quit []
csakatoku has quit [Ping timeout: 268 seconds]
cthuluh has quit [Ping timeout: 245 seconds]
cthuluh has joined #ocaml
tane has quit [Quit: Verlassend]
<avsm> amiller_: just other source code. you might find Dyntype useful: http://github.com/mirage/dyntype
osnr has quit [Quit: Leaving.]
jbrown has quit [Ping timeout: 256 seconds]
<amiller_> thanks avsm
<amiller_> i'm also having a look at metaocaml right now
ollehar1 has quit [Ping timeout: 255 seconds]
<amiller_> the dyntype looks like a good way of doing most of what i want just at the penalty of needing runtime values
breakds has quit [Read error: Operation timed out]
chambart__ has quit [Read error: Operation timed out]
chambart__ has joined #ocaml
emmanuelux has joined #ocaml
chambart__ has quit [Ping timeout: 240 seconds]
foo303_ has quit [Ping timeout: 256 seconds]
foo303 has joined #ocaml
ontologiae has joined #ocaml
foo303 has quit [Read error: Operation timed out]
travisbrady has quit [Quit: travisbrady]
chambart has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
gnuvince has quit [Ping timeout: 264 seconds]
foo303 has joined #ocaml
shinnya has joined #ocaml
csakatoku has joined #ocaml
bkpt has quit [Read error: Connection reset by peer]
watermind has quit [Remote host closed the connection]
mattrepl has quit [Quit: mattrepl]
ollehar has quit [Ping timeout: 276 seconds]