bogen has quit [Read error: 110 (Connection timed out)]
bogen has joined #ocaml
struktured has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ttamttam has joined #ocaml
thrasibule has quit [Read error: 110 (Connection timed out)]
ttamttam has quit ["Leaving."]
flux has quit [Read error: 54 (Connection reset by peer)]
flux has joined #ocaml
CcSsNET has joined #ocaml
CcSsNET has quit [Remote closed the connection]
CcSsNET has joined #ocaml
CcSsNET has quit [Remote closed the connection]
CcSsNET has joined #ocaml
mishok13 has joined #ocaml
__marius1_ has joined #ocaml
__marius__ has quit [Read error: 110 (Connection timed out)]
Associat0r has joined #ocaml
ttamttam has joined #ocaml
zhijie has quit [Read error: 60 (Operation timed out)]
zhijie has joined #ocaml
pad has quit [Read error: 110 (Connection timed out)]
thieusoai has joined #ocaml
minddog has quit [Read error: 113 (No route to host)]
gdmfsob has joined #ocaml
mishok13 has quit [Read error: 145 (Connection timed out)]
zhijie1 has joined #ocaml
zhijie1 has quit [Read error: 104 (Connection reset by peer)]
zhijie1 has joined #ocaml
tmaedaZ0 has joined #ocaml
CcSsNET has quit [Client Quit]
munga has joined #ocaml
_zack has joined #ocaml
tmaedaZ has quit [Read error: 110 (Connection timed out)]
zhijie has quit [Success]
Pimm has joined #ocaml
Yoric has joined #ocaml
minddog has joined #ocaml
_andre has joined #ocaml
albacker has joined #ocaml
albacker has quit [Read error: 104 (Connection reset by peer)]
minddog has quit [Read error: 113 (No route to host)]
ubuntu has joined #ocaml
ubuntu is now known as EliasAmaral
ikaros has joined #ocaml
EliasAmaral has quit [Read error: 110 (Connection timed out)]
Alpounet has quit [Read error: 131 (Connection reset by peer)]
Alpounet has joined #ocaml
tmaedaZ0 is now known as tmaedaZ
ikaros has quit ["Leave the magic to Houdini"]
Submarine has joined #ocaml
<Yoric>
Mmmmhhh...
<Yoric>
Does anyone know how I could create an array that doesn't pack floats?
<Yoric>
(I need to do some black magic with the array)
<Submarine>
box them explicitely
<Submarine>
use a single-field record
<Yoric>
I thought about that. Unfortunately, that's not possible.
<Yoric>
I'm doing some purely syntactic rewrite, so I don't have access to the information that my value is a float.
<Yoric>
I need a general-purpose method.
<Submarine>
what's the problem with the array being packed?
<Yoric>
Hum... I'm not using it to store only floats.
<Yoric>
And before you ask, no, I can't use a record instead of an array.
<Submarine>
are you playing dirty tricks from C?
<Yoric>
Yep.
Pimm has quit [Read error: 110 (Connection timed out)]
dmentre has joined #ocaml
<Yoric>
Well, for the moment, I guess I'll use my linear-time workaround.
<mfp>
Yoric: I think you have to do it C, using magic similar to caml_make_vect
<mfp>
and then your own set/get functions to replace %array_safe_set and friends
<Yoric>
Actually, looking at the source code of Ocaml, it seems that the magic packing is decided statically, not dynamically as I thought.
<Yoric>
If so, I just have to make sure that my array is an [Obj.t array].
<mfp>
caml_make_vect examines the tag of the value on init
Pimm has joined #ocaml
<mfp>
so you need to replace Array.make (= caml_make_vect) so that it doesn't unbox floats
<Yoric>
mmmhhh...
<mfp>
and there's actually no need to replace %array_safe_get & etc.
<Yoric>
I don't quite understand the source code.
<mfp>
which one?
<Yoric>
Or maybe it's different between bytecode and native code.
<Yoric>
From lambda.ml , I deduce that the kind of array is actually part of the Ast, so is decided statically.
<mfp>
array.c is the same for both
<mfp>
ah that
<Yoric>
But array.c does seem to indicate that the trick is done dynamically.
<mfp>
you have to make sure the compiler doesn't know the actual type
<mfp>
if it knows it's a float, it'll access the field directly
<Yoric>
Ah, it's just a further optimization.
<mfp>
otherwise, if it's a 'a array, it checks dynamically
<mfp>
sees whether it's a float array and boxes the result
<mfp>
right
<Yoric>
Ok, I'll start from the source code of caml_make_vect .
<Yoric>
Thanks.
<mfp>
so it'll all work if you operate on polymorphic 'a array types and override Array.make so that the arrays never get a Double_array_tag and the floats remain boxed
<Yoric>
Thanks.
* Yoric
will try and find the most economic way of overriding Array.make .
<Yoric>
Has anyone checked the performance of Bigarray, btw?
<Yoric>
Using Bigarray here is probably way overkill, but I'm wondering whether it would be a big loss of performance.
ubuntu has joined #ocaml
ubuntu has quit [Client Quit]
EliasAmaral has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
<mfp>
Yoric: you don't need polymorphic array types?
shr3kst3r has quit [Read error: 113 (No route to host)]
tarbo2 has quit [farmer.freenode.net irc.freenode.net]
dmentre has quit [farmer.freenode.net irc.freenode.net]
tmaedaZ has quit [farmer.freenode.net irc.freenode.net]
caligula_ has quit [farmer.freenode.net irc.freenode.net]
tarbo2 has joined #ocaml
caligula_ has joined #ocaml
ozzloy has quit [Remote closed the connection]
ozzloy has joined #ocaml
tarbo2 has quit [SendQ exceeded]
tarbo2 has joined #ocaml
shr3kst3r has joined #ocaml
Pimm has joined #ocaml
<flux>
ooh, my crusade against erronously included .cmi-files is victorious, my bug on Calendar was closed!
<sgnb>
flux: you mean, the .cmi of packed modules?
<flux>
sgnb, when packages that use -pack include also the original .cmi-files (that existed before packing)
<sgnb>
flux: ok, cool
<sgnb>
FWIW, they weren't installed by the Debian package
<sgnb>
(since 2.01.1-3)
<sgnb>
I wonder if mehdid_ has forwarded the patch...