Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yaml instead of tb.txt #96

Open
rokups opened this issue Sep 19, 2016 · 8 comments
Open

yaml instead of tb.txt #96

rokups opened this issue Sep 19, 2016 · 8 comments

Comments

@rokups
Copy link

rokups commented Sep 19, 2016

What do you think about using yaml instead of custom file format for UI?

Pros:

  • Familiar to way more people than tb.txt is
  • Ability to use existing third party tools for editing
  • Maintenance of parser is done by someone else

Cons:

  • One more dependency
  • Existing resources would need converting (although can be automated)

Reason i am suggesting this is because existing format is already close to yaml which is great. If we could use format that is already widely supported by other tools it would only benefit users of library.

@fruxo
Copy link
Owner

fruxo commented Sep 19, 2016

I reviewed using yaml before writing the custom parser that is in TB, but didn't like it. I couldn't find any implementation that would fit well either. Maybe things has changed on the implementation front since then (haven't checked).

@RobertoMalatesta
Copy link

Another option could be the use of JSON files.
All editors have excellent tools and (small and effective) C/C++ parser implementations abound.

--R

@codecat
Copy link
Contributor

codecat commented Sep 19, 2016

I think if you use yaml (or json for that matter) you'd have to add an additonal children tag to add children elements in layouts for example, which would just be yet another line of syntax. (I guess you could still see class names as children elements, but still)

As for editing, I have made and published a Sublime Text plugin for TB node syntax on Package Control: https://github.com/nimbletools/turbobadger-sublime

@rokups
Copy link
Author

rokups commented Sep 19, 2016

I would happily write one more line in order to get editor support. As for json - it was not created to be readable so something like yaml would still be better for writing by hand. Besides curlies=extra lines. Though honestly... Json still better than custom format imho.

@RobertoMalatesta
Copy link

@angelog great plugin. Too bad I don't use Sublime. Today I'm converging all my code on Visual Studio Code.

@RobertoMalatesta
Copy link

@rokups I admit my sheer ignorance on YAML (always skipped it thinking it was yet another markup --and I hate markups) but it shows some nice points, so I'll have a look adopting it in some other project (JS/TS based -- VSC seems to have interesting plugins as well)

I agree that JSON is maybe less readable, but today it is everywhere and well supported by libs and tools.

--R

@codecat
Copy link
Contributor

codecat commented Sep 19, 2016

@RobertoMalatesta You should be able to use the tmLanguage file on VSCode (Atom) too: https://code.visualstudio.com/docs/customization/colorizer

@jeduden
Copy link

jeduden commented Oct 17, 2016

Please also note that yaml has a pretty large specification. In addition, it is fairly easy to replace /adapt the current format with/to yaml in application code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants