adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
spew has joined #ocaml
orbifx has quit [Ping timeout: 268 seconds]
sh0t has quit [Remote host closed the connection]
jao has joined #ocaml
mengu has quit [Quit: Leaving...]
AltGr has left #ocaml [#ocaml]
spew has quit [Read error: Connection reset by peer]
kerrhau has quit [Quit: bye!]
groovy2shoes has quit [Quit: Leaving]
kerrhau has joined #ocaml
raphaelss has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
sh0t has quit [Remote host closed the connection]
malina has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 268 seconds]
mfp has quit [Ping timeout: 240 seconds]
Jesin has joined #ocaml
sz0 has joined #ocaml
enterprisey has quit [Remote host closed the connection]
kerrhau has quit [Quit: bye!]
_snhmib has quit [Ping timeout: 255 seconds]
danieli has quit [Remote host closed the connection]
nomicflux has joined #ocaml
kerrhau has joined #ocaml
kerrhau_ has joined #ocaml
ayxih_ has joined #ocaml
clog_ has joined #ocaml
rpcope- has joined #ocaml
DrWhax_ has joined #ocaml
noplamodo_ has joined #ocaml
krktz has joined #ocaml
ayxih has quit [Read error: Connection reset by peer]
Soni has joined #ocaml
ocabot_ has quit [Ping timeout: 248 seconds]
rpcope has quit [Ping timeout: 248 seconds]
vodkaInferno has joined #ocaml
clog has quit [*.net *.split]
henrytill has quit [*.net *.split]
SoniIsAThey has quit [*.net *.split]
DrWhax has quit [*.net *.split]
butterthebuddha has quit [*.net *.split]
krktz_ has quit [*.net *.split]
jerith has quit [*.net *.split]
vodkaInf1rno has quit [*.net *.split]
noplamodo has quit [*.net *.split]
clog_ is now known as clog
butterthebuddha has joined #ocaml
silver_ has quit [Read error: Connection reset by peer]
henrytill has joined #ocaml
jerith has joined #ocaml
jbrown has quit [Ping timeout: 250 seconds]
jbrown has joined #ocaml
spew has joined #ocaml
<xvilka> Hi! Is there any automatic bindings generation directly from C headers (for ctypes.foreign), something like rust-bindgen, but for ocaml? httpss://rust-lang-nursery.github.io/rust-bindgen
spew has quit [Read error: Connection reset by peer]
nomicflux has quit [Quit: nomicflux]
<whoman> called...
<whoman> ah, http://swig.org/
<whoman> there may likely be other solutions as well
cbot has joined #ocaml
<xvilka> whoman: no, swig requires writing "interface" files, which is dull work and you have to keep it updated. Also it seems almost dead, judging from repository activity. I want something like rust-bindgen, which parses C headers, e.g. using Clang, and generates the bindings from the parsed headers
raphaelss has joined #ocaml
mk9 has joined #ocaml
xttraces has quit [Quit: Connection closed for inactivity]
butterthebuddha has quit [Max SendQ exceeded]
butterthebuddha has joined #ocaml
mk9 has quit [Quit: mk9]
Jesin has quit [Quit: Leaving]
mbuf has joined #ocaml
infinity0 has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
zmt00 has quit [Quit: Leaving]
davs has joined #ocaml
kerrhau has quit [Quit: WeeChat 1.9.1]
kerrhau_ has quit [Quit: bye!]
raphaelss has quit [Remote host closed the connection]
mk9 has joined #ocaml
mk9_ has joined #ocaml
mk9 has quit [Read error: Connection reset by peer]
mk9__ has joined #ocaml
mk9_ has quit [Ping timeout: 240 seconds]
mk9 has joined #ocaml
mk9__ has quit [Ping timeout: 250 seconds]
davs has quit [Remote host closed the connection]
KeyJoo has joined #ocaml
dmi3y has joined #ocaml
dmi3y has quit [Client Quit]
mk9 has quit [Quit: mk9]
TarVanimelde has joined #ocaml
dmi3y has joined #ocaml
BitPuffin|osx has joined #ocaml
jnavila has joined #ocaml
sapristi has joined #ocaml
raphaelss has joined #ocaml
freusque has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
mk9 has joined #ocaml
mk9 has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
ygrek has joined #ocaml
AltGr has joined #ocaml
mfp has joined #ocaml
mk9 has joined #ocaml
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 276 seconds]
BitPuffin|osx has quit [Ping timeout: 248 seconds]
mk9 has quit [Quit: mk9]
mbuf has quit [Remote host closed the connection]
<orbifx[m]> xvilka: not heard of automatic generation no
mbuf has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
malina has joined #ocaml
malina has quit [Remote host closed the connection]
malina has joined #ocaml
cbot has quit [Quit: Leaving]
shiyas has joined #ocaml
<octachron> xvilka, there is https://github.com/xavierleroy/camlidl that generates bindings from IDL files
barcabuona has quit [Quit: WeeChat 1.9.1]
kakadu has joined #ocaml
<octachron> But generic C headers file do not contain enough information to generate bindings. For instance in `int foo(char* bar)` is bar a string? A pointer to a single character? An array of character? The true output of the function whereas int is an error code?
Serpent7776 has joined #ocaml
dmi3y has left #ocaml [#ocaml]
zolk3ri has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
snhmib has joined #ocaml
_andre has joined #ocaml
freyr has joined #ocaml
jbrown has quit [Ping timeout: 248 seconds]
jao has joined #ocaml
malina has quit [Ping timeout: 248 seconds]
snhmib has quit [Ping timeout: 240 seconds]
snhmib has joined #ocaml
<Leonidas> looks like jsoo-ppx is incompatible with ppx_deriving_yojson on 4.05 :-/
snhmib has quit [Ping timeout: 248 seconds]
snhmib has joined #ocaml
inr has quit [Quit: WeeChat 1.9.1]
inr has joined #ocaml
greyfacenospace has joined #ocaml
<greyfacenospace> hello
<Fardale> hi
<greyfacenospace> i have a question. i am still learning ocaml and i get this error which i can't understand
<greyfacenospace> Error: This expression has type 'a t option but an expression was expected of type 'a t
<greyfacenospace> how can i fix that?
jnavila has joined #ocaml
<greyfacenospace> can someone help?
silver has joined #ocaml
<zozozo> greyfacenospace: on line 7. you try and return a list, while the other branches return a list option
<zozozo> you probably want line 7 to be | [a] -> Some (Nil a)
jao has quit [Ping timeout: 240 seconds]
ziyourenxiang has joined #ocaml
<greyfacenospace> zozozo: so i change [a] -> Some (Nile (a)) to [a] -> Some (Nile a)
<greyfacenospace> i mean Nil\
<greyfacenospace> ]?
<zozozo> greyfacenospace: in the code you pasted, line 7 reads : " |[a]-> (Nil(a))", while it should probably be "| [a] -> Some (Nil(a))"
malina has joined #ocaml
<greyfacenospace> zozozo: i did what you suggested but i still get the same error. Line 7 and Line 8 now both have Some
<greyfacenospace> zozozo: https://pastebin.com/hnA4DQG9
<zozozo> there's also the problem of your recursive call at line 6: when you call from_list, it returns an option, that you have to unwrap, like in https://pastebin.com/P8sCPH23
<zozozo> greyfacenospace: ^
<greyfacenospace> oh
<greyfacenospace> let me try that out
<greyfacenospace> zozozo: were you able to run the code you pasted?
<greyfacenospace> because i am getting an error
malina has quit [Read error: Connection reset by peer]
malina has joined #ocaml
<zozozo> mhm.. didn't really try, I'll look at what happens
<zozozo> greyfacenospace: oh sorry, line 8 should read "Some (Nil x)"
snhmib has quit [Read error: Connection reset by peer]
<greyfacenospace> zozozo: oh...thank you so much :D
snhmib has joined #ocaml
<greyfacenospace> zozozo: i can't really understand why its working now though
<zozozo> well, when you call from_list on xs, it returns an option
<zozozo> that is. either a None or Some r where r is actually a value of your non_empty list type
<greyfacenospace> oh
<greyfacenospace> now i get it
<zozozo> ^^
<greyfacenospace> thanks
greyfacenospace has quit [Quit: Page closed]
jao has joined #ocaml
donflopez has joined #ocaml
<donflopez> Hello guys!
<donflopez> I'm having troubles trying to install ocp-build
<donflopez> The compilation of ocp-build failed at "make".
<donflopez> it was a conflict with reason :)
<donflopez> I've removed it and everything works fine
marvin2 has joined #ocaml
marvin2 has quit []
marvin2 has joined #ocaml
nomicflux has joined #ocaml
mbuf has quit [Quit: Leaving]
dmi3y has joined #ocaml
zaquest_ has joined #ocaml
zaquest has quit [Read error: Connection reset by peer]
nomicflux has quit [Quit: nomicflux]
marvin2 has left #ocaml [#ocaml]
spew has joined #ocaml
jnavila has quit [Ping timeout: 264 seconds]
jbrown has joined #ocaml
zolk3ri has quit [Ping timeout: 248 seconds]
trysound has joined #ocaml
aciniglio has joined #ocaml
shinnya has joined #ocaml
danieli has joined #ocaml
danieli has joined #ocaml
sapristi has quit [Ping timeout: 255 seconds]
sh0t has joined #ocaml
p1n34ppl3 has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
malina has quit [Remote host closed the connection]
Jesin has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
KeyJoo has quit [Remote host closed the connection]
jbrown has quit [Remote host closed the connection]
jnavila has joined #ocaml
wxyzzyrd has joined #ocaml
Siegfried has joined #ocaml
FreeBirdLjj has joined #ocaml
<orbifx[m]> Anyone figured out how to check if expression tailcalls?
<zozozo> orbifx[m]: isn't there an annotation for that in recent compilers ?
<orbifx[m]> there is `[@tailcall]`, but I've never got it work around `if` expressions
<orbifx[m]> I get: Warning 53: the "tailcall" attribute cannot appear in this context
<zozozo> what do you mean, "if" constructions ?
jbrown has joined #ocaml
<zozozo> well, quite righyl, an if block cannot be considered tailcall or not
<zozozo> rather, you should probably annotate the calls made in each block statement ("if <cond> then begin blabla...; f[@tailcall] x y z end else begin ...;g[@tailcall] z x)
moei has quit [Quit: Leaving...]
<orbifx[m]> Let's see
<orbifx[m]> K that worked
<orbifx[m]> I forgot it has to go by the function not, after the parameters
nightblues has joined #ocaml
enterprisey has joined #ocaml
wxyzzyrd has quit [Ping timeout: 268 seconds]
wxyzzyrd has joined #ocaml
enterprisey has quit [Ping timeout: 240 seconds]
barcabuona has joined #ocaml
zolk3ri has joined #ocaml
freusque has quit [Quit: WeeChat 1.9.1]
wxyzzyrd has quit [Ping timeout: 258 seconds]
dmi3y has quit [Quit: dmi3y]
donflopez has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
donflopez has joined #ocaml
dmi3y has joined #ocaml
enterprisey has joined #ocaml
sz0 has joined #ocaml
donflopez has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
donflopez has joined #ocaml
cschneid has quit [Read error: Connection reset by peer]
cschneid- has joined #ocaml
freyr has quit [Remote host closed the connection]
zmt00 has joined #ocaml
tane has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
malina has joined #ocaml
Serpent7776 has quit [Quit: Leaving]
moei has joined #ocaml
FreeBirdLjj has joined #ocaml
webshinra has joined #ocaml
Siegfried has quit [Ping timeout: 276 seconds]
haesbaert has quit [Remote host closed the connection]
aciniglio has quit [Ping timeout: 240 seconds]
malina has quit [Remote host closed the connection]
raphaelss has quit [Remote host closed the connection]
dmi3y has quit [Quit: dmi3y]
dmi3y has joined #ocaml
jnavila has quit [Remote host closed the connection]
donflopez has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TarVanimelde has joined #ocaml
govg has joined #ocaml
dmi3y has quit [Quit: dmi3y]
aciniglio has joined #ocaml
jnavila has joined #ocaml
jao has quit [Ping timeout: 248 seconds]
groovy2shoes has joined #ocaml
wxyzzyrd has joined #ocaml
_andre has quit [Ping timeout: 260 seconds]
kakadu has quit [Quit: Konversation terminated!]
Soni has quit [Ping timeout: 260 seconds]
Soni has joined #ocaml
_andre has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
TarVanimelde has quit [Quit: TarVanimelde]
raphaelss has joined #ocaml
shiyas has quit [Ping timeout: 250 seconds]
slash^ has joined #ocaml
ziyourenxiang has quit [Ping timeout: 252 seconds]
wxyzzyrd has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
wxyzzyrd has joined #ocaml
malina has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
wxyzzyrd has quit [Quit: WeeChat 1.9.1]
wxyzzyrd has joined #ocaml
kolko has quit [Quit: ZNC - http://znc.in]
spew has quit [Quit: Connection closed for inactivity]
dhtns has quit [Ping timeout: 240 seconds]
dhtns has joined #ocaml
donflopez has joined #ocaml
_andre has quit [Quit: leaving]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
cbot has joined #ocaml
donflopez has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 248 seconds]
leah2 has quit [Ping timeout: 246 seconds]
Jesin has quit [Quit: Leaving]
raphaelss has quit [Ping timeout: 255 seconds]
leah2 has joined #ocaml
argent_smith1 has quit [Quit: Leaving.]
whoman has quit [Remote host closed the connection]
whoman has joined #ocaml
kolko has joined #ocaml
zv has quit [Quit: WeeChat 1.9]
enterprisey has quit [Ping timeout: 276 seconds]
wxyzzyrd has quit [Ping timeout: 248 seconds]
enterprisey has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
pierpa has joined #ocaml
sapristi has joined #ocaml
fraggle_ has joined #ocaml
jao has joined #ocaml
kerrhau has joined #ocaml
spew has joined #ocaml
sh0t has quit [Remote host closed the connection]
spew has quit [Remote host closed the connection]
orbifx has joined #ocaml
lobo has quit [Read error: Connection reset by peer]
jnavila has quit [Quit: Konversation terminated!]
lobo has joined #ocaml
sapristi has quit [Ping timeout: 255 seconds]
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 248 seconds]
kakadu_ has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]