fusillia has quit [Remote host closed the connection]
ontologi1e has quit [Ping timeout: 244 seconds]
chambart has quit [Ping timeout: 246 seconds]
LowPotential has joined #ocaml
<LowPotential>
Hi all. I'm trying to build a custom toplevel with modules that use "Batteries Included". I'm calling "ocambuild -use-ocamlfind mytoplevel.top" where "mytoplevel.mltop" lists the names of the modules I want included. I'm getting the error "File "/usr/lib/ocaml/batteries/battop.ml", line 1:Error: Reference to undefined global `Batteries_help'" when I try to run the resulting top-level. Batteries works great o
<LowPotential>
therwise. Any ideas? I'm not experienced with these tools.
sivoais has quit [Quit: leaving]
sivoais has joined #ocaml
<thizanne>
LowPotential: try with ocamlbuild -use-ocamlfind -package patteries
<thizanne>
or is it another syntax ?
<thizanne>
well I can't remember and can't check right now, but you have to tell him to use the batteries package
<LowPotential>
thizanne: Thanks. It builds, but when I try to run it, I get the same error about "Batteries_help" missing.
joewilliams has left #ocaml []
avsm has quit [Quit: Leaving.]
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
LowPotential has quit [Remote host closed the connection]
ivan\ has joined #ocaml
mcclurmc is now known as mcclurmc_away
sepp2k1 has quit [Read error: Connection reset by peer]
travisbrady has quit [Quit: travisbrady]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
diego_diego has joined #ocaml
diego_diego has quit [Quit: diego_diego]
tac has joined #ocaml
Progster has quit [Ping timeout: 276 seconds]
Drakken has quit [Ping timeout: 246 seconds]
Drakken has joined #ocaml
pr has quit [Ping timeout: 246 seconds]
pr has joined #ocaml
pr has quit [Changing host]
pr has joined #ocaml
diego_diego has joined #ocaml
diego_diego has quit [Client Quit]
wtetzner has quit [Ping timeout: 248 seconds]
wtetzner has joined #ocaml
wormphlegm has quit [Ping timeout: 248 seconds]
wormphlegm has joined #ocaml
tac has quit [Quit: Page closed]
ankit9 has joined #ocaml
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
cdidd has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Read error: Operation timed out]
jewel has joined #ocaml
ulfdoz has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
answer_42 has joined #ocaml
jewel has quit [Ping timeout: 268 seconds]
pango is now known as pangoafk
answer_42 has quit [Ping timeout: 276 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
chambart has joined #ocaml
ankit9 has quit [Ping timeout: 264 seconds]
Cyanure has joined #ocaml
ankit9 has joined #ocaml
Neros has joined #ocaml
djcoin has joined #ocaml
theplanet^2 has joined #ocaml
elixey has quit [Ping timeout: 276 seconds]
andreypopp has joined #ocaml
cago has joined #ocaml
ankit9 has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
Arsenik has joined #ocaml
cago has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
arneis has quit [Ping timeout: 245 seconds]
wormphlegm has quit [Ping timeout: 264 seconds]
wormphlegm has joined #ocaml
Cyanure has quit [Remote host closed the connection]
avsm has joined #ocaml
cago has joined #ocaml
<f[x]>
LowPotential: one needs cmi files around for the used toplevel modules
<f[x]>
mfp, I've got a (simple) patch to generate `type t` alias for message types - it makes it easier to abstract over generated modules (wrapping into fcm), are you interested?
<f[x]>
btw, maybe there is some reason that types are named by the name of the message but not `t`?
<f[x]>
probably to reduce collisions when including several modules?
cago has quit [Read error: Connection reset by peer]
Kakadu has quit [Read error: Connection reset by peer]
Kakadu_ has joined #ocaml
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
iago has joined #ocaml
uselpa has joined #ocaml
uselpa has quit [Remote host closed the connection]
gnuvince has quit [Read error: Operation timed out]
avsm has joined #ocaml
answer_42 has joined #ocaml
Arsenik has quit [Remote host closed the connection]
fraggle_laptop has joined #ocaml
iago has quit [Read error: Operation timed out]
chambart has joined #ocaml
mcclurmc_away is now known as mcclurmc
Tobu has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
avsm has quit [Ping timeout: 252 seconds]
cago has quit [Ping timeout: 245 seconds]
mcclurmc is now known as mcclurmc_away
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
mcclurmc_away is now known as mcclurmc
travisbrady has joined #ocaml
beginner42 has joined #ocaml
<beginner42>
adrien: i try to get familiar with webkit and your binding, but i cant find any proper api. Could you tell me how i can download a the content of an given url?
<thelema>
munga: instead of "include module type of S", why not just "include Set.S"?
<thelema>
you're right that the error is non-helpful
jamii has joined #ocaml
<thelema>
actually, it is helpful
<munga>
if you remove the type annotation on T you get the two signatures that are suspiciously similar : http://pastebin.com/KPZVfpdQ
<thelema>
the problem is that ": MySet" is being applied to the result of the functor application, not the functor itself
<_habnabit>
munga, you're saying that your functor ret... ^
<thelema>
if you want to apply it to the functor itself, you can't use the nice functor shortcut: module T : MySet = functor (S : Set.S) -> struct include S let myfunction ... end
<munga>
mumble mumble ... I think I understand ...
pangoafk is now known as pango
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 256 seconds]
munga has quit [Ping timeout: 248 seconds]
as has joined #ocaml
travisbrady has joined #ocaml
as has quit [Quit: as]
munga has joined #ocaml
rixed has quit [Ping timeout: 276 seconds]
rixed has joined #ocaml
rixed has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
rixed has joined #ocaml
chambart has quit [Ping timeout: 260 seconds]
Neros has quit [Ping timeout: 264 seconds]
Neros has joined #ocaml
rrolles has joined #ocaml
<rrolles>
trying to build a mixed-mode (C/OCaml) executable on Windows, which invokes FlexLink, which has weird behavior
<wieczyk>
What do you think about this language feature:
<wieczyk>
module M :> MTYPE = struct ... end
<wieczyk>
It checks if the module M satisfy the module type MTYPE, but does not cut the module interface.
<pippijn>
I like it
<wieczyk>
I think someone should request it, or maybe it is already in ocaml and I cannot see this in reference manual.
<pippijn>
I don't think it's in
travisbrady has joined #ocaml
<wieczyk>
Where is wmeyer? ;[
<pippijn>
I don't know
<wieczyk>
Ocaml-lang.org looks like Haskell.org clone
<adrien>
looks quite different to me
<orbitz>
they look pretty diff to me
<orbitz>
ocaml-lang.org looks like every othe rbootstrap site...
<orbitz>
but c'mon, 3 columns vs 2 columns, you'd have to be mad to equate those
uselpa has joined #ocaml
<adrien>
yeah, it's the "discover", "docs", "community" stuff
<adrien>
people want the same things
<adrien>
we're not going to get all apple-samsung
Yoric has joined #ocaml
<wieczyk>
20:05 < orbitz> but c'mon, 3 columns vs 2 columns, you'd have to be mad to equate those
<wieczyk>
hehe
<wieczyk>
ocamlmklib
<wieczyk>
is another ocaml feature which convince me that this language is very good.
<orbitz>
ocaml++
<wieczyk>
It allows to use Ocaml code in anyt other application.
<pippijn>
funny, I haven't used that
<orbitz>
If I could destructuvaly udpate the ocaml variable to epxress its goodness I would
<pippijn>
oh, I probably have
<pippijn>
with oasis
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<pippijn>
Pervasives.incr ocaml
tane has joined #ocaml
<wieczyk>
If runtime would be good paralellized then maybe it could be possible to popularize Ocaml by doing some ocaml-written plugins to some mainstream C/C++ applications.
<orbitz>
ohh cool, Z.to_bits
munga has quit [Quit: Ex-Chat]
xavierm02 has joined #ocaml
andreypopp has quit [Quit: sleep]
<orbitz>
awesome, zarit hhas basically everything I want
andreypopp has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<thelema>
zarith is some good.
rwmjones has quit [Read error: Operation timed out]
gnuvince has quit [Ping timeout: 240 seconds]
uselpa has quit [Remote host closed the connection]
avsm has joined #ocaml
andreypopp has quit [Quit: sleep]
ontologi1e has quit [Ping timeout: 268 seconds]
emmanuelux has joined #ocaml
andreypopp has joined #ocaml
<orbitz>
thelema: the only thing it lacks that I want is converting to a string with a particular base?
<orbitz>
s/\?//
Xizor has joined #ocaml
<thelema>
external format: string -> t -> string = "ml_z_format"
<orbitz>
AFAIK that only does octal, hex, and dec?
<thelema>
only the common bases, it seems
<orbitz>
yeah
<thelema>
and binary.
<orbitz>
Well, I guess I don't *need* it
<thelema>
there's the opposite for any base between 2 and 16 - external of_string_base: int -> string -> t = "ml_z_of_string_base"
<thelema>
but no to_string_base
<orbitz>
what I want to do is be able to compare to numbers N bits at a time. the prettiest way is to convert to a string of that base and do string compare
<thelema>
why do you care how many bits at a time the numbers are compared?
rwmjones has joined #ocaml
<orbitz>
It is the unit that we consider prefixes in
<thelema>
I don't understand
<orbitz>
so a string compare is 8 bits at atime, this particular problem requires N bits at a time (N will usually be small, ~4, but it is arbitrary)
<orbitz>
I'm impleemnting Pastry which uses the prefix of the hash key to route messages between nodes
<thelema>
ok, so you have a special string compare that gives you the prefix of the two strings that are equal...
<orbitz>
Yes, more or less
<thelema>
why N bits at a time? why not first unequal bit?
<orbitz>
I'm actually looking for a value that has a prefix in common with a string that is longer than the one I have in common, in N unit bits, so being in common by a fraction of N is not ok
<thelema>
sure, but isn't this the same as doing the compare with n=1 and then rounding down to a multiple of N?
<orbitz>
yes
<orbitz>
I think so
_andre has quit [Quit: leaving]
<orbitz>
thelema: so if i can convert to this to a string in an arbitrary base it makes doing the compare easy as well as othe rnice things, like printing
theplanet^2 has quit [Remote host closed the connection]
<orbitz>
It's not that hard to do poorly, at least :)
<thelema>
true, but if you want to do it well...
<orbitz>
can I do this with some clever bit work..
<thelema>
shift = divide, mask = modulo. yes, but it'll be the same basic algorithm
<orbitz>
well I mean, I know the maximum number ofbits my number can be, so what if I build a lookup table
TDJACR has quit [Read error: Connection reset by peer]
jewel has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
<rrolles>
dumb question, I just wrote a lexer/parser using ocamllex/ocamlyacc and I want to pass the resulting parser a raw string, but it's expecting a "lexbuf" type... is there a lexbuf_of_string type of function?
ftrvxmtrx has joined #ocaml
sepp2k1 has quit [Remote host closed the connection]
<Qrntz>
rrolles, Lexing.from_string?
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
<rrolles>
yay!
<rrolles>
thank you
<Qrntz>
you're welcome
Xizor has quit [Remote host closed the connection]
larhat has quit [Quit: Leaving.]
TDJACR has joined #ocaml
Snark has quit [Quit: Quitte]
Neros has quit [Ping timeout: 252 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
Neros has joined #ocaml
Submarine has quit [Quit: Leaving]
chambart has joined #ocaml
rwmjones has quit [Ping timeout: 255 seconds]
tautologico has joined #ocaml
nooy has joined #ocaml
rwmjones has joined #ocaml
avsm has joined #ocaml
<ImAlsoGreg>
I'm testing elements in an array in a random sequence, in a while loop, and raising an exception with the found index to break out. But now I read that this is bad form. Is there a quick explanation why?
ontologiae has joined #ocaml
<jbrown__>
ImAlsoGreg: it's partly a matter of taste I guess, partly that exceptions (though fast) are possibly not the most efficient way of doing things -- though the latter would apply to e.g. C++ more than OCaml.
<jbrown__>
probably Array.fold would be more idiomatic
<_habnabit>
ImAlsoGreg, it isn't really bad form. where did you read it was?
<_habnabit>
jbrown__, you can't break out of a fold without an exception, though
<jbrown__>
...although then you'd be iterating over elements after you found the one you were interested in, I suppose.
<_habnabit>
ImAlsoGreg, so, you're trying to write a do-while, and looked at this page to see how to do it in ocaml?
<ImAlsoGreg>
Nope - I started with a normal while loop, and tried to look for examples of exceptions & whiles online, after getting some compile errors.
<ImAlsoGreg>
Found this example and was surprised to learn that it's bad style.
<_habnabit>
i don't think i've ever used the ocaml 'while' loop
<_habnabit>
this is just some random wiki author's opinion, though
<_habnabit>
it's fine to use exceptions for flow control, but that particular example is a bit silly
<ImAlsoGreg>
Yes. But I'm new enough that my own judgment on these things is probably below chance level :)
<ImAlsoGreg>
I see.
<_habnabit>
anyway, i almost always write loops by using a tail-recursive auxillary function
<_habnabit>
er
<_habnabit>
auxiliary
<jbrown__>
you can write it out "in full" using recursion -- err, what _habnabit said.
<ImAlsoGreg>
Ok, that sounds closer to jbrown_'s suggestion, except that
<ImAlsoGreg>
Ahh, yah - it's easier for me to see the aux way than the fold left way.
<_habnabit>
see the first example in the ocaml section
<_habnabit>
except i normally call it 'aux' and not 'loop'
<_habnabit>
also that's some bad indentation, dang
<_habnabit>
editing this page
<_habnabit>
... or not. can't be bothered to make an account