flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
Drup has quit [Quit: Leaving.]
talzeus has quit [Read error: Connection reset by peer]
ben_zen has quit [Ping timeout: 264 seconds]
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
turnersr has quit [Quit: Leaving]
watermind has quit [Quit: Konversation terminated!]
<wmeyer> jpdeplaix: ocamlbuild is faster, mostly due to community patches, but I'm afraid that full paralelization of ocamlbuild scripts might be a hard problem
es917 has quit [Quit: es917]
DaveS has joined #ocaml
n06rin has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
gnuvince has quit [Ping timeout: 248 seconds]
shinnya has quit [Quit: ZNC - http://znc.in]
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
mrvn has quit [Ping timeout: 240 seconds]
mrvn has joined #ocaml
ollehar has joined #ocaml
q66 has quit [Quit: Leaving]
n06rin has quit [Quit: Leaving.]
TDJACR has joined #ocaml
void64 has quit [Read error: Operation timed out]
darkf has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
turnersr has joined #ocaml
void64 has joined #ocaml
Neros has quit [Ping timeout: 248 seconds]
pkrnj has joined #ocaml
breakds has joined #ocaml
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
ben_zen has joined #ocaml
void64 has quit [Ping timeout: 256 seconds]
levi has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 264 seconds]
levi has joined #ocaml
pkrnj has quit [Ping timeout: 268 seconds]
pkrnj has joined #ocaml
turnersr has quit [Ping timeout: 256 seconds]
pkrnj has quit [Read error: Operation timed out]
pkrnj has joined #ocaml
pkrnj has quit [Ping timeout: 248 seconds]
gnuvince has quit [Remote host closed the connection]
pkrnj has joined #ocaml
void64 has joined #ocaml
breakds has quit [Remote host closed the connection]
pkrnj has quit [Ping timeout: 248 seconds]
pkrnj has joined #ocaml
void64 has quit [Ping timeout: 240 seconds]
tov has joined #ocaml
tov has quit [Quit: leaving]
tov has joined #ocaml
tov has quit [Client Quit]
tov has joined #ocaml
tov has quit [Client Quit]
Arsenik has joined #ocaml
<adrien> morning
<pippijn> morning
Kakadu has joined #ocaml
Ptival has quit [Ping timeout: 256 seconds]
gbluma_ has quit [Ping timeout: 256 seconds]
strmpnk_ has quit [Ping timeout: 256 seconds]
clog has quit [Ping timeout: 256 seconds]
clog_ has joined #ocaml
tianon has quit [*.net *.split]
Ptival has quit [*.net *.split]
clog has quit [*.net *.split]
gbluma_ has quit [*.net *.split]
strmpnk_ has quit [*.net *.split]
tianon has joined #ocaml
ben_zen has quit [Ping timeout: 268 seconds]
DaveS has quit [Ping timeout: 264 seconds]
ulfdoz has joined #ocaml
Cypi has quit []
Simn has joined #ocaml
Cypi has joined #ocaml
<adrien> wmeyer: I love reading SUSv2 on saturday mornings :P
Snark has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
<jpdeplaix> wmeyer: mh ok. I think this should be done in one way or an other if we want to be competitive comparing to ocp-build :/ (in term of pure performances, I mean)
<jpdeplaix> but yes this is hard due to dynamic rules :/
jyeo has quit [Quit: Connection closed for inactivity]
Neros has joined #ocaml
mfp has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ggole has joined #ocaml
mcclurmc has joined #ocaml
ollehar has joined #ocaml
ulfdoz has joined #ocaml
q66 has joined #ocaml
Drup has joined #ocaml
<jpdeplaix> wmeyer: can we imagine something if we separate the default rules and the user defined ones ?
n06rin has joined #ocaml
<Drup> wmeyer: if primitives like %apply assume a fixed signature, it should be better to check that during the declaration of the external with a clean error message, not to crash later with something completely obscure.
clog has joined #ocaml
yacks has quit [Quit: Leaving]
DaveS has joined #ocaml
DaveS has quit [Ping timeout: 256 seconds]
ben_zen has joined #ocaml
<wmeyer> Drup: I've thought about this
<wmeyer> jpdeplaix: there are no default and user rules, everything are fragments of code executed during dependency discovery
<Drup> wmeyer: should I reopen ?
<wmeyer> and that's the biggest chalenge, there is no way of telling mechanicaly, how and what and how the dependencies will come after each iteration.
<wmeyer> Drup: after thinking more about it, yes, we might want to introduce type checking of builtins
<wmeyer> adrien: pippijn morning
DaveS has joined #ocaml
DaveS has quit [Changing host]
DaveS has joined #ocaml
<Drup> wmeyer: I will let you do the reopening and stuff, you know far more about this than I do ;)
<wmeyer> OK, thanks, not that I oppose type checking of the builtins, but I think they are so rarely used in the code that it brings little benefit
<Drup> oh sure, it's very minor
<wmeyer> but worth to note in the bug tracker!
<wmeyer> jpdeplaix: so there are few options how to fix it, analyse the existing build process and store it in the database
<wmeyer> so for the first time ocamlbuild will try to build without big paralelisation
<wmeyer> and then for the second time, it will know how the files are coming
<wmeyer> assumimg nothing changed in the tree
<wmeyer> ping adrien
ontologiae has joined #ocaml
<adrien> wmeyer: pong
<adrien> checking some sed
<adrien> on bds
<adrien> bsd*
<adrien> wmeyer: I found a nice solution to the issue with make messages: MAKELEVEL and MAKEFLAGS were set so I simply unset them
<wmeyer> the question is if they work on BSD *and* GNU
<adrien> well, these variables were inherited because the script was called from inside recursive invocations of make
<adrien> I'm unset'ing them in the shell script btw
<adrien> currently on both gnu and bsd and this works
<wmeyer> yay
<adrien> there might be an issue with parallel builds on bsd however; doesn't seem to be because of me however
<pippijn> morning
<pippijn> again
<adrien> mrvn: oh, you play freeciv? :P
* pippijn plays 0ad
<pippijn> I have a terrible bug
<pippijn> I've had it for some months, but never looked into it
* wmeyer played Goasia, and now time for Vibronics :D
<adrien> 0ad was too slow on my computer
<pippijn> yesterday, I improved the debug trace for the parser engine
<adrien> plus it triggers an MCE through the js stuff =/
<pippijn> adrien: it gets slow with many elements
<adrien> AI?
<pippijn> unit AI probably
<pippijn> it spends a lot of time in simulation
<adrien> the AI was very slow last year and they know it but noone does anything to fix that
<adrien> and I understand nothing about their code
<adrien> (well, I don't have the macro-understanding of their code)
<pippijn> adrien: there are 2 AIs
<pippijn> one player AI and one unit AI
<pippijn> the unit AI is the slow one
<pippijn> I know this because I rarely play against a computer (I always win)
<pippijn> I play against my brothers
<pippijn> so there is no player AI involved
<adrien> I see
<adrien> bsd sed vs. gnu sed question
<adrien> echo a=b | sed 's/\([^=]\+\)=.*/\1/'
<adrien> with gnu sed: returns "a"
<adrien> with bsd sed: returns "a=b"
<adrien> with * instead of \+, I get "a" with bsd sed
<ggole> + isn't special by default in one of the seds (I forget which).
<ggole> There's a flag for it... uh, maybe -r
<pippijn> ggole: he makes it special with \+
<adrien> -r changes the escaping rules but I'm not used to them
<ggole> Hmm
<pippijn> expected AST: https://paste.xinu.at/iWw/
<adrien> actually, this is even simpler: echo a=b | sed 's/\(a\+\)=b/\1/'
<pippijn> actual AST: https://paste.xinu.at/XOL/
<pippijn> adrien: sounds broken :\ I can't imagine how '\+' should have the semantics of '.*'
<pippijn> for some reason the parser drops all merges on the floor
<adrien> with -r, it's fine
<adrien> s/(a+)=b/\1/
<pippijn> but it only happens in a rather specific grammar
<pippijn> it happens less if I inline TemplateArgumentListOpt
<pippijn> and it doesn't happen at all if I inline BinaryExpression
<pippijn> so instead of BinaryExpression in TemplateArgumentList, I write PrimaryExpression, and everything works fine
ontologiae has quit [Ping timeout: 256 seconds]
<adrien> \+ is a gnu extension
<pippijn> so in bsd you have to do pp* for p\+?
talzeus has joined #ocaml
<adrien> or use -r
<pippijn> ok
talzeus__ has joined #ocaml
talzeus has quit [Ping timeout: 245 seconds]
void64 has joined #ocaml
ski has joined #ocaml
yacks has joined #ocaml
<adrien> :)
Cypi has quit []
Cypi has joined #ocaml
<mfp> it's funny when you consider the orig author claimed to be within 20% of hand-written assembly (which he did write for the cmp loops), and then my straightforward OCaml impl with pessimized cmp ;) is 3X faster
<ggole> Just because you write assembly doesn't mean your code is any good.
<mfp> indeed; in this case, it's all about cache misses
<ggole> Bit ironic considering that OCaml is usually quite poor that way
<ggole> Nice job though.
<mfp> would something like this fit in batteries? then somebody could brag about building a fast on-line search engine in 3 LOCs
void64 has quit [Ping timeout: 246 seconds]
<jpdeplaix> wmeyer: By « default » I mean rules that are in ocaml_specific.ml
<wmeyer> jpdeplaix: yes, we want to make loading rules more modular, but that does not change the fact that the rules are hard to analyse
<pippijn> actually, even simpler
<jpdeplaix> mmmh maybe I don't have enough knowledge in ocamlbuild
<pippijn> me too
weie_ has quit [Quit: Leaving...]
weie has joined #ocaml
<adrien> it built
<adrien> thanks to vpm and cthuluh
<def-lkb> vpm ?
<adrien> /names
<adrien> :)
Arsenik has quit [Remote host closed the connection]
n06rin has quit [Read error: Connection reset by peer]
n06rin has joined #ocaml
DaveS has quit []
talzeus__ has quit [Remote host closed the connection]
talzeus has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
talzeus has quit [Remote host closed the connection]
ulfdoz has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
Anarchos has joined #ocaml
<Anarchos> hi
darkf has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
dsheets_ has quit [Ping timeout: 241 seconds]
Neros has joined #ocaml
pango_ is now known as pango
ontologiae has quit [Ping timeout: 268 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
ollehar has quit [Read error: Operation timed out]
derek_c has joined #ocaml
Drup has quit [Quit: Leaving.]
Drup has joined #ocaml
Neros has quit [Ping timeout: 256 seconds]
ecc has quit [Quit: ecc]
tane has joined #ocaml
n06rin has quit [Quit: Leaving.]
milosn has quit [Read error: Connection reset by peer]
milosn_ has joined #ocaml
milosn has joined #ocaml
Neros has joined #ocaml
ggole has quit [Ping timeout: 260 seconds]
milosn_ has quit [Ping timeout: 256 seconds]
derek_c has quit [Quit: Lost terminal]
void64 has joined #ocaml
void64 has quit [Ping timeout: 260 seconds]
void64 has joined #ocaml
void64 has quit [Ping timeout: 256 seconds]
void64 has joined #ocaml
ben_zen has quit [Ping timeout: 245 seconds]
void64 has quit [Ping timeout: 245 seconds]
watermind has joined #ocaml
<watermind> I'm very confused about core's Hashtbl.find_or_add : ('a, 'b) t -> 'a key -> default:(unit -> 'b) -> 'b
<watermind> it's seems like I must use the lable to provide the last argument, or else the types become all wrong
<watermind> so,
<watermind> Hashtbl.find_or_add v 1 ~default:(fun _ -> 2);; <- works
<watermind> Hashtbl.find_or_add v 1 (fun _ -> 2);; <- doesn't work
<watermind> why is that?
<watermind> I know the former is stylisticly better, but I thought the latter would be equivalent
breakds has joined #ocaml
ttm is now known as The_third_man
<watermind> another question
<watermind> this works let id : 'a. 'a->'a , but what of you need to type vars, as in id_pair : ('a,'b)->('a,'b) ?
<watermind> in the second how do you quantify over 'a and 'b?
<watermind> I tried 'a. 'b. (...) and also ('a,'b). (...)
<watermind> neither worked
<mrvn> 'a 'b.
<watermind> :-/
<watermind> thanks mrvn
<watermind> so I know the answer to why we cannot implement fix points as, let rec fix_ g = g (fix g) is because of call-by-value
<watermind> but to be honest I still have some trouble seeing why call-by-value messes this up
<watermind> consider the usual fibonnaci function, taking a step function rather than being recursive
<watermind> let fib_norec step = function | 0 -> 1 | 1 -> 1 | n -> step(n-1) + step(n-2)
<watermind> why would fix_ fib_norec not be a defined value
void64 has joined #ocaml
<watermind> nevermind, I see it
<watermind> argh
<watermind> still have lazy evaluation all over my brain
<pippijn> wmeyer: https://paste.xinu.at/TeA/ocaml it's broken :(
void64 has quit [Ping timeout: 260 seconds]
tani has joined #ocaml
<mrvn> watermind: That tempts me to write: let step = [|1; 1; .(-1) + .(-2) |];
tane has quit [Ping timeout: 264 seconds]
<pippijn> :> is ugly
<watermind> mrvn: oh, you usually leave a space?
<mrvn> only when the dice comes up even
<watermind> :)
ousado has quit [Ping timeout: 264 seconds]
<pippijn> mrvn: infinite lazy array?
<mrvn> pippijn: that was the idea
<mrvn> let step = [|1; 1; ... .(-1) + .(-2); |] might be a better syntax
<watermind> ok so now I'm confused again
<watermind> why wouldn't this be a perfectly acceptable implementation of fix
<watermind> let rec fix_ g = g (fun x -> fix g x)
<watermind> it is accepted
<watermind> but then "fix_ fib_norec 2" overflows
<watermind> but I just derived the calculation and all seems perfectly ok
<watermind> does OCaml try to simplify lambda abstractions beyond head normal form?
<watermind> or is something else happening here?
<watermind> ^
milosn_ has joined #ocaml
pkrnj has joined #ocaml
<Drup> watermind: what is the problem exactly ?
<Drup> oh, I see
<watermind> Drup: I get a stack overflow when doing, e.g. fix_ fib_norec 2
milosn has quit [Ping timeout: 268 seconds]
<watermind> which means I don't understand how OCaml is performing the reductions
<Drup> afair, argument first, from right to left
<watermind> yes, but either order should work
<watermind> the question is more, does it evaluate function values only to head normal form (which is what I'd expect)?
<Drup> why do you have fix_ and fix ?
<watermind> oh !"$#@
<watermind> :-/
<Drup> :D
<watermind> now it works :-/
void64 has joined #ocaml
<watermind> thanks Drup!
<Drup> no problem :D
<wmeyer> will do the commit soon adrien, thanks for the patch.
<wmeyer> sorry to keep you waiting with it
ulfdoz has quit [Ping timeout: 268 seconds]
ben_zen has joined #ocaml
tani has quit [Quit: Verlassend]
<wmeyer> oh noweb literate program pippijn ! nice
<pippijn> yes
<pippijn> the GLR algorithm is rather complex
<pippijn> so I thought it would be a good idea to turn it into a proper document
<pippijn> wmeyer: another advantage is that changing documentation does not cause a recompilation of ocaml code :)
<nicoo> pippijn: Cool
<pippijn> wmeyer: but the GLR engine is broken :(
ontologiae has joined #ocaml
void64 has quit [Read error: Operation timed out]
Drup has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 268 seconds]
Simn has quit [Quit: Leaving]
ben_zen has quit [Ping timeout: 240 seconds]
pkrnj has quit [Remote host closed the connection]
pkrnj has joined #ocaml