<elfring>
companion_cube: I am curious if any more software developers would like to analyse the status of a specific hash table after it was filled to some degree.
<companion_cube>
there are statistics available for Hashtbl
<companion_cube>
see Hashtbl.stats
<companion_cube>
but those are only performance-related indications, with no impact whatsoever on the semantics
<elfring>
Would it make sense to provide information about the applied hash function in these statistics?
<companion_cube>
you can deduce the number of collisions from it
<companion_cube>
from statistics.bucket_histogram (for every bucket with n elements, n > 1, there are n-1 collisions)
<elfring>
Would you eventually like to retrieve a list for the entries which belong to the value "maximal number of bindings per bucket"?
araujo has joined #ocaml
<Enjolras>
I don't understand why you want to do that. It sounds like heavy premature optimization to me
<companion_cube>
elfring: why would you like to do so?
nikki93 has joined #ocaml
<companion_cube>
don't worry about it unless you really have a degenerate case
<companion_cube>
which you currently don't
mika1 has quit [Quit: Leaving.]
<ggole>
Bucket lengths indicate *bucket* collisions, not hash function collisions.
<Enjolras>
what's the difference for an hashtable with collision list ?
<elfring>
I find that documentation around the OCaml hash functions could be improved. Do you need to inspect a hash table in more detail if a "maximal number of bindings" per bucket would not fit to expectations for run time behaviour with a specific application?
<ggole>
The difference is that bucket collisions don't necessarily indicate a weakness in the hash function
<companion_cube>
ggole: right
<companion_cube>
hash collisions are a subset of bucket collisions
<companion_cube>
my bad
<companion_cube>
elfring: Hashtbl provide good runtime behavior, unless an attacker crafter a very specific input (for a web server), so don't worry!
<ggole>
You can provide a seed from a known good RNG to make that difficult, too
<ggole>
(As of recent versions.)
<Enjolras>
ggole: hmm. you mean that you have to look at the variance of buckets lengths to detect hash weakness ?
<ggole>
Better to inspect the value returned by the hash function itself
<ggole>
The problem is that in choosing a bucket, bits are discarded
<elfring>
I do not worry for "toy programs". But I try to be more careful with internet tools and applications where software correctness will matter more.
<Enjolras>
Ah I see. It's a modulo or something like that
<companion_cube>
elfring: with randomized tables it will be fine anyway
zzing has joined #ocaml
zzing has quit [Client Quit]
<elfring>
How will you know that the "randomly" selected hash function fits really to your expectations on good software characteristics?
<nicoo>
elfring: You don't. Not anymore than in other programming languages which use non-crypto hashes.
<companion_cube>
elfring: how can you tell a cosmic ray isn't going to crash your OS?
tchell_ is now known as tchell
<ggole>
Personally, my "expectations on good software characteristics" is that the crudness of my code is likely to exceed that of the stdlib by at least several orders of mag
<ggole>
...more on a bad day
shinnya has quit [Ping timeout: 265 seconds]
<nicoo>
ggole: Then just trust the standard hash function. It is suitable for use in a hash table
<Drup>
(and don't use Str or Stream, or your expectations are going to be crushed)
<Drup>
(by several orders of magnitude)
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
<ggole>
Ah, the beauty of having low standards.
<elfring>
I guess that security researchers will fiddle with higher requirements to establish trust and reasonable confidence levels.
<Drup>
that's what the Hashtble.make functor is for, just use a crypto hash function if you want
<smondet>
elfring: or use a data-structure that really offers certified confidence levels (like Map.t → log(n) access)
<elfring>
How should a specific hash function implementation be passed to the functor "Hashtbl.Make"?
<Drup>
by using the functor
<Drup>
which you can learn how to do by reading ocaml's documentation
rand000 has joined #ocaml
ontologiae_ has quit [Ping timeout: 252 seconds]
<bjorkintosh>
how good is the documentation?
<companion_cube>
it's ok, I think
<gasche>
having an example of functor application directly in the Hashtbl/Set/Map documentation could help
<gasche>
(good patches welcome)
<elfring>
Does the hashed data type determine the selection of a hash function implementation for the functor "Hashtbl.Make"?
<Drup>
the official manual is complete but might be a bit rude, but there is plenty of very good and pedagogic books.
<companion_cube>
elfring: no, you provide a type, an equality predicate and a hash function
<companion_cube>
all three you have to provide
<ggole>
Even pointing at the existing part of docs might be helpful
<nicoo>
Drup: crude*
<elfring>
Do functors support more than a single parameter?
<Enjolras>
yes.
<companion_cube>
some functors take several parameters, but you shouldn't need them before a long time
<Enjolras>
well, it's more a functor with returns a functor than a functor which takes many parameters, but...
<Enjolras>
which*
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
<elfring>
Would you like point out functors which describe their requirement for several input parameters?
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
<companion_cube>
elfring: there aren't any in the standard library, as far as I remember
ousado has quit [Remote host closed the connection]
<elfring>
Which "functor" parameter will handle the comparison operator and the hash function then for example?
<companion_cube>
a functor takes a module as a parameter
<companion_cube>
the module contains a type, and two functions
<johnelse>
That module then gets passed to Hashtbl.Make
jwatzman|work has joined #ocaml
nikki93 has quit [Remote host closed the connection]
tautologico has quit [Quit: Connection closed for inactivity]
<elfring>
Thanks for your answers. - The involved relationships became a bit clearer once more.
tobiasBora has joined #ocaml
malo has joined #ocaml
mort___ has joined #ocaml
dRbiG has left #ocaml []
nikki93 has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Ping timeout: 264 seconds]
nikki93_ has joined #ocaml
nikki93 has quit [Read error: Connection reset by peer]
mort___ has quit [Ping timeout: 264 seconds]
nikki93_ has quit [Remote host closed the connection]
nikki93 has joined #ocaml
lunaryorn has quit []
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
Hannibal_Smith has joined #ocaml
ygrek_ has quit [Ping timeout: 265 seconds]
tobiasBora has quit [Ping timeout: 246 seconds]
ddosia has joined #ocaml
avsm has quit [Quit: Leaving.]
ontologiae_ has joined #ocaml
WraithM has joined #ocaml
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Kakadu has quit [Ping timeout: 245 seconds]
thomasga1 has quit [Ping timeout: 264 seconds]
AltGr has left #ocaml []
jonludlam has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
thomasga has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
Thooms has joined #ocaml
Kakadu has joined #ocaml
Mandus has quit [Ping timeout: 264 seconds]
Mandus has joined #ocaml
nikki93 has joined #ocaml
jonludlam has joined #ocaml
groovy2shoes has joined #ocaml
avsm has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
nikki93 has quit [Remote host closed the connection]
divyanshu has quit [Client Quit]
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
divyanshu has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
petterw has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
thomasga has quit [Quit: Leaving.]
avsm has quit [Ping timeout: 264 seconds]
Mandus has quit [Ping timeout: 240 seconds]
yacks has quit [Quit: Leaving]
Mandus has joined #ocaml
ontologiae_ has quit [Quit: WeeChat 0.4.0]
maattdd has joined #ocaml
avsm has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
ddosia has quit [Quit: Leaving.]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
q66 has quit [Ping timeout: 252 seconds]
q66 has joined #ocaml
michel_mno is now known as michel_mno_afk
claudiuc has joined #ocaml
nikki93 has quit [Remote host closed the connection]
demonimin has quit [Ping timeout: 246 seconds]
maattdd has quit [Ping timeout: 264 seconds]
nikki93 has joined #ocaml
jwatzman|work has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
thomasga has joined #ocaml
maattdd has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ollehar has joined #ocaml
divyanshu has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
Anarchos has joined #ocaml
nikki93 has joined #ocaml
<Anarchos>
hi nikki93
<nikki93>
sup
demonimin has joined #ocaml
RMacy has left #ocaml []
_andre has quit [Quit: leaving]
nikki93 has quit [Remote host closed the connection]
ollehar has quit [Quit: ollehar]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ggole has quit []
tane has joined #ocaml
Mandus has quit [Quit: leaving]
Mandus has joined #ocaml
nikki93 has joined #ocaml
reynir is now known as m0cx
m0cx is now known as reyn1r
reyn1r is now known as mocx
nikki93 has quit [Remote host closed the connection]
mocx is now known as mooczx
mooczx is now known as reynir
adrien_oww has quit [Ping timeout: 264 seconds]
adrien_oww has joined #ocaml
tobiasBora has joined #ocaml
nikki93 has joined #ocaml
BiDOrD_ has quit [Remote host closed the connection]
BiDOrD has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
BiDOrD has quit [Read error: Connection reset by peer]
BiDOrD has joined #ocaml
avsm has quit [Quit: Leaving.]
Kakadu has quit [Read error: Operation timed out]
Kakadu has joined #ocaml
kmicinski has joined #ocaml
<kmicinski>
If OPAM fails to build a package, how can I go in and fix it myself
<kmicinski>
OPAM is trying to tell me that I don't have libffi installed, but I do, and setting the right exports to environment variables to find it doesn't seem to be helping at all
<kmicinski>
Nevermind, I found the actual place where I can rerun installation, this just seems to be a strange OSX libffi thing with ctypes :-(.