smimou changed the topic of #ocaml to: OCaml 3.08.3 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
j__ has quit [Read error: 104 (Connection reset by peer)]
j__ has joined #ocaml
natv has quit [Read error: 60 (Operation timed out)]
_JusSx_ has quit ["leaving"]
<vincenz> Hello, how does one use finalizers?
<vincenz> More specifically... If I allocate a custom value in a c-extended lib, but this contains a class, how would I ensure the destructor call when the value is delete?
eyda|mon has joined #ocaml
Smerdyakov has quit [Client Quit]
Smerdyakov has joined #ocaml
Smerdyakov has quit [Client Quit]
Smerdyakov has joined #ocaml
Nutssh has joined #ocaml
j__ has quit [Read error: 60 (Operation timed out)]
j__ has joined #ocaml
j__ has quit [Read error: 104 (Connection reset by peer)]
j__ has joined #ocaml
monochrom has quit [Read error: 145 (Connection timed out)]
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
cmeme has quit [Remote closed the connection]
monochrom has joined #ocaml
cmeme has joined #ocaml
ulfdoz has joined #ocaml
monochrom has quit ["me!"]
ulfdoz_ has quit [Read error: 60 (Operation timed out)]
cjohnson has quit ["Leaving"]
tautologico has joined #ocaml
j_n_ has joined #ocaml
j__ has quit [Read error: 113 (No route to host)]
j_n_ is now known as j_n
CosmicRay has joined #ocaml
CosmicRay has quit ["Client exiting"]
tautologico has quit []
i has joined #ocaml
i has quit [Nick collision from services.]
i has joined #ocaml
i has quit [Nick collision from services.]
Submarine_ has joined #ocaml
Snark has joined #ocaml
__DL__ has joined #ocaml
eyda|mon has left #ocaml []
Nutssh has quit [Read error: 110 (Connection timed out)]
Nutssh has joined #ocaml
Herrchen has joined #ocaml
Msandin has joined #ocaml
Msandin has quit [Read error: 54 (Connection reset by peer)]
vezenchio has joined #ocaml
mlh has joined #ocaml
cognominal has quit [Remote closed the connection]
cognominal has joined #ocaml
_JusSx_ has joined #ocaml
tintin has quit [Remote closed the connection]
<mflux> vincenz, hmm.. I'm not quite sure what is the problem, isn't using custom blocks nicely documented?
<mflux> however I'm not sure if calling finalizers is _guaranteed_ though, for instance in the end of the program
<mflux> I am still wondering if its possible to make Dynloaded stuff appear in a toplevel loop I've linked into my program
<mflux> hm, I propably could use Env.add_module
<mflux> except Dynlink doesn't provide such values
smimou has joined #ocaml
shawn_ has joined #ocaml
cognominal has quit [Read error: 54 (Connection reset by peer)]
cognominal has joined #ocaml
_shawn has quit [Read error: 60 (Operation timed out)]
Snark has quit ["Leaving"]
Snark has joined #ocaml
cjohnson has joined #ocaml
spoofy has joined #ocaml
_JusSx_ has quit ["Lost terminal"]
spoofy has left #ocaml []
Gueben has joined #ocaml
Snark has quit ["Leaving"]
_JusSx_ has joined #ocaml
Snark has joined #ocaml
pango_ has joined #ocaml
pango has quit [Read error: 60 (Operation timed out)]
<vincenz> mflux: well the issue is that I want to call the destructor of a C++ class I might put in the custom block
<mflux> vincenz, hmm.. so then call?-)
<mflux> either with delete or with explicit call to destructor
<mflux> I take it you originally created the object with placement new?
<mflux> or you could just have a custom block that is a struct which then points to the object..
<vincenz> I haven't yet done it, but yes placement new or so
<vincenz> basically I want to add hooks of ocaml to ftgl
<mflux> so the destructor could be called in the finalizer with just foo.~Bar();
<vincenz> there's no per object finalize tho
<vincenz> is there
<Smerdyakov> Good grief. What language has that, besides maybe some esoteric Smalltalky thing?
<Smerdyakov> (Meaning per-object finalizers)
<vincenz> So how would I ensure the destructor call on the embedded C++ object
<mflux> vincenz, hmm.. custom_operations, 'finalize', doesn't it do just that?
<mflux> (looking at manual032.html)
<vincenz> Ah found it
<vincenz> yeah :)
<vincenz> Custom_tag
<vincenz> :)
<mflux> so that was what you were after in the beginning? I just sort of assumed you already knew all that :)
<vincenz> well I have to run, but thx
<vincenz> mflux: yip :)
monochrom has joined #ocaml
smimou has quit [Read error: 60 (Operation timed out)]
smimou has joined #ocaml
smimou has quit [Read error: 60 (Operation timed out)]
Submarine_ has quit ["Leaving"]
smimou has joined #ocaml
vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and bot]
vezenchio has joined #ocaml
vezenchio has quit [Remote closed the connection]
Snark has quit ["Leaving"]
tautologico has joined #ocaml
Herrchen has quit ["..."]
cognominal has quit [Read error: 54 (Connection reset by peer)]
cognominal has joined #ocaml
fck has joined #ocaml
<fck> hello, i have a syntax Q, would anyone be willing to help? it's pretty simple i believe..
<tautologico> ask it
<fck> i have no clue what's wrong with this:
<fck> let func_epsilon_t (count) =
<fck> epsilon_i *. (epsilon_f /. epsilon_i) ** ((float_of_int count) /. (float_of_int time_f)) ;;
<fck> where the epsilon values are all floats
<fck> i'm attempting to implement the neural gas algorithm if you wanted to know what that's for
<fck> below it are more functions defined like that...
<TeXitoi> where are defined epsilon_*.
<tautologico> here it's ok
<TeXitoi> s/\./\?/
<tautologico> I defined epsilons as float, count and time_f as ints
<tautologico> is time_f a float ?
<fck> no, it's an int
<tautologico> well, this snippet you pasted runs ok here
<tautologico> # epsilon_i *. (epsilon_f /. epsilon_i) ** ((float_of_int count) /. (float_of_int time_f)) ;;
<tautologico> - : float = 0.4940675749995046
<fck> it's within another function...
<fck> would the ;;'s be causing a problem for that?
<tautologico> so it's possible the syntax error is not there
<fck> forgive me, i'm relatively new to ocaml, but i've been reading a bunch of tutorials
<tautologico> I don't think so
<TeXitoi> fck: what's the syntax error?
<tautologico> send me the whole function
<tautologico> ocaml's syntax is somewhat quirky
<fck> just a sec
<fck> i think it's because i have nested functions...
<fck> and i'm using ;;'s at the end of my inner let's
<fck> i could be wrong though
<TeXitoi> fck: in text files, you can never use ";;"
<tautologico> well, I'm not a specialist in semicolons in ocaml, but I believe you misplaced them
<fck> i thought i had to in order for it to be executed in the appropriate order, is it just one ;?
<tautologico> no, it's none
<tautologico> if you're defining an inner function (or value) you should use the form
<tautologico> let fun x = x in
<fck> ah
<tautologico> that is, let <definition> in
<fck> and for the main function, just let it end?
<tautologico> yep
<TeXitoi> let <definition> in <expression>
<fck> i will try that
<fck> thanks for the help
<tautologico> for files i never use ;;
budjet has joined #ocaml
TeXitoi has quit ["leaving"]
TeXitoi has joined #ocaml
kuribas has joined #ocaml
budjet has quit [Remote closed the connection]
_JusSx_ has quit ["leaving"]
kuribas has quit ["bye"]
Gueben has quit ["Leaving"]
Nutssh has quit [Read error: 145 (Connection timed out)]
Nutssh has joined #ocaml
budjet has joined #ocaml
budjet has quit [Remote closed the connection]