sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
paciek has quit ["Lost terminal"]
ikaros has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
mnemonic has quit ["leaving"]
mbishop has quit ["Leaving"]
postalchris has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
smimou has quit ["bli"]
Jeff_ has joined #ocaml
Jeff_ has left #ocaml []
Jeff_ has joined #ocaml
<Jeff_>
test
Jeff_ has left #ocaml []
jlouis has quit [Read error: 110 (Connection timed out)]
JeffSmac has joined #ocaml
JeffSmac has quit [Client Quit]
johnnowak has joined #ocaml
b00t has joined #ocaml
johnnowak has quit []
postalchris has joined #ocaml
joshcryer has joined #ocaml
cmvjk has joined #ocaml
<cmvjk>
...trying to raise an exception in my ocaml C binding code causes my program to segfault... :(
<cmvjk>
does anyone know what might cause that to happen? or how I can at least find out more about why?
<cmvjk>
all I get is "Segmentation fault." when i run the program.
Mr_Awesome has joined #ocaml
<cmvjk>
ah, nevermind.
<Smerdyakov>
You're welcome.
postalchris has quit ["Leaving."]
joshcryer has quit [Read error: 145 (Connection timed out)]
<cmvjk>
okay, now I'm segfaulting if I call Wosize_val on a custom block...is there a reason why I can't do that? and, for that matter, if I try to assign values using Data_custom_val.
<hcarty>
cmvjk: May I ask what the first segfault problem was?
<cmvjk>
what, when I was trying to throw an exception? I wrote the name of the function wrong... :/
<hcarty>
Ah, ok. Understood.
<cmvjk>
I don't know why that segfaulted rather than telling me that the function didn't exist when I tried to compile it
<cmvjk>
but whatever...
<hcarty>
I'm working on a C-library binding as well, and while it works in bytecode/toplevel, native code segfaults
<cmvjk>
hmmm.
<hcarty>
So just looking for ideas :-)
<cmvjk>
yeah, I have no clue about this stuff. I'm an inexperienced programmer as it is, I probably shouldn't be trying to write C code like this...
<cmvjk>
and the worst thing is, it was working before, and I don't know why it isn't working now.
<hcarty>
That's unfortunate
<cmvjk>
isn't it, though? yet somehow it always ends up this way. anyway, thanks for your concern.
<hcarty>
Best of luck with it
Mr_Awesome has quit ["...and the Awesome level drops"]
diffbavis has quit [Remote closed the connection]
diffbavis has joined #ocaml
pantsd has quit [Remote closed the connection]
Submarine has joined #ocaml
mbp_ has joined #ocaml
mbp has quit [Read error: 104 (Connection reset by peer)]
pantsd has joined #ocaml
Smerdyakov has quit ["Leaving"]
<cmvjk>
okay, so basically I'm creating a block using caml_alloc_custom. If I try to reference Data_custom_val on that block in the same function as I create it, it works.
<cmvjk>
but if I return the block, then pass it back into a different function, and THEN try to reference Data_custom_val on it, it segfaults.
<jeffs>
man, i've never messed with the c bindings
<jeffs>
good luck! that looks like rough stuff
b00t has quit [Read error: 148 (No route to host)]
<cmvjk>
it's so weird! what would make it so that, if I set "int foo = *(some pointer)" that's okay, but then if i try to do "printf("%d\n", foo);" THAT segfaults.
<cmvjk>
i guess I need to go the C channel, actually...
johnnowak has joined #ocaml
<cmvjk>
ahaha, in case anyone is curious, my segfault issues were caused by the fact that I had the first two arguments to my C function switched from how they were represented in my .ml file.
<cmvjk>
I was taking a custom block value and taking Int_val on it, then taking an int value and calling it a custom block........
mbp_ is now known as mbp
jeffs is now known as jeffs_sleep
johnnowak has quit []
m3ga has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
pantsd has quit [Read error: 110 (Connection timed out)]
<flux->
cmvjk, it may be helpful to compile the C-code without optimizations, segfaults may be placed more naturally
<cmvjk>
hmm, thanks, actually i WAS compiling that code with optimizations, and had forgotten about that.
jlouis_ has quit [Remote closed the connection]
Foxyloxy has quit [Connection timed out]
Submarine has quit [Remote closed the connection]
love-pingoo has joined #ocaml
rickardg has joined #ocaml
jeffs_sleep has quit []
malc_ has joined #ocaml
ikaros has quit ["segfault"]
johnnowak has joined #ocaml
fremo has joined #ocaml
<fremo>
'lo
<fremo>
Is there a PCRE module writen in Ocaml ? (not the binding to the C library)
<fremo>
and is it possible to DOS ocaml Regexp module with a special regexp ?
<fremo>
I want to allow web visitors to use regexp so...
<malc_>
fremo: there's libre
<fremo>
erf, looking up libre in google is not easy :)
<fremo>
got it
<fremo>
nice ! thank you :)
<malc_>
np
<fremo>
a little outdated but... it's a good start :)
<fremo>
do you use it ?
<fremo>
whatever, I am a little dumb this morning, I didn't looked in the hump...
<malc_>
no, default regexp suits my little needs just fine
pango has quit [Remote closed the connection]
pango_ has quit [Remote closed the connection]
<fremo>
right
pango has joined #ocaml
pango_ has joined #ocaml
Submarine has joined #ocaml
malc_ has quit [Read error: 110 (Connection timed out)]
pango_ has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango_ has joined #ocaml
pango has joined #ocaml
ikaros_ has joined #ocaml
pango- has joined #ocaml
pango__ has joined #ocaml
love-pingoo has quit ["la preuve"]
johnnowak has quit []
pango_ has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango- is now known as pango
rickardg` has joined #ocaml
rickardg has quit [Read error: 145 (Connection timed out)]
rickardg` is now known as rickardg
<flux->
pango, hm, did you try to get the memory profiler for ocaml working with a recent ocaml version?
<flux->
I think you wrote a patch against the latest release or something along the lines?
rickardg has quit [Remote closed the connection]
gunark has quit ["Konversation terminated!"]
jlouis has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
love-pingoo has joined #ocaml
oscarh has joined #ocaml
slipstream-- has joined #ocaml
ocaml_newbie has joined #ocaml
gunark has joined #ocaml
zhllg has quit [Read error: 110 (Connection timed out)]
slipstream has quit [Read error: 110 (Connection timed out)]
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
cjeris has joined #ocaml
Submarine has quit [Remote closed the connection]
love-pingoo has quit ["ou bosser ?"]
pango__ has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
pango- has joined #ocaml
malc_ has joined #ocaml
ocaml_newbie has quit ["using sirc version 2.211+KSIRC/1.3.12"]
Smerdyakov has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
benny_ has joined #ocaml
benny has quit [Read error: 60 (Operation timed out)]
<pango>
flux-: smimou may be the best one to ask about this patch ;)
JeffSmac has joined #ocaml
* pango
is sorry for the nicks mess... forgot to kill an irc client on some box...
<smimou>
hum I only made an update of the patch, I don't claim that I understand it very well...
igli has left #ocaml []
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
love-pingoo has joined #ocaml
ikaros_ has quit [Read error: 110 (Connection timed out)]
ikaros_ has joined #ocaml
JeffSmac has quit []
gim__ has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
gim_ has quit [Read error: 110 (Connection timed out)]
gim__ is now known as gim_
JeffSmac has joined #ocaml
slipstream-- has joined #ocaml
slipstre1m-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
slipstream-- has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
bluestorm has quit [Remote closed the connection]
slipstre1m-- has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
<hcarty>
What level of performance hit is involved when using functors in OCaml? Where and when do these hits occur?
<hcarty>
I think I'm close to figuring out how to use them, and they have the potential to clean up my code significantly
<hcarty>
But I'm concerned by some of the speed issues I've seen advertised here and elsewhere
<love-pingoo>
hcarty: it shouldn't be too bad
<love-pingoo>
if it cleans your code, use them
<love-pingoo>
if it becomes critical you can inline them later
<love-pingoo>
(although I believe the defunctorizer is no longer maintained)
<hcarty>
love-pingoo: Ok, thanks. The code in question works with various Bigarray types, and from asking around previously it seems that variant types and functors are my two options for implementing this
<love-pingoo>
the overhead is in the lookup of the values from the abstracted module
<love-pingoo>
hopefully that's not critical in your code
<love-pingoo>
if you're using bigarrays I guess you're doing heavy computations on them, and this loop is about computation more than lookup
<malc_>
hcarty: there's no specialization whatsoever, the impact can be judged by this fact alone
JeffSmac has quit []
<hcarty>
malc_: I apologize, I don't know what you mean by specialization. Do you have a reference, or some extra context I can use to look up the term?
<malc_>
hcarty: are you familiar with c++ templates?
<hcarty>
malc_: Somewhat, at about an undergrad CS course level
<malc_>
hcarty: well with C++ when you instantiate template with a praticular type you effectively are getting new code specialized for this type, current ocaml implementation can not do it, so there's a cost of maintaing separate compilation
<hcarty>
malc_: Ok, I understand
<malc_>
there's tradeoff speed/time here, with defunctorization/specialization you get code bloat, without you get speed degradation
<hcarty>
This is for an OCaml wrapper for the HDF library, so the primary goal is reading/writing large data sets
<hcarty>
Since the data can be in many formats (at least everything that Bigarrays support) there is a large range of types to implement
smimram has joined #ocaml
<hcarty>
I'm currently using variant types and pattern matches, and it looks like functors will make for cleaner code
JeffSmac has joined #ocaml
Mr_Awesome has joined #ocaml
<JeffSmac>
variant types also have a certain amount of overhead
<JeffSmac>
so I'd use whichever is easiest to develop
slacker403 has joined #ocaml
slacker403 has left #ocaml []
<love-pingoo>
if module A depends on B, how come a.cmi doesn't depend on b.cmi according to ocamldep ?
<love-pingoo>
a.mli cites some types from B
<love-pingoo>
... maybe because my mli comes from a mly and wasn't there when I computed dependencies ...
smimou has quit [Read error: 110 (Connection timed out)]