<nihtml>
hi guys, i wanna list a dir's files in ocaml but idk how to do that, any idea?
nihtml has left #ocaml []
jhowarth has joined #ocaml
valross has joined #ocaml
valross has quit [Client Quit]
jhowarth has quit [Remote host closed the connection]
vivanov has quit [Ping timeout: 260 seconds]
vivanov has joined #ocaml
sepp2k has quit [Quit: Leaving.]
ymasory has joined #ocaml
ymasory has quit [Quit: Leaving]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
ymasory has joined #ocaml
vivanov has quit [Ping timeout: 246 seconds]
vivanov has joined #ocaml
arubin has quit [Quit: arubin]
bzzbzz has quit [Quit: leaving]
vivanov has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
enthymeme has joined #ocaml
rien has quit [Ping timeout: 252 seconds]
rien has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
boscop has quit [Ping timeout: 246 seconds]
boscop has joined #ocaml
vivanov has quit [Ping timeout: 250 seconds]
vivanov has joined #ocaml
lopex has quit []
arubin has joined #ocaml
vivanov has quit [Ping timeout: 246 seconds]
vivanov has joined #ocaml
mihamina has left #ocaml []
vivanov has quit [Ping timeout: 250 seconds]
dnolen has quit [Quit: dnolen]
vivanov has joined #ocaml
Associ8or has quit [Quit: Associ8or]
ymasory has quit [Quit: Leaving]
lamawithonel has joined #ocaml
enthymeme has quit [Ping timeout: 250 seconds]
vivanov has quit [Ping timeout: 252 seconds]
mrcarrot has joined #ocaml
<mrcarrot>
i am doing a test to see how well the naive implementation of a fibonacci function gets optimized in different languages. i have been googling up the function, but how do i print out a number in ocaml?
<mrcarrot>
for example if i have the function fib... how do i make it into a program that prints out fib 41
vivanov has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
larhat has joined #ocaml
vivanov has quit [Ping timeout: 246 seconds]
Amistoso1277 has joined #ocaml
Amistoso1277 has left #ocaml []
vivanov has joined #ocaml
philtor has quit [Ping timeout: 260 seconds]
myu2 has joined #ocaml
myu2 has quit [Client Quit]
kaustuv has joined #ocaml
kaustuv has left #ocaml []
rien has quit [Ping timeout: 240 seconds]
rien has joined #ocaml
Oejet has joined #ocaml
ygrek has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Yoric has joined #ocaml
DOUK has quit [Quit: Quitte]
arubin has quit [Quit: arubin]
rixed has quit [Quit: leaving]
rixed has joined #ocaml
ikaros has joined #ocaml
rien has quit [Ping timeout: 250 seconds]
Oejet has quit [Quit: Leaving.]
rien has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
ftrvxmtrx has joined #ocaml
<vivanov>
just forked batteries, "make doc" results in error:/home/vivanov/_build/src/batSet.mli : lexing: empty token
<temoto>
Where can i read how structural type checking is implemented in ocaml compiler?
<flux>
from the source code I imagine :)
<flux>
caml_equal might be the function
jderque has joined #ocaml
<flux>
ah, no, caml_compare perhaps
<temoto>
I need very high-level understanding, without details.
<flux>
well, it compares if two values are equal to each other. values that are not tagged are compare directly (ie. integers), tagged values (pointers) are tracked down
<temoto>
I have read something in the lines of each method in whole program including all modules is assigned with some tag and then typechecker somehow checks usage of those tags. But i can't find that post anymore.
<flux>
hmm
<flux>
tag is something that is in memory and typechecker doesn't care about memory
<flux>
value comparison on the other hand doesn't care about types, but it cares what is in memory
<temoto>
Those tags are compiler implementation detail, not language feature.
<flux>
yes
<flux>
what kind of definition are you looking for '='? it is just the same what would happen if you manually compared each field with the other
<temoto>
I'm looking for explanation how static type checking (i'm not sure if object#method is proper syntax) function f -> f#method works.
<rproust>
flux: temoto: it seems that one of you is talking about structural comparison and the other about structural type checking
<flux>
uh oh
<flux>
right :-)
<rproust>
10:03 < temoto> Where can i read how *structural type checking* is implemented in ocaml compiler?
<temoto>
rproust, thank you :)
<flux>
I read that wrong apparently :)
<rproust>
np
<rproust>
btw, I wouldn't know were to look
<rproust>
if you want a big picture, language independant explanation read wikipedia including the references
<rproust>
if you want to know how ocaml does it, I guess the sources are what you need
<flux>
I wonder if Types And Programming Languages covers such issues. but it's still on my reading list :)
<rproust>
(maybe you can try to find papers by the Gallium team on the matter…)
<kaustuv>
/tmp/camlasm7c489b.s:9609: Error: .size expression for camlSwitch__dense_1995 does not evaluate to a constant
<kaustuv>
(produced while building godi-ocamlduce with vanilla OCaml 3.12.0 on amd64)
<f[x]>
yes, triggered by recent binutils, fixed in ocaml svn and debian
<kaustuv>
so I should update both binutils and ocaml, or just binutils?
temoto has quit [Ping timeout: 246 seconds]
<f[x]>
downgrade binutils or upgrade caml
<f[x]>
or use debian package
<f[x]>
see PR#5237
<kaustuv>
Thanks
rien has quit [Ping timeout: 248 seconds]
rien has joined #ocaml
mrcarrot has left #ocaml []
rien has quit [Ping timeout: 250 seconds]
rien has joined #ocaml
<vivanov>
in order to use batteries as std lib with oasis, how to set _tags in _oasis?
Yoric has quit [Quit: Yoric]
_andre has joined #ocaml
rien has quit [Ping timeout: 240 seconds]
rien has joined #ocaml
<kaustuv>
While compiling ocsigen in godi, I get a bunch of errors like "undefined reference to 'SSLv2_client_method'". What library am I missing? (grep SSLv2_client_method /usr/include/**/*.h shows multiple hits)
<f[x]>
kaustuv, afaik sslv2 is deprecated
<kaustuv>
There does not seem to be an obvious way to convince godi-ocaml-ssl of that
<f[x]>
I've seen recently patch in debian
<f[x]>
but maybe you are simple missing some ssl-dev lib?
<kaustuv>
Nope, I have libssl-dev/unsable, and godi-ocaml-ssl builds properly. Just, nothing links against it.
<kaustuv>
*unstable
<f[x]>
try downgrading libssl-dev then
<kaustuv>
hmm
<kaustuv>
I guess that did the trick. Thanks a lot again.
<kaustuv>
I would almost prefer them to replace functions with stubs that call exit() instead of removing the functions. That way stuff that doesn't use the library won't just fail to compile.
<flux>
so you would prefer runtime errors instead of compile (link) time?-)
<kaustuv>
I said almost
<flux>
actually
<flux>
I've thought it'd be a nice option for ocaml to replace all type errors with failwith "insert actual error here"
<flux>
that way you could compile whole files instead of stopping to the first error
* f[x]
looks at extunix
<kaustuv>
actually I really just wish that I could apt-get install ocaml-3.12 already
<f[x]>
it is in unstable already
<f[x]>
but not all the libs are rebuilt yet
avsm2 has joined #ocaml
thomasga has joined #ocaml
<kaustuv>
ah, so it is!
lopex has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
vivanov has joined #ocaml
Yoric has joined #ocaml
<kaustuv>
is the following possible with ocsigen: the server sends a client a page with a link that when clicked sends back to the server some data (eg. Marshal.to_string (Some 42) []) as a POST
ygrek has joined #ocaml
temoto has joined #ocaml
q[mrw] has joined #ocaml
<rproust>
kaustuv: yes
<rproust>
you need to define a service that will receive the data
<rproust>
and then you make a link in page
q[mrw] has quit [Quit: Leaving]
<kaustuv>
rproust: I got that far, but I am not able to make a POST for some reason
<rproust>
do you want the page to change when the data is sent?
<rproust>
kaustuv: care to paste your code in which ever online code paster?
<kaustuv>
I will later in the day. I am not quite ready to give up yet. It is enough to know that it is possible for the time being.
thomasga has quit [Quit: Leaving.]
rien has quit [Ping timeout: 250 seconds]
rien has joined #ocaml
yziquel has joined #ocaml
<yziquel>
is there a a way to easily have oasis generate .mli files? like with ocamlc -i?
<thelema>
yziquel: auto-generated .mli files are as good as none at all
gildor has quit [Quit: leaving]
thomasga has joined #ocaml
<kaustuv>
If I want modules like Eliom_predefmod at the toplevel, what should I be #require-ing?
ygrek has quit [Ping timeout: 246 seconds]
<yziquel>
thelema: not true. when it's not your own code, it's handy to generate them
<thelema>
yziquel: then [for a in *.ml; do ocamlc -i $a > `basename $a`.mli; done]
<yziquel>
with ocamlfind dependencies... and internal dependencies that's too rash.
Yoric has quit [Quit: Yoric]
<yziquel>
and i'm looking for a way to do it with oasis. that's a hard constraint. not sure if possible.
Yoric has joined #ocaml
<thelema>
if you're in that situation, maybe ocamlbuild can help... I doubt oasis has anything for this
<yziquel>
thelema: i know. i'm fine with ocamlbuild. unfortunately constraint is oasis, not ocamlbuild directly.
<yziquel>
(in fact i'm already doing it with ocamlbuild... but cannot commit).
ski has quit [Ping timeout: 246 seconds]
joelr has joined #ocaml
<joelr>
good day
ski has joined #ocaml
<f[x]>
ocamlbuild q.inferred.mli ?
<f[x]>
add it as custom pre/postbuildcommand
yziquel has quit [Ping timeout: 252 seconds]
vivanov has quit [Ping timeout: 240 seconds]
Oejet has joined #ocaml
vivanov has joined #ocaml
ymasory has joined #ocaml
rien has quit [Ping timeout: 252 seconds]
rien has joined #ocaml
mcclurmc has joined #ocaml
oriba has joined #ocaml
Associat0r has joined #ocaml
BiDOrD has quit [Ping timeout: 258 seconds]
BiDOrD has joined #ocaml
_andre has quit [Quit: Lost terminal]
<rproust>
kaustuv: to get a module M available at top level you should do "open M"
<rproust>
you can also do "module M = VeryLongModule_Name_with_WeirdCasing"
<rproust>
although I recommend to follow yaron minski's tips on module opening
_andre has joined #ocaml
<kaustuv>
rproust: I think you misunderstood my question, but I have long ago figured it out
hnrgrgr has quit [Remote host closed the connection]
hnrgrgr has joined #ocaml
avsm has joined #ocaml
larhat has quit [Quit: Leaving.]
vivanov has quit [Ping timeout: 260 seconds]
lopex has quit []
Cyanure has quit [Ping timeout: 260 seconds]
vivanov has joined #ocaml
kaustuv has left #ocaml []
philtor has joined #ocaml
Cyanure has joined #ocaml
joewilliams_away is now known as joewilliams
lopex has joined #ocaml
wolverian has joined #ocaml
lopex has quit []
lopex has joined #ocaml
vivanov has quit [Ping timeout: 246 seconds]
ftrvxmtrx has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
Guest69694 has joined #ocaml
ygrek has joined #ocaml
sepp2k has joined #ocaml
vivanov has joined #ocaml
ulfdoz has joined #ocaml
kaustuv has joined #ocaml
thomasga has quit [Quit: Leaving.]
vivanov has quit [Quit: Lost terminal]
ftrvxmtrx has joined #ocaml
Oejet has quit [Ping timeout: 258 seconds]
myu2 has joined #ocaml
Yoric has quit [Quit: Yoric]
Guest69694 has quit [Ping timeout: 240 seconds]
Snark has joined #ocaml
kaustuv has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 246 seconds]
DimitryKakadu has joined #ocaml
Modius_ has joined #ocaml
Yoric has joined #ocaml
Modius_ has quit [Client Quit]
Oejet has joined #ocaml
lopexx has joined #ocaml
lopex has quit [Ping timeout: 252 seconds]
lopexx has quit []
lopex has joined #ocaml
rien has quit [Ping timeout: 246 seconds]
rien has joined #ocaml
Yoric has quit [Quit: Yoric]
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
avsm has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
boscop has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop_ has quit [Read error: Connection reset by peer]
boscop_ has joined #ocaml
Yoric has joined #ocaml
boscop_ has quit [Read error: Connection reset by peer]
boscop_ has joined #ocaml
Snark has quit [Quit: Ex-Chat]
boscop_ has quit [Read error: Connection reset by peer]
Cyanure has quit [Read error: Operation timed out]
ulfdoz has quit [Read error: Operation timed out]
boscop_ has joined #ocaml
avsm has quit [Ping timeout: 246 seconds]
lopex has quit [Ping timeout: 250 seconds]
avsm has joined #ocaml
lopex has joined #ocaml
smerz has joined #ocaml
boscop_ has quit [Ping timeout: 246 seconds]
yroeht has joined #ocaml
scooty-puff has joined #ocaml
<scooty-puff>
is it possible to encode peano numbers in ocaml and use them in a useful way? the hope would be to have a Make(Num: NumType): sig val get: t -> elt end
<scooty-puff>
functor
<scooty-puff>
(type t and type elt not included in the above sig)
<scooty-puff>
simulating tuples in c++
<scooty-puff>
(and allowing one to "loop" over homogenous tuples or arrays of statically known length in a very safe way)
<scooty-puff>
and in my case give me some peace of mind
<scooty-puff>
it seems like it would require pattern matching at the type level
<scooty-puff>
which i am uncertain if ocaml has
<scooty-puff>
ok, nm, found a way
DimitryKakadu has quit [Remote host closed the connection]
<scooty-puff>
hmm, actually, nevermind, i have not found a way
<scooty-puff>
the hope was that the outer module could include a "type size" definition, and the inner functor would have an appropriate "with" constraint
<scooty-puff>
but i can't think of how to write it
philtor has quit [Ping timeout: 246 seconds]
<scooty-puff>
and haven't found many papers or other resources
<mfp>
the one by Oleg (which I wrongly thought to be the above) is http://okmij.org/ftp/Computation/lightweight-dependent-typing.html which is accompanied by "Binary search with safe array access and no array bound checks" eliminating-array-bound-check-literally.ml [
edwin has quit [Remote host closed the connection]
Yoric has quit [Quit: Yoric]
boscop_ has joined #ocaml
philtor has quit [Ping timeout: 264 seconds]
philtor has joined #ocaml
boscop_ has quit [Ping timeout: 246 seconds]
boscop__ has joined #ocaml
boscop__ has quit [Read error: Connection reset by peer]
boscop__ has joined #ocaml
boscop__ has quit [Ping timeout: 250 seconds]
boscop has joined #ocaml
scooty-puff has quit [Quit: Leaving]
Oejet has quit [Quit: Leaving.]
boscop has quit [Read error: Connection reset by peer]
Associ8or has joined #ocaml
boscop has joined #ocaml
Associat0r has quit [Ping timeout: 246 seconds]
ftrvxmtrx has quit [Ping timeout: 246 seconds]
ftrvxmtrx has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
eikke has quit [Ping timeout: 252 seconds]
Amorphous has quit [Read error: Operation timed out]
jonafan has quit [Remote host closed the connection]
kusco has joined #ocaml
<kusco>
Idiot quesiton. I am trying to use extlib/dynArray for a project..I installed the packages, but how do I open the module from the interactive shell?
<kusco>
the mli is in /usr/lib/ocaml/extlib...I have tried open extlib/dynArray