companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
smondet[m] has quit [Ping timeout: 240 seconds]
M-martinklepsch has quit [Ping timeout: 240 seconds]
orbifx[m] has quit [Ping timeout: 246 seconds]
yetanotherion[m] has quit [Ping timeout: 246 seconds]
M-jimt has quit [Ping timeout: 246 seconds]
isaachodes[m] has quit [Ping timeout: 240 seconds]
copy[m] has quit [Ping timeout: 240 seconds]
timclassic has quit [Ping timeout: 240 seconds]
regnat[m] has quit [Ping timeout: 240 seconds]
M-ErkkiSeppl has quit [Ping timeout: 255 seconds]
Bluddy[m] has quit [Ping timeout: 255 seconds]
srenatus[m] has quit [Ping timeout: 240 seconds]
hdurer[m] has quit [Ping timeout: 255 seconds]
samrat[m] has quit [Ping timeout: 276 seconds]
aspiwack[m] has quit [Ping timeout: 276 seconds]
al-damiri has joined #ocaml
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
samrat[m] has joined #ocaml
samrat[m] has quit [Remote host closed the connection]
coventry has quit [Remote host closed the connection]
samrat[m] has joined #ocaml
sam___ has joined #ocaml
srenatus[m] has joined #ocaml
timclassic has joined #ocaml
smondet[m] has joined #ocaml
aspiwack[m] has joined #ocaml
M-jimt has joined #ocaml
M-martinklepsch has joined #ocaml
hdurer[m] has joined #ocaml
Bluddy[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
yetanotherion[m] has joined #ocaml
copy[m] has joined #ocaml
regnat[m] has joined #ocaml
isaachodes[m] has joined #ocaml
orbifx[m] has joined #ocaml
copy_ has quit [Quit: Connection closed for inactivity]
sz0 has joined #ocaml
sz0 has quit [Quit: ZNC - http://znc.in]
sz0 has joined #ocaml
mengu has quit [Remote host closed the connection]
charlenopires has joined #ocaml
KeyJoo has quit [Quit: Good luck! Have a nice Day!]
charlenopires has quit [Quit: Textual IRC Client: www.textualapp.com]
mfp__ has quit [Ping timeout: 260 seconds]
enterprisey has joined #ocaml
enterprisey has quit [Max SendQ exceeded]
enterprisey has joined #ocaml
enterprisey has quit [Max SendQ exceeded]
enterprisey has joined #ocaml
pzp has joined #ocaml
teknozulu has quit [Ping timeout: 246 seconds]
sam___ has quit [Ping timeout: 246 seconds]
sz0 has quit [Quit: ZNC - http://znc.in]
sz0 has joined #ocaml
sh0t has quit [Remote host closed the connection]
sam___ has joined #ocaml
_whitelogger has joined #ocaml
charlenopires has joined #ocaml
charlenopires has quit [Client Quit]
zv has quit [Read error: Connection reset by peer]
zv has joined #ocaml
ziyourenxiang has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
alexelcu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
nomicflux has joined #ocaml
sam___ has quit [Ping timeout: 246 seconds]
sam___ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
sam___ has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
raphaelss has joined #ocaml
mbuf has quit [Quit: Leaving]
ygrek has quit [Ping timeout: 240 seconds]
pzp has quit [Quit: Connection closed for inactivity]
ristos has quit [Quit: Connection closed for inactivity]
jbrown has quit [Quit: Leaving]
ShalokShalom has joined #ocaml
ziyourenxiang has joined #ocaml
enterprisey has quit [Quit: Leaving]
ShalokShalom_ has joined #ocaml
ShalokShalom has quit [Ping timeout: 276 seconds]
mccajm has joined #ocaml
<mccajm> I'm parsing a csv with a row of the form string,string,int and I've defined a record with this structure. How can I parse the row string into a record? Thanks.
<mccajm> (new to ocaml)
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
raphaelss has quit [Ping timeout: 260 seconds]
mccajm has quit [Quit: Lost terminal]
slash^ has joined #ocaml
FreeBirdLjj has joined #ocaml
raphaelss has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
raphaelss has quit [Quit: leaving]
raphaelss has joined #ocaml
ayxih has joined #ocaml
ShalokShalom_ is now known as ShalokShalom
ayxih has quit [Ping timeout: 255 seconds]
ziyourenxiang has quit [Quit: Leaving]
<orbifx[m]> mccajm: I doubt there is some library to so this directly, so you will have to write a parse function
FreeBirdLjj has quit [Remote host closed the connection]
kakadu has joined #ocaml
KeyJoo has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 248 seconds]
peterpp has joined #ocaml
mfp__ has joined #ocaml
_whitelogger has joined #ocaml
maarhart has joined #ocaml
<orbifx[m]> anyone knows when the compiler might raise this? `/tmp/camlasm365a95.s:188871: Error: offset out of range`
maarhart has quit [Client Quit]
sam___ has joined #ocaml
copy_ has joined #ocaml
ziyourenxiang has joined #ocaml
<kakadu_> orbifx[m]: Could be an annoying issue. Does `make clean` help?
malina has quit [Remote host closed the connection]
<orbifx[m]> this is through an `opam install` kakadu_ , can I run i there?
<kakadu_> that's weird
<kakadu_> I'm not even sure that it is error of ocaml compiler. Can it be a linker message?
<kakadu_> make will mean reinstall in this case
andreas__ has joined #ocaml
ayxih has joined #ocaml
yegods_ has joined #ocaml
<orbifx[m]> I think it is the linker yeah
<orbifx[m]> I have reinstalled the switch but might need to wipe opam and try again
ayxih has quit [Ping timeout: 255 seconds]
mrsmkl has joined #ocaml
ayxih has joined #ocaml
ayxih2 has joined #ocaml
ayxih has quit [Ping timeout: 255 seconds]
KeyJoo has quit [Ping timeout: 258 seconds]
ayxih2 has quit [Quit: AtomicIRC: The nuclear option.]
ayxih has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
sam___ has joined #ocaml
<orbifx[m]> For those interested on this Uri issue on ARM: https://github.com/mirage/ocaml-uri/issues/106
sam___ has quit [Ping timeout: 276 seconds]
MercurialAlchemi has quit [Ping timeout: 246 seconds]
raphaelss has quit [Quit: leaving]
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
peterpp has quit [Ping timeout: 248 seconds]
MercurialAlchemi has joined #ocaml
ayxih has quit [Remote host closed the connection]
ayxih has joined #ocaml
ShalokShalom has quit [Remote host closed the connection]
sh0t has joined #ocaml
FreeBirdLjj has joined #ocaml
sam___ has joined #ocaml
soupault has joined #ocaml
SpiceGuid has joined #ocaml
govg has joined #ocaml
sam___ has quit [Ping timeout: 258 seconds]
sam___ has joined #ocaml
sh0t has quit [Remote host closed the connection]
xuanrui has quit [Ping timeout: 246 seconds]
rostero has joined #ocaml
leah2 has quit [Quit: trotz alledem!]
xuanrui has joined #ocaml
leah2 has joined #ocaml
HTTP_____GK1wmSU has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
HTTP_____GK1wmSU has left #ocaml [#ocaml]
ayxih has quit [Ping timeout: 246 seconds]
<reynir> orbifx[m]: are you on debian by chance?
<orbifx[m]> No reynir, Arch. What's the matter?
<reynir> ok, I think I got similar linker errors after upgrading to debian 9
sh0t has joined #ocaml
<orbifx[m]> What CPU architecture?
<reynir> uh Intel, can't remember which machine tbh
<reynir> wait, ARM
<reynir> I mean, it's Intel, but I just noticed you said ARM. Sorry
<orbifx[m]> Hmm. Same package?
ShalokShalom has joined #ocaml
raphaelss has joined #ocaml
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 276 seconds]
ayxih has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
copy_ has quit [Quit: Connection closed for inactivity]
govg has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
ayxih has quit [Ping timeout: 240 seconds]
andreas__ has quit [Quit: Connection closed for inactivity]
nomicflux has joined #ocaml
ayxih has joined #ocaml
xuanrui has quit [Ping timeout: 248 seconds]
sam____ has joined #ocaml
sam____ has quit [Ping timeout: 240 seconds]
yegods_ has quit [Remote host closed the connection]
yegods has joined #ocaml
xuanrui has joined #ocaml
yegods has quit [Ping timeout: 246 seconds]
yegods has joined #ocaml
yegods_ has joined #ocaml
yegods has quit [Ping timeout: 246 seconds]
nomicflux has quit [Quit: nomicflux]
ayxih has quit [Ping timeout: 248 seconds]
andreas__ has joined #ocaml
soupault has quit [Remote host closed the connection]
nomicflux has joined #ocaml
yegods has joined #ocaml
theblatte has quit [Ping timeout: 240 seconds]
yegods_ has quit [Ping timeout: 246 seconds]
sam___ has joined #ocaml
ShalokShalom has quit [Quit: No Ping reply in 180 seconds.]
sam___ has quit [Ping timeout: 260 seconds]
ShalokShalom has joined #ocaml
sapristi has joined #ocaml
ayxih has joined #ocaml
peterpp has joined #ocaml
yegods has quit [Ping timeout: 246 seconds]
yegods has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.46/20161213183751]]
nomicflux has quit [Quit: nomicflux]
ayxih has quit [Ping timeout: 276 seconds]
nomicflux has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
fraggle_ has joined #ocaml
peterpp has quit [Remote host closed the connection]
ayxih has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
teknozulu has joined #ocaml
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
mrsmkl has quit [Ping timeout: 260 seconds]
teknozulu has quit [Ping timeout: 255 seconds]
ayxih has quit [Quit: Leaving]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
fraggle-boate_ has quit [Remote host closed the connection]
fraggle-boate has joined #ocaml
enterprisey has joined #ocaml
tane has joined #ocaml
copy_ has joined #ocaml
rostero has quit [Quit: Connection closed for inactivity]
enterprisey has quit [Quit: Leaving]
sz0 has joined #ocaml
BitPuffin|osx has joined #ocaml
gallais has quit [Ping timeout: 246 seconds]
gallais has joined #ocaml
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 260 seconds]
coventry has joined #ocaml
<coventry> How can I make an array of elements of the same type as those of a given list? I want to do something like "take n (l : a' list) = let rv = Array.make n 'a in ..." but ofc that doesn't work.
<Drup> coventry: either use Array.init or feed it the first element manually
<Drup> you need to handle the empty case specially in this case
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest32215
infinity0 has joined #ocaml
Guest32215 has quit [Ping timeout: 255 seconds]
<coventry> Drup: Thanks. So something like "type (List.hd l)" in the second option? What should I use for "type" in that case?
<coventry> (Will probably go with the first option, but would ilke to know how to do the second.)
<octachron> coventry, array are always initialized, so you need to have at least one element of your type
<octachron> another point is that functions cannot take types as argument
<coventry> octachron: Yes, that's all clear.
<coventry> What does it mean, here, for the "[]" not to be preceded by a pipe, and what do the two pipes in "[||]" mean? "let of_list = function [] -> [||]..." https://github.com/ocaml/ocaml/blob/trunk/stdlib/array.ml#L137
<coventry> Oh, [||] is an empty array.
<coventry> And I guess you don't need the first pipe in a pattern match if you don't want it?
<octachron> coventry, yes, but this is frowned upon by some coding style
<coventry> Thanks, octachron.
<octachron> the compiler code is old and some parts of it have survived a lot of style changes
<octachron> note also, that the code of https://github.com/ocaml/ocaml/blob/trunk/stdlib/array.ml is very peculiar since it has to respect some constraints that do not exists outside of the compiler
<coventry> Wow, yeah, that line is 22 years old!
theblatte has joined #ocaml
yegods has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]
yegods has joined #ocaml
yegods_ has joined #ocaml
yegods has quit [Ping timeout: 260 seconds]
sam___ has joined #ocaml
yegods_ has quit [Remote host closed the connection]
yegods has joined #ocaml
sam___ has quit [Ping timeout: 240 seconds]
yegods has quit [Ping timeout: 240 seconds]
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
teknozulu has joined #ocaml
sam___ has joined #ocaml
<coventry> I'd welcome any suggestions for improvement of this code: https://pastebin.com/YvCd6a3u (Solution for problem 23 of the 99 problems.)
copy_ has quit [Quit: Connection closed for inactivity]
<coventry> Need an Array.to_list at the end to match the types.
<coventry> Is there any way to destructure without using pattern matching? Something like "let h::t = l in h" to get the head of a list, as in clojure?
<coventry> Destructure a list, I guess. I know how to destructure a tuple that way.
<octachron> coventry, "let h :: t = l" works, but you are missing the [] case
sam___ has quit [Ping timeout: 246 seconds]
<octachron> for which reasons do you have a list as an input?
<coventry> Oh, so it does... thanks.
mengu has joined #ocaml
<coventry> You mean in the code paste? Just because that's what's specified in the problem. Would have been much simpler with Array input, I suppose. Thanks.
<octachron> It depends on what ought to be the core of problems, if it is converting from list to arrays, then it make sense to use list as input
sam___ has joined #ocaml
mengu has quit [Ping timeout: 276 seconds]
<coventry> I just decided it would be a good time to learn to use arrays and imperative programming, so it was the core of the problem for me. :)
pierpa has joined #ocaml
zv has quit [Quit: WeeChat 1.7.1]
sh0t has quit [Remote host closed the connection]
zv has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
kolko has quit [Ping timeout: 246 seconds]
kakadu_ has quit [Remote host closed the connection]
sh0t has joined #ocaml
coventry has quit [Remote host closed the connection]
sapristi has quit [Quit: Leaving]
ziyourenxiang has quit [Ping timeout: 255 seconds]
iitalics has joined #ocaml
enterprisey has joined #ocaml
mengu has joined #ocaml
<mengu> has anyone responded to espinoza's question yesterday
iitalics has quit [Quit: /thread]