<Drup>
whitequark: tbh, I still don't think the removal of libraries should be considered as part of a "no-camlp4" library, but that's just picky-ness
<companion_cube>
just don't let it install camlp4
<Drup>
because camlp4 choke on ppx
<whitequark>
the whole point of camlp4 is changing the syntax...
<whitequark>
camlp4.
<companion_cube>
it's a bit bothersome, but you may try to "opam switch 4.02.1" instead (thus ignoring camlp4+system totally)
<companion_cube>
yeah, I think I met this problem with camlp4
<chris2>
installing core fails here because of some camlp4 stuff
<Drup>
whitequark: please update your branch no-camlp4 for lwt
2014-12-09
<whitequark>
it uses ulex syntax. you need to load ulex's camlp4 extension first
<whitequark>
wait, what exactly is a camlp4 lexer module?
<seliopou>
I'm trying to load a camlp4 lexer module into utop to check out the types, but I keep getting parse errors even though I've loaded camlp4o (using #camlp4o)
<MercurialAlchemi>
ggole: the problem is that camlp4 is many-hearted
* ggole
pictures whitequark on top of a Mayan temple, knife in hand, offering camlp4's beating heart up to the sunset
<Leonidas>
"whitequark removes 4kLOC of camlp4 code and you wouldn't believe what happened"
<MercurialAlchemi>
"whitequark sacrifices camlp4 lines to the PPX god LIVE", for instance
2014-12-08
<pippijn>
(which I solved with camlp4)
2014-12-07
<michipili>
Leonidas: The build system of OCaml is terrible and not that good written. Now that camlp4 and labltk are standalone packages, this a kind of triple trouble! :)
<michipili>
Notice to FreeBSD OCaml-lers: ports for OCaml-4.02.1, Labltk and Camlp4 are ready, you can get them on my github if you want to try them before they are merged into ports: https://github.com/michipili/ports-bsd/tree/ocaml-4.02.1
2014-12-06
<michipili>
The new @-annotations should make camlp4 more or less obsolete, if I understand correctly.
<ggole>
michipili: even better, camlp5 used to be called camlp4
<michipili>
What is the difference between camlp4 and camlp5? Surely there are some, but…
<avsm>
michipili: great! you need a separate port for camlp4 as well i think?
<Drup>
I'm surprised I didn't do it already, I remember reading one of your burn-camlp4 PR, and I think it was lwt.
2014-12-05
<Drup>
whitequark: rebase your no-camlp4 PR on lwt, I'll review if you do it now.
2014-12-03
<companion_cube>
batteries 2 stopped using camlp4
<def`>
bitstring is camlp4 only, no ?
<struk_at_work>
def`: yeah its kind of a known issue but I don't know why merlin is injecting camlp4 either.
<def`>
sounds really camlp4-ish, I have no idea what's happening
<Drup>
camlp4 choke on extension/atributes anyway
<def`>
Wow, I have no idea how camlp4 and ppx in merlin interact
<struk_at_work>
argh I think in my case I think camlp4 is polluting things. getting a parse error reported by merlin that usually means camlp4 parser busted something
2014-11-30
<zump>
then i can install camlp4 from OPAM?
<zump>
i upgraded camlp4 from github and it workes now
<zump>
so camlp4 is broken (whatever it is..)
2014-11-29
<rgrinberg>
Drup: is ppx enough to get rid of camlp4 in eliom?
2014-11-27
<Drup>
for that, someone would need to fix camlp4
2014-11-25
<Leonidas>
wasn't there some camlp4 extension that wrote the mli for you?
<companion_cube>
but then it would need to depend on sexplib, which depends on camlp4
<companion_cube>
so, seeing how many packages depend on sexplib and camlp4, I'm really tempted to make ppx_deriving_sexp
<johnf>
whitequark: the extend gram; parser bits in camlp4 seem to work OK, what is the equivalent in ppx? It looks like the Ast_mapper.
<whitequark>
johnf: that's because 2/3 of ocaml ecosystem still depends on camlp4
<johnf>
whitequark: although camlp4 still looks fairly active at least on github although the wiki front page says its been replaced by ppx
<whitequark>
[✔] bring camlp4 a little closer to its death today
<johnf>
I'll port over some of my camlp4 stuff tomorrow. should have time anywyas.
<whitequark>
neither really requires camlp4
<whitequark>
have you considered not using camlp4?
<johnf>
hi, camlp4 question. I have a system of camlp4 quotations that I wrote up, then I decided I wanted to feed the parser input directly from stdin so I hooked it up to Scanf.fscanf which works ok but handling statements across multiple lines is a bit tricky because finding a deliminator for a statement is not always possible.
<companion_cube>
I'd like to remove the dependency on camlp4 for every mirage project ;_;
2014-11-22
<natrium1970>
I was just following the directions on the js_of_ocaml page. This camlp4 and ppx is so confusing.
<whitequark>
don't use system compiler if you want camlp4
2014-11-21
<whitequark>
the beatings will continue until morale improves, I mean, camlp4 is deprecated for good
<choeger_tu>
so how do I disable camlp4?
<whitequark>
in particular sexplib and core require camlp4; you cannot use ppx_deriving together with those
<whitequark>
choeger_tu: you need to disable camlp4
2014-11-19
<whitequark>
flux: it's not like camlp4 was
<struktured>
camlp4 is a virus and ppx is the cure
<companion_cube>
well I hope lwt will finally stop depending on camlp4
<struktured>
companion_cube: take that, camlp4!
2014-11-17
<seliopou>
is it possible to use a camlp4 parser on a string?
<mrvn>
isn't camlp4 obsolete anyway?
<gasche>
< Drup> and it's mandatory to use it for camlp4 extensions
<whitequark>
oh, its configure script support -no-camlp4
<Drup>
the opam package still needs camlP4
<Drup>
basically, bisect rewrite your program by instrumenting it. it's camlp4 based but it doesn't matter much, I think, since it doesn't change the syntax
<Drup>
you are editing a library, and suddenly, you enter the camlp4 area, and the syntax is different
<Drup>
and it's mandatory to use it for camlp4 extensions
<Drup>
I must say the revised syntax is strongly associated to camlP4 in my mind, so I transmisted the taste from one to another
<whitequark>
gasche: I'm more bothered by the fact that you apparently like camlp4
2014-11-16
<Drup>
and camlp4 is now un-maintained by the janestreet distribution guy, who sacrified himself for the cause.
<Drup>
camlp4 got removed for the standard distribution in the last OCaml version.
<Drup>
making camlp4 equally unmaintaned.
<Drup>
did I mention that new camlp4 is not compatible with old camlp4
<Drup>
he rewrote camlp4 and the rewrote got integrated in the standard distribution, Daniel de Rauglaudre then took back his version of camlp4 and distributed it alone, under the name "camlp5"
<Drup>
after seeing that it would not be maintainde by the original author, the Cristal team give the task of rewriting camlp4 to a local phd student, Nicolas Pouillard
<Drup>
mcc: otherwise, I think gasche finds camlp4 well done, and he's knowledgeable, so you can ask his opinion on the subject. Preferably by european day light hours.
<companion_cube>
liking camlp4 *and* Stream
<Drup>
mcc: someone expressed his taste for camlp4 and the revised syntax, the other day
<mcc>
is there ANYONE on this channel who actually likes camlp4
<ggole>
Roughly a million times easier to use than camlp4
<whitequark>
camlp5 basically exists because coq can't keep up with the development of camlp4
<whitequark>
I think camlp4 is just so backwards, it literally evolves in the direction of lower version
<whitequark>
mcc: camlp5 is a previous version of camlp4
<mcc>
whitequark: so does your ire for camlp4 extend to camlp5
<whitequark>
let's discuss what's worse: camlp4 or TH
2014-11-15
<whitequark>
the issue is that many things (camlp4, ppx, configure scripts, etc) require executing binaries on the buildsystem
2014-11-13
<Unhammer>
is there a syntax-less way to say %some_server_function in eliom? (can't figure out how to put it in client.ml instead of myproject.eliom without camlp4 complaining)
<whitequark>
camlp4, unsafe and Obj.magic in a single function >_<
<Drup>
not only the fact that it uses camlp4, but how it's designed
2014-11-09
<struktured>
Drup: ok, thats what I thought. I'm still not 100% sure if core really depends on pa_test at compile time, but when I wiped it out of XMeta* utop threw a missing reference error, so I put it back in for now. as long as camlp4 isn't aded to pa_test it doesn't matter anyhow
<whitequark>
see, this is why I hate camlp4.
<artagnon>
camlp4 4.02.1+system
<Drup>
artagnon: the ocamlopt, none. The camlp4 from the system, otoh ....
<struktured>
ok, gonna see if I can wipe out this camlp4 injection, even if I have to opam pin 20 repositories
<Drup>
pa_ounit doesn't need camlp4, pa_ounit.syntax do
<Drup>
probably, look at each library if the load camlp4
<struktured>
whitequark: other issues involve camlp4 extensions, and some libs that aren't / weren't 4.01+ ready
2014-11-08
<rgrinberg1>
pa_test is a camlp4 version of qtest :/
<whitequark>
... don't tell me you did it to avoid camlp4
<whitequark>
I don't think there is a reason async should depend on camlp4...
<Drup>
async load some camlp4 in utop by default ?
<gdsfh>
whitequark: wtf. Streams are really useful without camlp4. Streams look like "lazy lists" wrt semantics, but with guarantees about freeing memory (so forgetting head of list in memory can't ever happen with streams, as they are "destructive").
<whitequark>
no, Stream is an obsolete useless part of camlp4 that somehow made it inside the compiler
<struktured>
not a huge deal as you don't need the camlp4 extensions to use it
<whitequark>
oh, sure, but I mean, if *your* code does not depend on camlp4, then there is no reason to get ppx support in camlp4
<whitequark>
does async have a camlp4 extension? I thought they did not
<whitequark>
it's really not something you want to do, it's very much not trivial, and the more problematic camlp4 is, the less incentive it is to use it and the more incentive to migrate ;D
<whitequark>
camlp4 support for ppx extension requires someone willing to dive into that ... codebase. I am certainly not motivated enough to fix it
<whitequark>
async is not going to drop camlp4 dep for, I think, around a year at least
<struktured>
whitequark: what do you think will happen first? lwt drops camlp4 dependency, async drops camlp4 dependency, or camlp4 supports ppx extensions properly?
<mcc>
does that mean i can remove macports's camlp4 package?
<mcc>
whitequark do you think it would make sense if i just waited for your camlp4-stripping patches?
<whitequark>
alternatively, you can do "opam switch 4.02.1", it will build the OCaml compiler, then it will build camlp4, all of that inside opam, and it will also work.
<whitequark>
mcc: so basically the idea is that the camlp4 package installs a file called META *somewhere*
<whitequark>
mcc: can you show me whatever macports uses to install camlp4?
<WhatElse>
but what I had to do if I didn’t use camlp4?
<whitequark>
grep it for camlp4 :)
<whitequark>
does this library use camlp4? do you use OCaml >=4.02? if the answers are "no" and "yes", there is something that can write the function for you
2014-11-02
<whitequark>
it's not type_conv, it's the camlp4 opam package
<natrium1970>
I also tried removing camlp4 and reinstalling it, and I get the same error again.
<natrium1970>
“Package camlp4 is already installed (current version is 4.02.1+system).”
<whitequark>
try `opam install camlp4`
2014-10-31
<kaustuv>
that still uses Camlp4, no?
<companion_cube>
so I guess using camlp4 is only for mad people
<Leonidas>
whitequark: You should get yourself a t-shirt with "Camlp4 is not a crime", with the "not" striked out ;)
<whitequark>
oh, bleargh, it also uses camlp4 for lexing
<_obad_>
companion_cube: I probably could, and then I would have to update all the code... or I could stick with camlp4 for now. I'd rather wait for someone else to do it and polish the rough edges.
* whitequark
drives a stake through camlp4's heart and finishes the job with a bunch of silver nails
<Drup>
whitequark: you might be a bit extreme on the no-camlp4 position :]
<whitequark>
like the idea that use of camlp4 is acceptable at all
<whitequark>
it works with current camlp4, it just gives people starting to write their languages *very bad ideas*
<whitequark>
and fuck camlp4 stream syntax in particular
<whitequark>
nojb: because fuck camlp4
<nojb>
whitequark: why not stick with camlp4, but update it so that it work with the *current* camlp4 ?
<whitequark>
Drup: what should I replace camlp4 stream match syntax in llvm tutorial with?
<_obad_>
hi there. what's the latest on the lwt syntax extension? I'm still using the camlp4 one under 4.01.0, and ocp-indent doesn't really support it.
2014-10-28
<whitequark>
I've removed camlp4 dep from three of them, but for the fourth it's a 2kloc diff that's pending review (https://github.com/ocsigen/lwt/pull/95)
<mcc>
what i mean is, you're suggesting i need this patch to support camlp4 in opam, but i don't see anything on the github page suggesting camlp4 is in fact a dependency?
<whitequark>
but if you really want, you can still use it as a lexer for camlp4-based parsers
<whitequark>
so sedlex is not a camlp4-based syntax extension
<whitequark>
it's a bit complicated because camlp4 can refer to two things at once: 1) it is a generic extensible parser technology, 2) it also was/is used to extend OCaml syntax
<whitequark>
camlp4 is deprecated and the ecosystem is slowly migrating from it--I myself sent three or four PRs making camlp4 optional just previous week--but it's not happening quickly enough.
<whitequark>
please don't use camlp4 and especially not camlp5
2014-10-26
<jpu>
I thought it was about camlp4
<ggole>
Is camlp4 still basically undocumented?
<jpu>
I tried camlp4 first, wow camlp4 wiki really....sucks....
<Drup>
but at least, camlp4 is more common that camlp5
<Pepe_>
ah, it failed building camlp4
2014-10-23
<whitequark>
ok, then camlp4 should not be loaded. are you trying out the ppx syntax in a fresh toplevel instance?
<whitequark>
remove #camlp4o from your .ocamlinit, remove any packages that require camlp4 like sexplib.syntax and so on
<def`>
try without camlp4
2014-10-22
<companion_cube>
Drup: well, my point: streams really suck, so does camlp4, better ditch them both
<Drup>
except in files implementing a camlp4 syntax extension
<whitequark>
except by camlp4 itself I guess
<flux>
hmm, the future? deprecation of camlp4 also means the revised syntax is finally deprecated as well?
<Drup>
companion_cube: the camlp4 stream syntax is the only thing that make streams usable ...
<companion_cube>
I wonder whether good parser combinators would be as convenient as camlp4 stream parsers
<whitequark>
it uses camlp4 for its godawful parser syntax.
<whitequark>
camomile only uses camlp4 for ... tools/camomilelocaledef
<whitequark>
Drup: yay, lwt now works with --disable-camlp4
<whitequark>
just like for camlp4 extensions
<whitequark>
I hadn't even thought that it could use camlp4 for anything before I tried to install it just now
<companion_cube>
what does camomile use camlp4 for?
<whitequark>
oh god, fucking camomile also requires camlp4
2014-10-21
<whitequark>
though when I look at some camlp4 files, I wonder about it
2014-10-20
<whitequark>
but how utop itself doesn't depend on camlp4 and I exposed some bug that is re
<whitequark>
this chain of logic is thoroughly absurd, and yet here I am: fixing camlp4 in order to remove support for camlp4
<whitequark>
after removing support for camlp4, I exposed some sleeping bug in utop, and now I have to spend my time fixing the fucking camlp4
<whitequark>
it's related to camlp4.
<whitequark>
in unrelated news I broke camlp4 support in utop
2014-10-19
<whitequark>
>camlp4
* whitequark
says several more things about camlp4
2014-10-18
<gasche>
my experience with camlp4 is that you rarely need it
<Drup>
(I think camlp4 broke him)
<whitequark>
yay, --disable-camlp4 build works
<whitequark>
oh, it *also* requires camlp4 in _tags
<whitequark>
I'll just kill some more camlp4 instead
<whitequark>
so I'm patching utop to not require camlp4
<gasche>
(and I don't think people rely on ocamlbuild's installation dir as much as they do on camlp4's)
<gasche>
the issue I can see is the one that separated-camlp4 has: some people using Nix do not want to go write in the official-compiler directory at camlp4 install time
<whitequark>
like camlp4 was
2014-10-16
<whitequark>
someone needs to update http://i.minus.com/ieN8vUs4fdDJV.gif to include camlp4, oasis, ocp-build and ... I'm sure there are more things
<whitequark>
camlp4
<Drup>
<insert camlp4, omd, type_conv, ocamlbuild and tons of boilerplate>
2014-10-15
<nlucaroni>
I'm getting 'camlp4 is not available because it requires OCaml >= 4.03.0' with opam 1.2 and ocaml 4.02.1 . Is this known?
2014-10-14
<whitequark>
so that the expressive power of ppx extension packages is on par with camlp4
2014-10-13
<whitequark>
also lwt doesn't use its camlp4 extension itself
<def`>
whitequark: correct, it's utop with camlp4 loaded (conf from realworldocaml I think)
<whitequark>
well, that's how it looks in camlp4. we could have type%nonrec t = t
<companion_cube>
depends: ocamlfind & camlp4 & type_conv on opam, though
<whitequark>
adrien: it's not in core and it does directly depend on camlp4
<adrien>
and is in core and depends on camlp4 indirectly
2014-10-10
<flux>
camlp4, campl5, ocaml 8-)
<whitequark>
Drup: *silently points at camlp4*
<Drup>
yeah, camlp4 is totally equivalent to MetaOCaml
<Drup>
camlp4 manipulates pieces of (invalid) AST
<gasche>
(... or camlp4)
<SuperNoeMan>
how can I automatically transform ocaml functions to make them restful? WOuldn't there be something I could do with camlp4 that would allow me to parse the library naturally, and generate bindings or whatever to the ocaml restful package?
2014-10-08
<gasche>
gal_bolle: that said, ocamlbuild should work fine provided you don't use the builtin camlp4 rules but ocamlfind integration
<gasche>
you can report an ocamlbuild bug, but you should expect that a lot of other tools (eg. all packages that use plain make and camlp4) will break under your setting
<gasche>
by using the command-line syntax -I +camlp4
<gasche>
gal_bolle: the problem is that a vast amount of tooling today assumes that camlp4 is in the standard library
<gal_bolle>
i'm trying to build under nix, so it won't write into the ocaml stdlib dir when installing camlp4
<gal_bolle>
ocamlbuild seems to break when camlp4 is not installed into the stdlib's directory
2014-10-07
<whitequark>
ebzzry: not using camlp4
2014-10-06
<dmbaturin>
Did anyone add goto to ocaml with camlp4? If not, I'm going to do it. ;)
2014-10-04
<Leonidas>
Drup: afaik not in camlp4-lwt
<nicoo>
Leonidas: What are you using camlp4 for ?
<whitequark>
camlp4 has one too
2014-10-03
<whitequark>
or how it tries to mimic the camlp4 extension in a very naive way
2014-09-30
<argp>
Camlp4 Parsing version 4.01.0
2014-09-29
<nlucaroni>
you should be able to install camlp4 via opam.
<tane>
mh, nice.. after a fresh installed system, utop and camlp4 segfault
2014-09-27
<flux>
simply write a camlp4 module that convers your new code back to old one
2014-09-26
<whitequark>
rand000: it's a camlp4 bug.
2014-09-23
<Drup>
did camlp4 work at some point ? :]
<companion_cube>
did camlp4 work with the vanilla toplevel ?
2014-09-17
<Drup>
just replace this horrible camlp4 parser for the tyxml syntax extension
<Drup>
the one implemented currently is some horribly ugly camlp4 parser that is full of holes
<dmbaturin>
The camlp4 or ocaml itself?
2014-09-16
<companion_cube>
anyone else using the "system" switch on opam having troubles using camlp4?
2014-09-15
<bernardofpc>
(including camlp4)
2014-09-13
<dmbaturin>
tane: You only need camlp4 if you want to actually modify the language syntax though, e.g. make a DSL.
<Drup>
I was going to says "it's not some half-assed pseudo language embedded in ocaml sources by deep magical rewriting", but camlp4 is totally that, in fact >_>
<tane>
i just wondered if by using camlp4 ocaml source faces the same problems as templated-c++ code in the light of the halting problem of the compilation process :)
<Drup>
camlp4 is simply an ocaml library to implement syntax extension in ocaml, it's obviously turing complete
<Drup>
camlp4 is obviously turing complete, yes, but it's not a preprocessor as you thing it is
<tane>
camlp4
2014-09-11
<slecuyer>
so, before I had _tags: <{lexer,parser}.ml>: use_camlp4, pp(camlp4of) -- can I still do the same kind of thing for sedlex?
<Leonidas>
Yes, which camlp4 returns me the path to the OPAM camlp4 and I uninstalled the system camlp4
<whitequark>
make sure you really do use camlp4 from opam
<Leonidas>
[NOTE] Package camlp4 is already installed (current version is 4.02.0+1).
<Leonidas>
[ERROR] The package "camlp4" has no version 4.02.1.
<Leonidas>
I have camlp4 4.02 installed
<whitequark>
need to update camlp4
<Leonidas>
also, the Arch Linux System CamlP4 is broken but oh well
<johnf>
whitequark: I have an AST generated via camlp4 grammer then using the Camlp4Filters.MetaGeneratorExpr generating new data types.
<johnf>
whitequark: what I was going to ask is I've been using camlp4 to do code transformations is there a better tool for this?
2014-09-10
<johnf>
ah OK. the github repository for camlp4 is still pretty active.
<johnf>
whitequark: just curious why "don't use camlp4"
<whitequark>
slecuyer: please don't use camlp4 and especially camlp4 stream parsing.
<johnf>
where the [...] gives a readable error like has type int but expected string. I am currently looking through the camlp4 source wondering why the line and characters is not more accurate. any hints would be appreciated.
2014-09-03
<tane>
pgomes, 4.02.0 with camlp4 via opam works fine for me
<pgomes>
does anybody has any news concerning the build failure of camlp4 with 4.02.0 ?
<johnf>
and one more camlp4 question, how do I handle optional values, e.g. type t = { a : int option }. I tried to print the AST using <:str_item< ... >> and duplicate it but get this error,
2014-09-02
<johnf>
hi another camlp4 question, I'm trying to do this <:expr< $x$ >> where x is type 'Camlp4.PreCast.Ast.expr list' so I get a type error saying Camlp4.PreCast.Ast.expr is expected which makes sense, but what I'm not sure is how to do the conversion.
<pgomes>
Does anybody has problems installing CAMLP4 in 4.02.0?
2014-09-01
<pgomes>
opam install camlp4
<pgomes>
I have a problem: I cannot build camlp4 on 4.02.0...
2014-08-31
<pgomes>
installing camlp4
<pgomes>
opam install camlp4
<pgomes>
It gives me this output when I do a opam install camlp4
<pgomes>
Did anybody has success in compiling camlp4 in 4.02.0 ?
<rwmjones>
you have to patch it, see the fedora camlp4 repo
<vbmithr>
camlp4 broken under 4.02.0 ?
<def`>
so no need for camlp4 as far as I know (I used the opam binary from the website)
<def`>
opam will install camlp4 as a package
<pyon>
I would like to avoid having two copies of camlp4 installed on my system -- one installed from OPAM, another installed from elsewhere.
<pyon>
In order to install OPAM, do I need to install camlp4 separately? Is there any OPAM release that includes camlp4?
<pyon>
The latest OCaml version does not come with camlp4, right?
2014-08-30
<whitequa1k>
uhhhh, camlp4 install is broken
<chris2>
ah, opam 1.2 doesnt depend on camlp4 anyway
<chris2>
is there a camlp4 tarball?
<johnf>
next camlp4 question I'm trying to build a quotation for an option type so, 'let z = Some 3' then 'let b _loc = <:expr< $?:z$>> hopefully that makes some sense
2014-08-28
<pyon>
Ah... A blog post says it is a camlp4 replacement.
2014-08-27
<johnf>
Hi, I'm trying to sort out camlp4 and I found this file Camlp4Ast.mlast any hints on what a mlast file is for?