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
toppler has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
nullifidian_ has joined #ocaml
kvda has joined #ocaml
nullifidian has quit [Ping timeout: 276 seconds]
toppler has joined #ocaml
ravenousmoose has joined #ocaml
ravenousmoose has quit [Ping timeout: 245 seconds]
ycjung has quit [Quit: WeeChat 2.6]
vicfred has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 240 seconds]
silver has quit [Read error: Connection reset by peer]
toppler has joined #ocaml
mfp has quit [Ping timeout: 245 seconds]
amiloradovsky has quit [Ping timeout: 240 seconds]
ravenousmoose has joined #ocaml
ravenousmoose has quit [Ping timeout: 252 seconds]
malina has quit [Ping timeout: 240 seconds]
ravenousmoose has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
ravenousmoose has quit [Ping timeout: 276 seconds]
keep_learning has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
toppler has quit [Ping timeout: 276 seconds]
zolk3ri has quit [Ping timeout: 260 seconds]
zolk3ri has joined #ocaml
kgop has joined #ocaml
retropikzel has joined #ocaml
toppler has joined #ocaml
kgop has quit [Client Quit]
kgop has joined #ocaml
kgop has quit [Client Quit]
kgop has joined #ocaml
kgop has quit [Client Quit]
kgop has joined #ocaml
kgop has quit [Client Quit]
kgop has joined #ocaml
<kgop> /msg NickServ STATUS
<kgop>
tmps2 has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 265 seconds]
tmps2 has quit [Remote host closed the connection]
toppler has quit [Ping timeout: 268 seconds]
retropikzel has quit [Remote host closed the connection]
toppler has joined #ocaml
narimiran has joined #ocaml
narimiran has quit [Remote host closed the connection]
narimiran has joined #ocaml
mbuf has joined #ocaml
unyu has quit [Ping timeout: 245 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
unyu has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
Haudegen has joined #ocaml
rgherdt has joined #ocaml
toppler has joined #ocaml
rgherdt has quit [Ping timeout: 276 seconds]
kvda has joined #ocaml
vicfred has joined #ocaml
gravicappa has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
ravenousmoose has joined #ocaml
ggole has joined #ocaml
nullifidian__ is now known as nullifidian
toppler has joined #ocaml
KeyJoo has joined #ocaml
nullifidian_ has joined #ocaml
ycjung has joined #ocaml
nullifidian has quit [Ping timeout: 276 seconds]
bitwinery has quit [Quit: Leaving]
nullifidian_ is now known as nullifidian
barockobamo has joined #ocaml
barockobamo has quit [Remote host closed the connection]
barockobamo has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kakadu has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
pino|work has joined #ocaml
ravenousmoose has quit [Ping timeout: 252 seconds]
toppler has joined #ocaml
bartholin has quit [Remote host closed the connection]
ycjung has quit [Ping timeout: 276 seconds]
toppler has quit [Ping timeout: 246 seconds]
ravenousmoose has joined #ocaml
ravenousmoose has quit [Ping timeout: 252 seconds]
jbrown has quit [Quit: Leaving]
toppler has joined #ocaml
dmiles has quit [Read error: Connection reset by peer]
dmiles has joined #ocaml
jbrown has joined #ocaml
mfp has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
ravenousmoose has joined #ocaml
ravenousmoose has quit [Ping timeout: 276 seconds]
Haudegen has quit [Quit: Bin weg.]
toppler has quit [Ping timeout: 240 seconds]
ravenousmoose has joined #ocaml
gareppa has joined #ocaml
ravenousmoose has quit [Ping timeout: 264 seconds]
toppler has joined #ocaml
KeyJoo has quit [Quit: KeyJoo]
brettgilio has quit [Ping timeout: 245 seconds]
brettgilio has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
nullifidian has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
zolk3ri has joined #ocaml
brettgilio has quit [Ping timeout: 276 seconds]
toppler has joined #ocaml
brettgilio has joined #ocaml
silver has joined #ocaml
oni-on-ion has joined #ocaml
spew has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
tane has joined #ocaml
toppler has joined #ocaml
ygrek_ has quit [Ping timeout: 276 seconds]
gareppa has quit [Quit: Leaving]
KeyJoo has joined #ocaml
FreeBirdLjj has joined #ocaml
mbuf has quit [Quit: Leaving]
retropikzel has joined #ocaml
ygrek_ has joined #ocaml
toppler has quit [Ping timeout: 252 seconds]
gareppa has joined #ocaml
jaar has joined #ocaml
toppler has joined #ocaml
RalfJ has quit [Ping timeout: 276 seconds]
gareppa has quit [Quit: Leaving]
RalfJ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
kakadu has quit [Quit: Konversation terminated!]
kakadu has joined #ocaml
smazga has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
kakadu has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
toppler has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
kakadu has joined #ocaml
ziyourenxiang has quit [Ping timeout: 265 seconds]
<narimiran> another beginner's question: if you need to read a one-line file, how do you deal with the trailing newline?
<narimiran> i'm using `CCIO.(with_in filename read_all)`, but this also reads the final newline
<oni-on-ion> does it return a list ?
<narimiran> is `CCIO.(with_in filename read_line) |> Option.value ~default:""` the way to go, or is there something nicer/idiomatic?
<narimiran> oni-on-ion: no, it returns a string, which i want to split into a list
<oni-on-ion> is there any help in here ? https://stackoverflow.com/questions/23204953/does-ocaml-have-string-split-function-like-python -- it seems a bit overcomplicated however
<narimiran> the problem is that the initial solution with `read_all` will have a list whose last element is "fooxyz\n"
<oni-on-ion> from builtin String module, there is "val split_on_char : char -> string -> string list"
<narimiran> that's not a problem, i know how to split it
<oni-on-ion> hmm perhaps just split the last element ?
<oni-on-ion> if it is specific case to the last element from read_all then it is a logic problem
Athas has left #ocaml ["ERC (IRC client for Emacs 26.1)"]
<narimiran> contents of a file are on one line, something like: "abc def ghi jkl mno" and, there is a final newline in a file, so the contents really are ""abc def ghi jkl mno\n"
<oni-on-ion> yes. so String.split_on_char '\n' s -> will give ["mno"] at the very least
<oni-on-ion> current code example may help to reveal the solution
<narimiran> input: "abc def ghi jkl mno\n"; wanted output: ["abc"; "def"; "ghi"; "jkl"; "mno"]
<thizanne> narimiran: you can always CCString.rtrim your string
<thizanne> and then split_on_char ' ' I guess ?
<narimiran> thizanne: thanks! `rtrim` sounds like exactly what i need
Haudegen has quit [Quit: Bin weg.]
<retropikzel> Any way to have strings so that I dont need to escape " inside them?
toppler has quit [Ping timeout: 265 seconds]
<narimiran> retropikzel: {| ab"cd"ef |}
<narimiran> (the first time i can answer something, not just ask questions :))
<retropikzel> narimiran: Thank you very much :)
<retropikzel> (It was my frist question here)
cross has joined #ocaml
barockobamo has quit [Remote host closed the connection]
toppler has joined #ocaml
vicfred_ has joined #ocaml
pino|work has quit [Ping timeout: 240 seconds]
vicfred has quit [Ping timeout: 264 seconds]
bartholin has joined #ocaml
pino|work has joined #ocaml
rgherdt has joined #ocaml
KeyJoo has quit [Quit: KeyJoo]
pino|work has quit [Quit: bye]
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #ocaml
Haudegen has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
TheLemonMan has joined #ocaml
jnavila has joined #ocaml
Serpent7776 has joined #ocaml
webshinra has joined #ocaml
jnavila has quit [Ping timeout: 276 seconds]
zolk3ri has quit [Remote host closed the connection]
toppler has quit [Ping timeout: 268 seconds]
lucilius has joined #ocaml
lucilius has quit [Client Quit]
nullifidian_ has joined #ocaml
toppler has joined #ocaml
jnavila has joined #ocaml
nullifidian has quit [Ping timeout: 240 seconds]
jnavila_ has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
retropikzel has quit [Remote host closed the connection]
jaar has quit [Ping timeout: 276 seconds]
toppler has quit [Ping timeout: 265 seconds]
malina has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
toppler has joined #ocaml
gravicappa has quit [Ping timeout: 245 seconds]
troydm has quit [Ping timeout: 265 seconds]
brettgilio has quit [Ping timeout: 250 seconds]
brettgilio has joined #ocaml
jbrown has quit [Ping timeout: 246 seconds]
bitwinery has joined #ocaml
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ocaml
ggole has quit [Quit: Leaving]
jbrown has joined #ocaml
toppler has quit [Ping timeout: 246 seconds]
rgherdt has quit [Quit: Leaving]
toppler has joined #ocaml
brettgilio has quit [Ping timeout: 252 seconds]
troydm has joined #ocaml
rwmjones is now known as rwmjones_IMSmtg
jaar has joined #ocaml
brettgilio has joined #ocaml
narimiran has quit [Ping timeout: 268 seconds]
rgherdt has joined #ocaml
jnavila_ has quit [Remote host closed the connection]
brettgilio has quit [Ping timeout: 245 seconds]
brettgilio has joined #ocaml
iovec has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
brettgilio has quit [Ping timeout: 265 seconds]
brettgilio has joined #ocaml
smazga has quit [Quit: leaving]
toppler has joined #ocaml
Serpent7776 has quit [Quit: leaving]
assemblyman has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]
ziyourenxiang has joined #ocaml
ygrek_ has quit [Ping timeout: 246 seconds]
assemblyman has quit [Quit: ™]
toppler has quit [Ping timeout: 240 seconds]
vicfred_ has quit [Ping timeout: 246 seconds]
rgherdt has quit [Ping timeout: 246 seconds]
kakadu has quit [Remote host closed the connection]
toppler has joined #ocaml
kvda has joined #ocaml
brettgilio has quit [Ping timeout: 250 seconds]
brettgilio has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]