proqesi has quit [Read error: 145 (Connection timed out)]
alexyk has joined #ocaml
alexyk_ has joined #ocaml
alexyk_ has quit [Client Quit]
alexyk has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
alexyk has quit []
Morphous has quit [Read error: 110 (Connection timed out)]
Morphous has joined #ocaml
alexyk has joined #ocaml
ofaurax has quit ["Leaving"]
ido has joined #ocaml
plx- has joined #ocaml
<plx->
caligula: enjoy the ghost
caligula has quit [Nick collision from services.]
plx- has left #ocaml []
caligula has joined #ocaml
r0bby has quit [Client Quit]
r0bby has joined #ocaml
johnnowak has joined #ocaml
<alexyk>
how do you tell ocamlc to use an .mli when compiling the .ml for it?
johnnowak has quit []
<alexyk>
huh -- do you really have to duplicate all of .mli in the .ml???
johnnowak has joined #ocaml
alexyk has quit []
dfritz has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
<thelema>
alexyk: yes, the .ml is sufficient, and the .mli is an independent interface, not defining any parts of the .ml that are private.
<thelema>
s/sufficient/stand-alone/
<alexyk>
thelema: do I really have to duplicate the .mli in the .ml?
<alexyk>
if I want to create module signatures and make module conform?
<thelema>
yes - it's not like C, where the .h gets included in the .c
<alexyk>
and there's no include syntax?
<thelema>
it's that the .ml is the program, and the .mli lists the parts of the program (with their signature) that are public
<thelema>
there's ways to pre-process, but noone does that. It's straightforward to just duplicate.
<alexyk>
that's very annoying :( I have to edit .mli and .ml in two places
<alexyk>
or defer creatng .mli to the end
<thelema>
I agree - it's one place I'd like to improve ocaml.
<thelema>
you don't need an .mli file, so leave it alone until you're ready for others to use your code.
<alexyk>
but I saw include syntax I thought? can one include files in .ml?
<thelema>
*then* hide the parts that don't need hidden.
<thelema>
Probably the best way to solve the problem is some extra keywords in the .ml file that get pre-processed to empty strings in regular compilation, but allow ocamlc -i to only output some signatures
<thelema>
(you do know about ocamlc -i, no?)
munificent has joined #ocaml
<alexyk>
thelema: interesting...
<thelema>
this takes care of most people's problems with .mli files
<thelema>
they're still far from perfect, but...
alexyk has quit []
proq has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
johnnowak has quit []
johnnowak has joined #ocaml
itewsh has joined #ocaml
<itewsh>
hello
sporkmonger has quit []
sporkmonger has joined #ocaml
munificent has quit []
Stefan_vK1 has quit [Read error: 110 (Connection timed out)]
_JusSx_ has joined #ocaml
kig has quit ["moving"]
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
_JusSx_ has quit ["leaving"]
ikaros has joined #ocaml
_zack has joined #ocaml
_zack has quit [Client Quit]
fschwidom has joined #ocaml
fschwidom has quit [Remote closed the connection]
fschwidom has joined #ocaml
itouch has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
ikaros_ has joined #ocaml
ikaros has quit [Read error: 60 (Operation timed out)]
apedogeagle has joined #ocaml
apedogeagle has quit [Remote closed the connection]
<Yoric[DT]>
What's the usual way of getting rid of "Cannot grow buffer"?
<Yoric[DT]>
Is there a ulimit to change?
<mrvn>
are you trying to grow beyond 16MB?
blizz2 has joined #ocaml
<Yoric[DT]>
Possibly.
<Yoric[DT]>
It's OCamlDoc, so it's hard to say.
<mrvn>
On 32bit cpus strings are limited to 16MB and the buffer module I believe uses strings.
<mrvn>
Not enough bits for the length field in the tag.
<Yoric[DT]>
:/
<Yoric[DT]>
Unfortunately, I don't know exactly where that exception is raised.
<Yoric[DT]>
OCAMLRUNPARAMS="b" doesn't work with ocamldoc, afaik
<mrvn>
I hate that exceptions don't have a backtrace
<Yoric[DT]>
Yeah.
<flux>
yoric[dt], hm, does it require compiling with -g? in that case, you could recompile it?
<Yoric[DT]>
Well, that would require recompiling my ocaml distribution, I believe.
<flux>
really? backtraces have worked in my applications, why would ocamldoc be different?
<Yoric[DT]>
Well, you need to compile your application with -g for backtraces to work.
<Yoric[DT]>
Since ocamldoc is not compiled with this flag, it doesn't work out-of-the-box.
<Yoric[DT]>
Mmmhhh...
<flux>
right, by ocaml distribution you just referred to ocaml compiler?
<Yoric[DT]>
Well, ocamldoc is provided with the ocaml compiler.
<flux>
yes, but what you suggested sounded like you would need to compile everything ocaml-dependant, but that was my fault :)
<Yoric[DT]>
:)
<thelema>
Yoric[DT]: can we have batteries auto-include .mli files into the corresponding .ml?
<flux>
hopefully the airduster can helped my laptop's fan
<flux>
atleast it doesn't make a horrible noise - yet
<flux>
naah, some video running and the noise begins again..
purple has joined #ocaml
<Camarade_Tux>
flux, screwdriver first ?
purple is now known as Guest14583
<flux>
sure, I opened it first as much as I easily figured to do :)
<flux>
but I don't see how to fix that fan, even if I opened it.. I didn't get to see the fan's other side, though, so if it has an opening (covered by a tape possibly), it could be possible to add some oil..
<Camarade_Tux>
my laptop is getting noiser too, I don't know how much I'll be able to clean it =/
<mrvn>
if you open it be prepared to end up with a few extra screws.
purple_ has quit [Read error: 60 (Operation timed out)]
<flux>
I ended up with one extra non-screwed screw hole, and no extra screws..
<gildor>
where is the last screw
<gildor>
... your fan make noise ?
<flux>
well it does appear to make now a little bit less noise, but it might be just because it cooled in the process
_zack has joined #ocaml
<gildor>
Maybe you should tell cpufreqd to keep your laptop processor at low frequency
<gildor>
(even if not on battery power)
<gildor>
this will prevent your computer to heat too much
<gildor>
(but slowdown everything)
<Camarade_Tux>
once I ended up with no extra nor missing screws, I was particularly happy :)
<Camarade_Tux>
(but maybe that two were extra and two others were missing ;p )
<flux>
gildor, not a bad idea indeed, I don't miss the speed
<flux>
although I guess it will still heat up, if it is doing anything else but idling
<blizz2>
hi i'm trying to make a 2D game in ocaml ( a simple shoot em up) , and i have some problem implementing my data structure ( a scene graph + spatial partioning) because i don't understand how i can do it the functional way. could you give me some hint on how i should implement those data structure please?
<gildor>
put your whole laptop in "battery mode"
<gildor>
this will slowdown HD + backlight + processor
<gildor>
it will heat a lot less
<gildor>
if you still have problem i recommend you to buy
<mrvn>
blizz2: although maybe you may want to make the partitioning procedural and use mutables.
fschwidom has quit [Remote closed the connection]
<blizz2>
hmm ok and for my scene graph, i need to to make a new scene each time i process it , even if few changes have been made?
ikaros_ has quit [".quit"]
<mrvn>
Only the nodes you change and their parents.
<flux>
personally, if I had a graph to maintain in ocaml, I would just go with mutability :)
vixey has joined #ocaml
<flux>
trees and ids can work too, of course
<flux>
and occasionally I use those if I especially want to remain in the functional realm
<mrvn>
or both. A lot of the time things move only a little bit and stay in the same place in the tree.
<blizz2>
But i'm modifying my precedent scene graph? this is the point where i have a problem with functional prograimming, i have the impression that you must produce an all new structure each time you want to change something :/
<mrvn>
So make the leaf mutable and the nodes functional.
<blizz2>
mrvn : yes
snhmib_ has joined #ocaml
<flux>
blizz2, when you modify trees, you only need to copy the spine, the leafs can just refer to the old leafs
<flux>
and as allocation and copying pointers is very fast, it's not particularly slower than any other tree operations
<blizz2>
ok
snhmib_ is now known as snhmib
<blizz2>
so i can just put my leaf in my spatial partionning structure and have pointer between all my node?
<mrvn>
blizz2: you always have pointers. everything that isn't a trivial type is a pointer.
<mrvn>
blizz2: anything that doesn't fit in a word.
<blizz2>
oh, everythin point to data , but isn't really data?
<mrvn>
blizz2: (1, 2, 3) is a pointer
<blizz2>
pointer to the value "(1,2,3)"? ? so you mean that i'm never manipulating data in ocaml?
<mrvn>
blizz2: To a Block of memory of size 4 words. First word saying it is a tripplet and then ints 1, 2 and 3.
<mrvn>
blizz2: let a = (1, 2, 3) in let b = a in ... will just copy the pointer.
_JusSx_ has joined #ocaml
<det>
Anyone use ocamlnet on win32 ?
<det>
mingw32, specifically
<Camarade_Tux>
det, are you having problems with it ?
<mrvn>
robocop: have you read the docs and followed the example?
<robocop>
sorry, i'm stupid.
<robocop>
i forgot to declar a type.
<Camarade_Tux>
that's the problem with type inference, you sometimes want it to do a bit too much ;)
<mrvn>
sometimes you get errors a few function calls away from the real place and by that time the type has be infered to hell.
dfritz has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
<mrvn>
Someone tell me if this is sane: I have an abstract 'type res = Result of result | Exception of exn' in my module and 'let result = function Result x -> x | Exception e -> raise e' to access the abstract res. The res is passed from my module as arguments to callbacks it was given. The goal is to throw the exception inside the callback when they access the result.
alexyk has joined #ocaml
ikaros has joined #ocaml
<Yoric[DT]>
Well, that looks correct.
<mrvn>
Or would it be better to have that type not abstract so people can match themself or maybe 2 callbacks, one for normal and one for error?
<Yoric[DT]>
I'd go for the concrete type.
<Yoric[DT]>
Possibly as a polymorphic variant [> `Exception of exn ]
<flux>
what's the runtime cost of polymorphic variants vs regular variants, btw?
<mrvn>
The result is either a Buffer or a Unix error. No need to go polymorphic.
<mrvn>
flux: I think none. They are hased instead of numerated from 0.
<flux>
right, now I remember that the hashing was implemented during compile time
<flux>
except perhaps with C extensions, which will likely (but they don't have to?) do hashing at runtime
<Camarade_Tux>
afair polymorphic variants have a higher runtime cost compared to regular variants
robocop has quit [Remote closed the connection]
<mrvn>
The variant value `VConstr is represented by hash_variant("VConstr"). The variant value `VConstr(v) is represented by a block of size 2 and tag 0, with field number 0 containing hash_variant("VConstr") and field number 1 containing v.
<mrvn>
Unlike constructed values, variant values taking several arguments are not flattened. That is, `VConstr(v, v') is represented by a block of size 2, whose field number 1 contains the representation of the pair (v, v'), rather than a block of size 3 containing v and v' in fields 1 and 2.
<mrvn>
I hope the hash_variant("VConstr") is done at compiletime. But `VConstr(v, v') would indeed be more expensive.
IWannaLog has joined #ocaml
Camarade_Tux_ has joined #ocaml
Camarade_Tux_ has quit ["Leaving"]
<det>
I have a C extension that uses polymorphic variants
<det>
I do the hashing in an init call, that must be called before the module is used.
<mrvn>
so the cost is the difference between writing a literal and copying a value.
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
_zack has joined #ocaml
mohbana has joined #ocaml
<mohbana>
does ocaml allow subtyping of functions, if that makes sense what so ever
<mohbana>
as in
pango has quit [Remote closed the connection]
<mohbana>
(S' -> T') <: (S -> T), if S' <: S and T' <: T
<Smerdyakov>
Yes.
<IWannaLog>
but the type are not good its (s' -> t') <: (s -> t), if s <: s' and t' <: t
<Smerdyakov>
(Just try it and see. All casts must be explicit.)
<mohbana>
yes that's what i meant
pango has joined #ocaml
_zack has quit ["Leaving."]
Stefan_vK has joined #ocaml
xevz has quit [Read error: 113 (No route to host)]
xevz_ has joined #ocaml
xevz_ is now known as xevz
Associat0r has joined #ocaml
xevz has quit [Read error: 113 (No route to host)]
IWannaLog has left #ocaml []
xevz has joined #ocaml
johnnowak has quit []
haelix has quit [kornbluth.freenode.net irc.freenode.net]
cygnus_ has quit [kornbluth.freenode.net irc.freenode.net]
bohanlon has quit [kornbluth.freenode.net irc.freenode.net]
gaja has quit [kornbluth.freenode.net irc.freenode.net]
Stefan_vK has quit [kornbluth.freenode.net irc.freenode.net]
ikaros has quit [kornbluth.freenode.net irc.freenode.net]
vixey has quit [kornbluth.freenode.net irc.freenode.net]
thelema_ has quit [kornbluth.freenode.net irc.freenode.net]
rodge has quit [kornbluth.freenode.net irc.freenode.net]
erg has quit [kornbluth.freenode.net irc.freenode.net]
Mr_Awesome_ has quit [kornbluth.freenode.net irc.freenode.net]
Demitar has quit [kornbluth.freenode.net irc.freenode.net]
ido has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
shortc|desk has quit [kornbluth.freenode.net irc.freenode.net]
mfp has quit [kornbluth.freenode.net irc.freenode.net]
snhmib has quit [kornbluth.freenode.net irc.freenode.net]
itouch has quit [kornbluth.freenode.net irc.freenode.net]
det has quit [kornbluth.freenode.net irc.freenode.net]
hcarty has quit [kornbluth.freenode.net irc.freenode.net]
jburd has quit [kornbluth.freenode.net irc.freenode.net]
jdev has quit [kornbluth.freenode.net irc.freenode.net]
sbok has quit [kornbluth.freenode.net irc.freenode.net]
sporkmonger has quit [kornbluth.freenode.net irc.freenode.net]
thelema has quit [kornbluth.freenode.net irc.freenode.net]
maskd has quit [kornbluth.freenode.net irc.freenode.net]
sgnb has quit [kornbluth.freenode.net irc.freenode.net]
mattam has quit [kornbluth.freenode.net irc.freenode.net]
authentic has quit [kornbluth.freenode.net irc.freenode.net]
orbitz has quit [kornbluth.freenode.net irc.freenode.net]
Snark has quit [kornbluth.freenode.net irc.freenode.net]
caligula has quit [kornbluth.freenode.net irc.freenode.net]
jonafan_ has quit [kornbluth.freenode.net irc.freenode.net]
maxote has quit [kornbluth.freenode.net irc.freenode.net]
pango has quit [kornbluth.freenode.net irc.freenode.net]
ygrek has quit [kornbluth.freenode.net irc.freenode.net]
mjonsson_ has quit [kornbluth.freenode.net irc.freenode.net]
Morphous has quit [kornbluth.freenode.net irc.freenode.net]
smimou has quit [kornbluth.freenode.net irc.freenode.net]
mbishop has quit [kornbluth.freenode.net irc.freenode.net]
svenl has quit [kornbluth.freenode.net irc.freenode.net]
gim has quit [kornbluth.freenode.net irc.freenode.net]
mrvn has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
sscj has quit [kornbluth.freenode.net irc.freenode.net]
Stefan_vK has joined #ocaml
pango has joined #ocaml
ikaros has joined #ocaml
Snark has joined #ocaml
snhmib has joined #ocaml
vixey has joined #ocaml
itouch has joined #ocaml
sporkmonger has joined #ocaml
ygrek has joined #ocaml
caligula has joined #ocaml
ido has joined #ocaml
Morphous has joined #ocaml
thelema_ has joined #ocaml
thelema has joined #ocaml
mjonsson_ has joined #ocaml
smimou has joined #ocaml
cygnus_ has joined #ocaml
haelix has joined #ocaml
bohanlon has joined #ocaml
gaja has joined #ocaml
det has joined #ocaml
mrvn has joined #ocaml
maskd has joined #ocaml
jonafan_ has joined #ocaml
rodge has joined #ocaml
erg has joined #ocaml
Demitar has joined #ocaml
shortc|desk has joined #ocaml
Smerdyakov has joined #ocaml
mfp has joined #ocaml
Mr_Awesome_ has joined #ocaml
sbok has joined #ocaml
hcarty has joined #ocaml
jburd has joined #ocaml
jdev has joined #ocaml
sscj has joined #ocaml
ski_ has joined #ocaml
mattam has joined #ocaml
mbishop has joined #ocaml
authentic has joined #ocaml
sgnb has joined #ocaml
orbitz has joined #ocaml
svenl has joined #ocaml
maxote has joined #ocaml
gim has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Remote closed the connection]
_JusSx_ has quit ["leaving"]
hkBst has joined #ocaml
paul9 has joined #ocaml
ygrek has quit [Remote closed the connection]
paul9 has left #ocaml []
ygrek has joined #ocaml
alexyk has quit []
struktured has joined #ocaml
dfritz has joined #ocaml
_zack has joined #ocaml
xevz has quit [Read error: 60 (Operation timed out)]
xevz has joined #ocaml
ygrek has quit [Remote closed the connection]
Associat0r has quit []
alexyk has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
dfritz has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
Snark has quit ["Ex-Chat"]
alexyk has joined #ocaml
alexyk_ has joined #ocaml
alexyk has quit [Read error: 104 (Connection reset by peer)]
snhmib has quit ["Good riddance!"]
alexyk has joined #ocaml
alexyk_ has quit [Read error: 104 (Connection reset by peer)]
snhmib has joined #ocaml
alexyk_ has joined #ocaml
alexyk_ has quit [Client Quit]
struktured_ has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
alexyk has quit [Read error: 110 (Connection timed out)]
itouch has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
_zack has quit ["Leaving."]
Camarade_Tux has joined #ocaml
struktured__ has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
hkBst has quit [Remote closed the connection]
struktured_ has quit [Read error: 110 (Connection timed out)]