<bluestorm>
seems try/catch are compiled to trap handlers pushed on the stack
<bluestorm>
(I assume det__ question was rather about try/catch control flow implementation than printing of uncatched exceptions
<bluestorm>
)
<olegfink>
hm, I think caml_raise is called not only when there is noone at home
<olegfink>
in particular from byterun's fail.c it's clear that the context of the handler is stored in caml_external_raise, right?
onigiri__ is now known as onigiri_
<det__>
Im not sure what a trap handler is
<bluestorm>
det__: I don't pretend I _know_ how try/with is implemented in native code, but here is what I suppose from the look of MIPS code emitter
<bluestorm>
a trap handler is basically a strack frame pushed on the stack, wich contains the adress of the code to be executed when you catch a raise
<bluestorm>
it's on the stack so it's lexically scoped, and you have a register wich keeps the value of the last trap handler pushed, so that you can get it's data quickly
<bluestorm>
(that's in MIPS wich has a lot of register; x86 probably manage the trap handler adress differently, but I don't read x86 assembly)
<bluestorm>
(of course, when you push a track handler on the stack, you write within the adress of the former trap handler; when you catch an expression and jump to a trap handler, you pop it and restore the former handler : lexical scoping again)
_Jedai_ has joined #ocaml
|Jedai| has quit [Read error: 60 (Operation timed out)]
<mfp>
bluestorm: re: your batteries posting
<mfp>
I've given some thought to this, and reached the same conclusion "using AAA batteries as a (kernel / core / inner layer) for Batteries would be the best decision"
<mfp>
we have 2 conflicting goals: make batteries easy to use (which implies easy to install => few deps), and make it comprehensive (=> functionality provided by 3rd party libs => harder to install in general (non-Debian, Fedora, etc.))
<mfp>
they are best served by having AAA as an easily reusable kernel, plus batteries, built on top of it
<mfp>
it also addresses the circular dependency problem: how to wrap a library that uses batteries in the Batteries namespace
Yoric has joined #ocaml
ua has quit [Read error: 60 (Operation timed out)]
Yoric_ has joined #ocaml
Yoric has quit [Read error: 104 (Connection reset by peer)]
Yoric_ is now known as Yoric
bluestorm has quit ["Leaving"]
ygrek has joined #ocaml
ikaros has joined #ocaml
Pimm has joined #ocaml
gareth_0 has joined #ocaml
<gareth_0>
hi, is there a built-in list index of function>?
<fx___>
thelema, reminds: best cure for the headache - an axe
<ksson>
i'm using camlp4o on an mli, which is also used for documentation
BiDOrD has quit [Read error: 110 (Connection timed out)]
BiDOrD has joined #ocaml
Associat0r has joined #ocaml
yakischloba has joined #ocaml
<Camarade_Tux>
hmmm, anyone know how to change the license of a project on the ocaml forge?
<thelema>
ksson: one bad workaround is to preprocess manually
<thelema>
Camarade_Tux: that's a good question for gildor
<Camarade_Tux>
actually that's ok, my co-admin just found it :P
<fx___>
thelema, how would preprocessing manually solve the problem?
<ksson>
thelema: that's what i fear
<ksson>
actually, when i think of it, there can be no workaround ... i will have to use another preprocessor
<ksson>
for what i'm doing, cpp or autoconf will be enough
<ksson>
still it's a pain :)
_zack has quit ["Leaving."]
_zack has joined #ocaml
_p4bl0 has joined #ocaml
<_p4bl0>
Hi everyone! I have something that may be a bug in ocaml. If it's not could you explain me why :
<_p4bl0>
let v = "";; if v != "" then "not empty" else "empty";; if v = "" then "empty" else "not empty";;
<_p4bl0>
the first if then else yields "not empty", and the second yieds "empty"
<_p4bl0>
so `v != ""` and `v = ""` are true at the same time
<_p4bl0>
wtf?!
<ksson>
_p4bl0: != and "" are not the negation of each other
<ksson>
<> and = are
<ksson>
and: != and ==
<ksson>
= and <> are for structural comparison (comparing the string, in this example)
<ksson>
== and != are for physiqual equality (equality of the pointers)
<_p4bl0>
okaaaay
<_p4bl0>
didn't knew that
<_p4bl0>
thanks
patronus has quit [Read error: 60 (Operation timed out)]
<ksson>
try:
<ksson>
"hello" = "hello"
<ksson>
and
patronus has joined #ocaml
<ksson>
"hello" == "hello"
<ksson>
first one is true, because the strings are equal (contain the same chars)
<ksson>
second one is false, because ocaml allocates the string twice, so they are two different strings
<ksson>
(having the same contents)
<mrvn>
Too bad we don't have string literals
<_p4bl0>
thanks ksson
<thelema>
yes, ocaml is tricky, having two equalities.
<thelema>
mrvn: why string literals?
thrasibule has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
_p4bl0 has left #ocaml []
Narrenschiff has joined #ocaml
_zack has quit ["Leaving."]
<fx___>
ksson, looks like I've got the partial fix for #4713 (removing last comment in file)
<ksson>
fx___: sorry?
<ksson>
fx___: i have to remove the last comment in the file?
<fx___>
no, I have the patch that will make camlp4o to show the last comment in file
<ksson>
ah ok :)
<ksson>
nice
<fx___>
but that's only the minor half of the problem
<ksson>
hmm
<ksson>
fx___: if you want me to test anything, send me the patch
<ksson>
but i won't have much time tonight
<fx___>
I'll attach it to bugreport later
thrasibule has quit [Read error: 113 (No route to host)]
<ksson>
ok
Yoric has quit []
schme has quit [Read error: 60 (Operation timed out)]
schme has joined #ocaml
ikaros has joined #ocaml
mattam has quit [Read error: 60 (Operation timed out)]
Gertm has joined #ocaml
ksson has quit [Read error: 113 (No route to host)]
ttamttam has joined #ocaml
Smerdyakov has joined #ocaml
fx___ has quit [Read error: 110 (Connection timed out)]
thrasibule has joined #ocaml
gareth_0 has joined #ocaml
smimou has joined #ocaml
<gildor>
Camarade_Tux: Go into project administration tab -> "Classement du projet dans l'arbre" -> "License"
<gildor>
Camarade_Tux: to change project license
Amorphous has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
gildor: yup, I finally saw it, my eyes are pretty bad :P
gareth_000 has quit [Remote closed the connection]
Amorphous has joined #ocaml
_andre has quit ["leaving"]
BiDOrD has quit [Read error: 60 (Operation timed out)]
ski_ has joined #ocaml
mattam has joined #ocaml
Pimm has joined #ocaml
BiDOrD has joined #ocaml
<Camarade_Tux>
I'm wondering how the META files for lablgtk2 look like in debian or fedora: like http://vpaste.net/N0fVT (default?) or like http://vpaste.net/Wfg5L (godi), or something else (in that case, can anyone pastebin it and give me the corresponding link)?
<Camarade_Tux>
thelema: thanks, I think I'll have to get a debian/ubuntu install and test there, this "init" package/predicate seems quite problematic
<Camarade_Tux>
(and having different METAs everywhere is quite annoying)
mjsor has quit []
gareth_000 has joined #ocaml
marteo has quit [Read error: 110 (Connection timed out)]
marteo has joined #ocaml
gareth_0 has quit [Remote closed the connection]
quelqun_dautre has joined #ocaml
thrasibule has quit [Read error: 60 (Operation timed out)]
cloudhea has joined #ocaml
* mrvn
still wonders why (int, int, c_layout) Bigarray.Array1.t does not generate inline code. Or rather why it looses the type information before the code generator checks if it has inline code for the type.
<mrvn>
(which it does)
<ygrek>
ertai, is there some fundamental reason why comments are not part of the ast?
jeddhaberstro has joined #ocaml
Narrenschiff has quit [Read error: 60 (Operation timed out)]
cloudhead has quit [Read error: 110 (Connection timed out)]
CcSsNET has quit [Client Quit]
<Gertm>
Is there a good guide on how to use and set up emacs for ocaml?
<Smerdyakov>
I just ran "apt-get install caml-mode". :P
<Gertm>
ah, tuareg seems nice, now I just need to find how to use it.
<Smerdyakov>
Well, in Debian, you just run that command and then load an OCaml source file.
palomer has joined #ocaml
<palomer>
hello
<Gertm>
Smerdyakov: yeah thanks, it works. Just don't know how to use it :)
<palomer>
how do I tell omake to include pcre when compiling a camlp4 source file?
<Smerdyakov>
Gertm, you mean "how to use OCaml"?
<Gertm>
Smerdyakov: I mean how to use the emacs mode :)
<Camarade_Tux>
palomer: mikmatch?
<Smerdyakov>
Gertm, it's quite useful without any special procedures. Standard compile-file and all that work.
<Smerdyakov>
Gertm, I think I have the wrong name for that. I mean whatever is that command to compile and run through error locations.
<palomer>
ahh, woops
<palomer>
nevermind
<palomer>
how do I use ocamlfind to compile camlp4 source files?
<Gertm>
Smerdyakov: I'll work it out :)
<Camarade_Tux>
palomer: I think: -syntax camlp4o -pkg mikmatch_pcre [ in my case ]
<palomer>
ah, right
<Camarade_Tux>
but I'm quite tired so it may be wrong :-)
<palomer>
camlp4o -I /usr/lib/ocaml/type-conv pa_type_conv.cmo pa_seditable.cmo test.ml <-- how do I write this in ocamlfind?
<palomer>
it simply outputs the resulting source after transformation
<Camarade_Tux>
palomer: what is your full command-line ?