<ymasory>
what's the difference between an exact union and a closed union?
oriba has quit [Quit: Verlassend]
strangy has quit [Quit: Leaving]
elehack_ has joined #ocaml
CoryDambach has joined #ocaml
drunK has quit [Remote host closed the connection]
myu2 has quit [Remote host closed the connection]
Amorphous has quit [Ping timeout: 272 seconds]
myu2 has joined #ocaml
Amorphous has joined #ocaml
myu2 has quit [Remote host closed the connection]
Modius has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
uefqej has quit [Ping timeout: 276 seconds]
alexyk has joined #ocaml
groovy2shoes has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
<eye-scuzzy>
moin
elehack_ has quit [Ping timeout: 265 seconds]
elehack_ has joined #ocaml
elehack_ has quit [Client Quit]
myu2 has joined #ocaml
ulfdoz has joined #ocaml
alexyk has joined #ocaml
ymasory has quit [Quit: Leaving]
alexyk_ has joined #ocaml
alexyk has quit [Quit: alexyk]
alexyk_ is now known as alexyk
alexyk has quit [Client Quit]
ulfdoz has quit [Ping timeout: 255 seconds]
jamii_ has joined #ocaml
<jamii_>
are there any prngs for ocaml that allow splitting seeds?
groovy2shoes has quit [Quit: groovy2shoes]
myu2_ has joined #ocaml
myu2 has quit [Read error: No route to host]
almaisan-away is now known as al-maisan
noisymouse has joined #ocaml
<noisymouse>
hi all!
<noisymouse>
any way I can put one match statement inside another?
<adrien>
yes: wrap it inside a "being ... end" or "( ... )" block
<noisymouse>
well I have the thing I'm matching my variable to
<noisymouse>
and then I have ->
<noisymouse>
but don't I have to put a return value after ->?
Yoric has joined #ocaml
<adrien>
well, the return value will be the return of value of the inner match if you don't have anything else in the outer match clause
<adrien>
there's nothing special here: it could as well be a function in place of your inner match
<noisymouse>
could you show me an example somewhere?
LeNsTR has joined #ocaml
<mrvn>
let foo x y = match x with 0 -> y | _ -> match y with 0 -> x | _ -> x+y
decaf has quit [Quit: Leaving]
jamii_ has quit [Quit: Leaving]
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
Yoric has quit [Quit: Yoric]
jonafan has quit [Read error: Connection reset by peer]
<noisymouse>
mrvn: thanks for the help
<noisymouse>
I almost got the homework done before the midnight deadline, but alas
<noisymouse>
anyway, I think my professor will at least appreciate my approach
explodus has quit [Ping timeout: 276 seconds]
explodus has joined #ocaml
edwin has joined #ocaml
Modius has quit [Ping timeout: 255 seconds]
ttamttam has joined #ocaml
<Axioplase_>
noisymouse: He will, if you're among the first homeworks he reads :)
<noisymouse>
well, some people had already submitted their homeworks
Yoric has joined #ocaml
myu2_ has quit [Remote host closed the connection]
al-maisan is now known as almaisan-away
bbc has joined #ocaml
_andre has joined #ocaml
ikaros has joined #ocaml
avsm has joined #ocaml
Nepomuk has joined #ocaml
munga has joined #ocaml
<Axioplase_>
noisymouse: don't underestimate the bad mood of a teacher/TA who has already read a lot of terribly bad homeworks :)
ftrvxmtrx has joined #ocaml
LeNsTR has quit [Quit: LeNsTR]
edwin1 has joined #ocaml
edwin has quit [Disconnected by services]
edwin1 is now known as edwin
almaisan-away is now known as al-maisan
Yoric has quit [Quit: Yoric]
al-maisan is now known as almaisan-away
almaisan-away is now known as al-maisan
<adrien>
that might be with the latest sexplib: it looks like that when I use camlp4, I lose the location of errors
<adrien>
File "/tmp/camlpp43e5a4", line 42, characters 16-32:
<adrien>
instead of the right file and the right line, anyone saw that?
albacker has quit [Remote host closed the connection]
Yoric has joined #ocaml
myu2 has joined #ocaml
al-maisan is now known as almaisan-away
almaisan-away is now known as al-maisan
al-maisan is now known as almaisan-away
ptrf has joined #ocaml
Nepomuk has quit [Quit: Leaving]
ccasin has joined #ocaml
mehdid has quit [Ping timeout: 264 seconds]
munga has quit [Ping timeout: 240 seconds]
mehdid has joined #ocaml
Yoric has quit [Quit: Yoric]
mnabil has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Client Quit]
Yoric has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
munga has joined #ocaml
mnabil has quit [Ping timeout: 255 seconds]
mnabil has joined #ocaml
boscop has joined #ocaml
mnabil has quit [Read error: Connection reset by peer]
mnabil has joined #ocaml
eaburns has joined #ocaml
ftrvxmtrx has quit [Remote host closed the connection]
ccasin has quit [Quit: Leaving]
ccasin has joined #ocaml
ftrvxmtrx has joined #ocaml
ttamttam has quit [Remote host closed the connection]
avsm has quit [Ping timeout: 240 seconds]
ccasin has quit [Ping timeout: 250 seconds]
Yoric has quit [Quit: Yoric]
jonafan has joined #ocaml
<thelema>
odd, I'm reading a large file into memory (~800MB), and valgrind (massif) finds a string getting creates that's almost exactly 1.8 times that size
<adrien>
thelema: hold on... need to dig up mantis
<thelema_>
kaustuv: actually, I've done work on routers, and the cost for them to keep statistics is quite significant. Moral: don't underestimate the cost of *many* counters.
<thelema_>
kaustuv: nicely written. I'm a bit sad at the end that ocaml lost.
<thelema_>
You'll lose some of your narrative power, but it might help people skim / get an idea of the flow of things to present your summary first
eaburns has left #ocaml []
<adrien>
kaustuv: can't really comment but I've had similar troubles not having gcc completely remove pure functions
<adrien>
or rather, functions which computations are not used
<thelema_>
kaustuv: lastly, some notes on why bigarray isn't as fast as C might be useful
<adrien>
I've never been really sure that it wasn't sometimes doing that at least in parts
<adrien>
kaustuv: maybe -fnoipa-pure-const could work: -fipa-pure-const "Discover which functions are pure or constant. Enabled by default at -O and higher."
<thelema_>
oops, sorry for horrible url paste, sed.bordeaux.inria.fr/seminars/profiling_20100511.pdf
<adrien>
thelema_: might be beamer
<kaustuv>
thelema_: I would love to find out why bigarrays are not as fast as C. I think mfp had a good suggestion yesterday about code hoisting, but I didn't fully understand it
<mfp>
kaustuv: take Array1.(unsafe_)get: it's got extra indirections compared to Array.(unsafe_)get because the address is computed as (roughly) & ba[1]->data[size * index] (bigarrays are custom blocks)
<thelema_>
kaustuv: also, it'd probably help (someone) to point out that the type annotation on incr_array is very important for performance
<kaustuv>
thelema_: yes, I plan to add a comment about that presently.
<thelema_>
otherwise, very nice.
<kaustuv>
mfp: Yes, I understand that, but I don't think one level of indirection can amount for the drastic difference between Array and Bigarray.Array1 in this example.
cthuluh has quit [Quit: "Our life is frittered away by detail... Simplify, simplify" -- Thoreau]
thelema_ is now known as thelema
cthuluh has joined #ocaml
<mfp>
now if you have something like for i = j to k do arr.{j} <- x done you'd want the code to be like (in C) sometype *ptr = ((struct caml_ba_array *)Field(ba, 1))->data[j]; for(n = 0; n < k - j + 1; n++; ptr++) { *ptr = x; }
<thelema>
and the ocaml compiler won't do that kind of factorizing for you like GCC
<mfp>
(modulo typos such as the missing &, and s/;/,/ ugh)
<mfp>
thelema: the pb (relative to Array) is that you cannot do it manually either
edwin has left #ocaml []
<kaustuv>
mfp: thanks, I think I get your point now.
<kaustuv>
strictly speaking, the reason gcc -O3 is so fast is that it is doing an addq to an address in memory, which I think neither OCaml's nor GHC's codegen covers
ygrek has joined #ocaml
_andre has quit [Quit: leaving]
<mfp>
thelema: btw. the slides you linked to were definitely created with beamer (that is, libextract says producer - pdfTeX-1.40.10 creator - LaTeX with beamer class version 3.07)
<kaustuv>
Does anyone know what the status is on that LLVM backend for OCaml proposed a few years back? ISTR Jon Harrop was involved in some kind of mentorship role. Was the project canned?
alexyk has quit [Read error: Connection reset by peer]
munga has joined #ocaml
ulfdoz has joined #ocaml
ftrvxmtrx has joined #ocaml
munga has quit [Ping timeout: 240 seconds]
dskippy has joined #ocaml
ymasory has joined #ocaml
<thelema>
mfp: thanks much - now I just have to get their beamer template
<thelema>
kaustuv: yes, jon is working on hlvm instead, an ocaml-like language with a very different backend. He's having pretty good success, from what he writes about it, although it's still quite a toy language still
* adrien
is really wondering if his recent changes (gc) are really that good
drunK has joined #ocaml
mattam has joined #ocaml
mattam has quit [Client Quit]
mattam has joined #ocaml
<alpounet>
kaustuv, it was rejected (as a Jane Street Summer Project)
<alpounet>
it was about having an HLVM backend for the OCaml compiler
<adrien>
couldn't the reprensentation be made somehow compatible?
<alpounet>
nope
<alpounet>
since the IR becomes the LLVM IR at some point when using HLVM
<adrien>
right, no choice here
smerz has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ezyang has quit [Ping timeout: 240 seconds]
Tianon has quit [Ping timeout: 272 seconds]
yezariaely has joined #ocaml
avsm has joined #ocaml
mnabil has joined #ocaml
ymasory has quit [Ping timeout: 250 seconds]
yezariaely has quit [Quit: Leaving.]
groovy2shoes has joined #ocaml
ymasory has joined #ocaml
hcarty has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
bbc has quit [Quit: leaving]
decaf has joined #ocaml
almaisan-away is now known as al-maisan
lamawithonel has joined #ocaml
ygrek has quit [Remote host closed the connection]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
Yoric has quit [Quit: Yoric]
ymasory has quit [Ping timeout: 250 seconds]
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
hexmode has joined #ocaml
<hexmode>
Would someone here be willing to look at an Ocaml diff and tell me if it is sane?
<hexmode>
should be just whitespace differences, but I've never used ocaml
<adrien>
parens are useless, we tend to use 2-spaces for the indentation, and I couldn't find issues, but this kind of diff is probably where it's the easiest to miss changes
elehack is now known as elehack|out
thieusoai_ has joined #ocaml
thieusoai_ has quit [Remote host closed the connection]
tnguyen has joined #ocaml
<tnguyen>
j #python
tnguyen is now known as thieusoai_
al-maisan is now known as almaisan-away
Edward__ has quit []
thieusoai_ has quit [Read error: Connection reset by peer]
thieusoai_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
thieusoai_ has quit [Quit: thieusoai_]
ftrvxmtrx has joined #ocaml
<hexmode>
adrien: thanks
* hexmode
had stepped out to eat
ikaros has quit [Quit: Leave the magic to Houdini]