companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
mengu has quit [Remote host closed the connection]
infinity0 has quit [Changing host]
infinity0 has joined #ocaml
infinity0 has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
nicoo has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
Algebr has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 255 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 268 seconds]
jao has joined #ocaml
silver has quit [Read error: Connection reset by peer]
KeyJoo has quit [Ping timeout: 240 seconds]
copy_ has quit [Quit: Connection closed for inactivity]
mindbound has joined #ocaml
mindbound has left #ocaml [#ocaml]
ousado_ has quit [Remote host closed the connection]
Algebr has joined #ocaml
ousado_ has joined #ocaml
TarVanimelde has joined #ocaml
Algebr has quit [Ping timeout: 268 seconds]
mfp__ has quit [Ping timeout: 240 seconds]
agravier has joined #ocaml
samrat has joined #ocaml
Algebr has joined #ocaml
ryanartecona has joined #ocaml
Algebr has quit [Ping timeout: 255 seconds]
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
pzp has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
alexelcu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
MercurialAlchemi has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
_whitelogger has joined #ocaml
samrat has quit [Ping timeout: 268 seconds]
olibjerd has joined #ocaml
samrat has joined #ocaml
Algebr has joined #ocaml
Algebr has quit [Ping timeout: 255 seconds]
_whitelogger has joined #ocaml
Algebr has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
pzp has quit [Quit: Connection closed for inactivity]
govg has joined #ocaml
enterprisey has joined #ocaml
enterprisey has quit [Remote host closed the connection]
sgronblo has joined #ocaml
madroach has quit [Ping timeout: 240 seconds]
madroach has joined #ocaml
sgronblo has quit [Ping timeout: 255 seconds]
sgronblo has joined #ocaml
barcabouna has quit [Ping timeout: 240 seconds]
sgronblo has quit [Ping timeout: 240 seconds]
barcabouna has joined #ocaml
slash^ has joined #ocaml
hashpuppy has quit [Quit: Connection closed for inactivity]
raphaelss has quit [Quit: Lost terminal]
mengu has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
mengu has quit [Ping timeout: 255 seconds]
olibjerd has quit [Quit: olibjerd]
ygrek has quit [Ping timeout: 240 seconds]
Merv_ has quit [Ping timeout: 240 seconds]
Merv_ has joined #ocaml
maarhart has joined #ocaml
maarhart_ has joined #ocaml
ohama has quit [Ping timeout: 255 seconds]
maarhart has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
maarhart_ has quit [Remote host closed the connection]
olibjerd has joined #ocaml
ohama has joined #ocaml
mfp__ has joined #ocaml
maarhart_ has joined #ocaml
maarhart_ has quit [Remote host closed the connection]
_whitelogger has joined #ocaml
FreeBirdLjj has joined #ocaml
nightmared has quit [Ping timeout: 258 seconds]
nightmared has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
_whitelogger has joined #ocaml
sgronblo has joined #ocaml
samrat has joined #ocaml
mengu has joined #ocaml
MercurialAlchemi has joined #ocaml
silver has joined #ocaml
raphaelss has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
agravier has quit [Quit: agravier]
mengu has quit [Remote host closed the connection]
samrat has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
olibjerd has quit [Quit: olibjerd]
jnavila has quit [Ping timeout: 255 seconds]
agravier has joined #ocaml
jao has joined #ocaml
olibjerd has joined #ocaml
spew has joined #ocaml
tane has joined #ocaml
jnavila has joined #ocaml
agravier has quit [Quit: agravier]
jnavila has quit [Ping timeout: 240 seconds]
<hannes> I wonder whether I'm missing some documentation/disclaimer about this whole OCaml-C interface... I struggle a bit with Val_long: long in C is usually 64bit these days, but Val_long cuts off one bit.. thus Val_long can never be safe!?
<hannes> i.e. CAMLreturn (Val_long(LONG_MAX)) is -1
agravier has joined #ocaml
<hannes> similarly, on 32bit platforms, e.g. getpid (which uses Val_int(getpid ())) won't always return the correct value.. but be limited to 31 bits
<Drup> hannes: not using ctypes ?
<hannes> Drup: this is raw C FFI from OCaml, as used in the OCaml runtime (Unix module)
<Drup> ah, right
<adrien> hannes: getpid doesn't use the 32 bits so it's not an issue in practice
<adrien> it's not comfortable however
<hannes> adrien: I'm sure there's a "better" example.. e.g. read/write!
<adrien> hannes: not on linux :P
<adrien> hmmm, actually
<hannes> adrien: I'm usually talking about UNIX and POSIX...
<adrien> yeah, I know, I wasn't being very serious :P
<adrien> (the thing I'm refering to is this: "On Linux, write() (and similar system calls) will transfer at most 0x7ffff000 (2,147,479,552) bytes, returning the number of bytes actually transferred. (This is true on both 32-bit and 64-bit systems.)")
<adrien> (because ssize_t vs. size_t is annoying)
<hannes> adrien: ah, thx!
<adrien> but for read and write, Unix is an issue but Unix.LargeFile isn't
<adrien> it uses int64 rather than int
<adrien> (on 32 bits you're stuck without largefile support otherwise)
<adrien> hannes: which functions are you binding?
jlam__ has joined #ocaml
<hannes> adrien: I bound sysctl net.link.generic.ifdata.1.general -- which returns ifdata (from if_mib.h / if.h) containing several (C) long fields representing interface statistics... certainly I now use caml_copy_int64 instead of Val_long... I mainly wondered whether others had fallen into the trap
jlam_ has quit [Ping timeout: 255 seconds]
<adrien> oh, indeed, these counters tend to quickly need more than a few bits of precision
<hannes> I was surprised that Val_long/Val_int don't do a range check, but instead just wrap values outside of their domain.. but seems like this is in the same spirit as integer arithmetics in OCaml..
<hannes> Drup: is ctypes any different (I have never looked into that, seemed to way more than I need)?
jao has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
<Drup> hannes: you never used ctypes? This is quite surprising. Ctypes doesn't make you write C code to write the bindings, but I don't know the behavior on overflows. It's probably in the docs
<mrvn_> pretty sure it just overflows. It uses the same ocaml macros internally.
mrvn_ is now known as mrvn
<Drup> Yes, that's probable
<hannes> Drup: I usually avoid interfacing C, and if I have to it is one or two functions... it is then not worth for me to learn another DSL / library
<mrvn> What I find anoying is that there is no int63 type that is unboxed on 64bit cpus but boxed on 32bit cpus.
jlam__ is now known as jlam
<mrvn> hannes: yes, verry much so.
<Drup> hannes: I find ctypes easier to learn than the behavior of the C/OCaml macros ...
<mrvn> hannes: avoids writing a C stub at all if you have just a simple function.
<mrvn> and you only have to learn it once.
argent_smith has joined #ocaml
olibjerd has quit [Ping timeout: 258 seconds]
<Leonidas> and you dont have to figure out how to build c stubs with whatever build system youre using :/
<Leonidas> that said, I found the ocaml c api easier to understand than the python c api
KeyJoo has joined #ocaml
ontologiae_ has joined #ocaml
tormen has quit [Remote host closed the connection]
tormen has joined #ocaml
samrat has joined #ocaml
ryanartecona has joined #ocaml
samrat has quit [Ping timeout: 258 seconds]
newuser has joined #ocaml
<newuser> Hi everyone, I've never programmed and this summer I'm willing to learn programming as a hobby, is suitable for me OCaml? Thanks
<Drup> I believe this book would be well suited for you: http://ocaml.org/learn/books.html#OCamlfromtheVeryBeginning
samrat has joined #ocaml
<rightfold> Typed functional programming is excellent for beginning programmers.
olibjerd has joined #ocaml
ontologiae_ has quit [Ping timeout: 268 seconds]
ontologiae_ has joined #ocaml
ontologiae_ has quit [Ping timeout: 246 seconds]
newuser has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ontologiae_ has joined #ocaml
ontologiae_ has quit [Ping timeout: 255 seconds]
sh0t has quit [Ping timeout: 255 seconds]
ryanartecona has quit [Quit: ryanartecona]
ygrek has joined #ocaml
ontologiae_ has joined #ocaml
TheLemonMan has joined #ocaml
agravier has quit [Quit: agravier]
enterprisey has joined #ocaml
jnavila has joined #ocaml
yegods has joined #ocaml
samrat has quit [Ping timeout: 260 seconds]
jnavila has quit [Ping timeout: 255 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
ryanartecona has joined #ocaml
spew has quit [Ping timeout: 246 seconds]
FreeBird_ has quit [Remote host closed the connection]
andreas_ has joined #ocaml
copy_ has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
zpe has joined #ocaml
barcabouna has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
zpe has quit [Remote host closed the connection]
newuser has joined #ocaml
<newuser> Thanks, I'm gonna learn OCaml
kakadu has joined #ocaml
<reynir> have fun, newuser :)
barcabouna has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
Anarchos has joined #ocaml
sh0t has joined #ocaml
newuser has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
sh0t has quit [Remote host closed the connection]
newuser has joined #ocaml
pierpa has joined #ocaml
newuser has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ontologiae has joined #ocaml
ontologiae_ has quit [Ping timeout: 255 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
iCharlie has joined #ocaml
ncthom91 has joined #ocaml
<demonimin> Does anyone know how to combine ctypes.foreign with jbuilder? Putting a non-stubs C source file in c_names doesn't seem to work
<demonimin> stracing, gcc is using --as-needed, maybe that messes things up
<Drup> demonimin: I'm pretty sure that's unsupported right now
<demonimin> dammit
<demonimin> I could use ctypes.stubs, but that's massive overkill and the build system is a mess
<demonimin> ah, if I add a (currently broken) extern declaration, it seems to be linked int
tane has quit [Remote host closed the connection]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Drup> wait, ctypes.foreign is the dynamic one, right ?
<Drup> then that should be completely trivial
<demonimin> maybe?
<Drup> The mode with code generation is the one that is complicated
<demonimin> yes, it's the dynamic one. there's just a linking issue
<Drup> but linking is dynamic, that's the point
<demonimin> I get: exception Dl.DL_error("_build/default/runner/main.exe: undefined symbol: blah")
<Drup> I suggest a bug report :p
<demonimin> hah
<demonimin> sure
<Drup> (alternatively, ctypes.stub + ocamlbuild works very well nowadays)
<Drup> (there is an ocamlbuild plugin in the ctypes-build package, it works like a charm)
<demonimin> I'm not changing build systems for a single function
<Drup> fair enough
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
olibjerd has quit [Quit: olibjerd]
larhat has joined #ocaml
mengu has joined #ocaml
ollehar has quit [Quit: ollehar]
jnavila has joined #ocaml
<demonimin> So I solved this with: 1. an external declaration 2. (c_library_flags (:standard -Wl,-export-dynamic))
jnavila has quit [Remote host closed the connection]
sgronblo has quit [Ping timeout: 258 seconds]
argent_smith has quit [Quit: Leaving.]
sgronblo has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.1]: i've been blurred!]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
demonimin has quit [Ping timeout: 240 seconds]
demonimin has joined #ocaml
ontologiae has joined #ocaml
kakadu has quit []
yegods_ has joined #ocaml
yegods has quit [Ping timeout: 260 seconds]
pierpa has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
yegods_ has quit [Remote host closed the connection]
superherointj has joined #ocaml
<superherointj> Good evening.
<superherointj> I am using Windows 10 64-bit. When I try to ¨opam install core¨ I get a message: [ERROR] core is not available because your system doesn't comply with ocaml-version >= "4.03.0" & os != "win32".
<superherointj> How do I fix this?
<superherointj> OS must not be Win32?
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
ryanartecona has joined #ocaml
yegods has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
Algebr has quit [Ping timeout: 260 seconds]
average has quit [Ping timeout: 245 seconds]
average has joined #ocaml
larhat has quit [Quit: Leaving.]
KeyJoo has quit [Ping timeout: 268 seconds]
ryanartecona has quit [Quit: ryanartecona]
moei has quit [Quit: Leaving...]
FreeBirdLjj has joined #ocaml