<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>
[A
<_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"