Code Monkey home page Code Monkey logo

Comments (7)

VMatthijs avatar VMatthijs commented on July 29, 2024

RealWorldOCaml writes

The Arg module
The Arg module is from the OCaml standard library, which is used by the compiler itself to handle its command-line interface. Command is generally more featureful than Arg (mainly via support for subcommands, the step combinator to transform inputs, and help generation), but thereโ€™s absolutely nothing wrong with using Arg either. You can use the Command.Spec.flags_of_args_exn function to convert Arg specifications into ones compatible with Command. This is quite often used to help port older non-Core code into the Core standard library world.

@seantalts , what is the priority of this issue? Should it be listed under the initial release milestone? In what way does the current command line interface not suffice?

from stanc3.

seantalts avatar seantalts commented on July 29, 2024

Re: why: I think we'll see synergies by switching entirely to Core_kernel and using it whenever we need something it supports. They have the same code and doc standards, interface aesthetics, etc. And I found the Arg thing a bit weird at first - very side-effect-y, for example.

I think it will probably work and this shouldn't block an initial release, but we can keep this here as a good first issue.

from stanc3.

VMatthijs avatar VMatthijs commented on July 29, 2024

OK! Makes sense!

from stanc3.

 avatar commented on July 29, 2024

Is the idea then to fold Debugging.ml into stanc.ml with those arguments held inside the definition of options? Or would we like Debugging to continue to be used as it is now?

from stanc3.

seantalts avatar seantalts commented on July 29, 2024

We talked a little about this at the meeting - I think we want to move away from the global references used for config and debug flags and what not and instead pass config records to the frontend, middle, and backend. So I think eventually we'd like to get rid of Debugging.ml but we could do that separately from this PR if that's easier.

from stanc3.

seantalts avatar seantalts commented on July 29, 2024

I just realized we don't even have access to the Jane st Command module yet - it's in Core_kernel 0.12.0 and up, and we're on 0.11.1. We could upgrade, but then ocamlformat gets upgraded and touches a bunch of files in a silly way. @enetsee we should probably wait until after your refactor for this.

from stanc3.

WardBrian avatar WardBrian commented on July 29, 2024

This is theoretically possible with #1019 merged, but I'm not sure we can do this still. So far as I can tell, Core_kernel's version of Command has no Command.run function -- that's only in Core, which I believe cannot be cross compiled. This seems really strange to me - Arg works fine after all.

from stanc3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.