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.]
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
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