Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 25 2020 20:09
    gildor478 edited #532
  • Oct 25 2020 20:09
    gildor478 commented #532
  • Oct 24 2020 23:57
    Travis ocaml/oasis (master) passed (282)
  • Oct 24 2020 21:40
    Travis ocaml/oasis (master) canceled (281)
  • Oct 24 2020 21:40

    gildor478 on master

    Update README.md (compare)

  • Oct 24 2020 21:20
    Travis ocaml/oasis (master) canceled (280)
  • Oct 24 2020 21:20

    gildor478 on master

    Improve documentation. (compare)

  • Oct 24 2020 21:13
    Travis ocaml/oasis (master) canceled (279)
  • Oct 24 2020 21:13

    gildor478 on master

    Update logo. (compare)

  • Oct 24 2020 21:10
    bar commented #532
  • Oct 24 2020 21:10

    gildor478 on master

    Integrate documentation from oa… (compare)

  • Oct 24 2020 19:13
    gildor478 commented #557
  • Oct 24 2020 19:12
    gildor478 commented #509
  • Oct 24 2020 19:12
    gildor478 commented #507
  • Oct 24 2020 19:11
    gildor478 commented #505
  • Oct 24 2020 19:11
    gildor478 commented #494
  • Oct 24 2020 19:10
    gildor478 commented #373
  • Oct 24 2020 19:10
    gildor478 commented #371
  • Oct 24 2020 19:09
    gildor478 commented #367
  • Oct 24 2020 19:09
    gildor478 commented #363
