Comments (7)
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.
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.
OK! Makes sense!
from stanc3.
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.
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.
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.
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)
- [BUG] Array literals in `return` statements may generate wrong type in C++
- [BUG] Tilde syntax does not properly generate promote_scalar for array arguments HOT 7
- [FR] Variadic signatures with external c++ HOT 1
- [FR] Tuple unpacking
- [FR] Expose variadic signatures for `integrate_1d` (deprecate current?) HOT 8
- Expose additional `normal_id_glm` pointwise signatures HOT 2
- Issue a warning when a variable is assigned to itself HOT 5
- [Build] Investigate Melange as an alternative to Js_of_ocaml
- [BUG] atan2 listed as vectorised in manual, vectorised sigs not in stanc3
- Stan compiler Error when using the normal_cdf function HOT 16
- [BUG] Reporting example where new compiler failed HOT 1
- [BUG] stanc3 v. 2.33.1: build error with OCaml 4.14.1 and JaneStreet 0.16.x: `Error: This expression has type [ `Use_Sys_unix ] This is not a function; it cannot be applied`; `Error: Unbound value Set.Poly.union` HOT 4
- Typechecker: Allow predicate-based typechecking of library functions HOT 3
- [BUG] SoA request is ignored with external c++ HOT 5
- Release support for building against ocaml 5 HOT 9
- [BUG] Github action doesn't build static binary for linux platform
- Improve message and handling of internal compiler errors
- [BUG] Array declaration no longer canonicalizes from deprecated format HOT 1
- Iinformative error message for expired array syntax
- CI: Switch from the ghr script to the github CLI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stanc3.