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
enterprisey has joined #ocaml
Anarchos has quit [Quit: got to sleep]
kakadu_ has quit [Remote host closed the connection]
cbot has joined #ocaml
maufred has quit [Ping timeout: 258 seconds]
VermillionAzure has quit [Ping timeout: 248 seconds]
maufred has joined #ocaml
nalc has joined #ocaml
nalc has quit [Read error: Connection reset by peer]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
zolk3ri has quit [Remote host closed the connection]
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 248 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
shinnya has joined #ocaml
KeyJoo has joined #ocaml
nalc has joined #ocaml
cbot_ has quit [Ping timeout: 260 seconds]
VermillionAzure has joined #ocaml
enterprisey has quit [Read error: Connection reset by peer]
snhmib has quit [Quit: WeeChat 1.6]
enterprisey has joined #ocaml
<_xvilka_> expired SSL certificate on realworldocaml site
shinnya has quit [Ping timeout: 255 seconds]
nomicflux has joined #ocaml
<_xvilka_> I have a question - how to convert String to CArray? It doesn't seem to have any function to convert from String or Bytes, only from lists
silver has quit [Read error: Connection reset by peer]
nalc has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 260 seconds]
<_xvilka_> uh, seems like the only simple way is the most ineffective - convert string to a list of chars, then convert to CArray
<_xvilka_> why, why there is no standard function for this in ctypes module!?
<_xvilka_> (to do that efficiently)
sz0 has joined #ocaml
<_xvilka_> uh, I think I will fall back to the "old way" of interfacing with C, ctypes is hardly documented, while old-fashion one documented much better
sh0t has quit [Remote host closed the connection]
VermillionAzure has quit [Ping timeout: 248 seconds]
VermillionAzure has joined #ocaml
malina has quit [Remote host closed the connection]
hooman has joined #ocaml
whoman has quit [Remote host closed the connection]
hooman has quit [Remote host closed the connection]
jao has quit [Ping timeout: 240 seconds]
whoman has joined #ocaml
whoman has quit [Remote host closed the connection]
nalc has joined #ocaml
nalc has quit [Quit: Textual IRC Client: www.textualapp.com]
cbot_ has joined #ocaml
spew has quit [Read error: Connection reset by peer]
pierpa has quit [Quit: Page closed]
whoman has joined #ocaml
whoman has quit [Remote host closed the connection]
govg has quit [Ping timeout: 248 seconds]
whoman has joined #ocaml
<_xvilka_> hm. In_channel.length returns incorrect value of the file size
nomicflux has quit [Quit: nomicflux]
<_xvilka_> oh, nvm
nomicflux has joined #ocaml
KeyJoo has quit [Ping timeout: 248 seconds]
govg has joined #ocaml
nomicflux has quit [Quit: nomicflux]
osa1 has joined #ocaml
kerrhau has quit [Ping timeout: 260 seconds]
osa1 has quit [Remote host closed the connection]
BitPuffin|osx has joined #ocaml
mbuf has joined #ocaml
TarVanimelde has joined #ocaml
bramford has quit [Quit: leaving]
<_xvilka_> problem wasn't in ctypes library, sorry :( I just passed the wrong buffer /o\
KeyJoo has joined #ocaml
raphaelss has quit [Remote host closed the connection]
osa1 has joined #ocaml
<osa1> how do I fold a string? I don't see fold_left or fold_right in Str or String modules
lopex has quit [Quit: Connection closed for inactivity]
freusque has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
<whoman> i read today, not to use 'Str' module
<whoman> also, osa1 , strings could be sequences or lists of chars, where folding could apply ..
<osa1> whoman: what do you mean "could be" ?
zmt00 has quit [Quit: Leaving]
AltGr has joined #ocaml
maattdd has joined #ocaml
<whoman> i do not know the internal type of strings in ocaml. i think they are bytes now or they are not any more..
<osa1> fold functions can be provided for different representations so I'm not sure how much representation matters.
<companion_cube> use an extension of the stdlib, astring, containers, batteries, core, base, … they all provide fold on strings afaik
ygrek has joined #ocaml
freusque has quit [Ping timeout: 255 seconds]
<Leonidas> there is no String.fold? meh
<Leonidas> nor a way to convert a string to char list.
<Leonidas> whoman: strings are not char lists
<Leonidas> I can't think of a reason why the default String module would not have a fold though.
<companion_cube> converting to char list is bad, anyway
<companion_cube> but yeah, String.fold missing is just another case of incomplete stdlib
mk9 has joined #ocaml
mk9 has quit [Ping timeout: 255 seconds]
argent_smith has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
shiyas has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 255 seconds]
<Leonidas> the question is what the elements of a string are. chars? uchars? single bytes?
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
freusque has joined #ocaml
<octachron> _xvilka_, there is no need to use an intermediary for converting between string and CArray: CArray.(make + set) should be enough. Note also that depending on your use case ocaml_start_string might work better
zolk3ri has joined #ocaml
<companion_cube> Leonidas: yeah, if I could update the stdlib I'd like to have fold_bytes and fold_uchars and maybe even fold_glyphs
<companion_cube> something like in rust
<companion_cube> (but maybe with iterators, yay)
<Leonidas> \o/
cbot_ has quit [Ping timeout: 260 seconds]
mbuf has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
mfp has joined #ocaml
mengu has joined #ocaml
freyr has joined #ocaml
osa1 has quit [Remote host closed the connection]
jao has joined #ocaml
silver has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 260 seconds]
baboum has joined #ocaml
spew has joined #ocaml
spew has quit [Read error: Connection reset by peer]
KeyJoo has quit [Read error: Connection reset by peer]
KeyJoo has joined #ocaml
leah2 has quit [Read error: Connection reset by peer]
leah2 has joined #ocaml
bjs has quit [Ping timeout: 264 seconds]
bjs has joined #ocaml
<Leonidas> quick Q: if I have an foo.install file, I don't need install: and remove: stanzas in opam, correct?
sh0t has joined #ocaml
<Drup> _xvilka_: you do realize you can just write a for loop that copy the string in a carray ?
jao has quit [Ping timeout: 255 seconds]
<octachron> Leonidas, yes
<Leonidas> octachron: Great, thanks. Creating PRs then :)
andreas_ has joined #ocaml
<Leonidas> companion_cube: yeah, Rust/Swift are one of the few languages that do actually think what you want to iterate over in a string.
<companion_cube> they're more recent, too, but yeah
donflopez has joined #ocaml
govg has quit [Ping timeout: 248 seconds]
nahra has quit [Remote host closed the connection]
shinnya has joined #ocaml
lopex has joined #ocaml
donflopez has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 240 seconds]
donflopez has joined #ocaml
mengu has quit [Remote host closed the connection]
barcabuona has quit [Quit: WeeChat 1.9.1]
VermillionAzure has quit [Ping timeout: 240 seconds]
baboum has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
dynrzk has joined #ocaml
dynrzk has quit [Ping timeout: 260 seconds]
malina has joined #ocaml
dynrzk has joined #ocaml
dynrzk has left #ocaml [#ocaml]
FreeBirdLjj has joined #ocaml
donflopez has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Read error: Connection reset by peer]
VermillionAzure has joined #ocaml
freusque has quit [Quit: WeeChat 1.9.1]
spew has joined #ocaml
johnelse has quit [Ping timeout: 240 seconds]
sepp2k has joined #ocaml
johnelse has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
jimmyrcom_ has joined #ocaml
donflopez has joined #ocaml
FreeBirdLjj has joined #ocaml
freyr has quit [Remote host closed the connection]
VermillionAzure has quit [Quit: Leaving]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
malina has quit [Remote host closed the connection]
Serpent7776 has quit [Quit: Leaving]
AltGr has left #ocaml [#ocaml]
donflopez has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 276 seconds]
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
mengu has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
mengu has quit [Remote host closed the connection]
enterprisey has joined #ocaml
mengu has joined #ocaml
FreeBirdLjj has joined #ocaml
mengu_ has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
johnelse_ has joined #ocaml
mengu_ has quit [Ping timeout: 260 seconds]
johnelse has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 255 seconds]
Associat0r has quit [Read error: Connection reset by peer]
seangrove has joined #ocaml
<seangrove> seliopou: ping - you around? Running into trouble with httpaf trying to read a request body. With the example code it basically just hangs
<seangrove> Here's the code I'm working with https://gist.github.com/sgrove/fb629515fd1b1077e9931b39a65ba61d
kakadu has quit [Quit: Konversation terminated!]
<seangrove> I'm not sure why it never hits eof. If `on_read` returns more than 34 (the size of the body in this case), faraday throws an assert (makes sense), and same if it return < 0
<seangrove> I thought returning the length of what I've consumed would bump faraday's offset and we'd get a eof on the next scheduled_read
<seangrove> Also, if the body is completely empty then there's no problem
shiyas has quit [Ping timeout: 260 seconds]
grueni__ has quit [Quit: Page closed]
zmt00 has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
dxtr has quit [Quit: leaving]
Anarchos has joined #ocaml
johnelse has joined #ocaml
johnelse_ has quit [Read error: Connection reset by peer]
kakadu has joined #ocaml
dxtr has joined #ocaml
jao has joined #ocaml
cbot_ has joined #ocaml
mengu has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
orbifx has joined #ocaml
mengu has quit [Remote host closed the connection]
orbifx has quit [Ping timeout: 268 seconds]
_andre has quit [Quit: leaving]
jnavila has joined #ocaml
mengu has joined #ocaml
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
kakadu has quit [Ping timeout: 248 seconds]
kakadu_ has joined #ocaml
zolk3ri has quit [Ping timeout: 276 seconds]
zolk3ri has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
ygrek has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
jnavila has quit [Remote host closed the connection]
kakadu has joined #ocaml
kakadu_ has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
mengu has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.10.2]: i've been blurred!]
johnelse has quit [Read error: Connection reset by peer]
johnelse has joined #ocaml
raphaelss has joined #ocaml
dreadedfrog has joined #ocaml
dreadedfrog has quit [Client Quit]
dreadedfrog has joined #ocaml
mk9 has joined #ocaml
dreadedfrog has quit [Ping timeout: 248 seconds]
kerrhau has quit [Quit: bye!]
kerrhau has joined #ocaml
mk9 has quit [Quit: mk9]
orbifx has joined #ocaml
malina has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
pierpa has joined #ocaml
kakadu has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]