alexyk has quit [Read error: Connection reset by peer]
CoryDambach has quit [Read error: Connection reset by peer]
hyperbor1ean has joined #ocaml
CoryDambach has joined #ocaml
rup_ has joined #ocaml
hyperboreean has quit [Ping timeout: 240 seconds]
rup has quit [Ping timeout: 240 seconds]
fraggle_ has quit [Ping timeout: 240 seconds]
deavid has quit [Read error: Connection reset by peer]
deavid has joined #ocaml
brendan has quit [Ping timeout: 276 seconds]
alexyk has joined #ocaml
haelix_ has joined #ocaml
flx_ has joined #ocaml
haelix has quit [Ping timeout: 240 seconds]
flux has quit [Remote host closed the connection]
flx_ is now known as flux
zzz_` has joined #ocaml
zzz_ has quit [Ping timeout: 260 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
Pepe_ has quit [Ping timeout: 260 seconds]
Pepe_ has joined #ocaml
fraggle_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
ulfdoz has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
pls\ has joined #ocaml
groovy2shoes has joined #ocaml
alexyk has joined #ocaml
<alexyk>
thelema: you were right, it's line 34 but in a different file. Funny how ocamlopt screws up/
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
arubin has joined #ocaml
brendan has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
<thelema>
alexyk: you're welcome
alexyk has quit [Quit: alexyk]
arubin has quit [Quit: arubin]
smerz has quit [Quit: Ex-Chat]
lopex has quit []
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
alexyk has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Changing host]
groovy2shoes has joined #ocaml
pls\ has quit [Read error: Operation timed out]
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
groovy2shoes has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Client Quit]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
philtor has quit [Ping timeout: 240 seconds]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
tauntaun has joined #ocaml
Cyanure has quit [Remote host closed the connection]
seafood has joined #ocaml
tauntaun has quit [Quit: Ex-Chat]
groovy2shoes has joined #ocaml
seafood has quit [Quit: seafood]
groovy2shoes has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
edwin has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Client Quit]
vivanov has joined #ocaml
<vivanov>
hi - i have several threads writing on one socket -> will they automatically wait for each other until each other's single_write is done? thanks
<vivanov>
i want the threads to write on the socket one after another
brendan has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
seafood has joined #ocaml
hyperbor1ean has quit [Quit: leaving]
hyperboreean has joined #ocaml
<flux>
vivanov, no, you need to synchronize manually
seafood has quit [Quit: seafood]
<flux>
small chunks will get written in atomic fashion, but best not build your program on that unless you are optimizing for performance and guarantee that it works otherwise as well
SoftTimur has joined #ocaml
<SoftTimur>
Hello all, I would like to double check with you one thing... in ocaml, "match a b with ..." is same as "match (a, b) with ..." , right?
<adrien>
well, "match a b with" is quite different
<adrien>
# match 3 4 with _ -> ();;
<adrien>
Error: This expression is not a function; it cannot be applied
<adrien>
with '3' underlined: it'll only work if 'a' is a function and you're applying 'b' to it
<adrien>
which is quite different from '(a, b)'
<flux>
softtimur, however, match a, b with .. is the same as match (a, b) with ..
<milosn>
hi guys, i am looking at examples in ocamlnet ... where should i look if i want to make custom protocol servers/clients?
<SoftTimur>
thanks adrien & flux
<SoftTimur>
guys, if you know monad in ocaml, there are at least 3 operations "ret, bind, run"... I would like to know if "ret" is short for "return"?
<flux>
yes
<flux>
no reason why it could actually be 'return', I've used return
<flux>
("why it couldn't" of course)
<SoftTimur>
flux: thank you
ikaros has joined #ocaml
SoftTimur has quit [Quit: Leaving.]
rup_ is now known as rup
<vivanov>
flux: thanks, can u pls explain why -> i thought this is exactly what blocking mode of a socket means
<vivanov>
or does the blocking mode of a socket mean to block until smth was written, and this smth is just a small chunk, and after this small chunk is written the blocking ends and the single_write functions start to compete for the socket again?
<adrien>
when using Mutex.lock/unlock, is the order in which the different lockers are awaken specified? I need that the first section that resumes is the section that first tried to lock
<flux>
vivanov, blocking means that the thead will stop if the send buffer is full
<flux>
vivanov, non-blocking means that you only write as much as fits into the buffer and if you try to write more, you get an error
<flux>
vivanov, ..but the plus side is that the thread never stops
<flux>
vivanov, when using non-blocking sockets, one would also use Unix.select to determine which sockets are writeable (or readable)
<flux>
adrien, while some platforms may provide such guarantees, in general, there aren't
<flux>
adrien, but it is feasible to implement your guaranteed-order mutexes from plain mutexes and conditions
<flux>
not that much code.. guessing, maybe 50 loc?
<adrien>
flux: ok, thanks
<vivanov>
flux: i see, thanks vm
boscop has joined #ocaml
haelix_ is now known as haelix
Yoric has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
CoryDambach has quit [Read error: Connection reset by peer]
CoryDambach has joined #ocaml
kmag has joined #ocaml
ztfw has joined #ocaml
oriba has joined #ocaml
oriba has quit [Client Quit]
alexyk has joined #ocaml
<kmag>
I'm having trouble figuring out the syntax for annotating the type of a global value defined in a let statement.
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
<ygrek>
kmag, ocamlc -i
<kmag>
ygrek: okay, so ocamlc -i is able to infer the type
alexyk has quit [Read error: Connection reset by peer]
<kmag>
ygrek: but ocamlc isn't able to do the same
<ygrek>
parenthesis are needed in this case (cf manual)
<kmag>
Is "type annotation" not the correct search term?
<kmag>
I was having trouble finding the solution via google.
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
<ygrek>
it is called 'type constraint' in the manual, section 6.7.1
<ygrek>
but I guess type annotation is also used
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
<kmag>
ygrek: again, thanks!
lopex has joined #ocaml
Associat0r has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
Oejet has joined #ocaml
Associat0r has quit [Quit: Associat0r]
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
kmag has quit [Quit: Leaving]
<vivanov>
can i join several multicast groups with only one socket?
<vivanov>
these groups have different ports as well
willb1 has quit [Ping timeout: 246 seconds]
willb1 has joined #ocaml
brendan has joined #ocaml
<ygrek>
npouillard, is there a way to print camlp4ast item from within camlp4 (i.e. I get assert false for unmatched pattern in Camlp4Ast2OcamlAst and I want to inspect what was the item)
<npouillard>
ygrek: which line the assert?
<thelema>
hmm, ocamlfind seems to work on only one datadir at a time?
<ygrek>
325
<ygrek>
I thought of constructing Printer, but there is no Syntax
<ygrek>
npouillard, ^^
<ygrek>
but I am interested in general approach - how do you debug it - you definitely need some way to introspect items at different stages
<ygrek>
thelema, datadir?
<ygrek>
thelema, there is one destdir and several search dirs
<thelema>
ygrek: thanks, that helps
<adrien>
how am I supposed to use "ocamlfind ocamldoc" when the interface uses the Mutex module? I can't pass the -thread parameter to ocamlfind =/
<thelema>
adrien: maybe -package threads
<adrien>
don't like it but: '-I +threads'
<adrien>
thelema: didn't work
<adrien>
tried something else with "-package threads" and ocamlfind ocamlopt yesterday and it didn't work either
<thelema>
odd
<adrien>
well, threads is a bit special but I wish ocamlfind handled it more gracefuly
<thelema>
flag ["ocaml"; "doc"; "threads"] & S[A"-I"; A "+threads"];
<thelema>
what you're doing seems to be the way to use ocamldo with threads...
<adrien>
ok, and might have to add the "mt" predicate too sometimes (sometimes)
smerz has joined #ocaml
tauntaun has joined #ocaml
<ygrek>
npouillard, it happens for the code like 'type a = | fpclass' but only if run as ocamldep -pp 'camlp4orf pa_deriving.cma', running preprocessor manually happily emits such code without error
<npouillard>
ygrek: yes but running it to /dev/null (not a terminal) produces the error
<ygrek>
yup
<ygrek>
so it is converting such code to ocaml ast which errs out
<npouillard>
-filter Camlp4AstLifter
<npouillard>
try this option to see the AST in ocaml syntax this may helps
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
ikaros has quit [Remote host closed the connection]
ikaros has joined #ocaml
jonafan_ has joined #ocaml
jonafan has quit [Ping timeout: 276 seconds]
yezariaely has joined #ocaml
mbac has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
ccasin__ has joined #ocaml
arubin has joined #ocaml
ikaros has joined #ocaml
<orbitz>
npouillard: i was there for that, unfortunatly it was way over my head
schmrkc has quit [Read error: Operation timed out]
<npouillard>
orbitz: sorry to hear that, don't give up! Learning meta-programming is hard because it asks for a clear understanding of different levels of programming, one working on the representation of the other
<npouillard>
... easy to get lost
schmrkc has joined #ocaml
schmrkc has quit [Changing host]
schmrkc has joined #ocaml
Cyanure has joined #ocaml
ccasin__ has quit [Quit: Leaving]
<orbitz>
npouillard: yeah, in no way is that a critique of teh CUFP seminar btw, it was just over my head
philtor has joined #ocaml
<orbitz>
what is the production stateof ocamljs?
eye-scuzzy has quit [Quit: leaving]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
mnabil has joined #ocaml
enthymeme has joined #ocaml
mnabil has quit [Ping timeout: 240 seconds]
<gildor_>
npouillard, orbitz; I was at CUFP and at the tutorial, and find it quite interesting, but I already know a bit of camlp4
* thelema
plans to make oasis the first target of odbminus
<thelema>
as it has many deps
<ygrek>
slides are useful, thanks
<gildor_>
what is odbminus ?
<thelema>
gildor_: oasis-db minus
<gildor_>
thelema: don't you think it will be more efficient to work together on oasis-db ?
<thelema>
well, if I can have mine working this weekend...
<thelema>
then I can have a better perspective on the design of oasis-db
<gildor_>
thelema: you know there is already an alpha version online, since ~6 months ?
<thelema>
gildor_: is there any program/library that it can auto download and install?
<gildor_>
thelema: you can download tarball from there, yes
<gildor_>
but the build process doesn't exist
<thelema>
okay, so it can't actually install any library
<thelema>
you have a program that can download a tarball, but so do I, and mine took an hour
<thelema>
(to get to the tarball downloading stage
bzzbzz has quit [Read error: Connection reset by peer]
<ygrek>
obviously fix for PR#5104 doesn't fully work, submitted new issue..
bzzbzz has joined #ocaml
mbac has left #ocaml []
<shaun__>
hi, does anyone know why the OCaml designers chose to implement typing of constructors in expressions by requiring that the syntactic form of the arguments is a tuple with the same arity as the constructor, instead of an expression with the tuple type of the correct arity?
<shaun__>
and why it would be useful to distinguish between type foo = Cons of int * int and type foo = Cons of (int * int)
<thelema>
they're implemented differently - often the first saves an indirection
<thelema>
and the second is sometimes easier to conmstruct and pass around the untagged value
<thelema>
you think they should all be the second?
<shaun__>
yes, because in all other cases, when expressions are replaced by (raise E) where E is an exception, the overall program is well-typed if there exists _any_ modification to that expression that makes the program well-typed
<thelema>
maybe a case of premature optimization, but in the common case, dropping a pointer adds speed
<shaun__>
and in terms of using the language, there is no difference between the two (except typing failure as mentioned)
<thelema>
there's a number of ways people can be bitten by the difference, but yes, it's a very subtle difference
<shaun__>
so they're different to improve performance in different usage scenarios?
<thelema>
yes, flattening most variants helps with performance. If it helps, all polymorphic variants are as you want, with the extra pointer to the tuple
<shaun__>
i.e. the first is more efficient when there are many uses, and the second when there are many constructions
<thelema>
depends on how you're constructing them even.
<mfp>
'More generally, I think the representation trick for constructorstaking several arguments is so crucial and so hard to perform as atransparent optimization that it deserves to be exposed in thelanguage as a primitive concept of "constructor with arity".' (xleroy)