ttamttam has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
ttamttam1 has quit ["Leaving."]
Associat0r has quit []
ikaros has quit ["Leave the magic to Houdini"]
ttamttam has joined #ocaml
mal`` has quit ["Coyote finally caught me"]
mal`` has joined #ocaml
sramsay has joined #ocaml
sramsay has quit [Client Quit]
Pimm has joined #ocaml
albacker has joined #ocaml
Asmadeus has quit ["reboot"]
Asmadeus has joined #ocaml
albacker has quit ["Leaving"]
Pimm has quit [Read error: 60 (Operation timed out)]
_unK has joined #ocaml
munga_ has joined #ocaml
munga_ has quit [Read error: 110 (Connection timed out)]
seanmcl has joined #ocaml
munga_ has joined #ocaml
ccasin has joined #ocaml
seanmcl has quit []
munga_ has quit [Read error: 110 (Connection timed out)]
Alpounet has joined #ocaml
bluestorm has joined #ocaml
BiDOrD has joined #ocaml
ccasin has quit ["Leaving"]
_unK has quit [Remote closed the connection]
bluestorm has quit [Read error: 104 (Connection reset by peer)]
bluestorm has joined #ocaml
ttamttam has quit ["Leaving."]
_unK has joined #ocaml
Submarine has joined #ocaml
ttamttam has joined #ocaml
rbancroft has quit [Remote closed the connection]
rbancroft has joined #ocaml
Submarine_ has joined #ocaml
Pimm has joined #ocaml
Submarine_ has quit [Client Quit]
ski_ has quit ["Lost terminal"]
Amorphous has quit [Read error: 60 (Operation timed out)]
Amorphous has joined #ocaml
Yoric has joined #ocaml
Pimm has quit [Read error: 60 (Operation timed out)]
ttamttam has quit ["Leaving."]
Pimm has joined #ocaml
thrasibule has joined #ocaml
r0bby has quit [Connection timed out]
r0bby has joined #ocaml
eldragon has joined #ocaml
<eldragon>
hi guys, is ocaml required to specify a max. heap size during the initialization as jvm's?
<eldragon>
or is its heap growing in need?
<bluestorm>
it depends on how you compile : bytecode (ocamlc) use a runtime heap, and native (ocamlopt) use the bare system heap
<flux>
bluestorm, ..but its size is not bounded, which is what eldragon was asking?
<eldragon>
bluestorm, can the native use all the heap but not consuming all this appreciated resource once during all its lifetime?
<bluestorm>
i'm not exactly sure, because those are low-level details that I only have a very superficial knowledge of
<eldragon>
the problem that had many JVMs is that the user/programmer had to specify the max. heap size (sometimes smaller than needed, sometimes bigger than needed) instead of doing it by the CPU as justly needed.
<bluestorm>
but I think that there is no fixed limit, though you can run out of stack space quicker than you run out of RAM, because stack space handling is (in the underlying OS) specific
<bluestorm>
in that sense, OCaml is more limited stack-space-wise than other implementations that don't use the OS stack, but put everything on the heap (I heard some SML implementations do that, wich is probably more meaningfull in a language with call/cc)
<eldragon>
assuming that the application is not overflower of the memory (no OOM killer needed).
<bluestorm>
eldragon: I think the answer is : native-compiled programs don't have an inherent limit
<bluestorm>
(bytecode programs do, and you can set it with eg. OCAMLRUNPARAM="l=2K")
<eldragon>
thanks bluestorm, i though that JVMs have inherent limits, the most critical, the HEAP.
<bluestorm>
eldragon: there is also the difference that OCaml do optimize tail calls, so in many situation stack will not grow as much as the same program on the JVM
<bluestorm>
(but that doesn't help for non-tailrec recursive programs)
<eldragon>
bluestorm, my planning simple app will use heap intensive instead of stack-only.
<eldragon>
i don't know strategies for doing all it using stack-only.
<eldragon>
i've heard that the objects overheads in heap are, in java 12-byte, in C++ 4-byte (only ptr to VMT of the object), .. how much is in ocaml using non-OO style?
<mrvn>
C++ needs at least one pointer in an object.
<mrvn>
Ocaml uses one word overhead for the GC.
<eldragon>
thanks mrvn
<mrvn>
But you are comparing apples with oranges.
<mrvn>
The overhead for a malloc is a pointer and a size_t. That is 8-16 bytes already. The overhead a c++ object then has is different.
Submarine has quit ["Leaving"]
ua has quit [Read error: 54 (Connection reset by peer)]
ua has joined #ocaml
ua has quit [Remote closed the connection]
stan__ has joined #ocaml
bluestorm has quit [Read error: 113 (No route to host)]
ua has joined #ocaml
BiDOrD has quit [Read error: 110 (Connection timed out)]
BiDOrD has joined #ocaml
<eldragon>
is there any type as int62 constructed using int31 & int31 for preventing the sooner overflow of int31?
<Camarade_Tux>
int64 or int32?
<eldragon>
as C does long64 using two int32s on 32-bit architecture, i don't know if ocaml provides it similar or not.
<eldragon>
/overflow/arithmetic overflow/
<Camarade_Tux>
there is a type called int64: see man Int64, and try something like 4567898765434567788L
<Camarade_Tux>
still signed though
<eldragon>
Camarade_Tux, i want it more "ocaml's native", either int62 or int61 on 32-bit arch.
<eldragon>
ignoring the middle sign of such int6x.
mehdid has quit [Read error: 60 (Operation timed out)]
<mrvn>
eldragon: you can write one but Int64 already gives you 64bit signed int.
sgnb has quit [Read error: 60 (Operation timed out)]
<Camarade_Tux>
or Nativeint too
<Camarade_Tux>
(32bit on 32bit and 64bit on 64bit)
<mrvn>
isn't nativeint 32bit on 32bit cpu?
<eldragon>
Int64 is too inefficient compared to supposed native int6x.
<mrvn>
nm
mehdid has joined #ocaml
<mrvn>
eldragon: you think (int * int) will be faster?
sgnb has joined #ocaml
<mrvn>
And (int*int) will be 126 bit on 64bit cpus or have 64 bit wasted.
<eldragon>
mrvn, i want a primitive type, not a composite type, unaffortunately, double64 and Int64 use 3 words, i want int6x uses 2 words.
<mrvn>
impossible.
<eldragon>
a count of one billion is still limited for my app's purposes, i think int6x is needed.
Yoric has quit []
<Camarade_Tux>
hmmmm, in Bigarray?
Yoric has joined #ocaml
<eldragon>
int6x = either int62 (or int61 ignoring the middle sign) of (int31*int31) as primitive type instead of composite type on 32-bit arch.
Pimm has quit ["Ik ga weg"]
<eldragon>
for preventing premature arithmetic overflow.
<mrvn>
eldragon: That would still require a block consisting of int6x tag, int31, int31 == 3 words.
Yoric has quit [Client Quit]
<eldragon>
mrvn, int31 is tagless, can't be int6x tagless?
<eldragon>
isn't float32 tagless?
<mrvn>
It could possibly be inlined as 2 ints if it is part of a larger structure.
<mrvn>
You could do that with camlp4
<Camarade_Tux>
if you have that many variables, I think you have them in an array, right? so why not try Bigarray? Bigarray.int32_elt for instance?
stan__ has quit [Client Quit]
<mrvn>
eldragon: for me the big question is: Would that be faster? I don't think so.
<eldragon>
mrvn, int6x would be faster and more space-efficient than Int64 or Bigarray.int32_elt
<eldragon>
mrvn, if camlp4/camlp5 is used for it, is it easier syntactically?
<mrvn>
eldragon: I believe that when I see it. You would have to untag the two ints and do a lot of bit masking and shifting to handle over and underflows.
<eldragon>
there is a problem, i don't like let x = (0,1) in .. from (int31 * int31), instead, the preprocesor should generate let x_high = 0 in let x_low = 1 in .. from int31 & int31 from int6x.
<eldragon>
there are some complications using camlp4/camlp5.
<mrvn>
esspecially: type foo = { x : int62; y : int62; } needs to be { x_high : int; x_low : int; y_high : int; y_low : int }
<mrvn>
But camlp4 can do that.
<eldragon>
mrvn, tagless?
<eldragon>
tagless internally?
<mrvn>
eldragon: no. but box-less.
<mrvn>
You need the int tag for the GC.
<eldragon>
can't OCaml team add ocamlp4/5 code for int6x?
<mrvn>
eldragon: show that it is faster than int64 first.
<eldragon>
Int64 adds 3 fields to the box, int6x only 2 fields.
<mrvn>
Or add support for a int62 tag to the GC so that the second word of an int62 can be without tag.
<mrvn>
eldragon: no, int64 adds one field.
<eldragon>
2 vs 3 fields is 66% of 100% in space.
<mrvn>
if you have the same int64 in multiple records that actualy saves space compared to your int62.
<mrvn>
If it is not shared then it costs you 4 values. One in the record and 3 for the int64 itself.
<eldragon>
i only need int6x, no more because arithmetic overflow doesn't happen often in the app that i'll develop.
<mrvn>
someone should burn all 32bit cpus so we can just use 63bit ints.
<eldragon>
mrvn, i wanna tagged record, i want tagless record, it's record that hasn't tag.
<eldragon>
mrvn, Intel has been retarding such 32-bit cpus burning.
<eldragon>
and many machines (desktop PCs, laptops, ...) have inherently limitations related to 32-bit nature, e.g., still limited 3.5GB+.
<mrvn>
exactly.
<mrvn>
16M string or array size sucks too.
<eldragon>
mrvn, 4M entries arrays still in ocaml, i tough.
<mrvn>
Could be. 16MB then.
<eldragon>
i think that the french team didn't want to remove this known limitation for many years ago.
<mrvn>
There are not enough fits in the GC word at the start of blocks.
<mrvn>
s/fits/bits/
<eldragon>
mrvn, no problem, indirect arrays of arrays.
<mrvn>
Bigarray
<eldragon>
but it should be made internally.
<mrvn>
Bigarray is
<eldragon>
and for hash?
<mrvn>
Write a BigHash module
<eldragon>
/hash/hashtable/ still with the same 4M entries problem.
<mrvn>
Hashtbl is afaik array based. Should be trivial to rewrite to Bigarray.
<mrvn>
Probably easy to rewrite as functor and derive Hashtbl and BigHashtbl from Array and Bigarray.Array1 then.
<eldragon>
mrvn, thanks, i will rewrite MyBigArray and MyBigHashtable that remove the 4M internal limitation.
<eldragon>
but int6x still is unsolved for me, i've to use Int64 inefficiently unaffortunately.
<eldragon>
because untagged anonymous boxes/records don't exist yet.
<mrvn>
What I hate is that I could use normal int on 64bit cpus but then I need two sets of interfaces, one for 32bit cpu and one for 64bit cpu.
<eldragon>
and i hate Intel for retarding and putting limits to 32-bit
<mrvn>
eldragon: That is your own fault for buying a 32bit cpu.
kaustuv has joined #ocaml
<eldragon>
mrvn, i need a 64-bit laptop, the problem is that the current laptops are very expensive and underperformed (they're selling Atoms instead of mobile i8, the AMD chips warm too, too higher wattage for 64-bit compared to old 32-bit), there is global crisis, i'm jobless, i'm in home long time. 64-bit laptop i.
<mrvn>
I have an Amd64 X2.
<mrvn>
And Atom330 desktop.
<eldragon>
and sucks almost half of the ram, almost laptops are limited to 4 GiB, i've not seen 6 GB laptops at least.
<kaustuv>
If I want to create a simple master/workers setup with multiple processes communicating only with marshalled values (i.e., no shared memory), which ocaml library (that works with 3.11+) can I use with the least amount of pain?
<eldragon>
i need at least 6 GiB 64-bit laptop to see as if it's 3 GiB virtually.
<mrvn>
kaustuv: the standard library
<kaustuv>
I feared as much.
<mrvn>
Do you want to marshal at all? Unless you go over the network and have to support different architectures I would just send the data in binary.
<eldragon>
i wanna 3.5+ GiB 64-bit laptop as if i see 1.75 GiB virtually, i'm not fine for ~2GiB virt., i'll fine for ~3GiB virt. (64-bit sucks half of ram compared to 32-bit).
<mrvn>
eldragon: only for ocaml.
<kaustuv>
mrvn: how do you propose to send data in binary without shared memory
<mrvn>
kaustuv: Define shallow types containing the data and then write a little stub that writes an object to an fd.
<mrvn>
If your data is too complex to be represented in a shallow type then stick with marshall.
<kaustuv>
given that my data is ASTs, I doubt anything I can write myself in 1 hour will beat the raw speed of marshalling
<mrvn>
An AST is definetly not shallow. :)
<mrvn>
kaustuv: Do you want something more than Marshalling? Type safety? Proxy objects?
<kaustuv>
What I really want are my copies of APUE and UNP that I foolishly left in the US when moving to Europe.
<kaustuv>
But anyway, I can figure this out. I am almost tempted to try OcamlMPI, but MPI is too big a hammer for what I need.
<Camarade_Tux>
I haven't really followed the conversation but I'm doing that with ocamlnet's rpc right now
<Camarade_Tux>
currently I'm evaluating it
<Camarade_Tux>
kaustuv: also, sexplib maybe
<Camarade_Tux>
hmmm, I had forgotten something for ocamlnet's Rpc: for strings it expects that you give a (max) size for the data you're transferring
<Camarade_Tux>
and in bed now
nnyby has quit [Client Quit]
thrasibule has quit [Read error: 110 (Connection timed out)]
<eldragon>
kaustuv, my idea is simple, to use socket instead of heavy MPI, send it as text instead of binary (text required for debugging issues), and instead of printing nested terms (as functors) from ASTs, print what commands in lines should construct the remote receiver for avoiding the need of implementing a grammar/lexer/parser.
<eldragon>
construction is stack-based.
aym has joined #ocaml
verte has joined #ocaml
BigJ has quit [Read error: 54 (Connection reset by peer)]
kaustuv has quit [Remote closed the connection]
ccasin has joined #ocaml
struktured has joined #ocaml
Nepomuk has joined #ocaml
Nepomuk has quit ["Leaving"]
lutter has joined #ocaml
lutter has quit [Remote closed the connection]
_unK has quit [Remote closed the connection]
ccasin has quit ["Leaving"]
caligula__ has joined #ocaml
caligula_ has quit [Read error: 110 (Connection timed out)]