Giter Club home page Giter Club logo

Comments (11)

liilac avatar liilac commented on July 17, 2024 2

I think it's important to clarify, my commentary was actually on the representation of the configuration in code, not in the configuration files.

@neuroscr

from lokinet.

neuroscr avatar neuroscr commented on July 17, 2024

INI was chosen for UX. If other projects can use INI, it's probably possible somehow to make it work.

I'm against using YAML

appropriateness of using a library over custom, internally maintained, code

This is not a value we hold. More dependencies isn't always a good thing.

Compile-time safety is your strongest point here.

from lokinet.

despair86 avatar despair86 commented on July 17, 2024

liilac: if you want, we could go full TOML (ew) to gain access to more descriptive types 🤔

  • wouldn't break existing configs

ye I also agree with ryan's position on external code

  • code should be auditable
  • simplifies packaging (at this time, it is possible to ship a fully linked binary with no external requirements other than [libc|msvcrt] and lib[std]c++)
  • simplifies user experience for installation from source (rapidjson is header-only)

from lokinet.

neuroscr avatar neuroscr commented on July 17, 2024

At least TOML is like INI, it maybe a good compromise, if we need one
https://github.com/toml-lang/toml

from lokinet.

liilac avatar liilac commented on July 17, 2024

What was the reason for closing this? Would it be possible to get a summary of the thoughts and reasoning behind a deliberate choice to not (at some point) have a well-typed representation of the configuration in code? @majestrate

from lokinet.

majestrate avatar majestrate commented on July 17, 2024

from lokinet.

liilac avatar liilac commented on July 17, 2024

@majestrate I think you're misunderstanding the proposal here.

It's nothing to do with the configuration file format; comments on changes to that were tangential.

The proposal and discussion here (on my part), was about having a well-typed representation of the configuration in code; i.e. with structs and such.

Simplistic example in plain C:

typedef struct
{
    int listenPort;
    const char* nickname;
    // ...
} config;

from lokinet.

majestrate avatar majestrate commented on July 17, 2024

ah i see, that would make more sense.

from lokinet.

liilac avatar liilac commented on July 17, 2024

Might be helpful to link an exhaustive sample config here

from lokinet.

majestrate avatar majestrate commented on July 17, 2024

the sample config is generated by lokinet using the -g flag

from lokinet.

majestrate avatar majestrate commented on July 17, 2024

we have refactored the config layer to make things more strongly typed.

from lokinet.

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.