gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
<ousado> and that doesn't work so well with Java programmers
<wmeyer> agreed... but it gathers different people
<wmeyer> look at SPJ
lggr has quit [Ping timeout: 264 seconds]
<ousado> wmeyer: SPJ?
<wmeyer> he is a perfect Haskell priest gury, and it works for some people, and the other people can't really say anything
<wmeyer> yes Simon Peyton Jones
<ousado> ah
<ousado> do you know tony morris?
<wmeyer> I admit I love to listen to his talks
<ousado> dibblego?
GnomeStoleMyBike has quit [Ping timeout: 240 seconds]
<ousado> he's on a crusade in #scala
<ousado> for some reason he's forces to use a JVM-compatible language, and he's very unhappy about it
<wmeyer> no I don't know them
<ousado> *forced
<ousado> it' the same guy
lggr has joined #ocaml
<wmeyer> you know let's say it
<wmeyer> it's a transition
<wmeyer> means, that it just a weapon
<ousado> yes
<ousado> I think I slowly got the hang of it now
<ousado> I start to wish for lazy evaluation at times
avsm has quit [Quit: Leaving.]
<wmeyer> so my opinion about Haskell is that, it's a slightly higher level language than ML
<wmeyer> however ML scales from system programming up to theorem provers
<ousado> I have to say that I like ML a lot, maybe most of all
<wmeyer> I share the same feeling, but I would like to see more monads :-)
<ousado> haxe is crazy in that regard
<ousado> I implemented a poor-mans version of type-classes
lggr has quit [Ping timeout: 264 seconds]
<ousado> as far as I understand them, at least
<ousado> and there are monad-like things, too
<ousado> I'm also eagerly waiting for ATS2
<ousado> which will have C++-like templates
lggr has joined #ocaml
<wmeyer> nice
<wmeyer> looks like Haskell
<wmeyer> and does the same thing
<ousado> deliberately, yes
<wmeyer> just the brace syntax
<ousado> indeed
<ousado> and the implementation is everything but complicated
<ousado> writing DSLs is also very easy
<ousado> s/also//
lggr has quit [Ping timeout: 246 seconds]
<wmeyer> nice
<wmeyer> abstracting a bit
cdidd has joined #ocaml
<wmeyer> oh i got the answer
<wmeyer> nevermind
lggr has joined #ocaml
avsm has joined #ocaml
<ousado> wmeyer: alright, gotta go, nice talking
<ousado> .. to you
<wmeyer> ousado: yep, thanks for a good talk too, see you
smondet has quit [Ping timeout: 256 seconds]
<ousado> yes, see you
lggr has quit [Ping timeout: 260 seconds]
thebifnif has joined #ocaml
lggr has joined #ocaml
thebifnif has left #ocaml []
wahnfried has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
avsm has quit [Quit: Leaving.]
milosn has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 255 seconds]
milosn has joined #ocaml
lggr has joined #ocaml
vincent has joined #ocaml
beckerb_ has joined #ocaml
vincentbalat has quit [Ping timeout: 245 seconds]
beckerb has quit [Ping timeout: 245 seconds]
vincent is now known as Guest66028
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
madroach has quit [Ping timeout: 265 seconds]
madroach has joined #ocaml
lggr has joined #ocaml
Drakken has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
Drakken has joined #ocaml
lggr has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
hongboz has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
hongboz has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
avsm has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
avsm has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
hongboz has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
Yoric has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
wieczyk_ has joined #ocaml
lggr has joined #ocaml
Marqin has quit [*.net *.split]
wieczyk has quit [*.net *.split]
xaimus has quit [*.net *.split]
josch has quit [*.net *.split]
srcerer has quit [*.net *.split]
gmcabrita has quit [*.net *.split]
lggr has quit [Ping timeout: 260 seconds]
gmcabrita has joined #ocaml
josch has joined #ocaml
xaimus has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
jathd has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 240 seconds]
wtetzner has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
lggr has joined #ocaml
ankit9 has joined #ocaml
<pippijn> is there a nicer way to do this: http://paste.xinu.at/tVNOB/
<pippijn> (BatBitSet)
hongboz has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 245 seconds]
<pippijn> this is slower: http://paste.xinu.at/03bLSP/
lggr has joined #ocaml
<pippijn> as is this: http://paste.xinu.at/iAjE/
<pippijn> the fold is even slower than the iter
<pippijn> anyway, the enum thing is slower than creating a new bitset
<pippijn> oh.. "unite" calls union internally
<pippijn> :(
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
<pippijn> this one is a little bit faster: http://paste.xinu.at/1HjQ/
sg has joined #ocaml
<sg> anybody about?
<pippijn> I'm here
<sg> do you mind looking over some code quickly and telling me why i am getting a compile error?
<pippijn> I'm new to ocaml
<sg> ah..taking it at uni?
<pippijn> no, for fun
<sg> ah, gotcha. thanks anyhow
<pippijn> you can paste the code, anyway
<pippijn> maybe someone sees it
lggr has quit [Ping timeout: 260 seconds]
avsm has quit [Quit: Leaving.]
lggr has joined #ocaml
<sg> http://pastebin.com/nY1Gk6eu <-- why won't this compile? transform in line 15 is giving me an unbounded value error
<pippijn> ugh
<pippijn> sorry, not for you
<pippijn> sg: what is unbound?
<wahnfried> sg: where is bodies defined
<wahnfried> err
<wahnfried> body
lggr has quit [Ping timeout: 252 seconds]
<pippijn> and acc_on?
<pippijn> body is a type
<sg> body is a type
<sg> yeah
<pippijn> where is acc_on?
<sg> same file
<sg> let acc_on (pos1:point) (m2:float) (pos2:point): vec =
<pippijn> why do you show incomplete code and then ask "what is not defined"?
<sg> everything is defined
<sg> that's the issue
<pippijn> not in this code
<sg> " Error: Unbound value transform "
<pippijn> ah
<sg> IDE is telling me the error is on line 15
<pippijn> I don't know, clearly "transform" is there
<pippijn> can you produce a test case?
<pippijn> a single file I can compile here?
Znudzon has quit [Quit: Leaving]
<sg> yeah, transform has test cases and it compiles, hold on
<pippijn> no, I mean, produce a file that demonstrates the error you are getting
lggr has joined #ocaml
<sg> hold on
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
Cyanure has joined #ocaml
tufisi has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
sg has quit [Quit: sg]
tufisi has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
cb_ has joined #ocaml
<cb_> back
cb_ is now known as sg
sg has quit [Changing host]
sg has joined #ocaml
<sg> did you guys come to any conclusions?
<sg> i'm still lost.
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
Cyanure has quit [Remote host closed the connection]
sg has quit [Quit: sg]
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
pango is now known as pangoafk
<pippijn> I moved the bitset to C++
<pippijn> now it went from 40% to 6% of time spent in merging bitsets
lggr has quit [Ping timeout: 246 seconds]
ankit9 has quit [Quit: Leaving]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
djcoin has joined #ocaml
Yoric has joined #ocaml
astertronistic has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
ftrvxmtrx has quit [Quit: Leaving]
lggr has joined #ocaml
<pippijn> custom operations are really expensive
<pippijn> I noticed I spend quite some time creating new bitsets, so I figured I could re-use GC'd ones, but that slowed things down
lusory has joined #ocaml
<pippijn> from 0.8 to 1.2 seconds
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
ankit9 has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
cago has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
ocp has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
Obfuscate has quit [Ping timeout: 268 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
ftrvxmtrx has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
ontologiae has joined #ocaml
thomasga has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
sepp2k has joined #ocaml
lggr has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
GnomeStoleMyBike has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
milosn has quit [Ping timeout: 244 seconds]
milosn has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
Kakadu has joined #ocaml
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
tufisi has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
tufisi has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
chambart has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
<fasta> How would you write a parser which matches exactly one or two digits in some kind of composable grammar? E.g. "1 " , "21 ", "21" would be valid, but "213" would not.
<thizanne> fasta: with ocamllex, ['0'-'9']['0'-'9']
<thizanne> with ?
<thizanne> ['0'-'9']['0'-'9']?
<fasta> thizanne: can I assign that to a first class value and compose that with other stuff?
<thizanne> yes
<thizanne> do you know ocamllex ?
<fasta> thizanne: by name
<thizanne> well this is simple enough to be writed in classic ocaml then
<fasta> thizanne: but ocamllex isn't a library.
<fasta> thizanne: I would need a build system to use ocamllex.
<fasta> thizanne: not that this is anything special, but if you use Parsec, you don't need that.
<fasta> There are OCaml parsec implementations too, though, but I don't know how good they are.
lggr has quit [Ping timeout: 240 seconds]
<thizanne> fasta: you can (dirtily) write http://paste.awesom.eu/nRH
<fasta> thizanne: that's not composable.
fusillia has quit [Ping timeout: 240 seconds]
<fasta> thizanne: or rather not in a nice way.
<thizanne> hum
<thizanne> what do you want by "composable" ?
<fasta> thizanne: Parsec is composable.
<fasta> thizanne: in that I can assign parsers to identifiers within the language.
<fasta> thizanne: I don't need to call external tools to use it.
<fasta> If I have a parser to parse "foo" and I have a parser to parse "bar", I can just do foo <|> bar to have one that parses both.
<Kakadu> fasta: You can use ocamllex+yacc to create LR-parser for your grammar, You can write parser-combinator library to parse it using LL(k) or You can write ad-hoc hack soultion. What do you want?
lggr has joined #ocaml
<fasta> Kakadu: what do you mean by k, is that any k which has to be known at compile time?
<thizanne> fasta: then you could write `let (<|>) f g = x -> (f x) || (g x)`
<Kakadu> it is lookahead for k tokens
<thizanne> or do you want a library which already supports these classical operations ?
<fasta> Kakadu: sure, but Parsec has infinite lookahead.
<fasta> Kakadu: that is, any arbitrary k.
<Kakadu> fasta: I haven't said that k is a positive number :D
<fasta> Kakadu: ok
<Kakadu> also this lazy parsec-style parsers will work better & faster in lazy languages like Haskell
lggr has quit [Ping timeout: 260 seconds]
larhat has quit [Quit: Leaving.]
mcclurmc is now known as mcclurmc_away
lggr has joined #ocaml
fusillia has joined #ocaml
<GnomeStoleMyBike> Hi All
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
astertronistic has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 256 seconds]
astertronistic has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
ottbot has joined #ocaml
larhat has joined #ocaml
lggr has quit [Ping timeout: 262 seconds]
thomasga has quit [Quit: Leaving.]
astertronistic has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
ankit9 has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
ankit9 has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
ocp has quit [Quit: Leaving.]
fusillia has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 256 seconds]
chambart has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Remote host closed the connection]
Sablier has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
<pippijn> Kakadu: hey
<pippijn> Kakadu: I'm very unhappy
<pippijn> %%% LR item sets construction took 0.847328 seconds
<Kakadu> where?
<pippijn> my program
lggr has joined #ocaml
<pippijn> can you ask your friend how long LR item set construction is supposed to take?
<Kakadu> pippijn: I'm unhappy too. I'm too stupid to understand how to use git-dpm
<Kakadu> I think before I should ask you about your grammar....
tlockney has quit [Ping timeout: 252 seconds]
tlockney has joined #ocaml
<pippijn> 1350 states
<pippijn> in LALR(1)
<pippijn> 734 productions
<pippijn> 150 terminals
lggr has quit [Ping timeout: 240 seconds]
<pippijn> Kakadu: bison takes about 300ms for everything
<pippijn> I'm not even done yet
<pippijn> Kakadu: I already implemented my bitset in C++
<pippijn> because the ocaml one was too slow
<Kakadu> maybe Your algorithm differs from bison's?
<pippijn> yes
<pippijn> probably
<pippijn> I think my algorithm sucks
<pippijn> I need to understand LR more deeply so I can create a better algorithm
<Kakadu> Why You can't look at bison sources?
lggr has joined #ocaml
ankit9 has quit [Quit: Leaving]
lggr has quit [Ping timeout: 264 seconds]
<pippijn> Kakadu: it's written in C
mcclurmc_away is now known as mcclurmc
<Kakadu> I know
<pippijn> if I copy bison's algorithm, it will be a derived work
<pippijn> I'm in china
<pippijn> what is it?
<ousado> pippijn: that would make any second+ implementation of any algorithm a derived work
<Kakadu> "Write in C " cover of "Let it be"
lggr has joined #ocaml
<pippijn> ousado: it's not important enough to me to be fast, right now
<pippijn> maybe I'll look at it in the future
<pippijn> but it's likely a mess, being written in C
<pippijn> I'd rather simplify my current code
<Kakadu> pippijn: Don't afraid monads^W C. It can sense that and counterattack!
<ousado> yes, just saying that not copying algos is impossible
<ousado> (algorithms, not code)
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
smondet has joined #ocaml
sivoais has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
<adrien> 4.00.1? I haven't had time to move to 4.00 yet ='(
hongboz has joined #ocaml
sivoais has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
<flux> true for /topic as well :)
<adrien> :D
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
jamii has joined #ocaml
lggr has joined #ocaml
hongboz has quit [Ping timeout: 260 seconds]
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
paolooo has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
jamii has quit [Ping timeout: 245 seconds]
<hcarty> adrien: You chould try ocamlbrew then :-) Just now updated to build OCaml 4.00.1 by default.
<hcarty> s/chould/should/
<adrien> well, I'm using godi; but I just had no time :P
<adrien> anyway, I should install it too to check compat of lablgtk2
<adrien> at least for that
lggr has quit [Ping timeout: 252 seconds]
<hcarty> adrien: I'll test that now...
<hcarty> adrien: Works here
mnabil has joined #ocaml
<hcarty> adrien: The test is as simple as http://vpaste.net/k3hhw
lggr has joined #ocaml
<hcarty> adrien: That assumes you have libev installed to make Lwt happy... if not then there is an extra step to set an environment variable to limit what is installed by default.
<adrien> hmmmm
<adrien> ocamlbrew works by sourcing a file?
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
<hcarty> adrien: You can download it manually
<hcarty> The file that's piped into bash downloads and calls ocamlbrew automatically
Marqin has joined #ocaml
Marqin has quit [Changing host]
Marqin has joined #ocaml
<hcarty> adrien: And https://github.com/hcarty/ocamlbrew/blob/master/RECIPES.md for a list of example invocations
lggr has quit [Ping timeout: 245 seconds]
<hcarty> adrien: You can download ocamlbrew and run it locally without suffering any ill effects :-)
<hcarty> Other than some used byte on disk, lost CPU time, and whatever bugs may exist
jamii has joined #ocaml
lggr has joined #ocaml
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
Guest66028 is now known as vincentbalat
<adrien> heheh :-
<adrien> )
<adrien> thanks
ontologi1e has quit [Read error: Connection reset by peer]
ftrvxmtrx has quit [Quit: Leaving]
lggr has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
lggr has joined #ocaml
ontologiae has joined #ocaml
cdidd has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
eni has joined #ocaml
lggr has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
tac-tics has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
<GnomeStoleMyBike> cloud is a lie
lggr has quit [Ping timeout: 246 seconds]
leoncamel has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
larhat has quit [Quit: Leaving.]
cago has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 256 seconds]
chambart has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.7]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
leoncame` has joined #ocaml
lggr has joined #ocaml
leoncamel has quit [Ping timeout: 246 seconds]
leoncame` has quit [Client Quit]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
Cyanure has joined #ocaml
eni has quit [Ping timeout: 245 seconds]
tac has joined #ocaml
beckerb_ has quit [Quit: Konversation terminated!]
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
tac_ has joined #ocaml
Yoric has quit [Quit: Instantbird 1.3a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
tac has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
GnomeStoleMyBike has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
thelema_ is now known as thelema
err404 has joined #ocaml
tac_ is now known as tac
zbroyar has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
ImAlsoGreg has quit [Quit: Leaving]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
fraggle_laptop has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
pangoafk is now known as pango
lggr has quit [Ping timeout: 256 seconds]
avsm has joined #ocaml
lggr has joined #ocaml
cb_ has joined #ocaml
cb_ has quit [Client Quit]
lggr has quit [Ping timeout: 240 seconds]
ottbot has quit [Ping timeout: 240 seconds]
pippijn has quit [Ping timeout: 265 seconds]
lggr has joined #ocaml
djcoin has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
err404 has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
emmanuelux has quit [Client Quit]
lggr has joined #ocaml
sepp2k1 has joined #ocaml
emmanuelux has joined #ocaml
sepp2k has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 245 seconds]
mnabil has quit [Ping timeout: 246 seconds]
<adrien> more than 70 new downloads over 2 months added to the forge it seems
lggr has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
trotro has joined #ocaml
trotro has quit [Client Quit]
trotro has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
trotro has quit [Client Quit]
lggr has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.7]
lggr has quit [Ping timeout: 246 seconds]
mcclurmc is now known as mcclurmc_away
lggr has joined #ocaml
<wieczyk_> let f (ld : (module Ld)) =
<wieczyk_> let module M = ld in
<wieczyk_> ....
<wieczyk_> How to make M equal to ld ?
<wieczyk_> or maybe better
<wieczyk_> let F be a functor
<wieczyk_> let f (ld : (module P)) = F(ld)
<wieczyk_> why it is not working
<wieczyk_> module F(module ld) is also not working
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
chambart has quit [Ping timeout: 260 seconds]
<_habnabit> wieczyk_, define 'not working'
<Drakken> wieczyk_ module F (M: MTYPE) = struct ... end
lggr has quit [Ping timeout: 256 seconds]
<Drakken> module M = F(Ld)
lggr has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
dwmw2_gone has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
<wieczyk_> Drakken: let f (ld : (module P)) = module F(ld) ?
<wieczyk_> I do not understand what you said to me, only part of expression.
<wieczyk_> _habnabit: not compiling
<Drakken> wieczyk_ what do you want to do with Ld?
<wieczyk_> pass as a parameter to functor F
wieczyk_ is now known as wieczyk
<Drakken> I should have chosen better names: module F(L:LDTYPE) = struct ... end
lggr has joined #ocaml
<Drakken> That makes F a functor that uses Ld.
<Drakken> module M = F(Ld)
<Drakken> Now use can use M, which is an application of F that uses Ld.
<wieczyk> Can you write whole expression?
<Drakken> What do you want F to do with Ld?
<wieczyk> 20:51 < wieczyk_> pass as a parameter to functor F
<Drakken> That's what module F(L:LDTYPE) does.
<Drakken> You refer to L in the ... between "struct" and "end".
<Drakken> And you pass Ld to F in module M = F(Ld)
<wieczyk> Sorry, as you can see I am exploring the first-class modules, why are ytou forcing me to something else?
<wieczyk> to do*
lggr has quit [Ping timeout: 264 seconds]
Kakadu has joined #ocaml
lggr has joined #ocaml
GnomeStoleMyBike has joined #ocaml
casion has quit [Quit: casion]
<Kakadu> http://paste.in.ua/4837/raw/ I need a tip to fix my error
<Kakadu> I happens beacuse module has type 'a key_ = Key.t inside
<Kakadu> and this type appears as type for value named `str`
<Kakadu> and I don't know how to kill this '_a
lggr has quit [Ping timeout: 255 seconds]
<thelema> wieczyk: # let f ld = let module LD = (val ld: LDT) in let module M = LF(LD) in ();;
<Drakken> wieczyk: let f (module L: LTYPE) = L.f() (* or whatever you want to do with Ld *)
<Drakken> oops. duplicate posts.
<thelema> wieczyk: apparently it's not allowed to directly pass the unpacking of a first class module to a functor, but unpacking it to a name seems to work.
lggr has joined #ocaml
<wieczyk> Thanks guys.
<thelema> wieczyk: yes, coming soon
<wieczyk> I am interrested how good it will be.
<thelema> wow, that's a HDR happy camel
<wieczyk> :D
<wieczyk> Ah I understand why I could now defend my first-class modules problem.
<wieczyk> Programming with 3.12 and reading manual for 4.0 isnt good idea.
<thelema> yes, use 4.00
<thelema> wieczyk: ocamlbrew can install just released 4.00.1
<wieczyk> mhmh
lggr has quit [Ping timeout: 240 seconds]
<wieczyk> thelema: I have swithced to OCamlbuild, yes, it is much better than my own Makefile
<wieczyk> What is an OASIS?
<thelema> wieczyk: oasis is a tool that will generate a build system for you
<thelema> it is also related to oasis-db, which takes the same input and categorizes packages in a global repository
<wmeyer> Write in C
<thelema> no, ocaml
<wieczyk> Something like cabal?
<thelema> yes, something like cabal
<wieczyk> Well, I am not fanatic that I cannot use ocaml software which was not written in Ocaml.
<thelema> although I'm not qualified to back that up, as I've never used cabal
<wmeyer> I used
<wmeyer> worse, possibly more stable: that's a direct and honest comment
<thelema> oasis is definitely newer
<wmeyer> at least it does not generate any files at the moment (optionaly it generates single setup.hs)
lggr has joined #ocaml
<wieczyk> Nice
<wieczyk> so again, I cannot understand why Haskell is much much more popular than Ocaml ;
<thelema> oasis can generate ocamlbuild configurations for you
<wieczyk> mhmh
<thelema> wieczyk: oasis is quite new, and not all projects use it.
<thelema> in fact, batteries hasn't quite migrated to using it for build.
<thelema> it has an _oasis file, but that oasis file just says to use the makefile for build
<wieczyk> mhmh
<wieczyk> Maybe you should write some blog about Ocaml.
<wieczyk> some info about news in Ocaml's software, in language, some ,,patterns''
<wieczyk> (update topic)
ftrvxmtrx has joined #ocaml
<wmeyer> wieczyk: we don't blog we developp :-) that's one of the failures of the community - no blogs about the monads.
<thelema> wieczyk: planet.ocamlcore.org
<thelema> wmeyer: we develop from scratch, even
<wieczyk> HAskell's people also develop from scratch
<wieczyk> to have library ion some monad, transfoer etc
<wieczyk> too much purity for me, too less pragmatic
<thelema> I see a lot of projects that build on top of others.
<wieczyk> But ok, maybe i am Haskell antifan I am too much bad for this language.
<thelema> although maybe that's my small sample
mnabil has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
<wieczyk> How did you meet ocaml?
paolooo has quit [Quit: Page closed]
lggr has quit [Ping timeout: 256 seconds]
<tac> I met ocaml cordially.
<thelema> In a dark alley.
<tac> Well, I couldn't meet him in daylight hours. The Haskell community would shun my associating with such an impure personality.
<thelema> :)
<thelema> Oddly enough, I came to OCaml from Perl, via wanting to use 'map' and 'grep' and pipelines of transformers more
lggr has joined #ocaml
<wieczyk> :D
<wieczyk> From Perl to Ocaml, buitifull
<wmeyer> thelema: When you told me during our Camlers dinner, I thought I wouldn't survive this kind of enlighement, I would delve into hallucination for 3 days in a row.
<thelema> they're both wonderfully expressive languages with (and this isn't obvious to perl outsiders) flexible type systems
<wmeyer> thelema: you still a perl hacker it sounds ....
<wieczyk> hihi
<thelema> nah, haven't coded perl in a long time.
<thelema> am doing all my work in OCaml/C++ now
<wmeyer> wieczyk: don't be discouraged I was genuinely surprised that it's possible: such a seameless switch
<thelema> oddly enough, some of it involves OCaml generating C++ code.
<wieczyk> In Perl I have written only very small scripts.
err404 has joined #ocaml
<wmeyer> wieczyk: that's still sane. I think thelema was writting biger scripts and he was kicked badly by the duck typing
lggr has quit [Ping timeout: 245 seconds]
<wmeyer> (not confirmed!)
<wieczyk> hehe
mnabil has quit [Ping timeout: 246 seconds]
<tac> Haskell retains the "beauty" of Perl
<thelema> having terrible problems with object typing did drive me away from them. :)
<wieczyk> It is possible to have something similar to Haskell's ($) in Ocaml?
<wieczyk> I am asking because this language is not ,,indent-driven''
<wmeyer> thelema: that's the weirdest route I can imagine. So next thing you tried were OCaml objects?
<wmeyer> :-)
<thelema> I didn't immediately go from perl to ocaml objects (my perl style wasn't particularly object-oriented)
lggr has joined #ocaml
<thelema> but I did try to fit what I wanted to say into ocaml's object system, and found that I wasn't able to make things work well.
<wmeyer> wieczyk: point free notation, you have it, I think i mentioned there is builting called revapply which you can bind to (<|)
ftrvxmtrx has quit [Ping timeout: 246 seconds]
<wmeyer> builtin
<wmeyer> external (<|) : ('a -> 'b) -> 'a -> 'b = "%revapply"
<thelema> wieczyk: the ocaml version of ($) is (|>), which is reversed: x |> f1 |> f2 |> f3
<wieczyk> Hm, yes, you have have already told me about this.
<wieczyk> Can you give me a list of some usefull definitions etc?
<thelema> I don't recommend revapply as ocaml's eager nature doesn't match with it
<wmeyer> oh yes, i always get it wrong
<thelema> wieczyk: that's the one thing I write myself when I don't include a stdlib.
<flux> the way I see it $ isn't about lazy evaluation but about omitting parens.
<thelema> s/stdlib/extended stdlib/, like batteries or core
<thelema> flux: and |> does the same for me
<wieczyk> Can I find those definitions in stdlib or batteries?
<thelema> wieczyk: in batteries. |> is spelled |! in core
<wmeyer> not in stdlib
<wmeyer> why they chosen the shreek :)
<wmeyer> |$ maybe
<thelema> wmeyer: a mistake, which is too costly to fix at this point.
<flux> thelema, but how about this: some_function_that_takes_an_argument_and_a_callback 42 $ fun a -> a + 1
<wmeyer> hmm is the precedence driven by lexographicaly calculating precedence of each of the characters of the operator?
<Anarchos> wmeyer there are some rules like that into the ocaml grammar
<wmeyer> thelema: ooops.
<thelema> flux: eww.
lggr has quit [Ping timeout: 248 seconds]
<flux> thelema, it's pretty nice if you have continuation-passing-style code.
<thelema> wmeyer: yes, the ocaml grammar determines precedence and associativity from the first character(s) in the operator
<thelema> flux: I can see that. i don't program in continuation passing style much
<flux> |> is nice when you are 'piping data' but not when you are transferring control flow
<Anarchos> nobody used dypgen GLR generator ?
ftrvxmtrx has joined #ocaml
<thelema> monadic style in ocalm still allows `y >>= fun x -> ...`
<thelema> *ocaml
<flux> thelema, and what is better way to use higher order functions within each other than this? flip Array.iter array $ fun row -> flip Array.iter row $ fun x -> Printf.printf "%d" (x + x)
eni has joined #ocaml
lggr has joined #ocaml
<flux> (you can indent it nicely)
<thelema> flux: if you're using 'flip', you're probably doing it wrong
<flux> thelema, well, why is flip in batteries then?-)
<flux> the problem is that not always the function part is last, which of course wouldn't fit that
<thelema> some darned fool put it in, and backwards compatibility keeps us from removing it.
<thelema> labels may fix this
<thelema> although they may still have issues in such pipelines
<flux> I don't think it would be confusing to see that fragment of code when, say, summing over a 3d array elements
<flux> actually it might, because folds have three arguments, no flip there :)
lggr has quit [Ping timeout: 264 seconds]
mcclurmc_away is now known as mcclurmc
<wmeyer> thelema: flip List.map [1;2;3] <- isn't that useful?
<wmeyer> i know. I shouldn't recomend flip to anyone
_andre has quit [Quit: leaving]
<thelema> I've tried using flip, and have come to the conclusion that it's not the right tool for understandable programming
<thelema> and understandability is critical.
<flux> it's just a matter of recognizing certain patterns in code
<wmeyer> thelema: Haskell programmers don't like flip either - they say it's sometimes useful - mainly for implementing embedded Forth in Haskell
<flux> I think it's at times useful to have the 'long' part of the argument last
lggr has joined #ocaml
<thelema> flux: labeled arguments
<thelema> which I wish batteries had as default.
<flux> labeled arguments have their own problems, especially in partial applications
ulfdoz has joined #ocaml
<flux> probably the reason ocaml doesn't use labels just everywhere, but has separate "Labeled" modules
<thelema> I don't think those problems are unsolvable; the compiler can be a bit more generous in how it matches.
<flux> I'll believe it when I see it :)
<flux> in any case when you have a function that takes two arguments and one of them is a function..
<flux> you could imagine even a language where you can just put those arguments in any order and it just works
<flux> the fact that there's word "flip" there is just a small thing I need to do to appiese the compiler
<flux> (s/pie/pea/)
tac has quit [Ping timeout: 240 seconds]
tac_ has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
Yoric has quit [Ping timeout: 246 seconds]
<Drakken> flip is nice in the absence of labels. I don't like having to track down the second arg when the first one is a big lambda function.
lggr has joined #ocaml
<wmeyer> Drakken: I share the same observation, the problem begins when you will start "refactoring" stuff transforming everything to free point notation with flips to be pure
<thelema> point-free notation is probably also not productive in terms of readability
<wmeyer> so flip is powerful but not sure about readability
<wmeyer> it's crazy
<Drakken> wmeyer that's a cultural problem in the Haskell community.
<wmeyer> with list comprehensions and recursion ideally
<Drakken> They love to overuse (.)
<wmeyer> we love ; :-)
<flux> thelema, so would you say partial applications in general reduce comprehensibility?
<thelema> flux: a bit, yes, although by themselves, they're not as bad as the other techniques.
<flux> the extremes are alwyas, well, extreme. I'd like to think for most techniques there's a golden middle way.
<thelema> when partial applications are bound to a useful identifier, this helps a lot
<flux> sadly you (the one reading the code) must still be familiar with all of them to be able to rapdily comprehend what's going on.
<wmeyer> that's why we have (fun o -> ...) and not \o -> ... (you can see the difference)
<thelema> Supposedly, most C++ shops program in a subset of C++, probably for exactly this reason - limiting the number of cogs that have to turn in peoples' heads
<flux> iirc someone wrote a syntax extension for 'holes' in ocaml, it was pretty nifty
<thelema> flux: bluestorm did, iirc
<flux> the notation was (iirc): \(foo + _)
<flux> or maybe it was _1 instead of plain _, raising the question of unused parameters etc
lggr has quit [Ping timeout: 256 seconds]
<flux> bluestorm hasn't been around for quite a while
<thelema> iirc, _# and _ were both allowed
<thelema> allowing one to do \(_2 + _1)
<thelema> (not that it matters for +
<wmeyer> thelema: that's a nice twist
lggr has joined #ocaml
<wmeyer> the problem is
<wmeyer> usual
<wmeyer> psychological
<wmeyer> people are insecure about OCaml
<wmeyer> Camplp4
<wmeyer> Camlp4 not OCaml
<flux> well, camlp4 changes things
<wmeyer> and don't use all these goodies
<flux> in particular error messages
<wmeyer> no we have a strong maintainer
<wmeyer> that's one reason, it could be a packrat parser to be honest
<flux> and then there is this camlp4/camlp5-thing
<flux> and the sad state of camlp4 documentation
<wmeyer> I wish these holes, pa_monad, etc. light syntax extensions were in wild
<wmeyer> because OCaml compiler is minimalistic in some sense
<wmeyer> Haskell does more things like deriving
<wmeyer> or sugar for monads
<wmeyer> we do need it
<flux> copyright 2007? time flies..
<thelema> no, that's not right. it's 2009 at the earliest
<wmeyer> flux: I did notice
<flux> thelema, web server says Last-Modified 18 Dec 2008
<thelema> flux: wow.
<flux> the coypright message could be copy-asted from pa_refutable, apparently some other code such as the first coment comes from there as well :)
<thelema> flux: yes, that's what I'm thinking. I'm surprised at the last-modified
<wmeyer> maybe bluestorm can comment.
lggr has quit [Ping timeout: 248 seconds]
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
lggr has joined #ocaml
bddn has quit [Quit: No Ping reply in 180 seconds.]
<wmeyer> frozen here; need to put double heating on.
Obfuscate has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
chambart has joined #ocaml
avsm has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
avsm has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
eni has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 260 seconds]
zbroyar1 has joined #ocaml
lggr has joined #ocaml
zbroyar1 has left #ocaml []
bddn has joined #ocaml
Cyanure has quit [Remote host closed the connection]
zbroyar has quit [Ping timeout: 248 seconds]
BiDOrD has joined #ocaml
smondet has quit [Ping timeout: 244 seconds]
BiDOrD_ has quit [Read error: Operation timed out]
lggr has quit [Ping timeout: 248 seconds]
larhat has joined #ocaml
lggr has joined #ocaml
tac_ has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
Kakadu has quit [Quit: Konversation terminated!]
lggr has joined #ocaml
mnabil has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
lggr has joined #ocaml
Playground has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
Sablier has quit []
lggr has joined #ocaml
<ousado> heh the myhtryl guy is funnny
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
mnabil has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 240 seconds]
tufisi has joined #ocaml
lggr has joined #ocaml
mnabil has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
amitp has joined #ocaml
lggr has joined #ocaml
<wieczyk> Where can i Find zip and unzip
<wieczyk> ?
<wieczyk> split and combine in Batteries, thanks
amitp has left #ocaml []
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
<mcclurmc> wieczyk: split and combine are also in the standard List module
mnabil has quit [Ping timeout: 246 seconds]
jamii has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
<wieczyk> mcclurmc: I did not see
<wieczyk> thanks
<wieczyk> Ok, I have switched to ocamlbuild but I have problem.
<wieczyk> I am using batteries in src/Lang/CWCPS/SomeFile.ml
<wieczyk> and ocamlbuild requires proper _tags file in src/Lang/CWCPS/
<wieczyk> but I would like to have _tags in ./_tags instead of ./src/.../_tags
<wieczyk> Can I achieve this?
Yoric has joined #ocaml
jathd has quit [Remote host closed the connection]
srcerer has joined #ocaml
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
<wmeyer> wieczyk: Isn't it 2 AM in Poland? ;)
<wmeyer> wieczyk: use single _tags in root of your project
<wieczyk> wmeyer: not working single _tags
<wieczyk> BAtteries not found, when I put _tags more deeply then it works
<wmeyer> so the pattern is most likely wrong
<wieczyk> Yes, it is 2AM, but I will not have time to programm in Ocaml in next week
<wmeyer> true: use_menhir
<wmeyer> <examples/llvm-example/codegen.*>: syntax_camlp4o
<wmeyer> <dragons/LLVM/{llvmf,AST}.*>: syntax_camlp4o
<wmeyer>
<wieczyk> So i need to use this time ;]
<wmeyer> sample
<wieczyk> <*>: package(batteries)
<wmeyer> you need to do <**/*>: package(batteries)
<wieczyk> OK!
<wmeyer> or just
<wmeyer> true: package(batteries)
<wieczyk> (Jesus, how pleasure is programming in ML, especially after writting whole week in C++)
<wmeyer> it is
<wmeyer> nobdoy pays for that though ;)
<wmeyer> well at least in my case, but it's not the major problem
lggr has quit [Ping timeout: 260 seconds]
<wieczyk> ;]
lggr has joined #ocaml
<wmeyer> wieczyk: keep it going; i do have plenty do to tonight
<wmeyer> next step for you after you learn basic arcana of ocamlbuild, is to try to use Oasis
<wieczyk> :D
cdidd has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]