Giter Site home page Giter Site logo

Add support of YAML configs about 42 HOT 5 CLOSED

ericstoneking avatar ericstoneking commented on July 28, 2024
Add support of YAML configs

from 42.

Comments (5)

ericstoneking avatar ericstoneking commented on July 28, 2024

I can't promise I'll adopt what you come up with, but I'll be interested in seeing it. To fit in with 42's style, a scheme for reading input files should:

  1. Minimize (ideally avoid) external dependencies. A "yamlkit.c" would be best. Linking to external libraries is sub-optimal.
  2. Provide a template in the input file itself. I'll be interested to see how you sort out the Keplerian/RV/file options.
  3. Fail in an obvious way if some inputs are not provided. Obnoxiousness is a feature. Chasing what appears to be a dynamics bug when it's actually a bad input is painful enough as it is. I fear that having a robust, typo-tolerant input scheme would only make that worse.

Regards,
-Eric (he/him)

from 42.

vladtcvs avatar vladtcvs commented on July 28, 2024

Example for orbit:
https://github.com/vladtcvs/42/blob/master/InOut/Orb_Ellipse.yaml

Example for SC:
https://github.com/vladtcvs/42/blob/master/InOut/SC_Simple.yaml

Example simulation description:
https://github.com/vladtcvs/42/blob/master/InOut/Inp_Sim.yaml

from 42.

vladtcvs avatar vladtcvs commented on July 28, 2024

I've used https://github.com/pantoniou/libfyaml for yaml because it provides much more useful interface than libyaml. I never heard about "yamlkit.c", and the only lib with name yamlkit is https://github.com/patrickt/yamlkit, but it's objective-c. Can you please give link to yamlkit.c?

from 42.

ericstoneking avatar ericstoneking commented on July 28, 2024

Sorry, "yamlkit.c" is shorthand for: Code up whatever yaml support you need in C, and put it in Kit/Source along with all the other *kit.c files, so we can build it along with the rest of 42, thus avoiding adding an external dependency.

from 42.

ericstoneking avatar ericstoneking commented on July 28, 2024

Looking at your examples, I think readability is in the eye of the beholder. I might suggest something that I've seen others do: make a front end that takes your yaml input files, and translates them into the format that 42 expects.

from 42.

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.