adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
vicfred has quit [Remote host closed the connection]
vicfred has joined #ocaml
tvn948 has quit []
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
malc_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
malc_ has quit [Ping timeout: 256 seconds]
malc_ has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
malc_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
NSA_Spy has quit [Remote host closed the connection]
NSA_Spy has joined #ocaml
mbuf has joined #ocaml
narimiran has joined #ocaml
NSA_Spy has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ocaml
osa1 has joined #ocaml
dborisog has joined #ocaml
Serpent7776 has joined #ocaml
_whitelogger has joined #ocaml
rowbee has joined #ocaml
rowbee is now known as robi
snowpand_ has quit [Quit: Leaving...]
chripell has quit [Quit: ZNC 1.8.1+deb1 - https://znc.in]
chripell has joined #ocaml
nkly_ has joined #ocaml
bartholin has quit [Quit: Leaving]
jaar has joined #ocaml
mbuf has quit [Quit: Leaving]
mbuf has joined #ocaml
ggole has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
Haudegen has joined #ocaml
artart78 has quit [Ping timeout: 256 seconds]
inkbottle has quit [Ping timeout: 256 seconds]
zebrag has joined #ocaml
jbrown has quit [Ping timeout: 246 seconds]
jbrown has joined #ocaml
oriba has joined #ocaml
<oriba> If I call C-functions from OCaml, do I have to use CAMLprim for the function that is called from OCaml? I have seen examples, where C-functions only have type value.
<def> C-functions called from OCaml are restricted to taking and returning values
waleee-cl has joined #ocaml
aaaaaa has joined #ocaml
<oriba> how to give back double-value from C to OCaml?
Haudegen has quit [Ping timeout: 264 seconds]
sagax has quit [Remote host closed the connection]
sagax has joined #ocaml
Haudegen has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
mbuf has quit [Quit: Leaving]
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 260 seconds]
vicfred has quit [Quit: Leaving]
vicfred has joined #ocaml
<flux1> oriba: there's a C function that takes a C double, allocates a boxed ocaml-float and then returns that.. I don't recall if it might be valled Val_double or Double_val or something :)
<flux1> at least I'm 98% sure there is :)
<oriba> flux1: yes, found out that I have to use caml_alloc_float_array() for allocation (instead of caml_alloc()) and Store_double_field() instead of Store_field.
<oriba> but IÄm not sure if I have to use Camllocal<n> for a value that I don't give back and just store into the result, which is given back.
<malc_> flux1: caml_copy_double?
<flux1> malc_: sounds very likely :)
<malc_> tres bien
<flux1> oriba: I believe you do need to use Camllocal for those values
<oriba> but my value is a true C-double, not a value variable... Does Store_double_field(result, 0, Double_val(mydouble)) work with mydouble being a double[1] mydouble?
<flux1> hmm, I think Double_val is intended to convert from OCaml values to C values, right?
<flux1> so if mydouble is a C value, then it's not the right function to call
<flux1> "Double_val(v) returns the floating-point number contained in value v, with type double." and "Store_double_field(v, n, d) stores the double precision floating-point number d in the nth element of the array of floating-point numbers v.", so the latter takes plain C doubles and stores them inside OCaml heap
<oriba> ooops
<oriba> flux1: it worked, but seems to be the wrong function, yes. Val_double(mydouble) hmhhh
<oriba> errormessages ... hmhhh
<oriba> caml_copy_double ??
<oriba> I wonder why it compiled nicely with the wrong function...
<adrien> isn't that always the case with C stubs? ;p
<oriba> but it even gave back the right value...
<adrien> :D
<adrien> would have to take a deep look at the code but not sure I feel like doing that :P
spew has joined #ocaml
osa1 has quit [Ping timeout: 256 seconds]
malc_ has quit [Ping timeout: 240 seconds]
vicfred has quit [Quit: Leaving]
dborisog has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
<oriba> who is editing the opam-package-entries? Is there a centralized instance?
malc_ has joined #ocaml
vicfred has joined #ocaml
webshinra has quit [Remote host closed the connection]
waleee-cl has quit [Quit: Connection closed for inactivity]
nullcone has joined #ocaml
waleee-cl has joined #ocaml
Guest86335 has joined #ocaml
webshinra has joined #ocaml
jco has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
tane has joined #ocaml
malc_ has quit [Ping timeout: 256 seconds]
jco has quit [Ping timeout: 264 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
vicfred_ has joined #ocaml
vicfred_ has quit [Client Quit]
vicfred_ has joined #ocaml
vicfred has quit [Ping timeout: 256 seconds]
ggole has quit [Ping timeout: 260 seconds]
osa1 has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
oriba has joined #ocaml
vicfred_ has quit [Quit: Leaving]
vicfred has joined #ocaml
NSA_Spy has joined #ocaml
nkly_ has quit [Ping timeout: 246 seconds]
Serpent7776 has quit [Quit: leaving]
tane has quit [Quit: Leaving]
mfp has joined #ocaml
narimiran has quit [Ping timeout: 256 seconds]
artart78 has joined #ocaml
gaussian has quit [Quit: Connection closed]
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
aaaaaa has quit [Quit: leaving]
jaar has quit [Ping timeout: 246 seconds]
Undercover_Russi has joined #ocaml
NSA_Spy has quit [Ping timeout: 264 seconds]
aaaaaa has joined #ocaml
aaaaaa has left #ocaml [#ocaml]
vicfred has quit [Quit: Leaving]
delysin has quit [Ping timeout: 246 seconds]