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
Sylvain Le Gall
@gildor478
@jpdeplaix no
diqye
@diqye2014

sum.ml

open Core.Std
....

run

ocamlopt sum.ml

error

Error: Unbound module Core
Sylvain Le Gall
@gildor478
@diqye2014 not sure if it has anything to do with OASIS
diqye
@diqye2014

I was the first to compile the ml file
I ask for an environmental problem

the error massage is

Error: Unbound module Core

but I do not know how bound module core
the ml source is

open Core.Std

let rec read_and_accumulate accum =
  let line = In_channel.input_line In_channel.stdin in
  match line with
  | None -> accum 
  | Some x -> read_and_accumulate (accum +. Float.of_string x)

let () =
  printf "Total: %F\n" (read_and_accumulate 0.)
Sylvain Le Gall
@gildor478
@diqye2014 do you have an _oasis file somewhere ?
diqye
@diqye2014

I do not to use oasis

I run command is

$ ls
sum.ml
$ ocamlopt -o sum sum.ml
File "sum.ml", line 1, characters 5-13:
Error: Unbound module Core
Sylvain Le Gall
@gildor478
anyway, here is your solution:
ocamlfind ocamlopt -package core suml.ml
but it has nothing to do with OASIS
and you are on the OASIS Gitter channel, maybe ask a more general channel
diqye
@diqye2014
sorry,
I can not find other more suitable channels
so come here
And so I learned almost I would use OASIS
Sylvain Le Gall
@gildor478
OASIS is not mandatory ;-)
Have a look here http://ocaml.org/community/mailing_lists.html it is a collection of resources if you want to ask question to the more general OCaml community + some documentation to start
diqye
@diqye2014
thank your help
Sylvain Le Gall
@gildor478
I don't think the OCaml community is using Gitter a lot -- it is more a mailing list based community
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