<ita>
ktne: do you notice a difference between 63 and 64 bit ints ?
<ktne>
mbishop i was not aware of that
<mbishop>
linuxtk10: there is an external library
<cannedfish>
linuxtk10: well it does supoort but but not natively (e.g. strings, regexes in std lib)
<ktne>
mbishop in that case i would still preffer f# because it feels more modern :)
<ita>
in the variable names
<linuxtk10>
i have no use for unicode really
<ita>
ktne: what the fuck are you doing on this channel then ? :-)
<ita>
ktne: archeology ? :-)
<cannedfish>
linuxtk10: good for you :)
<bluestorm_>
there is camomile
<bluestorm_>
an external library that handle many string encodings
<ktne>
ita i'm not familiar enough with either f# or ocaml :)
<ktne>
ita so i'm here to learn :)
<bluestorm_>
ktne: i still don't see the problem with 31/63 ints
<bluestorm_>
there is a tag bit
<ita>
ktne: ...
<cannedfish>
the problem with non-standard library support is, well it's not standard and not every body uses it so not everything supports unicode
<bluestorm_>
the GC uses it, and it's efficient
<ktne>
bluestorm_ it feels like a hack, lack of rtti
<bluestorm_>
rtti ?
<ktne>
runtime type information
<ktne>
google -> "Information, available at runtime, about the class types and inheritance relationships of application objects. Also referred to as metadata."
<bluestorm_>
hm
<cannedfish>
and the biggest pain in the ass is regular expression engine's lack of support for unicode if you need it
<bluestorm_>
ktne: stripping off type information at evaluation time allows for some more optimizations
<ita>
ktne: it looks like a hardware optimization you dont want to understand ? :-)
<ktne>
bluestorm_ you don't really have to strip type information
<ita>
ktne: remember the difference int - Integer() ?
<bluestorm_>
ktne: hm
cannedfish has quit ["Reconnecting"]
cannedfish has joined #ocaml
<ita>
bluestorm_: hm
<bluestorm_>
you're worrying about *one bit*, then you want to add type information everywhere
<ktne>
bluestorm_ you can store information that enables the GC to "know" the type without extra tagging
<ktne>
bluestorm_ a table in vmtable
<pango>
ktne: but it's less cache friendly
<ktne>
pango that's like a bit per member
slipstream has quit [Read error: 110 (Connection timed out)]
<ktne>
pango also it's accessed during gc only
<pango>
exactly what I'm saying, it has worse locality
<ktne>
you have worse locality with a bit per integer
<ktne>
because you have to check each integer in the stack, and each integer in each object
<ktne>
in order to determine whenever an object is a pointer or an integer
<ktne>
that is not the case if you use type metadat in vmtable
<pango>
if that's a pointer gc has to read it anyway
<ktne>
but you have to scan the entire memory for pointers
<ktne>
and the whole stack
<ktne>
because you don't have type metadata to point you there directly
<ktne>
no modern vm uses pointer tagging afaik anymore
cannedfish has quit [Client Quit]
cannedfish has joined #ocaml
<pango>
looks like ultimate argument, I guess I'll stop here ;)
<ktne>
:)
<ktne>
howhever pointer tagging is easier to implement
<ktne>
so i can see the reason why it might have been implemented :)
<pango>
see papers on ocaml site on their tests with type-aware gc
<pango>
performance is about the same
<ktne>
but those 31bit pointers feel so squishy :)
<ktne>
and so prone to overflowing if you are not careful :)
<pango>
like 32 and 64 bit integers, too; But I'm not too happy with 31/63 bits either, it makes OCaml unfit for some tasks
cannedfish has quit [Client Quit]
cannedfish has joined #ocaml
<ktne>
yes but 32bit integers overlflow naturally
<ktne>
they overflow to 0 .. they don't overflow .. into a pointer
<pango>
31bits overflow naturally too
<pango>
now that's fud
<ktne>
well 2^31 + 1 is not 0, it's a pointer
<ktne>
so on overflow the object type will change
<ktne>
and it will point to some place in memory
<pango>
have you checked ?
<ktne>
which the GC will then have to scan
<pango>
you should check 2-complement arithmetic, signed 31 bits arithmetic overflow exactly like 32 bits arithmetic, just slightly sooner ;)
<ktne>
only if the hardware is built around a 31bit register
<ktne>
01111 + 1 is not 00000, it's 10000
<pango>
check how it's implemented in OCaml's generated asm
<ktne>
i doubt it's implemented differently
<ktne>
hmm
<ktne>
i've deleted my ocaml :)
<ktne>
would you be kind enough to test 2^31+1?
<ktne>
see what value it returns? :)
<ktne>
actually 2^30-1 + 1
<ktne>
1073741824
<ktne>
1073741824 + 1
<ktne>
how much ocaml returns for that?
<pango>
# max_int ;;
<pango>
- : int = 1073741823
<pango>
# max_int + 1 ;;
<pango>
- : int = -1073741824
<ktne>
hmm
<ktne>
interesting :)
<ktne>
does it store pointer flag as bit 0 = 0?
<ktne>
then it must check for overflow after each math operation?
<ktne>
hmm
<ktne>
unfortunatelly i must go now :)
<ktne>
cya tommorow, i'll investigate on this :)
<pango>
reinstall ocaml then ;)
cannedfish has quit ["Reconnecting"]
cannedfish has joined #ocaml
<ktne>
i'll have to :)
ktne has quit []
G_ has quit [Read error: 110 (Connection timed out)]
mordaunt has joined #ocaml
<linuxtk10>
hmm im wondering how i can run my ocaml web script natively compiled
<bluestorm_>
cgi ?
<bluestorm_>
hm
<bluestorm_>
i've done something with xinetd in the past
cannedfish has quit ["Reconnecting"]
cannedfish has joined #ocaml
<bluestorm_>
you can use xinetd to redirect port 80 input on a ocaml binary, that has to output HTML back
<linuxtk10>
theres a fcgi moule wit hthat net library
<linuxtk10>
and cgi
<linuxtk10>
but i am running it as interpreted atm
olegfink has quit [Read error: 104 (Connection reset by peer)]
olegfink has joined #ocaml
cannedfish has quit [Remote closed the connection]
cannedfish has joined #ocaml
cannedfish has quit [Client Quit]
cannedfish has joined #ocaml
clog has joined #ocaml
_JusSx_ has quit ["leaving"]
mbishop has joined #ocaml
martin_ has quit [Read error: 110 (Connection timed out)]
|Jedai| is now known as jedai
gaja has quit [Remote closed the connection]
buluca has joined #ocaml
magnus_ has joined #ocaml
slipstream has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
seafoodX has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]