pango has quit [brown.freenode.net irc.freenode.net]
juri has quit [brown.freenode.net irc.freenode.net]
demitar__ has quit [brown.freenode.net irc.freenode.net]
Hadaka has quit [brown.freenode.net irc.freenode.net]
haelix has quit [brown.freenode.net irc.freenode.net]
mauke has quit [brown.freenode.net irc.freenode.net]
kubano has quit [brown.freenode.net irc.freenode.net]
pnou_ has quit [brown.freenode.net irc.freenode.net]
knobo has quit [brown.freenode.net irc.freenode.net]
quamaretto has quit [brown.freenode.net irc.freenode.net]
skylan has quit [brown.freenode.net irc.freenode.net]
cmeme has quit [brown.freenode.net irc.freenode.net]
shammah has quit [brown.freenode.net irc.freenode.net]
Oatmeat|umn has quit [brown.freenode.net irc.freenode.net]
flux__ has quit [brown.freenode.net irc.freenode.net]
noj has quit [brown.freenode.net irc.freenode.net]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
Raziel has quit [brown.freenode.net irc.freenode.net]
ski has quit [brown.freenode.net irc.freenode.net]
Bigb[a]ng has quit [brown.freenode.net irc.freenode.net]
bacam has quit [brown.freenode.net irc.freenode.net]
vodka-goo has quit [brown.freenode.net irc.freenode.net]
Raziel has joined #ocaml
demitar__ has joined #ocaml
pango has joined #ocaml
ski has joined #ocaml
vodka-goo has joined #ocaml
mauke has joined #ocaml
flux__ has joined #ocaml
knobo has joined #ocaml
ulfdoz has joined #ocaml
cmeme has joined #ocaml
juri has joined #ocaml
Oatmeat|umn has joined #ocaml
Hadaka has joined #ocaml
kubano has joined #ocaml
haelix has joined #ocaml
quamaretto has joined #ocaml
pnou_ has joined #ocaml
skylan has joined #ocaml
shammah has joined #ocaml
Bigb[a]ng has joined #ocaml
bacam has joined #ocaml
noj has joined #ocaml
vodka-goo has quit []
_fab has quit [Remote closed the connection]
exa has quit [Remote closed the connection]
ulfdoz has quit [brown.freenode.net irc.freenode.net]
bacam has quit [brown.freenode.net irc.freenode.net]
Raziel has quit [brown.freenode.net irc.freenode.net]
Bigb[a]ng has quit [brown.freenode.net irc.freenode.net]
ski has quit [brown.freenode.net irc.freenode.net]
Raziel has joined #ocaml
ski has joined #ocaml
ulfdoz has joined #ocaml
bacam has joined #ocaml
Bigb[a]ng has joined #ocaml
pango_ has joined #ocaml
pango has quit [Read error: 145 (Connection timed out)]
m3ga has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
revision17_ has quit ["Leaving"]
vezenchio has quit ["\\o sora wa hate shinai, kokoro no kagami dakara ne \o/ mainichi iro wo kaeteku utsushidasu you ni o//"]
Skal has joined #ocaml
rq has joined #ocaml
shirogane has quit [Read error: 104 (Connection reset by peer)]
Revision17 has joined #ocaml
Schmurtz has quit [Read error: 110 (Connection timed out)]
m3ga has joined #ocaml
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
ppsmimou has joined #ocaml
revision17_ has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
pingoo has joined #ocaml
Snark has joined #ocaml
<haakonn>
if i want a function that can hash any value into an int, is Hashtbl.hash the way to go? something more "independent" i could look at (to avoid depending on Hashtbl)?
<flux__>
you can't write such a 'a -> int -function in ocaml
<flux__>
btw, Hashtbl.hash appears to use Hashtbl.hash_param, which may be more suitable (it takes two integers also, maybe the affect how the hashing is done :))
<haakonn>
right, iirc Hashtbl.hash is a natively-implemented function
<haakonn>
oh, nice
<flux__>
it's not a very complex function I see
<flux__>
oh, I missed a function cal
<flux__>
l
<haakonn>
hehe
<flux__>
anyway, hash.c is 157 lines long
<flux__>
so it's not _that_ complex
<flux__>
but it does recurse into the object
<haakonn>
seems like i'll just use Hashtbl's functions then
<flux__>
ah, the second second parameter to hash_param is the depth the hash function will recurse up to
<haakonn>
right, i looked into it a while back :)
<haakonn>
so it allows you to trace accuracy for efficiency
<haakonn>
s/trace/trade/
<flux__>
doesn't look very thread safe though (but it doesn't matter as it is c and calls no ocaml stuff)
<flux__>
I wonder if there is a lot of code like this, although it's not like ocaml's going to be running on multiple cores any time soon..
<dylan>
oh?
<flux__>
oh what?
<dylan>
That ocaml won't be running on multiple cores any time soon?
bluestorm has joined #ocaml
<flux__>
..because I understand there aren't plans to support runnings threads of a single ocaml process in multiple cpu's at the same time.
<flux__>
due to the difficulties of having an efficient gc for that
<flux__>
+ how that would affect code all around ocaml
<dylan>
But, at least on linux, ocaml threads are posix threads. Posix threads work on multiple cores, no?
<flux__>
yes, but they don't run simultanouly
<flux__>
when one thread runs the others don't
<flux__>
unless it's running c-code
<flux__>
(but it still needs specially written c-code)
<dylan>
hmm... that would explain some things.
<dylan>
so it uses some kind of mutex to prevent more than one thread from doing anything at any given instance?
<flux__>
I think that's the idea
<flux__>
it escapes me what is the advantage of using green threads anyway ;)
<flux__>
uh, s/green/native/
<dylan>
'cause vmthreads don't work without a vm?
<bluestorm>
vmthreads use vm to be converted into native threads, i guess
<flux__>
green threads (single-process user-space-only ones) also allow much faster switching between threads
vezenchio has joined #ocaml
Raziel has quit ["Yo soy goma. Tú eres cola."]
<pingoo>
flux__: but it also doesn't take advantage of multiproc computers, and requires extra care from the user
<pingoo>
forget that, everybody knows, I just opened my mouth because I'm bored at work :p
<bluestorm>
hum
<bluestorm>
seems you thought we desagree because nobody answered :D
* dylan
wonders when ocaml's native threads will be multicore.
<bluestorm>
hum
<bluestorm>
can't the kernel do this part of the work ?
<dylan>
Well, it does.
<dylan>
pthreads work on multicore.
<bluestorm>
i mean, the number of core may be hidden by the scheduler
<bluestorm>
hum
<bluestorm>
pthreads ?
<bluestorm>
some kernel module, i guess
<dylan>
what ocaml uses for threads on linux with native code.
<bluestorm>
ah
<bluestorm>
so
<bluestorm>
hum
<bluestorm>
so ocaml is multicore on linux
<bluestorm>
and your question is about windows ?
<dylan>
No. Someone said it wasn't multicore.
<bluestorm>
(i guess other descent kernel like bsd ones have a pthread-like)
<bluestorm>
But
<dylan>
flux__ said "yes, but they don't run simultanouly"
<bluestorm>
Does this question concern ocaml developpers ?
<bluestorm>
i mean, if windows can't provide an easy way to do that
<bluestorm>
why should ocaml implement it ?
<dylan>
the question is: Does ocaml's use of native threads on linux allow it to take advantage of multicore processors?
* dylan
doesn't really care about windows, anyway.
<bluestorm>
:p
<dylan>
as I was told, ocaml doesn't run the native threads at the same time for GC reasons.
<bluestorm>
do you know
<bluestorm>
if ocaml developpment is active ?
_fab has joined #ocaml
<bluestorm>
i mean
<bluestorm>
they are not very communicative about developpment progress
<dylan>
I would assume it is.
<bluestorm>
(s/communicative/talkative/ i think)
<dylan>
(Either. I'd use communicative, but I'm a weirdo.)
<dylan>
So, are there any actual ocaml devs here, I wonder?
<bluestorm>
( i think weirdo Californian guys speak a better english than weirdo french guys )
<bluestorm>
dylan:
<bluestorm>
actual ocaml devs
<dylan>
I am not a californian! ;)
Raziel has joined #ocaml
<bluestorm>
if they are working, they're not here
<bluestorm>
:p
<bluestorm>
so in any case they are not
<dylan>
Interesting.
mauke_ has joined #ocaml
mauke has quit [Read error: 104 (Connection reset by peer)]
stevie has joined #ocaml
<stevie>
commands
<bluestorm>
?
stevie has left #ocaml []
__DL__ has joined #ocaml
descender has quit [Read error: 104 (Connection reset by peer)]
menace has joined #ocaml
<pingoo>
I think OCaml is still maintained, but not so much "developped".
<pingoo>
I thought they were not adding features anymore, but on the other hand there was this private row thing with 3.09.
<bluestorm>
do you think
<bluestorm>
a language wich isn't developped anymore
<bluestorm>
hum
descender has joined #ocaml
<bluestorm>
actually, there is a lot of 'not-anymore-developped-for-a-long-time' very used languages :P
gim has quit ["really dead"]
<pingoo>
bluestorm: what do you want more in ocaml ?
<pingoo>
they'll fix bug and the community keeps developping libs & tools
<bluestorm>
hum
<bluestorm>
dunno
<bluestorm>
for example
<pingoo>
there are some fancy things they don't have, but it would imply changing the whole type system
<pingoo>
i think about coroutining for example
<bluestorm>
i hoped there would be a way
<bluestorm>
to use streams easily
<bluestorm>
juste with the standard library
<pingoo>
what do you mean ?
<pingoo>
there is a stream module in stdlib right ?
<bluestorm>
hum
<bluestorm>
there is one
<pingoo>
and a camlp4 friendly syntax
<bluestorm>
hum
<pingoo>
bluestorm: the stdlib is a bit weak that's true, you've got a point here.. inria doesn't work on that but some external devs do (I don't remember the name of the project)
<bluestorm>
yes
<bluestorm>
the problem is that in sometime i can only use the standard lib
<bluestorm>
so the existence of a perhaps-wonderful Extlib doesn't help me
<pingoo>
there will be others new langages developped by the inria, but OCaml has quite reached its goals
<pingoo>
bluestorm: when can't you use Extlib ?
<bluestorm>
hum
<bluestorm>
for example
<bluestorm>
when doing contests
<bluestorm>
hum
<pingoo>
icfp doesn't forbid you.. in general you can still include what you need I hope
<bluestorm>
could you tell me about these others language getting developped by INRIA ?
<pingoo>
there is jocaml but that's another story, it's too different from ocaml
<pingoo>
I don't really know, there are only ear-says..
<pingoo>
bluestorm: C isn't developped anymore for example :)
<dylan>
The example even works. Or did a few revs ago.
Bigbang is now known as Bigb[a]ng
haelix has quit [Remote closed the connection]
haelix has joined #ocaml
ski has joined #ocaml
pingoo has quit ["Leaving"]
ski__ has quit [Read error: 110 (Connection timed out)]
exa has joined #ocaml
ppsmimou has quit ["Leaving"]
systems has joined #ocaml
systems has left #ocaml []
jynxzero has joined #ocaml
<jynxzero>
Hi. Seems that if you call Unix.select on a socket which has no data waiting, but has been closed by the other end, it is returned in the list of handles that are "ready to read from".
<jynxzero>
Which is a bit surprising to me, though I've not really done much Unix programming.
<jynxzero>
Is it meant to be like that, or is this a bug?
menace has quit [Read error: 104 (Connection reset by peer)]
pango has quit ["Leaving"]
pango has joined #ocaml
shirogane has joined #ocaml
Snark has quit ["Parti"]
vodka-goo has joined #ocaml
<mauke_>
jynxzero: works as designed
<mauke_>
"ready to readfrom" really means reading won't block
shirogane has quit [Remote closed the connection]
mauke_ is now known as mauke
_exa has joined #ocaml
_exa has quit [Remote closed the connection]
kos_tom has joined #ocaml
<kos_tom>
hi
<kos_tom>
I have some trouble compiling ocaml-equeue on Mandriva
<kos_tom>
ocamlfind: ocamlopt does not support multi-threaded programs for your configuration
<kos_tom>
the Ocaml compiler from the Mandriva package was compiled without -with-pthread, so I re-compiled it with this option, but I still get the same error.
<kos_tom>
how can I be sure that the ocaml version I'm using support posix threads ?
<kos_tom>
(i'm using findlib 1.0.4 or 1.1, ocaml 3.08.3 and ocaml-equeue 2.1.3)
m3ga has quit ["disappearing into the sunset"]
exa has quit [Success]
exa has joined #ocaml
revision17_ is now known as Revision17
smimou has joined #ocaml
Raziel has joined #ocaml
exa has quit [Remote closed the connection]
bluestorm has quit [Remote closed the connection]
qknight has joined #ocaml
<qknight>
hey
<qknight>
good evening
<qknight>
i'm having - as usually - problems with ocmal ..
<qknight>
| Assign (pos, e) ->
<qknight>
let new_val = eval e env in
<qknight>
update_env env pos new_val;
<qknight>
Int 42
<qknight>
| Unit -> print_int 42
<qknight>
in this code above there is some sort of pattern matching
<qknight>
and now i would like to match Unit
<qknight>
but i get This expression has type unit but is here used with type value
<qknight>
sorry
<qknight>
the error for the code above is: The constructor Unit expects 1 argument(s),
<mauke>
ok?
<qknight>
now i want to match a unit so that i can have functions with only sideeffects (btw: it's a kind of compiler for a ocaml-like language we're working with)
<qknight>
can i somehow write a function with having only sideeffects? like "let a = print_int 5;;"
<mauke>
that's not a function
<qknight>
i can't image more functions having only sideeffects than print_int or print_something in general
<mauke>
you need something like let a () = print_int 5