Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
emmanuelux has joined #ocaml
emmanuel__ has joined #ocaml
emmanuelux has quit [Ping timeout: 272 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
Yoric has joined #ocaml
eni has joined #ocaml
testcocoon has joined #ocaml
blinky- has joined #ocaml
silver has quit [Remote host closed the connection]
sepp2k has joined #ocaml
emmanuel__ has quit [Ping timeout: 276 seconds]
scri has quit [Ping timeout: 260 seconds]
madroach has quit [Quit: leaving]
madroach has joined #ocaml
kuribas has joined #ocaml
<kuribas>
Hi, I am trying to compile ant, but I am getting errors:
<kuribas>
No implementations provided for the following modules: ] 00223 / 00932
<kuribas>
Tmpfile referenced from /usr/lib/ocaml/camlimages/camlimages_all.cmxa(Ps)
<kuribas>
etc...
blinky- has quit [Quit: /quit]
<kuribas>
Under /usr/lib/ocaml/camlimages I see tmpfile.cmi and tmpfile.mli, but not tmpfile.cmxa
<kuribas>
Btw, ant hasn't been worked on since 2008.
<mfp>
kuribas: ocamlobjinfo says Tmpfile is defined in camlimages_core.cmxa
_andre has joined #ocaml
osa1 has joined #ocaml
<kuribas>
Ah, I see.
<kuribas>
mfp: Ok, it works now, thanks!
<mfp>
np
<kuribas>
Now I am getting: "File "Runtime.cmx", line 1, characters 0-1:" Error: Files LoadImage.cmx and Bitmap.cmx== make inconsistent assumptions over interface Bitmap
<kuribas>
It seems there are two bitmap types defined...
<kuribas>
Since they are in seperate interfaces, there should be now clash, right?
hkBst has quit [Quit: Konversation terminated!]
ankit9 has quit [Quit: Leaving]
Yoric has quit [Read error: Operation timed out]
nicoo is now known as nicoo__
nicoo__ is now known as nicoo
ankit9 has joined #ocaml
gnuvince has quit [Ping timeout: 240 seconds]
eikke has quit [Ping timeout: 252 seconds]
<kuribas>
Stupid ocaml, if it was in haskell or C, I could have fixed it by now...
<adrien>
uninstall, build camlimages in one pass but for both native and bytecode targets
<kuribas>
Actually LoadImage and Bitmap are part of ant (I use libcamlimages from ubuntu).
<kuribas>
Maybe the Interface Bitmap from camlimages clashes with the interface Bitmap from ant.
<adrien>
that, yeah, it's pretty likely
<kuribas>
So I could rename Bitmap...
SanderM has joined #ocaml
emmanuel__ has joined #ocaml
Yoric has joined #ocaml
<adrien>
yes
<kuribas>
It seems to work for now...
<adrien>
there are several things that can be done but that one is the easiest
<kuribas>
I have renamed all occurances of Bitmap to AntBitmap, and I haven't got any errors yet...
<_andre>
is there a well known algorithm that takes a format string like "foo: {x}, bar: {y}" and an input like "foo: 1, bar: blah" and returns x=1 and y=blah?
<kuribas>
Obviously it should be gcc -I/usr/include/freetype2 -MM freetype-stubs.c.
<kuribas>
_andre: Sounds like a regular expression.
emmanuel__ has quit [Ping timeout: 245 seconds]
eni has quit [Ping timeout: 240 seconds]
<_andre>
hmm seems pcre supports named captures
<adrien>
_andre: number of fields is know?
<adrien>
known*
<_andre>
yes
<adrien>
use Scanf
<_andre>
does it support custom format strings or just the usual %d, %s, etc?
<adrien>
%d, %s, ...
<adrien>
%s is a very wide format however
<_andre>
it's important that the fields are named
emmanuel__ has joined #ocaml
<adrien>
but their order can change?
<_andre>
yes
<adrien>
use Scanf, "%s %s %s"
<adrien>
then split each of the strings in 'value, key' pair
ankit9 has quit [Quit: Leaving]
<adrien>
you can also do a linear scan for " " then for "=" and String.copy/blit
thomasga has quit [Quit: Leaving.]
diego_diego has joined #ocaml
diego_diego has quit [Client Quit]
diego_diego has joined #ocaml
diego_diego has quit [Client Quit]
<thelema>
_andre: the beat solution I see is to turn the input into a map/hashtable/association list (nsplit on " ", and then split each on "=" to get key, value)
<thelema>
_andre: then query that data structure for the keys you want
<thelema>
I use this data structure (called a property list in my code) in odb.ml
pango_ has joined #ocaml
<_andre>
yeah the problem is that the format string is also an input to the program, so i don't know the separator in order to split the values
<_andre>
all i know are the {x} and {y} names
<_andre>
the input could be "@{x}&{y}" for all i know
<_andre>
so i guess i'll just iterate on both the format and the input string looking for the replacements
<adrien>
at this point, I'd ask why there is so much configurability
pango has quit [Ping timeout: 252 seconds]
<_andre>
because i'm doing something unsupported and i want to be able to change it if there's a change in the protocol :)
<_andre>
without recompiling my program
<kuribas>
Ok, so now it seems libz is missing, but I have no idea where to insert it in the OMakefile.
<thelema>
but if the format string doesn't describe the exact format (you indicated that x and y could be in any order), how to derive the possible formats from the format string
<thelema>
and how to derive the keys?
<thelema>
oh, you want the result keyed off "x" and "y"?
<thelema>
yes, parallel iter on both inputs, when you reach a { in the format string, scan for the character after the } and put that slice in an associative structure under the key in the {}
<thelema>
no pcre needed
<thelema>
you want scanf with named parameters, from what I can tell
ftrvxmtrx has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
<_andre>
it fails for `parse "|x=a|y=bb|" "|x={x}|y={y}b|"` but i have to think if i need to handle that
thomasga has joined #ocaml
gnuvince has quit [Ping timeout: 248 seconds]
<thelema>
_andre: at the moment, it just uses one-character lookahead to determine the end of the value
<thelema>
if you want 2-character lookahead, you're welcome to do this, but you'll have more special cases for end of string
gnuvince has joined #ocaml
<thelema>
also unsupported if "xy={x}{y}", as there's no way to tell when x ends and y begins
<thelema>
at the moment it will try to end x on a {, which probably isn't what you want
<_andre>
yeah
<_andre>
i'll see how far i have to go with this :)
emmanuel__ has quit [Ping timeout: 244 seconds]
<hcarty>
thelema: Would you be opposed to Float.is_finite in Batteries 2.0? The opposite of Float.is_special I suppose.
<hcarty>
thelema: The question comes because I have found myself writing "Module.filter (Float.is_special |- not) floaty_collection" more often than I would like.
<thelema>
hcarty: send a pull request with documentation (doesn't have to be long) and some tests; bonus points for testing is_special if it's not tested)
<hcarty>
thelema: Sounds good :-)
SanderM has joined #ocaml
SanderM_ has quit [Ping timeout: 276 seconds]
Progster has joined #ocaml
kuribas has left #ocaml []
avsm has joined #ocaml
r126f_ has quit [Remote host closed the connection]
eni has quit [Ping timeout: 245 seconds]
Mnabil has joined #ocaml
eni has joined #ocaml
eni has quit [Client Quit]
eni has joined #ocaml
milosn has quit [Ping timeout: 264 seconds]
ftrvxmtrx has quit [Quit: Leaving]
emmanuel__ has joined #ocaml
gnuvince has quit [Ping timeout: 240 seconds]
eni has quit [Ping timeout: 256 seconds]
djcoin has quit [Quit: WeeChat 0.3.2]
avsm has quit [Quit: Leaving.]
emmanuel__ has quit [Ping timeout: 245 seconds]
Cyanure has quit [Ping timeout: 244 seconds]
Yoric has quit [Ping timeout: 248 seconds]
kutsuya has joined #ocaml
Cyanure has joined #ocaml
milosn has joined #ocaml
ulfdoz has joined #ocaml
emmanuel__ has joined #ocaml
SanderM has quit [Remote host closed the connection]
gnuvince has joined #ocaml
eni has joined #ocaml
Guest11736 has quit [Ping timeout: 246 seconds]
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
thomasga1 has quit [Client Quit]
emmanuel__ has quit [Read error: Operation timed out]
eni has quit [Ping timeout: 248 seconds]
<_andre>
does OCAMLRUNPARAM=b work with native code?
<adrien>
yes
<adrien>
but you must compile with -g
<_andre>
weird
<_andre>
i have "ocamlfind ocamlopt -g ..."
<_andre>
and still i get a damn "Not_found"
<thelema>
sometimes it gives the wrong backtrace, and I have to compile to bytecode to get the right one
<thelema>
also, all parts of the executable should be compiled with -g
<adrien>
_andre: you don't get a backtrace _at_ _all_ ?
<_andre>
none
<adrien>
which message do you get exactly? can you copy-paste it?
<_andre>
Fatal error: exception Not_found
<adrien>
does it happen early?
<_andre>
it's in one of my modules
<_andre>
i found the error
<_andre>
just don't understand why there's no backtrace
<adrien>
how long have you had the -g switch? maybe the module had been compiled before
<_andre>
i ran ocaml setup.ml -clean after adding it and compiling again
<adrien>
hmm, where have you added it?
<_andre>
_tags
<_andre>
<*/*.ml>: debug
<adrien>
so only one level of directories?
<_andre>
yeah but all the code is in src/
<adrien>
just to check: when you build, it displays the ocamlbuild invocation
<_andre>
yep
<adrien>
copy it, add -classic-display
<adrien>
after cleaning
<adrien>
and check it uses -g
<_andre>
i did, it's there
<_andre>
i'm using some external packages... would those need to be recompiled with -g too?
<_andre>
by that i mean -package foo in the command line
<adrien>
they should, yeah; but even without these, you should get some backtrace
<adrien>
unless maybe if your exception is raised right after exiting such a module
ftrvxmtrx has joined #ocaml
<cacho>
Ptival: thanks, giving a try!
<madroach>
_andre: I'm not sure, but don't you have to specify the -g flag while linking, too? That would be something like <*.byte/opt>: debug
<thelema>
madroach: quite true; I usually do `true: debug` and set the debug flag on *everything*
<thelema>
this is both a strength and a weakness of ocamlbuild, that you can apply flags to files with no effect
emmanuel__ has joined #ocaml
<adrien>
doh, right; it's required for linking too
<_andre>
works :)
Guest70129 has quit [Changing host]
Guest70129 has joined #ocaml
Guest70129 is now known as henux
Cyanure has quit [Remote host closed the connection]
bzzbzz has quit [Quit: leaving]
Snark has quit [Quit: Quitte]
Yoric has joined #ocaml
emmanuel__ has quit [Ping timeout: 240 seconds]
kutsuya has left #ocaml []
Mnabil has quit [Ping timeout: 272 seconds]
_andre has quit [Quit: leaving]
eni has joined #ocaml
eni has quit [Quit: Leaving]
gnuvince has quit [Ping timeout: 252 seconds]
pango_ has quit [Ping timeout: 252 seconds]
pango_ has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]