lapinou changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Public logs at http://tunes.org/~nef/logs/ocaml/
pyon has quit [Quit: brb]
maattdd has joined #ocaml
nikki93 has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 250 seconds]
mfp has joined #ocaml
bjorkintosh has quit [Quit: Leaving]
Rotacidni has joined #ocaml
maattdd has joined #ocaml
ygrek has joined #ocaml
maattdd has quit [Ping timeout: 258 seconds]
q66 has quit [Quit: Leaving]
rgrinberg has left #ocaml []
rgrinberg has joined #ocaml
rgrinberg has left #ocaml []
rgrinberg has joined #ocaml
divyanshu has joined #ocaml
studybot_ has quit [Read error: Connection reset by peer]
jwatzman|work has quit [Quit: jwatzman|work]
tlockney_away is now known as tlockney
studybot has joined #ocaml
tlockney is now known as tlockney_away
tlockney_away is now known as tlockney
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 258 seconds]
ygrek has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Quit: Leaving.]
cesar_ has joined #ocaml
cesar_ is now known as Guest95361
ygrek has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
alephlambda has left #ocaml []
`jpi has joined #ocaml
<`jpi> any rationale behind using a stack machine rather than a register machine for bytecode?
nikki93 has quit [Remote host closed the connection]
<whitequark> easier to serialize?
rgrinberg has joined #ocaml
nikki93 has joined #ocaml
<ruzu> stack machines are for wimps
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 250 seconds]
inr has quit [Ping timeout: 245 seconds]
claudiuc_ has quit [Ping timeout: 276 seconds]
claudiuc has joined #ocaml
<flux> probably was a popular choice at the time
<flux> jvm is a stack machine as well
<flux> I suppose llvm has shown the light for register machines ;)
<whitequark> flux: I'm almost entirely sure jvm is a stack machine because it's simpler to generate, serialize and verify the stack bytecode
<whitequark> also, more compact, unless you do clever things like llvm does
<whitequark> really? *this* is your solution to generating parsers? C preprocessor? ಠ_ಠ
<flux> interesting :)
<whitequark> I suppose reading sexplib source to attempt to understand how to use type_conv may have been a mistake
divyanshu has quit [Quit: Computer has gone to sleep.]
<whitequark> the pa_sexp_conv is horrifying in its sheer volume, too
marcux has joined #ocaml
<`jpi> looks like perl code
`jpi has quit [Quit: WeeChat 0.3.2]
<whitequark> hmm, seems like ppx is what I would want to rather use instead
jk_ has joined #ocaml
inr has joined #ocaml
<whitequark> ppx looks *great*.
yacks has joined #ocaml
lopex has quit [Ping timeout: 258 seconds]
Guest95361 has quit [Remote host closed the connection]
lopex has joined #ocaml
divyanshu has joined #ocaml
andreypopp_ has quit [Ping timeout: 252 seconds]
__marius___ has quit [Ping timeout: 246 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 265 seconds]
darkf_ is now known as darkf
siddharthv has joined #ocaml
axiles has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 265 seconds]
darkf_ is now known as darkf
rgrinberg has quit [Quit: Leaving.]
AIDS_Pizza has joined #ocaml
michel_mno_afk is now known as michel_mno
ggole has joined #ocaml
jzelinskie has quit []
tlockney is now known as tlockney_away
andreypopp_ has joined #ocaml
__marius___ has joined #ocaml
Mandus has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 250 seconds]
andreypopp_ has quit []
Simn has joined #ocaml
michel_mno is now known as michel_mno_afk
andreypopp_ has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 252 seconds]
darkf_ is now known as darkf
manizzle has quit [Ping timeout: 258 seconds]
keen___ has quit [Ping timeout: 276 seconds]
Kakadu has joined #ocaml
tnguyen has quit [Ping timeout: 245 seconds]
mister_m has quit [Ping timeout: 245 seconds]
tnguyen has joined #ocaml
mister_m has joined #ocaml
keen___ has joined #ocaml
ygrek has joined #ocaml
ollehar has joined #ocaml
jzelinskie has joined #ocaml
tnguyen has quit [Ping timeout: 250 seconds]
tnguyen has joined #ocaml
Mandus has joined #ocaml
<whitequark> wheee, I wrote my first ppx extension
<Kakadu> Something useful?
keep_learning has joined #ocaml
<companion_cube> whitequark: please blog ;)
<Kakadu> Also If you have collected some useful links/examples about it post them somewhere
michel_mno_afk is now known as michel_mno
claudiuc_ has joined #ocaml
Arsenik has joined #ocaml
lordkryss has joined #ocaml
claudiuc has quit [Ping timeout: 265 seconds]
claudiuc_ has quit [Ping timeout: 250 seconds]
ikaros has joined #ocaml
AIDS_Pizza has quit [Quit: Lost terminal]
<keep_learning> Hello everyone.
<keep_learning> I am trying to learn Ocaml
<keep_learning> and converting this http://www.cs.utexas.edu/~wcook/anatomy/anatomy.htm into Ocaml
Thooms has joined #ocaml
<keep_learning> so far it's great http://lpaste.net/102710
<keep_learning> but I am getting some type error which I am not able to decode.
<keep_learning> Could some one please tell me what is wrong with this code.
<keep_learning> I have problem when I am adding | Declare (x, exp, body ) -> evaluate ( substituteOne ( x, evaluate exp ) body ) in evaluate code
<keep_learning> line 28 in paste
<Kakadu> keep_learning: let rec evaluate = ... and substitute_one = ....
AltGr has joined #ocaml
<keep_learning> Also I would like to any general suggestion regarding learning OCaml.
<keep_learning> Kakadu: Thank you.
<keep_learning> Kakadu: BTW you just suggested substitute_one so no camel case in OCaml ( substituteOne )
<companion_cube> except for constructors, yes
<Drup> and modules
<companion_cube> indeed
<Drup> BatMap ! :D
<keep_learning> companion_cube: Drup Thank you!
tnguyen has quit [Ping timeout: 245 seconds]
maattdd has joined #ocaml
tnguyen has joined #ocaml
<keep_learning> Also I am using Tuareg but I have very hard time in know the exact line of error. It gives me character number so is there any way make it line number and column number ( Characters 405-765: Warning 8: this pattern-matching is not exhaustive)
<Drup> use "M-x compile" and enter your compiler command
<Drup> you will be able to click on the error to jump to the location
rand000 has joined #ocaml
<Drup> also, you should use merlin
ollehar has quit [Ping timeout: 240 seconds]
__marius___ has quit [Ping timeout: 252 seconds]
__marius___ has joined #ocaml
ddosia has quit [Remote host closed the connection]
adrien_o1w is now known as adrien_oww
AltGr has left #ocaml []
AltGr has joined #ocaml
bholst has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
nikki93 has quit [Remote host closed the connection]
zpe has joined #ocaml
<ygrek> This lwt loop leaks on me - http://paste.in.ua/9522/ - how come?
thomasga has joined #ocaml
<ygrek> looks like Lwt_stream misbehaves wrt Lwt.cancel?
<ygrek> I am confused
keep_learning has quit [Ping timeout: 240 seconds]
siddharthv is now known as siddharthv_away
avsm has joined #ocaml
siddharthv_away is now known as siddharthv
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
maufred has quit [Remote host closed the connection]
ccasin_ has quit [Ping timeout: 264 seconds]
ccasin has joined #ocaml
cdidd has quit [Remote host closed the connection]
ddosia has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 252 seconds]
cdidd has joined #ocaml
AltGr has left #ocaml []
nikki93 has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
nikki93 has quit [Ping timeout: 240 seconds]
jonludlam has joined #ocaml
thomasga has joined #ocaml
avsm has quit [Quit: Leaving.]
jk_ has quit [Remote host closed the connection]
_andre has joined #ocaml
tnguyen has quit [Ping timeout: 265 seconds]
tnguyen has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
thomasga1 has joined #ocaml
thomasga has quit [Ping timeout: 250 seconds]
maufred has joined #ocaml
maattdd has joined #ocaml
thomasga1 has quit [Ping timeout: 245 seconds]
Thooms has quit [Ping timeout: 265 seconds]
Thooms has joined #ocaml
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
hto has quit [Read error: Operation timed out]
tnguyen has quit [Ping timeout: 265 seconds]
rz has quit [Read error: Connection reset by peer]
rz has joined #ocaml
tnguyen has joined #ocaml
hto has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
siddharthv is now known as siddharthv_away
elfring has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
ygrek has joined #ocaml
zarul[afk] has quit [Quit: Leaving]
studybot has quit [Remote host closed the connection]
tane has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Ping timeout: 276 seconds]
shinnya has joined #ocaml
sgnb has joined #ocaml
ocp has joined #ocaml
andreypopp_ has quit [Remote host closed the connection]
__marius___ has quit [Remote host closed the connection]
avsm has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
divyanshu has quit [Quit: Computer has gone to sleep.]
Rotacidni has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
avsm1 has quit [Ping timeout: 240 seconds]
andreypopp_ has joined #ocaml
zpe has joined #ocaml
<kerneis> hi
studybot has joined #ocaml
<kerneis> what is the runtime overhead of functor application?
<kerneis> I guess another way to put this is: how is a module represented at runtime?
studybot has quit [Remote host closed the connection]
<companion_cube> I think it's a function that returns a record
__marius___ has joined #ocaml
<companion_cube> (modules are records at runtime, afaik)
studybot has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
<kerneis> ok, so having lots of functor applications which create large modules would yield a lot of pressure of the GC
<kerneis> that would make sense wrt. the profiling I get
<ggole> Modules are pretty much exactly records
<kerneis> good, thanks
<kerneis> that piece of software is doomed, then, I guess
<ggole> There's some work being done on eliminating functor applications with known arguments, I think
<kerneis> it wouldn't help here; it's a compiler, and some environment is passed from functor to functor
<ggole> So these are local modules?
<kerneis> typical code looks like this:
<kerneis> module Macros(E : sig val env : env end) = struct
<kerneis> module I = struct let d = E.env.t_env let i = E.env.i_env end
<kerneis> module C = Exps_in_context(struct let env_opt = Some E.env;; let avoid = None end)
<kerneis> module T = Types.Constraint(I)
<kerneis> and then, Macros uses I, C and T a lot
<kerneis> and is instantiated many times (each time the environment is update basically)
<kerneis> it would probably make sense to have a mutable env, and apply the functor only once
<ggole> Yeah, that does look pretty expensive
<kerneis> but the code is full of those functors, it would be a large refactoring
<kerneis> so I'm not going to do it today I guess
<ggole> What does it compile?
<kerneis> Lem
<ggole> Hmm, that would be a challenge to change
adrieng has joined #ocaml
paolooo has joined #ocaml
<asmanur> kerneis: is_lowercase & is_uppercase, come on ‽
<kerneis> asmanur: it's not in OCaml's stdlib as far as I can tell
<asmanur> what is the problem with let is_lowercase = function 'a' .. 'z' → true | _ → false, it's too clean to make it into lem ?
<kerneis> I was surprised as well
<asmanur> (and you can do Char.lowercase c = c :-°)
<kerneis> as, that is cleaner, I like it
<kerneis> except it fails
<kerneis> don't try to be clever
<kerneis> Char.lowercase 5 = 5
<kerneis> '5' sorry
<asmanur> ah
<asmanur> yeah ok
<asmanur> that was some kind of joke, what about the first proposition ?
<kerneis> in any case, you must admit that my approach is *much* better than the Str.regexp one ;-)
<asmanur> yes
<asmanur> but still, hardcoding ascii character?
<kerneis> well, I'm not sure it would be more efficient. Maybe clearer, but also more verbose
divyanshu has joined #ocaml
<kerneis> well, I could have written let is_uppercase = let codeA = Char.code 'A' and codeZ = Char.code 'Z' in fun c -> ...
<asmanur> Char.code is not "%identity"?
paolooo has quit [Client Quit]
<kerneis> it probably is
paolooo has joined #ocaml
<kerneis> it is
<asmanur> but still, my first proposition is clean and fast
<ggole> Char.code is, Char.chr isn't
<ggole> (It does range checking.)
darkf has quit [Quit: Leaving]
rgrinberg has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 265 seconds]
lordkryss has quit [Disconnected by services]
Muzer has quit [Excess Flood]
Muzer has joined #ocaml
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
<kerneis> asmanur: I am in fact quite impressed by how cleverly ocamlopt compiles 'a' | 'b' | … ->
<kerneis> it's probably more efficient than my code
<asmanur> how does it compile it ?
<kerneis> add $0xffffffffffffff3e,%rax
<kerneis> cmp $0x33,%rax
<kerneis> jbe
<kerneis> and then mov/retq for returning a value in each case
Rota has joined #ocaml
<asmanur> nice
AngryRam has joined #ocaml
<AngryRam> fun swapAll3 lst = foldr (fn (x,y) => fn acc => (y,x)::acc) [] lst;
<AngryRam> can someone tell me where is the "circularity" error here?
<asmanur> is it standard ML ?
<Drup> I don't know, but "fn" and "=>" is not going to work in ocaml
<AngryRam> yes, SML
<AngryRam> #sml is dead :)
<asmanur> you perhaps reversed the argument of your lambda ?
<asmanur> because you take the element of the list and the acc, but you give the acc and then the list
maattdd has joined #ocaml
<AngryRam> @asmanur i dont see what ur saying
IbnFirnas_ has quit [Remote host closed the connection]
termos has quit [Remote host closed the connection]
ggherdov has quit [Remote host closed the connection]
<gasche> kerneis: I hate it when people write 97 instead of (Char.code 'a')
strmpnk has quit [Remote host closed the connection]
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
<gasche> (but I agree the best version is asmanur's 'a'..'z', understanding that they're all crap in a unicode-world anyway)
<gasche> kerneis: why would a function like starts_with_upper_letter be part of a performance bottleneck anyway? I didn't think lem was a text-processing application
tobiasBora has joined #ocaml
<tobiasBora> Hello,
<tobiasBora> I'm trying to install merlin with opam but I get an error message : "Package `menhirLib` not found"
<tobiasBora> (while Menhir was just installed before as a dependency)
<tobiasBora> Here is the logs :http://paste.ubuntu.com/7255587
<kerneis> gasche: I'm not 100% which part was the bottleneck, except it had to do with compiling regexps; so I grepped for Str.regexp and fixed all the crap
<tobiasBora> I can see menhir when I do ocamlfind list | grep menhir
<kerneis> but Lem does a lot of string manipulation, unfortunately
<tobiasBora> And ocamlfind query menhirLib gives me /home/leo/.opam/system/lib/menhirLib
<tobiasBora> Any idea why ocamlfind find the lib but it doesn't when I use opam ?
<gasche> is ocamlfind install by opam?
<gasche> it's suspicious that it calls /usr/bin/ocamlfind
AngryRam has quit [Quit: Leaving.]
<gasche> you should `opam install ocamlfind` and retry, and then maybe send menhir's OPAM packager a mail about needing ocamlfind as a dependency
<tobiasBora> gasche: I don't remember installing ocamlfind manually but I'm not sure...
ikaros has quit [Quit: Ex-Chat]
<tobiasBora> Well which ocamlfind gives me /home/leo/.opam/system/bin/ocamlfind
<kerneis> tobiasBora: gasche I've seen a similar failure yesterday
<gasche> (it's on the 'system' switch which is probably the least well-tested)
<kerneis> someone on BSD, trying to use ocamlc from its package manager, and the rest via opam
<gasche> tobiasBora: which OCaml version is that?
strmpnk has joined #ocaml
<asmanur> tobiasBora: is 1.3 the last version ?
<gasche> I think there may have been a bug in pre-4.00 ocamlbuild related to tools path lookup
tlockney_away is now known as tlockney
<asmanur> I think the last one should be 1.6
<kerneis> the problem was that /usr/bin/ocamlbuild called /usr/bin/ocamlfind even though "ocamlfind" in the toplevel yielded the opam one
<tobiasBora> asmanur: The git repo says it's 1.6 indeed
<asmanur> so does the opam-repository
<gasche> the bug I'm thinking of was fixed in Jan 2013
<tobiasBora> gasche: 3.12.1
<asmanur> have you updated your opam db lately ?
<tobiasBora> asmanur: I don't think so... How could I do it ?
<tobiasBora> opam update ?
<gasche> asmanur: later merlin don't build under 3.12.1
<gasche> you introduced GADTs at some point (for greater good)
<asmanur> oh right didn't see the ocaml version
<gasche> tobiasBora: considering installing a 4.01 switch which would avoid you a lot of troubles
<gasche> s/considering/consider/
<tobiasBora> gasche: And what is the best way to install 4.01 ?
<gasche> opam switch install 4.01.0
<tobiasBora> Is it possible to have both 3.* and 4.* in the same system ?
<gasche> yes
avsm has quit [Quit: Leaving.]
IbnFirnas_ has joined #ocaml
<tobiasBora> gasche: And is there a way to see already installed versions ? Because opam switch list gives me all available versions on the internet
<Drup> -i
<whitequark> Kakadu: companion_cube: it's trivial (a test)
<tobiasBora> Drup: Thank you !
<whitequark> I will absolutely blog about it, because the concept is very simple and natural and *so much better* than camlp4
<whitequark> in retrospect I even fail to understand why someone merged camlp4
paolooo has quit [Ping timeout: 240 seconds]
<Drup> whitequark: agreed.
<tobiasBora> Each packet has a version for ocaml 3.12 and 4.0 ?
<gasche> tobiasBora: but you don't need to have the same list of packets installed on both
<gasche> the "switch" you are in is a bit of global state (of your shell environment)
<gasche> and each package install request is relative to this switch
<tobiasBora> gasche: And it's possible to install a package for all switchs ?
<gasche> so if you "opam install merlin" in 4.01, you won't have merlin installed in 3.12 (or you can, possibly with a different version)
<gasche> good question
<gasche> I don't know
divyanshu has quit [Ping timeout: 258 seconds]
<gasche> but it's rather easy to export the list of packages you have installed on a switch
<tobiasBora> Ok thank you. That's pretty amazing ^^
<gasche> and then request its installation on the other
<tobiasBora> It compiles merlin !!!
<tobiasBora> Thank you !
<tobiasBora> With something like opam list -i ?
<gasche> there is a "opam switch export" command
<gasche> and "opam switch import" from the other end
<tobiasBora> Thank you !
termos has joined #ocaml
Rota has quit [Quit: Leaving]
ggherdov has joined #ocaml
<tobiasBora> And when I run merlin-mode in emacs I have the error "ocamlmerlin not found" while which ocamlmerlin gives me "/home/leo/.opam/4.01.0/bin/ocamlmerlin"
<tobiasBora> Do I need to export in emacs some variables ?
CissWit has quit [Quit: I probably failed.]
tnguyen has quit [Ping timeout: 250 seconds]
nikki93 has joined #ocaml
<tobiasBora> I will try a reboot...
tobiasBora has quit [Quit: Konversation terminated!]
thomasga has joined #ocaml
avsm has joined #ocaml
tobiasBora has joined #ocaml
<tobiasBora> With the reboot it works...
<tobiasBora> I don't know why but opam modification is never reported to emacs, even if I restart it
Hannibal_Smith has joined #ocaml
axiles has quit [Ping timeout: 245 seconds]
<Drup> tobiasBora: how do you launch your emacs ?
axiles has joined #ocaml
<tobiasBora> Drup: with emacsclient
<Drup> so you have a server launched
<Drup> opam use variable environment
<gasche> I never understood how to have Emacs pick the correct switch
<Drup> obviously, emacs can't see the variable environment change, since it's not in the same shell
<gasche> my solution is to use the following
<gasche> opam config exec "<my command>"
<tobiasBora> Well... So no in fact I've a script which uses emacs if emacs is closed
<gasche> (with a --switch=<switch> parameter if you want to use a different switch)
tnguyen has joined #ocaml
<Drup> gasche solution is probably the good one
<gasche> (so eg. to get a working toplevel, when tuareg asks me which toplevel to run, I use "opam config exec ocaml" instead of "ocaml"
<gasche> )
<tobiasBora> gasche: So it would look like "opam config exec 'emacs'" ?
<tobiasBora> and opam set it for the current environment ?
<tobiasBora> Because by default which environment is modified ?
<asmanur> is it possible to use batteries & js_of_ocaml?
* Drup invoke companion_cube
<Drup> asmanur: either you use js_of_ocaml 2.0 and play carefully with what you are calling, or you use the version by companion_cube that removes Unix in the core of batteries
<asmanur> does js_of_ocaml 2.0 exist ?
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
<asmanur> oh right
ollehar has joined #ocaml
<asmanur> hm
<Drup> yes, it does :D
<asmanur> that'll wait :P
<asmanur> i have a compiled version of js_of_ocaml dating of 2 weeks
<kerneis> it’s not long to compile
<kerneis> not longer than trolling on irc, anyway
<asmanur> yeah but i have to remove the previously manually installed version
<asmanur> deal with the mess
<Drup> "opam reinstall js_of_ocaml"
<kerneis> rm -rf ~
<asmanur> killall irssi
tani has joined #ocaml
<whitequark> cat ~/.ssh/id_rsa
tane has quit [Ping timeout: 265 seconds]
tani has quit [Ping timeout: 245 seconds]
tane has joined #ocaml
thomasga has quit [Quit: Leaving.]
adrieng has quit [Quit: leaving]
avsm has quit [Quit: Leaving.]
tobiasBora has quit [Quit: Konversation terminated!]
<gasche> easy way to miss one's shuttle: wait until your fuzzer finds a bug in an already-hardened-enough implementation
jwatzman|work has joined #ocaml
tnguyen has quit [Ping timeout: 250 seconds]
<companion_cube> Drup: :D
maattdd has quit [Ping timeout: 265 seconds]
_5kg has quit [Ping timeout: 250 seconds]
Mandus has quit [Quit: leaving]
Mandus has joined #ocaml
ocp has quit [Ping timeout: 245 seconds]
<nicoo> whitequark: .ssh/id_rsa: No such file or directory; did you mean id_ecdsa?
* whitequark grins
tnguyen has joined #ocaml
<flux> zsh can do that :), but if it were configured to be so lenient it would be wildly annoying
lordkryss has joined #ocaml
<nicoo> flux: ZSH askes me, yes, but it would need rsa and ecdsa to be more similar
<flux> nicoo, I think you can configure it.. it's zsh, after all.
zarul has quit [Quit: Leaving]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
maattdd has joined #ocaml
avsm has joined #ocaml
thomasga has joined #ocaml
nikki93 has quit [Remote host closed the connection]
<Drup> flux: you can answer pretty much any question about zsh by "you can configure it" :3
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
avsm has quit [Quit: Leaving.]
nikki93 has joined #ocaml
q66 has quit [Ping timeout: 252 seconds]
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
Arsenik has quit [Remote host closed the connection]
Arsenik has joined #ocaml
jonludlam has quit [Ping timeout: 245 seconds]
ocp has joined #ocaml
zpe has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ocp has quit [Ping timeout: 245 seconds]
lordkryss has quit [Ping timeout: 245 seconds]
WraithM has joined #ocaml
michel_mno is now known as michel_mno_afk
ollehar has quit [Ping timeout: 240 seconds]
Kakadu has quit [Ping timeout: 240 seconds]
tnguyen has quit [Ping timeout: 265 seconds]
<whitequark> hmmm, is lwt broken on 4.02.0dev+trunk?
tnguyen has joined #ocaml
<whitequark> as it doesn't have camlp4 anymore
marcux has quit [Quit: marcux]
<Drup> there is probably a flag somwhere to disable the extension
tnguyen has quit [Max SendQ exceeded]
marcux has joined #ocaml
avsm has joined #ocaml
<pippijn> so camlp4 is going away entirely?
<whitequark> it's split into its own repo
<whitequark> personally I wouldn't cry for it. every single extension I use could be rewritten, and more cleanly at that, with ppx
nikki93 has joined #ocaml
tnguyen has joined #ocaml
<elfring> Do you expect that compiled module interfaces will be stored in a standard directory for your software libraries?
<adrien> cmi files are required
<adrien> so, yes
Thooms has joined #ocaml
<whitequark> ugh, how do you call the ppx extensions in singular?
<whitequark> "the extension points API" is unwieldy
<whitequark> *ppx extension API
tnguyen has quit [Ping timeout: 265 seconds]
maattdd has quit [Ping timeout: 240 seconds]
<jpdeplaix> gasche: hopefully it wasn't the last shuttle :D
lordkryss has joined #ocaml
_tca has quit [Changing host]
_tca has joined #ocaml
_tca has quit [Changing host]
_tca has joined #ocaml
<ggole> Hopefully ppx will actually be documented.
<rgrinberg> well it seems a lot smaller
<rgrinberg> i also hope that ocamlbuild will get the same treatment as camlp4
<ggole> That's not saying much :)
<ggole> I remember bouncing off camlp4 a few times: the first time I loaded it up in the repl and did module C = Camlp4 to see what was in it
<ggole> Then, after waiting for a bit, I went and made a cup of coffee
<ggole> And it had printed just under 20k lines of interface.
<Drup> ggole: ppx is already documented
<Drup> parstree.mli is very informative and alain frisch as done some examples in experimental/frisch/
<Drup> whitequark: why not just "ppx API" ?
<Drup> x being extension, ppx extension sounds a bit redundant
tnguyen has joined #ocaml
jonludlam has joined #ocaml
<whitequark> ggole: 16255 to be precise
<whitequark> ggole: ppx is documented.
<whitequark> well, actually, just wait until I publish my article, it's all there :p
* whitequark is ⅓ done
<Drup> whitequark: what is your first ppx doing ?
<ggole> It was 195xx, or something like that: a different version of camlp4, I guess.
<Drup> camlp5 maybe ?
<whitequark> Drup: a protobuf serializer/deserializer
<Drup> whitequark: you will receive the love from at least 2 person in this channel, I think
<ggole> I seem to remember it was an oldish ocaml from the Debian archives
<mrvn> Drup: we need more extension extensions
* ggole approves of whitequark
<whitequark> \o/
<ousado> how does protobuf deal with ADTs?
<whitequark> ousado: it has enums
<mrvn> given that sniplet I don't think there should be a libfl.so.2.0.0
<mrvn> ups
<whitequark> although, now that I look at it, it doesn't directly support "enums with parameters"
axiles has quit [Ping timeout: 258 seconds]
<elfring> What is the default installation directory for cmi files of your software libraries?
<whitequark> fortunately, the wire protocol is very lightweight and I think I'll be able to desugar it into whatever protobuf supports.
Kakadu has joined #ocaml
<whitequark> i.e. a numeric enum and a bunch of optional records immediately succeeding it. the invariants are lost to C protobuf, but could be restored with a custom option in protoc, if someone wants to do that.
<ggole> So many structured formats lack decent sums :/
<whitequark> yeah.
rand000 has quit [Ping timeout: 252 seconds]
<whitequark> really, protobuf is not perfect. I'm using it because: 1) it's not yet another binary JSON (biniou, bson) 2) it's not ocaml-specific
jonludlam has quit [Ping timeout: 240 seconds]
willy_ has joined #ocaml
<willy_> bonsoir
Anarchos has joined #ocaml
rand000 has joined #ocaml
tnguyen has quit [Ping timeout: 250 seconds]
maattdd has joined #ocaml
tnguyen has joined #ocaml
tnguyen has quit [Ping timeout: 250 seconds]
marcux has quit [Quit: marcux]
tnguyen has joined #ocaml
<NoNNaN> I try to compile from source the llvm3.3 and got the following message. Any idea? Bad magic number for this ocamldoc dump! This dump was not created by this version of OCamldoc.
_5kg has joined #ocaml
zpe has quit [Remote host closed the connection]
tnguyen has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
axiles has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
tnguyen has joined #ocaml
zpe has joined #ocaml
sgnb has quit [Ping timeout: 245 seconds]
<whitequark> NoNNaN: that's odd. have you tried cleaning the tree and starting over?
<whitequark> perhaps only the OCaml subtree, i.e. make -C bindings/ clean
<whitequark> NoNNaN: if that doesn't help, please post a full build log on pastebin or gist
tnguyen has quit [Ping timeout: 245 seconds]
tnguyen has joined #ocaml
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
zarul has quit [Remote host closed the connection]
maattdd has quit [Ping timeout: 258 seconds]
zarul has joined #ocaml
zarul has quit [Changing host]
zarul has joined #ocaml
divyanshu has joined #ocaml
WraithM has quit [Ping timeout: 276 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
tnguyen has quit [Ping timeout: 245 seconds]
<thomasga> hum I've just got a 16k line error message
<thomasga> not sure what to do with that ...
<def-lkb> how :D?
<Drup> my bet is on polymorphic variants
Hannibal_Smith has quit [Quit: Sto andando via]
<mrvn> or objects
<mrvn> functor over a module with objects that have polymorphic variants?
<companion_cube> object wrapping a first-class functor with a polymorphic variant-parametrized functionalobject
WraithM has joined #ocaml
<ggole> Shelling out to a C++ compiler
<def-lkb> :D
<adrien> I like ocaml-fileutils
<adrien> but sometimes I don't understand why it doesn't use Filename more (from the stdlib)
tnguyen has joined #ocaml
maattdd has joined #ocaml
<adrien> actually there's a reason: it handles paths for OSes which aren't the current on
<adrien> e
<adrien> but there are bugs ='(
tnguyen has quit [Ping timeout: 265 seconds]
<whitequark> ggole: haha
angerman has joined #ocaml
maattdd has quit [Ping timeout: 250 seconds]
lordkryss has quit [Read error: Connection reset by peer]
lordkryss_ has joined #ocaml
nikki93 has quit [Read error: Connection reset by peer]
divyanshu has quit [Quit: Computer has gone to sleep.]
nikki93 has joined #ocaml
ggole has quit []
lostcuaz has quit [Ping timeout: 252 seconds]
lostcuaz has joined #ocaml
marcux has joined #ocaml
_andre has quit [Quit: leaving]
tnguyen has joined #ocaml
lostcuaz_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
tnguyen has quit [Max SendQ exceeded]
thomasga has joined #ocaml
tnguyen has joined #ocaml
shinnya has joined #ocaml
marcux has quit [Ping timeout: 258 seconds]
ygrek has quit [Ping timeout: 240 seconds]
lostcuaz has quit [Ping timeout: 276 seconds]
marcux has joined #ocaml
nikki93 has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
maattdd has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
tnguyen has quit [Ping timeout: 265 seconds]
nikki93 has joined #ocaml
Submarine has quit [Quit: Leaving]
tnguyen has joined #ocaml
tnguyen1 has joined #ocaml
tnguyen has quit [Ping timeout: 250 seconds]
jonludlam has joined #ocaml
tane has quit [Quit: Verlassend]
tnguyen has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
maattdd has quit [Ping timeout: 258 seconds]
ocp has joined #ocaml
dapz has joined #ocaml
angerman has quit [Quit: Bye]
axiles has quit [Quit: Quitte]
zpe has joined #ocaml
yacks has quit [Quit: Leaving]
<thomasga> re 16k error message: with first-class modules!
maattdd has joined #ocaml
tnguyen has quit [Ping timeout: 245 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
lostcuaz_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zpe has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
lostcuaz has quit [Client Quit]
zxqdms has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
<tautologico> so what's everyone using for monad do notation?
<smondet> tautologico: none, just: something () >>= fun result -> ...
tnguyen has joined #ocaml
lostcuaz has joined #ocaml
lostcuaz_ has joined #ocaml
<whitequark> Lwt has an extension for its monads: lwt x = f in y → Lwt.bind f (fun x -> y)
lostcuaz has quit [Ping timeout: 276 seconds]
<tautologico> very modern, already using ppx
<whitequark> (Alain Frisch in his notes writes that he considers the way omonad alters the syntax harmful.)
<Drup> I agree with him, it should be changed to use an extension point when next ocaml is out
<Drup> (the author is not going to do it, unfortunatly)
<whitequark> yeah :(
* whitequark wonders whom to ping with ctypes PRs. it's a bit annoying to have a web of interdependent packages, all with local modifications necessary for them to work well.
<whitequark> specifically this one: https://github.com/ocamllabs/ocaml-ctypes/pull/143
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tnguyen has quit [Ping timeout: 250 seconds]
lordkryss_ is now known as lordkryss
willy_ has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
dapz has joined #ocaml
malvarez has joined #ocaml
tnguyen has joined #ocaml
nikki93 has joined #ocaml
ollehar has joined #ocaml
tnguyen has quit [Ping timeout: 265 seconds]
<rgrinberg> whitequark: i think 3 days is not very long
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
michael_lee has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<whitequark> hm, fair enough
* whitequark can be impatient.
<rgrinberg> whitequark: out of curiousity, what are you working on, inotify?
<whitequark> rgrinberg: no, that uses the C API and is already finished
<whitequark> ocaml-zmq
<rgrinberg> but it does not use ctypes
<whitequark> yeah
<rgrinberg> ah, cool
<whitequark> errrr, sorry, typoed
<whitequark> not zmq, ocaml-sodium
<rgrinberg> still cool
<whitequark> zmq also currently uses stubs.
<whitequark> and I've already finished fixing it too :)
<rgrinberg> yeah it's rather old
<whitequark> the API is nice, though
<rgrinberg> that's a bad way of saying it. the project is mature i guess
<Drup> whitequark: do you plan to update zmq ?
* whitequark is only ocaml-ppx_protobuf short of finally getting to work on $PROJECT!
tanguy` has joined #ocaml
tnguyen has joined #ocaml
<whitequark> Drup: hm? it's currently up-to-date, sans one PR not yet merged
<whitequark> or do you mean maintain?
dapz has joined #ocaml
<Drup> last time I checked, it was for the previous version of zmq, not the last one
Thooms has quit [Quit: WeeChat 0.3.8]
<whitequark> well, I believe my previous PR fixed that :p
<whitequark> I can now use curve25519 auth from ocaml
<whitequark> sadly, its implementation in zmq is not really usable yet, so I guess I'll have to discuss it further with upstream
tnguyen has quit [Max SendQ exceeded]
<Drup> oh, if your pr fix the zmq binding for zmq 4, it's nice
<whitequark> the one that exposes all functions from zmq 4 is already merged
<Drup> ok
<whitequark> the one that's pending just adds missing exceptions. the binding is still usable without it, just some errors will come up as EUNKNOWN
<Drup> just need to update the description of the library then :D
<Drup> https://github.com/issuu/ocaml-zmq is still "ZeroMQ 3.2 bindings for OCaml http://zeromq.org/ "
<whitequark> right. the README is already updated
<whitequark> also need to make a release :)
marcux has quit [Quit: marcux]
shinnya has quit [Ping timeout: 258 seconds]
nikki93 has quit [Remote host closed the connection]
zpe has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
<whitequark> grmbl
<companion_cube> true
zpe has quit [Ping timeout: 258 seconds]
<whitequark> :) I was referring to the fact that even utop and oasis won't work on 4.02.0dev+trunk out of the box.
<whitequark> I guess the only option is to install camlp4 manually.
<whitequark> https://gist.github.com/whitequark/695a3ff4782a5316abdc ← why does this happen?
<companion_cube> no idea
* whitequark sighs
stomp has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
<whitequark> I can't with a serious face publish an article recommending ppx knowing that 99% of tools people use won't work on 4.02.0dev+trunk
<whitequark> and I have no damn clue what is broken in camlp4 build
<jpdeplaix> even better with ocaml.4.02.0dev+pr20
<Drup> whitequark: camlp4 is broken against trunk because it's not updated with the new gramar
<whitequark> Drup: I don't need new grammar though. I want utop and oasis to work
<Drup> you don't, but camlp4 does to compile :)
<whitequark> (╯°□°)╯︵ ┻━┻
<Drup> :D
<Drup> <3
* whitequark has that bound to a compose key :p
<Drup> oh, I'm going to do that too !
<Drup> which key do you use ? :D
<Drup> (just give me the line to put in my .XCompose, I'm lazy x)
<whitequark> <Multi_key> <t> <f> : "(╯°□°)╯︵ ┻━┻" # TABLE FLIP
<whitequark> together with: <Multi_key> <O> <O> : "ಠ_ಠ" # FACE OF DISAPPROVAL
<Drup> I don't even have those caracters
<whitequark> the first one originates from Japan, I believe. the second one abuses some weird language I can't even remember the name of
<whitequark> the hell is that?!
<whitequark> Google Translate tells me: "If , Kannada alphabet ta - the second character class. It's a sauce ."
maattdd has quit [Ping timeout: 252 seconds]
rand000 has quit [Quit: leaving]
nikki93 has joined #ocaml
jonludlam has quit [Ping timeout: 252 seconds]
lostcuaz_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Simn has quit [Quit: Leaving]
michael_lee has quit [Quit: Ex-Chat]
tnguyen has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
<whitequark> jpdeplaix: how do I add an overlay?
<Drup> opam remote add FOO adress/to/foo
<whitequark> Drup: thanks
thomasga has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<whitequark> nope, jpdeplaix's overlay fails with the same error
<whitequark> I mean, it doesn't even start to build stuff. it just dies somewhere inside ocamlbuild
tnguyen has quit [Ping timeout: 265 seconds]
<malvarez> is there a way to tell ocamlyacc to open a specific module in the generated mli?
<whitequark> Drup: oooooh, I just realized that all the extension points changes will mean that camlp4 won't build, since it manipulates OCaml's ASTs internally
<whitequark> so it's all in vain
<Drup> yes
<Drup> that's exactly what I told you :D
<whitequark> well, I'm dumb! :)
<Drup> malvarez: you can include code in the beginning with {% %} (iirc)
<malvarez> Drup: my problem is that %{ %} seems to only include code in the .ml file, not the .mli
<Drup> oh
<Drup> yes
<Drup> you can't.
tnguyen has joined #ocaml
<malvarez> well, that's...a disappointment
<Drup> :/
<Drup> you just need to fully identify your type
<Drup> you can write a type expression there, so it's not really an issue
<malvarez> ...yeah, that works. I can't understand how I didn't think of that
<malvarez> thanks
<Drup> dinosaure got the exact same issue earlier in the evening ;)
<malvarez> well, besides that small inconvenience, I msut say ocamlyacc/ocamllex is awesome
madroach has quit [Ping timeout: 252 seconds]
darkf_ has joined #ocaml
<Drup> menhir is even better
<whitequark> *much* better
<whitequark> and consider using ulex
madroach has joined #ocaml
darkf has quit [Ping timeout: 258 seconds]
darkf_ is now known as darkf
<malvarez> thanks, compiling my existing grammar with menhir immediately yielded a few extremely helpful warnings
<whitequark> it also seems like ocamlfind is unable to package ppx extensions yet
<whitequark> this is so going to be an uphill battle.
<companion_cube> the hill is lowering as we get closer to 4.02, hopefully
NoNNaN has quit [Remote host closed the connection]
<whitequark> well, I'll just need to also patch camlp4, findlib and oasis
tnguyen has quit [Ping timeout: 245 seconds]
NoNNaN has joined #ocaml
manizzle has joined #ocaml
thomasga has quit [Quit: Leaving.]
<whitequark> grammar/phrasing suggestions are quite welcome.
tnguyen has joined #ocaml
<Drup> let's look at this :3
<Drup> whitequark: concerning ocamlfind, I mailed gerd about it
<Drup> it seems there are still discussion on composition of ppx
<Drup> but you can already package executable within ocamlfind
<whitequark> composition?
<tautologico> what's $PROJECT?
<Drup> and call them with ocamlfind name_of_package/name_of_executable
<tautologico> composing extensions, I guess