claudiuc has quit [Read error: Connection reset by peer]
jwatzman|work has quit [Quit: jwatzman|work]
Muzer has quit [Ping timeout: 252 seconds]
comacat has quit [Quit: Lost terminal]
boogie has quit [Quit: Leaving...]
claudiuc_ has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
talzeus__ has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
talzeus has joined #ocaml
q66 has quit [Quit: Leaving]
Simn has quit [Quit: Leaving]
struktured has joined #ocaml
manizzle has quit [Ping timeout: 265 seconds]
Dongyancai has quit [Ping timeout: 240 seconds]
Dongyancai has joined #ocaml
manizzle has joined #ocaml
Muzer has joined #ocaml
manizzle has quit [Ping timeout: 244 seconds]
alex_nx has quit [Ping timeout: 264 seconds]
amiller has quit [Ping timeout: 264 seconds]
skchrko has quit [Remote host closed the connection]
tlockney_away is now known as tlockney
divyanshu has quit [Quit: Computer has gone to sleep.]
yacks has joined #ocaml
introom2 has joined #ocaml
nikki93 has joined #ocaml
alex_nx has joined #ocaml
Guest61739 has joined #ocaml
introom2 has quit [Ping timeout: 240 seconds]
clan has joined #ocaml
divyanshu has joined #ocaml
manizzle has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clan has quit [Quit: clan]
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
arturgadelshin has joined #ocaml
lostcuaz has joined #ocaml
siddharthv_away is now known as siddharthv
clan has joined #ocaml
tlockney is now known as tlockney_away
manizzle has quit [Ping timeout: 240 seconds]
introom2 has joined #ocaml
introom2 has quit [Ping timeout: 265 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
ski has quit [Quit: Lost terminal]
tlockney_away is now known as tlockney
ski has joined #ocaml
ggole has joined #ocaml
divyanshu has joined #ocaml
r0b4 has quit [Ping timeout: 252 seconds]
ygrek has quit [Ping timeout: 240 seconds]
tlockney is now known as tlockney_away
clan has quit [Quit: clan]
arturgadelshin has quit [Ping timeout: 264 seconds]
clan has joined #ocaml
segmond has joined #ocaml
ulfdoz has joined #ocaml
axiles has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
ygrek has joined #ocaml
angerman has joined #ocaml
seggy has joined #ocaml
segmond has quit [Read error: Connection reset by peer]
talzeus has quit [Read error: Connection reset by peer]
talzeus has joined #ocaml
ulfdoz has quit [Ping timeout: 265 seconds]
glothriel has joined #ocaml
arturgadelshin has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
Locus has joined #ocaml
ddosia has joined #ocaml
<ddosia>
hello guys, i am trying to install opam with opam... but that package does not contain binary
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
adrien_oww has quit [Ping timeout: 264 seconds]
introom2 has joined #ocaml
yacks has quit [Quit: Leaving]
introom2 has quit [Ping timeout: 240 seconds]
Locus has quit [Ping timeout: 245 seconds]
locus has joined #ocaml
adrien_oww has joined #ocaml
adrien_o1w has joined #ocaml
adrien_o1w has quit [Client Quit]
metasyntax has quit [*.net *.split]
maufred has quit [*.net *.split]
IbnFirnas has quit [*.net *.split]
n0v has quit [*.net *.split]
thorsten` has quit [*.net *.split]
divyanshu has quit [*.net *.split]
ddosia has quit [*.net *.split]
glothriel has quit [*.net *.split]
ygrek has quit [*.net *.split]
nikki93 has quit [*.net *.split]
rz has quit [*.net *.split]
cdidd has quit [*.net *.split]
lopho has quit [*.net *.split]
yacks has joined #ocaml
maufred has joined #ocaml
claudiuc has quit [Remote host closed the connection]
__marius__ has quit [Ping timeout: 245 seconds]
__marius__ has joined #ocaml
cago has joined #ocaml
ikaros has joined #ocaml
AltGr has joined #ocaml
cago has quit [Ping timeout: 264 seconds]
IbnFirnas has joined #ocaml
n0v has joined #ocaml
lopho has joined #ocaml
cdidd has joined #ocaml
rz has joined #ocaml
ygrek has joined #ocaml
ddosia has joined #ocaml
metasyntax has joined #ocaml
thorsten` has joined #ocaml
nikki93 has joined #ocaml
IbnFirnas_ has joined #ocaml
IbnFirnas has quit [Ping timeout: 268 seconds]
IbnFirnas_ is now known as IbnFirnas
locus has quit [Ping timeout: 245 seconds]
mika2 has joined #ocaml
johnelse_away is now known as johnelse
Simn has joined #ocaml
nikki93 has quit [Ping timeout: 265 seconds]
jonludlam has joined #ocaml
ddosia has quit [Quit: Leaving.]
Thooms has joined #ocaml
ousado has quit [Ping timeout: 264 seconds]
ousado has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
shinnya has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
avsm has joined #ocaml
nikki93 has joined #ocaml
claudiuc has quit [Ping timeout: 244 seconds]
glothriel has joined #ocaml
dsheets has joined #ocaml
skchrko has joined #ocaml
Dongyancai has quit [Ping timeout: 264 seconds]
Dongyancai has joined #ocaml
clan has quit [Quit: clan]
rand000 has joined #ocaml
bjorkintosh has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
adrien_o1w has joined #ocaml
cuicui_ has quit [Quit: Connection closed for inactivity]
adrien_oww has quit [Ping timeout: 240 seconds]
bjorkintosh has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
sw1nn has joined #ocaml
mort___ has joined #ocaml
q66 has joined #ocaml
Thooms has quit [Ping timeout: 244 seconds]
glothriel has quit [Ping timeout: 240 seconds]
introom2 has joined #ocaml
arjunguha has joined #ocaml
Thooms has joined #ocaml
samae has quit [Quit: WeeChat 0.4.2]
flux has quit [Remote host closed the connection]
flux has joined #ocaml
lopex has quit [Ping timeout: 265 seconds]
flux has quit [Remote host closed the connection]
Snark has quit [Ping timeout: 265 seconds]
darkf has quit [Quit: Leaving]
dkg has quit [Ping timeout: 265 seconds]
chris2 has quit [Ping timeout: 265 seconds]
ggherdov has quit [Ping timeout: 265 seconds]
clog has quit [^C]
clog has joined #ocaml
chris2_ is now known as chris2
jao has quit [Ping timeout: 252 seconds]
nikki93 has quit [Ping timeout: 244 seconds]
mort___ has quit [Ping timeout: 240 seconds]
introom2 has quit [Ping timeout: 240 seconds]
siddharthv is now known as siddharthv_away
yacks has quit [Remote host closed the connection]
avsm has joined #ocaml
Kakadu has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
introom2 has joined #ocaml
Anarchos has joined #ocaml
yacks has joined #ocaml
divyanshu has joined #ocaml
introom2 has quit [Ping timeout: 240 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20131020]: i've been blurred!]
nikki93 has joined #ocaml
r0b4 has joined #ocaml
_2can has quit [Ping timeout: 245 seconds]
adrien_o1w is now known as adrien_oww
Thiht has joined #ocaml
glothriel has joined #ocaml
ontologiae has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
divyanshu has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
sgnb has joined #ocaml
darkf has quit [Quit: Leaving]
glothriel has quit [Remote host closed the connection]
arjunguha has joined #ocaml
rand000 has quit [Quit: leaving]
talzeus has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
divyanshu has quit [Quit: Computer has gone to sleep.]
nlucaroni has joined #ocaml
arturgadelshin has quit [Quit: Leaving.]
arturgadelshin1 has joined #ocaml
ygrek has joined #ocaml
matthieu2 has joined #ocaml
reynir has joined #ocaml
arturgadelshin has joined #ocaml
nikki93 has joined #ocaml
arturgadelshin1 has quit [Ping timeout: 244 seconds]
arturgadelshin1 has joined #ocaml
arturgadelshin has quit [Ping timeout: 264 seconds]
tlockney_away is now known as tlockney
arturgadelshin1 has quit [Ping timeout: 244 seconds]
Kakadu has quit [Ping timeout: 245 seconds]
divyanshu has joined #ocaml
talzeus has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
Anarchos has joined #ocaml
AltGr has left #ocaml []
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
mort___ has joined #ocaml
divyanshu has quit [Remote host closed the connection]
nikki93 has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
AltGr has joined #ocaml
dfgdfgdfg has joined #ocaml
dfgdfgdfg has left #ocaml []
ddosia has joined #ocaml
Guest61739 is now known as amiller
amiller has quit [Changing host]
amiller has joined #ocaml
mika2 has quit [Quit: Leaving.]
lostcuaz has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
Kakadu has joined #ocaml
ff22310 has joined #ocaml
arturgadelshin has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
arturgadelshin has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
ff22310 has quit [Ping timeout: 265 seconds]
claudiuc_ has quit [Read error: Connection reset by peer]
matthieu2 has quit [Ping timeout: 244 seconds]
Dongyancai has left #ocaml []
jwatzman|work has joined #ocaml
matthieu2 has joined #ocaml
nikki93 has joined #ocaml
rand000 has joined #ocaml
tnguyen has joined #ocaml
avsm has quit [Quit: Leaving.]
hto has joined #ocaml
struktured has quit [Ping timeout: 264 seconds]
willb1 has quit [Ping timeout: 264 seconds]
tlockney is now known as tlockney_away
ikaros has quit [Quit: Ex-Chat]
nikki93 has quit [Read error: Connection reset by peer]
nikki93 has joined #ocaml
jonludlam has quit [Remote host closed the connection]
matthieu2 has quit [Ping timeout: 240 seconds]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
willb1 has joined #ocaml
angerman has quit [Quit: Gone]
ygrek has quit [Ping timeout: 265 seconds]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
struktured has joined #ocaml
manizzle has joined #ocaml
mort___ has quit [Ping timeout: 240 seconds]
yacks has quit [Quit: Leaving]
matthieu2 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
sw1nn has quit [Ping timeout: 240 seconds]
jao` has joined #ocaml
jao` has quit [Changing host]
jao` has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
AltGr has left #ocaml []
struktured has quit [Ping timeout: 252 seconds]
matthieu2 has quit [Ping timeout: 240 seconds]
angerman has joined #ocaml
comacat has joined #ocaml
claudiuc has joined #ocaml
rand000 has quit [Ping timeout: 240 seconds]
Hannibal_Smith has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
nikki93 has joined #ocaml
<flux>
batteries doesn't have with a double-ended queue does it? It does have double-linked list, but it's a bit annoying to use, I need to handle the case of empty list separately..
<flux>
cool, opam has Reins
matthieu2 has joined #ocaml
<ddosia>
real world ocaml says that ^ operator builds string every time when I use it. And it is better to use something like String.make or something. How does that functions works, how they could produce new string without concatenation issue?
Anarchos has quit [Ping timeout: 240 seconds]
hto_ has joined #ocaml
hto_ has quit [Client Quit]
<flux>
there is Buffer for constructing long strings out of small ones
<ggole>
ddosia: If you know the length of everything in advance, you can allocate it in one go using String.make
<ggole>
That's considerably more efficient than using ^
<ggole>
(Buffer is also useful.)
<flux>
well, I wouldn't say it's the allocation that's the problem with ^, but the O(n^2) behavior if you build a large string out of small ones
<adrien>
concatenation through ^ is perfectly fine; _repeated_ concatenations through ^ aren't
<ddosia>
ggole: Could I write function with similar qualities?
<adrien>
ddosia: the issue with ^ is that it will create a fresh string
<ggole>
I suppose so, but you should be able to use what is already there effectively enough.
<adrien>
so if you have two strings, the first one of length n and the second one of length m
<adrien>
it will create a string of length n+m
hto_ has joined #ocaml
<Drup>
ddosia: sure you can build one, it's called BatString.concat
matthieu2 has quit [Ping timeout: 240 seconds]
<adrien>
and then if you want to concatenate a third string, of length o, it will create a string of length n+m+o
<adrien>
and so one
<flux>
so, the reins in opam doesn't install any .cmi files. so the package is broken, right?
troydm has joined #ocaml
<adrien>
that can end up very costly for repreated calls
<adrien>
but it will only do so once per call, not all the time you refer to the string
<flux>
and it does the string by copying first n and m to it
<adrien>
on the other hand, Buffer has a "length" and when you need to add more chars than would fit into this length, it will expand to 2*length
<adrien>
and if you need to fit more than 2*length after that, it will expand again by a factor of 2
<adrien>
this leads to far less string allocations
<ddosia>
So this is possible only due special tricky built in functions?
rand000 has joined #ocaml
<ggole>
No. The functionality is pretty straightforward.
claudiuc has quit [Read error: Connection reset by peer]
claudiuc_ has joined #ocaml
<ddosia>
So as I see it, if I want to concatenate 3 strings, I should allocate l * m * n string
<ddosia>
and copy each character from them to new string
<adrien>
if you have 3 strings, do it with ^ :)
ocp has joined #ocaml
<adrien>
if you have more than that, use the Buffer module
<ggole>
The problem is more with calling ^ in a loop than a fixed number of concatenations.
Anarchos has joined #ocaml
<flux>
gaah, opam even had an updated package for reins.. with the same problem!
<adrien>
:D
<flux>
I was already so hopeful after noticing there was one :)
<ggole>
(I'm not actually sure whether the compiler is smart enough to alloc once for a ^ b ^ c, but even if it isn't there won't be a horrible slowdown compared to the quadratic behaviour you could get with a loop.)
<flux>
"Installed 3 times in last month." - not very popular apparently
<ggole>
...looks like it isn't.
<adrien>
ggole: I don't think it tries to optimize that and I don't think it's worth it
<adrien>
also
<adrien>
String.concat "" [ a; b; c ]
<ggole>
That's not really clearer than a ^ b ^ c
<ggole>
Or were you referring to efficiency?
<adrien>
it allocates only once
<ggole>
Ah
<flux>
I suppose it's a special case when you are doing ^ ^ ^ and you care about performance
<flux>
in those rare cases ,maybe you can use String.concat and get slightly uglier code
<flux>
or maybe you could have a string concatenation monad!
<flux>
and a string concatenation embedded doman specific language!
<flux>
:)
<ggole>
I don't really see the objection to optimising a ^ b ^ c, but I agree it isn't very important.
<adrien>
exactly
<adrien>
flux: I just 'sprintf "%s%s%s"' :P
<flux>
and if the gadt-based printf arrives to ocaml, it will be even faster :).
<flux>
though, I don't know how it handles memory management
<ddosia>
I ll rephrase my question, Is it possible to write a function which effectively concatenate list of strings without referring to modules like Buffer or String or others?
matthieu2 has joined #ocaml
dsheets has joined #ocaml
<adrien>
ddosia: srting-handling wthout the String module sounds weird
<adrien>
string*
<ggole>
No, you need to use the string operations, which are in the String module.
* adrien
blames the beer
divyanshu has quit [Quit: Computer has gone to sleep.]
<ggole>
Pervasives only provides a few basic things.
<flux>
it looks to me Buffer is implemented purely in terms of the String module though
<adrien>
it's max_length + string
<adrien>
or something like that
<flux>
you can't allocate strings without the Strings module
<ggole>
You could allocate in a loop with ^ :p
* ggole
ducks
<ggole>
let rec allocate_omg n = if n = 0 then "" else " " ^ allocate_omg (n - 1)
<flux>
allocate_omg (-1)
<ggole>
Yes. That is the sole flaw with this function.
matthieu2 has quit [Ping timeout: 252 seconds]
dMaggot has joined #ocaml
<dMaggot>
I'd like to know about the details of Core_bench.Bench, I read from Real World OCaml that it "executes the code thousands of times"
<dMaggot>
I'd like to know how many times and what's the input for those times
Arsenik has joined #ocaml
<dMaggot>
in my specific case, I'm trying to sort an array
<dMaggot>
the sorting is a unit() and I wrap that around a Bench.Test create -> measure -> analyze -> display
<dMaggot>
(that was befire I knew it would execute that "thousands of times")
<flux>
installing src/reins.cmi fixed it. I files an issue.. perhpas I should look into how I would fix&pull-request it myself
<dMaggot>
then it takes its time and outputs the array sorted, but the number of times it calls certain function I have makes me wonder what exactly is it doing
ontologiae has quit [Ping timeout: 265 seconds]
<ggole>
Peek at the source?
<ggole>
(Or the docs, if you are lucky.)
<dMaggot>
ggole: docs are for people that already know how to use the module and don't need to read the docs