flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
Neros has quit [Ping timeout: 245 seconds]
eni has quit [Ping timeout: 245 seconds]
stevej has quit [Quit: Computer has gone to sleep.]
stevej has joined #ocaml
eikke has quit [Ping timeout: 276 seconds]
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
darkf has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
breakds has quit [Quit: Konversation terminated!]
ollehar has joined #ocaml
madroach has joined #ocaml
stevej has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ollehar has quit [Ping timeout: 256 seconds]
Watcher7 is now known as Watcher7|off
cdidd has quit [Remote host closed the connection]
lusory has quit [Read error: Connection reset by peer]
Drup has quit [Quit: Leaving.]
talzeus has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
lusory has joined #ocaml
ygrek has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
jkl has quit [Ping timeout: 264 seconds]
fraggle_ has joined #ocaml
zarul has quit [Ping timeout: 256 seconds]
ggole has joined #ocaml
Watcher7|off is now known as Watcher7
jkl has joined #ocaml
ttamttam has joined #ocaml
ttamttam has left #ocaml []
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
yacks has quit [Ping timeout: 248 seconds]
yacks has joined #ocaml
<adrien> NaCl: :-)
wwilly has joined #ocaml
ttamttam has joined #ocaml
<flux> adrien, indeed, I cannot see any other reason for volatile other than to make C++ look worse :-o
<adrien> yeah, I really don't understand it
<adrien> the guys are supposed to be very good since they work on v8
<flux> but it doesn't affect the performance on my environment that much
<adrien> but I see no interrupt or the like
<flux> 1.165->1.110
<adrien> well, still, it's extra words and it's slower :P
<adrien> so it worries me about possible other things
<flux> erm, clang++ -O3 produces very fast code
<flux> runs in 0.004 seconds
<flux> sadly it returns the wrong answer :P
<ggole> Volatile is a pretty strange qualifier
<flux> (that is: 0)
<ggole> People think it's great and use it for flaky multiprocessing hacks
<ggole> Which is *such* a terrible idea
<flux> maybe they use it for clang 3.2
<flux> it doesn't work with optimizations otherwise with it :-)
<adrien> flux:
<adrien> flux: but clang is fast! :P
<flux> it sure is
<flux> compiles bliding fast as well
<ggole> They are using it as a compiler barrier? That makes me sad.
<adrien> I rarely have compilation speed issues but otoh I don't do C++
milosn has quit [Ping timeout: 246 seconds]
<adrien> several times I've had GCC produce *very* fast code
<adrien> basically it noticed I was doing a benchmark, that my code was pure, that the result was unused
<adrien> so it skipped everything :P
<flux> that's why input should come as a parameter
<ggole> Yeah, it's very aggressive these days
<adrien> -fnoipa-something (enabled at O2)
<adrien> flux: even with that it wouldn't do anything until I used the result (and even then I couldn't compute the same thing several time)
milosn has joined #ocaml
testcocoon has joined #ocaml
Neros has joined #ocaml
Watcher7 is now known as Watcher7|off
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 252 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
Yoric has joined #ocaml
testcocoon has joined #ocaml
eni has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
djcoin has joined #ocaml
Snark has joined #ocaml
troydm has quit [Ping timeout: 256 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
troydm has joined #ocaml
ulfdoz has joined #ocaml
jbrown has joined #ocaml
mort___ has joined #ocaml
eni has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
troydm has quit [Ping timeout: 256 seconds]
troydm has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
testcocoon has joined #ocaml
Yoric has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
mort___ has left #ocaml []
Kakadu has quit [Ping timeout: 245 seconds]
<ousado> flux: for the C++ code from that presentation?
<ousado> clang, I mean
<ousado> which version is that?
talzeus has quit [Read error: Connection reset by peer]
talzeus has joined #ocaml
<flux> 3.2
<flux> (so no point in doing a bug report before trying on 3.3)
wormphlegm has quit [Ping timeout: 256 seconds]
wormphlegm has joined #ocaml
<ousado> 3.0 seems to work
testcocoon has joined #ocaml
Drup has joined #ocaml
Yoric has quit [Quit: Instantbird 1.4a1pre -- http://www.instantbird.com]
yacks has quit [Quit: Leaving]
wwilly has quit [Quit: This computer has gone to sleep]
<flux> ousado, so you 1) removed volatile 3) clang++ -O3?
<flux> 2) xxx
<adrien> magic!
<ousado> ah no I didn't
eikke has joined #ocaml
<ousado> maybe that's the reason for the volatile after all?
Kakadu has joined #ocaml
<adrien> make the code not crash? :D
<ousado> hehe, yes
<ousado> ah right, now it dies
<flux> well that's what I hypotethised
<flux> but the code does nothing funky requiring volatile
<flux> basically if your code needs volatile to work, it is doing something platform-specific; this code doesn't
<flux> well, unless primes[25000] or greater gets accessed
<flux> and it doesn't seem like that
<ousado> and clang should notice
<ousado> at least for simple cases like this one
<ousado> it's strange that it doesn't get this right
ollehar has joined #ocaml
<ousado> hm.. actually on this machine (amd phenom) the JS version is faster than -O3
<ousado> using either of nodejs 0.6.19 and 0.10.1
<flux> I suspect there is some lack of this-> elimination in the code, as it is 'object oriented'
<flux> actually I now understand what's going on
<flux> the code is undefined behavior, it doesn't reset prime_count
<adrien> meaning that you need to prevent the compiler from optimising it to avoid crashes...
talzeus has quit [Remote host closed the connection]
<adrien> I can't chose between the authors coding badly or doing it on purpose
<flux> part that and part it doesn't do any work
<flux> if prime_count is >=25000 by random chance it doesn't do any work, if it's <0 it will crash
<flux> (I think, not sure)
<flux> in any case, it should be clear that V8 performs pretty well with this (micro)benchmark
talzeus has joined #ocaml
<ousado> I think that's fair to say, yes. given that startup-time and compilation time are included
<ousado> and the v8 really performs quite well in many scenarios, though it does have issues with big amounts of allocated memory
<adrien> hmm, I think GCC now has a warning for that kind of undefined behaviour
<adrien> need to check
<ggole> What's the benchmark? Operations on arrays of primitives?
<ousado> basically, yes
<ggole> Those are pretty fast in every language. :)
<ggole> Not that v8 is unimpressive
<ousado> I don't think e.g. python would look good here..
<ousado> pypy would be interesting
<adrien> well, no warning from GCC ='(
<adrien> and my laptop is really too slow
<ggole> luajit, java, and js all handle arrays of primitives really well
<ggole> Arrays of objects are another question
<ousado> these are standard JS arrays that are bein optimized
<ousado> not those fancy native ones
dsheets has joined #ocaml
<ggole> Yes, but the data in the array is primitives.
<ggole> So there is no indirection, no GC, no write barrier, etc.
<ggole> I'd be interested to see what the results of the same operations on an array of pairs would look like.
<ggole> (And volatile, wtf)
hto has quit [Read error: Operation timed out]
yacks has joined #ocaml
hto has joined #ocaml
mcclurmc has joined #ocaml
eikke has quit [Ping timeout: 256 seconds]
<adrien> well, played a bit with the code; converted to non-object code, switched to C, inlined by hand, ...
<adrien> got no performance difference at -O3 on GCC 4.8.0
yacks has quit [Ping timeout: 245 seconds]
<ousado> me neither
q66 has joined #ocaml
<adrien> well, was fun trying to change it and I'm really surprised it didn't change; now doing something else :P
eikke has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
<ggole> Didn't change from the volatile version?
Kakadu has quit [Read error: Connection reset by peer]
<adrien> can't remember for sure; I think it did but only by 10% or so
<ggole> Hmm, yeah
<ggole> I get a bit from making making the array unsigned
<ggole> (Presumably because the cdq turns into a zero)
<ggole> No change from volatile
Kakadu has joined #ocaml
zpe has joined #ocaml
yacks has joined #ocaml
speredenn has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
testcocoon has joined #ocaml
_andre has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
ygrek has quit [Ping timeout: 260 seconds]
Kakadu has quit [Ping timeout: 264 seconds]
balouis has quit [Read error: Operation timed out]
balouis has joined #ocaml
eikke has quit [Read error: Operation timed out]
raichoo has joined #ocaml
testcocoon has joined #ocaml
speredenn has quit [Quit: Leaving]
hto has quit [Ping timeout: 246 seconds]
speredenn has joined #ocaml
talzeus has quit [Remote host closed the connection]
cdidd has joined #ocaml
hto has joined #ocaml
ollehar has quit [Ping timeout: 276 seconds]
hto has quit [Read error: Operation timed out]
cdidd has quit [Remote host closed the connection]
hto has joined #ocaml
Kakadu has joined #ocaml
ollehar has joined #ocaml
eikke has joined #ocaml
hto_ has joined #ocaml
ollehar has quit [Ping timeout: 248 seconds]
hto has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
cdidd has joined #ocaml
troydm has quit [Read error: Operation timed out]
wwilly has joined #ocaml
raichoo has quit [Quit: Lost terminal]
Kakadu has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
gustav___ has quit [Quit: leaving]
gustav_ has joined #ocaml
hto_ has quit [Read error: Operation timed out]
hto has joined #ocaml
darkf has quit [Quit: Leaving]
eikke has quit [Ping timeout: 264 seconds]
zarul has quit [Read error: Connection timed out]
jkl has quit [Ping timeout: 256 seconds]
raichoo has joined #ocaml
gnuvince has quit [Ping timeout: 256 seconds]
troydm has joined #ocaml
speredenn has quit [Ping timeout: 246 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
troydm has quit [Ping timeout: 256 seconds]
troydm has joined #ocaml
ttamttam has quit [Quit: ttamttam]
troydm has quit [Read error: Operation timed out]
fraggle_ has quit [Remote host closed the connection]
troydm has joined #ocaml
<thelema_> adrien: on && returning first or second argument: this is incredibly useful at times, despite being rediculously unsafe.
<companion_cube> in which language?
<adrien> yeah, I can imagine that now but I'm really put off by the danger
<ggole> Javascript, lisp, et al
<thelema_> companion_cube: many. I first used it in perl.
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
<adrien> if (a == true) { a; } else { if (b == true) { b; } else { false; } }
<adrien> definitely longer but if you only need it once every year...
<thelema_> what's more useful is perl's new // operator, which is like && except it checks for being undefined.
<companion_cube> oh, yeah
<thelema_> It's kind of like Option.default; foo // "bar" returns "bar" unless foo is defined.
<companion_cube> but it also implies that there are no proper booleans...
<ggole> You can do something like it with type classes (or equivalent constructs)
smondet has joined #ocaml
<ggole> Without the evil of implicit conversions
<ggole> Iirc scala has such a construct
<thelema_> adrien: (if is_true(a) then a else b)
<adrien> true that checking for b was useless :-)
ygrek has joined #ocaml
<ggole> Seems scala calls it orElse
<thelema_> and we just implemented "||"; && has the first test as a == false
<ggole> || is the more common, I think
<thelema_> || is more common for values, while && is probably more common for flow control (i.e. only do b if a succeeds)
<ggole> Hmm, it's quite common to make use of short-circuiting ||
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
<ggole> var thing = expensive_calc(arg) || other_expensive_calc(arg) || default;
<ggole> Or some junk like that
<ggole> Default is often an expression that throws an error, too
<thelema_> sure, that's for when the value is what you want
<thelema_> and if you want some side effect, usually && is used.
<ggole> Side effect, maybe: flow control, I disagree. foo(a) || bar(b) || fail "aargh" *requires* short-circuiting.
<thelema_> ggole: yes, no disagreement that for both the short-curcuit operation is important.
<thelema_> both && and ||
<thelema_> but || is usually done to get a value (var thing = ... || ... || ...) vs. && being used for side effects (... && ... && ...;)
<ggole> Ah, that's what you meant by flow control
<ggole> Yeah, fair enough
<ousado> poor mans laziness
stombaker has joined #ocaml
<stombaker> Hello / Bonjour
<thelema_> hello
<stombaker> I have a question with Ocaml. How can we define an object which can be instantiable in the module but not out of the module (same question about methods)?
ttamttam has joined #ocaml
<thelema_> stombaker: you want the 'private' keyword
<stombaker> No, because functions in the modules cannot access the method too.
<thelema_> oh, you're talking about OO objects...
<thelema_> well, I still keep the same response for objects, and don't know what you mean about instantiating methods either inside or outside a module.
<stombaker> For instance, I have a module A and I have an object with methods a, b, and c. The method c can be called in the module A, but not in the module B.
<thelema_> not the private keyword for methods, but the private keyword for private row types
<thelema_> as far as visibility of methods, you can have all user-facing functions cast away the method you want hidden, but then you can't get it back...
<stombaker> Thanks, I think I can do what I want.
<stombaker> Have a nice day
<thelema_> you too.
stombaker has quit [Quit: Page closed]
wmeyer has quit [Remote host closed the connection]
ttamttam has left #ocaml []
speredenn has joined #ocaml
dsheets has quit [Ping timeout: 248 seconds]
hsuh123 has joined #ocaml
yezariaely has quit [Excess Flood]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has left #ocaml []
yezariaely has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
eikke has joined #ocaml
ski has joined #ocaml
pango_ has joined #ocaml
pango has quit [Disconnected by services]
pango_ is now known as pango
Kakadu has quit []
wmeyer has joined #ocaml
<wmeyer> hi
<pippijn> hi
<wmeyer> :-)
<adrien> o/
<companion_cube> \o
<wmeyer> \o/
mcclurmc has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
Arsenik has joined #ocaml
<_habnabit> 
<_habnabit> irssi :(
<adrien> pebkac =P
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
ollehar has joined #ocaml
so is now known as so_
zpe has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 256 seconds]
Kakadu has joined #ocaml
so has joined #ocaml
<Kakadu> wmeyer: afair, you wanted to test lablqt when you would get Qt5. Any success?
ttamttam has joined #ocaml
dtg_ has quit [Ping timeout: 252 seconds]
<wmeyer> Kakadu: not at the moment, at all.
ttamttam has left #ocaml []
smondet has quit [Remote host closed the connection]
ttamttam has joined #ocaml
ggole has quit []
<ousado> can opam upgrade itself?
<wmeyer> not that I am aware of :-)
<wmeyer> it will be a cool feature though
ygrek has quit [Remote host closed the connection]
* wmeyer is at the second round of testing his espresso machine today
<ousado> yay :)
<wmeyer> :-)
<ousado> I stopped drinking way too much cofee when I got one
<ousado> *coffee
<wmeyer> it does not work well with my development though, too shaky to do any coding now :-)
<wmeyer> so I suggest myself not buying this big cartoons of nespresso capsules
<ousado> haha
<wmeyer> :D
ttamttam has quit [Remote host closed the connection]
<wmeyer> happy to do the work though
<ousado> can opam handle different local sets of repositories?
<wmeyer> I'm not sure what do you mean ousado here
<wmeyer> you can always change the root of opam
<wmeyer> by saying
<wmeyer> [opam --root]
<wmeyer> and then specify something different
<ousado> ah yes, I guess that would do the trick
<wmeyer> actually suprisingly it remembers the current root across the .opam invocation
<wmeyer> (I think)
zpe has joined #ocaml
<ousado> urgh.. seems I have a corrupted opam install already
<ousado> blabla "make inconsistent assumptions over interface Pervasives"
<Drup> what were you trying to do ?
<ousado> I did "opam install eliom"
<Drup> what's your ocaml version ?
<ousado> git from two days ago
<ousado> corresponding to svn trunk@13694
<ousado> I installed opam before that, though
<ousado> I'll just reinstall it
zpe has quit [Ping timeout: 252 seconds]
<Drup> hum, I don't think there is a change in persuasive in the trunk so .. i don't know :/
zpe has joined #ocaml
<ousado> wmeyer: ah - "With OPAM, each compiler is associated with its own set of packages"
<ousado> so it does that already
<ousado> with switch
<orbitz> opam is like nix-mini
<ousado> failed again :/
zpe has quit [Ping timeout: 256 seconds]
<ousado> "Reason: /clean/usr/lib/ocaml/stublibs/dllnums.so: undefined symbol: caml_hash_mix_uint32"
<ousado> when compiling tyxml.2.2.0
<ousado> and one can also make an alias of some compiler, to use the same version with a new set of packages, so yes, it's exactly what I meant
<ousado> schwweeeet
<ousado> if only tyxml would compile
<ousado> who needs xml anyway
<Drup> ousado: html need it :]
<ousado> yeah, just kidding :)
<ousado> but it's an amazingly not-human, not-machine and not-anything else readable format
ygrek has joined #ocaml
<ousado> ok third attempt..
ygrek has quit [Remote host closed the connection]
gnuvince has joined #ocaml
ygrek has joined #ocaml
eslg has joined #ocaml
<ygrek> why doesn't opam show urls before downloading?
<ygrek> even with -v I get only curl progress without actual url
<ygrek> that's sneaky
Watcher7|off is now known as Watcher7
<ousado> Drup: which ocaml version do you have installed?
<ousado> or rather, are you using for eliom
<Drup> the last stable
ulfdoz has quit [Ping timeout: 248 seconds]
<ousado> so 4.00.1?
_andre has quit [Quit: leaving]
malo has joined #ocaml
eslg has left #ocaml []
<Drup> yes
djcoin has quit [Quit: WeeChat 0.4.0]
<ygrek> one more opam question: where can I see the build logs?
<ousado> tyxml doesn't like me
<ygrek> when installing the package
<ousado> Error: xml_sigs.cmi is not a compiled interface
mcclurmc has joined #ocaml
<ousado> ygrek: when a build fails, it prints parts of stdout and all of stderr to the terminal
<ousado> here at least
<ousado> and writes stderr to a file in the build directory
oriba has joined #ocaml
<ousado> like $HOME/.opam/4.00.1/build/tyxml.2.2.0/
<ousado> ah and stdout also gets a file
jkl has joined #ocaml
<ygrek> ousado, I want the logs of the successful build ...
<ousado> maybe there's a --leave-junk option somewhere?
speredenn has quit [Quit: Leaving]
<ygrek> nope, not in manpages at least
<ousado> --keep-build-dir
<ousado> opam install --help
<ygrek> it doesn't produce logs
<def-lkb> hmm… personally, I would also like to be able to print a message targeting the user
<ygrek> afaik it produces these log files but then removes them
<ygrek> i.e. the logfiles are present during the build
<ygrek> at least the logfile of the last command
Arsenik has quit [Remote host closed the connection]
raichoo has quit [Quit: leaving]
<Kakadu> ygrek: stupid question: have you tried --debug?
wwilly has quit [Quit: This computer has gone to sleep]
ygrek has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Ping timeout: 256 seconds]
emmanuelux has joined #ocaml
Kakadu has quit []
jbrown has quit [Ping timeout: 245 seconds]
speredenn has joined #ocaml
speredenn has quit [Client Quit]
dtg has joined #ocaml
tchell has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
tchell has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
fraggle_ has joined #ocaml
tchell has quit [Read error: Operation timed out]
ollehar has joined #ocaml
oriba_ has joined #ocaml
malo has quit [Quit: Leaving]
oriba_ has quit [Quit: oriba_]
oriba has quit [Quit: Verlassend]
jkl has quit [Ping timeout: 246 seconds]
ollehar has quit [Ping timeout: 264 seconds]
Snark has quit [Ping timeout: 276 seconds]