cdidd has quit [Remote host closed the connection]
Neros has quit [Ping timeout: 256 seconds]
Neros has joined #ocaml
q66 has quit [Remote host closed the connection]
eikke has quit [Read error: Operation timed out]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
soulofpeace has joined #ocaml
darkf has joined #ocaml
weie has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
jobseeker has quit [Disconnected by services]
jobseeker has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
osnr has quit [Quit: Leaving.]
sevvie has joined #ocaml
bacam_ has joined #ocaml
foo303__ has joined #ocaml
jonafan_ has joined #ocaml
zen_ben has joined #ocaml
willy__ has joined #ocaml
Ptival_ has joined #ocaml
orbitz_ has joined #ocaml
mattrepl has quit [Quit: mattrepl]
habnabit has joined #ocaml
jave_ has joined #ocaml
rixed_ has joined #ocaml
SuperNoeMan_ has joined #ocaml
ivan\_ has joined #ocaml
foo303_ has quit [Ping timeout: 245 seconds]
bacam has quit [Ping timeout: 245 seconds]
ggherdov has quit [Ping timeout: 245 seconds]
SuperNoeMan has quit [Ping timeout: 245 seconds]
jonafan has quit [Ping timeout: 245 seconds]
_habnabit has quit [Ping timeout: 245 seconds]
ben_zen has quit [Ping timeout: 245 seconds]
jave has quit [Ping timeout: 245 seconds]
ivan\ has quit [Ping timeout: 245 seconds]
Ptival has quit [Ping timeout: 245 seconds]
orbitz has quit [Ping timeout: 245 seconds]
SuperNoeMan_ is now known as SuperNoeMan
willy_ has quit [Ping timeout: 245 seconds]
rixed has quit [Ping timeout: 245 seconds]
dwmw2_go` has quit [Ping timeout: 245 seconds]
habnabit is now known as _habnabit
dwmw2_gone has joined #ocaml
ggole has joined #ocaml
jobseeker has quit [Disconnected by services]
jobseeker has joined #ocaml
zen_ben is now known as ben_zen
yacks has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
venk has joined #ocaml
osnr has quit [Quit: Leaving.]
breakds has quit [Quit: Konversation terminated!]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Watcher7 is now known as Watcher7|off
Snark has joined #ocaml
ggherdov has joined #ocaml
Yoric has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
tane has joined #ocaml
testcocoon has joined #ocaml
wagle has quit [Ping timeout: 256 seconds]
hkBst has joined #ocaml
ttamttam has joined #ocaml
wagle has joined #ocaml
orbitz_ has quit [Quit: Reconnecting]
orbitz has joined #ocaml
wagle has quit [Ping timeout: 252 seconds]
wagle has joined #ocaml
zpe has joined #ocaml
hkBst has quit [Ping timeout: 248 seconds]
gustav_ has joined #ocaml
djcoin has joined #ocaml
hkBst has joined #ocaml
Arsenik has joined #ocaml
zpe has quit [Remote host closed the connection]
<adrien_oww>
morning
tane has quit [Quit: Verlassend]
ulfdoz has joined #ocaml
ollehar has joined #ocaml
Arsenik has quit [Remote host closed the connection]
mika1 has joined #ocaml
cago has joined #ocaml
hkBst has quit [Ping timeout: 245 seconds]
hkBst has joined #ocaml
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
eikke has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
ontologiae_ has joined #ocaml
zpe has joined #ocaml
<gasche>
I discussed the Terra language mentioned on LtU yesterday
<gasche>
they say they use metaprogramming to tune matrix operations to get nearly as fast as BLAST, but that result was already attained by the MetaOCaml folks
<gasche>
Kakadu_: I believe lines is a string, and in that case foo.[bar] is the right syntax indeed (vs. foo.(bar) for arrays)
<gasche>
BlankVerse: let [arg;rest] = is dubious style at best, a bug at worst (if you meant "let (arg::rest) = " which is still dubious)
<gasche>
(thankfully in the latter case the typer won't let you)
<Kakadu_>
gasche: I bet on 'lines' is a list
<BlankVerse>
lines is a list , yes gasche
<gasche>
ah
<gasche>
indeed
<gasche>
but in that case random access doesn't make much sense
<Kakadu_>
BlankVerse: List.nth than
<gasche>
you may want to turn the list into an array first
<gasche>
before doing random access in it
hkBst__ has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
<BlankVerse>
https://gist.github.com/pankajmore/5591888 , now it gives the error : Error: This expression has type string list but an expression was expected of type 'a array
<Cypi>
lines.((String.length lines)-1)
<Cypi>
That's exactly the same mistake. So you can use 'List.nth', or do as gasche said.
beckerb_ has quit [Read error: Connection reset by peer]
travisbrady has joined #ocaml
<BlankVerse>
thanks
<gasche>
List.nth is an inconvenient syntax because random access in (linked) lists should be avoided
<gasche>
being linear in time
<gasche>
if you want to access the last element, you may as well turn the whole thing into an array; not much slower, nicer syntax, and scales better to other accesses
<BlankVerse>
are nested matches not allowed?
<thizanne>
yes they are, but you must enclose the inner one with begin ... end
<thizanne>
like function [] -> 1 | x :: xs -> begin match xs with ... end
<BlankVerse>
thanks thizanne
lusory_ has quit [Ping timeout: 248 seconds]
beckerb_ has joined #ocaml
cago has quit [Quit: Leaving.]
smondet has joined #ocaml
oriba has quit [Quit: oriba]
beckerb_ has quit [Quit: Konversation terminated!]
beckerb_ has joined #ocaml
<BlankVerse>
is there something like fmap for option?
mika1 has quit [Quit: Leaving.]
<gasche>
BlankVerse: not in the stdlib, but there are in Batteries or Core
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
rgrinberg1 is now known as rgrinberg
cdidd has quit [Ping timeout: 252 seconds]
zarul has quit [Quit: Leaving]
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
beckerb_ has quit [Read error: Connection reset by peer]