Simon Cruanes
@c-cube
Hum, isn't it a bit weird that I have a warning if I have a flag with the same name as an executable?
I'd like the flag to have the same name exactly because the flag controls whether the executable is built…
Simon Cruanes
@c-cube
so hum, people are talking about jbuilder these days
Sylvain Le Gall
@gildor478
what about jbuilder? pros/cons?
Simon Cruanes
@c-cube
seems like it is faster and more principled than ocamlbuild. Also, it replaces packs with module aliases (which are better if handled properly). cons: not that stable yet?
But it seems like they have a decently expressive build specification language built on S-exprs now, should beat _tags hands-down
Rudi Grinberg
@rgrinberg
if you'd like to stick to oasis but still use module aliases, anton's namespaces are always an option btw
I'm pretty sure it supports oasis.
Sylvain Le Gall
@gildor478
to be honest, I am not familiar with module aliases not anton's namespaces
neither/nor
Rudi Grinberg
@rgrinberg
I'll leave the link here in case you're curious https://github.com/aantron/namespaces
Sylvain Le Gall
@gildor478
@rgrinberg thanks
Mike
@mikebelanger
hey guys, anyone here use Merlin along with Atom?
Sylvain Le Gall
@gildor478
@mikebelanger
@mikebelanger not the best place to ask I suppose, the channel is about OASIS (https://oasis.forge.ocamlcore.org). Merlin has a mailing list (but I think it is dead https://lists.forge.ocamlcore.org/cgi-bin/listinfo/merlin-discuss), you should try to IRC channel of #ocaml on freenode or the new https://discuss.ocaml.org
Mike
@mikebelanger
@gildor478 alright thanks, I'm on discuss I'll check that out
Aleksandr Denisov
@alerdenisov
Guys, could you please help me? I'm very new in OCaml and have a trouble with build pretty interested repository: https://github.com/o1-labs/snarky
         ppx src/snark_intf.pp.ml (exit 1)
(cd _build/default && ./.ppx/ppx_deriving.enum+ppx_jane+ppx_driver.runner/ppx.exe --dump-ast --cookie 'library-name="snarky"' -diff-cmd - -o src/snark_intf.pp.ml --impl src/snark_intf.ml)
File "src/snark_intf.ml", line 415, characters 42-46:
Error: ppx_type_conv: 'enum' is not a supported signature type type-conv generator
         ppx src/enumerable.pp.ml (exit 1)
(cd _build/default && ./.ppx/ppx_deriving.enum+ppx_jane+ppx_driver.runner/ppx.exe --dump-ast --cookie 'library-name="snarky"' -diff-cmd - -o src/enumerable.pp.ml --impl src/enumerable.ml)
File "src/enumerable.ml", line 12, characters 66-70:
Error: ppx_type_conv: 'enum' is not a supported signature type type-conv generator
         ppx src/enumerable.pp.mli (exit 1)
(cd _build/default && ./.ppx/ppx_deriving.enum+ppx_jane+ppx_driver.runner/ppx.exe --dump-ast --cookie 'library-name="snarky"' -diff-cmd - -o src/enumerable.pp.mli --intf src/enumerable.mli)
File "src/enumerable.mli", line 2, characters 66-70:
Error: ppx_type_conv: 'enum' is not a supported signature type type-conv generator
I got this error with jbuilder build
snark_intf.ml 415: : functor (M : sig type t [@@deriving enum] end) ->
enumerable.ml 12: module Make (Impl : Snark_intf.Basic) (M : sig type t [@@deriving enum] end) = struct
Sylvain Le Gall
@gildor478
@alerdenisov jbuilder is totally different from oasis, I have no clue about it.
Kenneth Adam Miller
@KennethAdamMiller
Is there a way to build using ppx dependencies?
Ivan Gotovchits
@ivg
@KennethAdamMiller, just add a ppx library as a dependency and it will work out if the box.
Kenneth Adam Miller
@KennethAdamMiller
I was trying to do that, but it ended up being easier to switch to dune. I had added that library using _oasis, and it wouldn't work.
Kenneth Adam Miller
@KennethAdamMiller
Do you have any recommendation for/against dune or oasis? I mean, I thought that bap had switched to dune at one point, and I was really reluctant to encounter any more further trouble when I already had something working. But now I can get that working too.
Ivan Gotovchits
@ivg
Nope, we didn't switch to dune as it is not versatile enough. We use oasis, together with ocamlbuild and omake backend. The former is for portability the latter is for in-house development (it builds bap in 2 minutes vs 30 minutes, and rebuilds in the matter of seconds).
Kenneth Adam Miller
@KennethAdamMiller

I kept getting this error:

File "src/metrics.ml", line 16, characters 14-22:
Error: Ppxlib.Deriving: 'protobuf' is not a supported type deriving generator

And, my build depends include ppx_deriving_protobuf

Ivan Gotovchits
@ivg
You were probably also missing the dependency on ppx_deriving
Kenneth Adam Miller
@KennethAdamMiller
Ok, I added that, but I still get that error
Ivan Gotovchits
@ivg
just in case, when you change anything in _oasis you have to repeat all the steps from the very beginning, oasis setup, ocaml setup.ml -configure, etc
Kenneth Adam Miller
@KennethAdamMiller
I did that too
Here's the command:
  • /home/kennethadammiller/.opam/4.07.0/bin/ocamlfind ocamldep -package bap -package cmdliner -package core_kernel -package ocamlgraph -package ppx_deriving -package ppx_deriving_protobuf -package threads -modules src/superset.ml > src/superset.ml.depends
Ivan Gotovchits
@ivg
ivg@pippin:~/artifacts/protobuf_example$ cat _oasis
OASISFormat: 0.4
Name:        protobuf_example
Version:     0.1
Synopsis:    Example
Authors:     Me
License:     MIT
Plugins:     META (0.4), StdFiles (0.4), DevFiles (0.4)
Executable example
  Path:       .
  BuildTools: ocamlbuild
  MainIs:     example.ml
  BuildDepends: ppx_deriving_protobuf
$ cat example.ml
type t = string [@@deriving protobuf]
let () = print_endline "hello, world"
$ oasis setup
$ ./configure
<snip>
$ make
ocaml setup.ml -build
Finished, 0 targets (0 cached) in 00:00:00.
Finished, 3 targets (3 cached) in 00:00:00.
$ ./example.byte
hello, world
In other words, it works for me out of the box
However, if I will add ppx_jane it will fail, because this derivier is not supported by ppx_jane
+ /home/ivg/.opam/4.09.0/bin/ocamlfind ocamldep -package ppx_deriving_protobuf -package ppx_jane -modules example.ml > example.ml.depends
File "example.ml", line 1, characters 28-36:
1 | type t = string [@@deriving protobuf]
                                ^^^^^^^^
Error: Ppxlib.Deriving: 'protobuf' is not a supported type deriving generator
Kenneth Adam Miller
@KennethAdamMiller
I don't have a configure step...
Where'd you get that example?
Ivan Gotovchits
@ivg
I just wrote it a second ago
The configure script is generated by the DevFiles it is just the same as running ocaml setup.ml -configure but in a more natural way
anyways, the culprit is that ppx_deriving is not compatible with ppx_jane and we're using ppx_jane in bap, so you will need to drop the dependency on ppx_deriving and ppx_protobufs. They are very fragile and break every other release and we took a lot of effort to get rid of them in our code base, so we would like to add them back. I also don't see any practical need to use protobuf when implementing a disassembler.
Kenneth Adam Miller
@KennethAdamMiller
My build works when I use dune though. You say dune takes 30+ mins vs oasis 2 mins?
Ivan Gotovchits
@ivg
I did not say this.
Your build works, because dune doesn't bring the dependency on ppx_jane from bap. But it will stop working if you will try to integrate it with bap and turn into a plugin. And anyway, if you want to merge to bap you will have to use oasis. You can make it work, of course, by setting predicates and playing with tags, but it will make bap very fragile and we don't want it.
Kenneth Adam Miller
@KennethAdamMiller
Ok. I was going to use protobuf to make much of the results of my output parsable without requiring scripts.
Ivan Gotovchits
@ivg
you can use binprot or sexp
Kenneth Adam Miller
@KennethAdamMiller
In particular, I don't like how my scripts folder breaks down results with grep and other things
Oh ok!
Well, now I had planned a lot of development efforts around ppx to use instrumentation to write some programmable debugging facilities.
Separate from bap. You say that ppx is really fragile?
Ivan Gotovchits
@ivg
I didn't say this. I said that ppx_deriving is fragile, stick to ppx_jane
and it doesn't mean that you shouldn't to use [@@deriving ...]. Just ppx_deriving grabbed that name, but ppx_jane is handling better this extension.
There are a few well-supported ppx extensions from Janestreet https://github.com/janestreet?q=ppx&type=&language=