Live data from Hacker News

Cue – A language for defining, generating, and validating data

cuelang.org

81–90 of 167 posts

Re: Cue – A language for defining, generating, and validating data

#81
post #65
post #3

Seems like an interesting language, but I'm very disappointed that my first attempt to view example code took 5 clicks. The most important part of any programming language website is a short example snippet: put it above the fold on the front page!

"but I'm very disappointed that my first attempt to view example code took 5 clicks." Talk about first world problems. That this caused you to be "very disappointed" would suggest you need to take a step back and reevaluate your priorities.

Are you familiar with the concept of context? It's helpful because it allows easier communication by not requiring words to mean the same thing at all times.

In this case, it is helpful because we can scale our understanding of the poster's disappointment to allow us to not have to consider how it might be disappointing relative to, say, global thermonuclear war or a first kiss, but only need to think about it in relation to the other topics of discussion.

I highly recommend using context whenever communicating.

Re: Cue – A language for defining, generating, and validating data

#82

Earlier quoted context omitted.

I didn't even have to scroll down to see an example of code and usage.

Where? I don't see any example on the page linked to. Edit: Ah, the code example only appears for desktop browsers (or at least, browser windows wider than a phone screen).

Works fine on my phone, though unlike desktop,I do have to scroll a little.

Re: Cue – A language for defining, generating, and validating data

#84
post #60

I feel like that validation feature could theoretically save a lot of people that occasional 1 hour of their time that was wasted because of a typo in a config file leading to a cryptic error message.

Yes, that's the interesting part to me.

Re: Cue – A language for defining, generating, and validating data

#85
If configuration starts becoming more complex than looking up key value pairs, why not just write it in the programming language you are using? More languages / serialisation just adds another layer of complexity. Config as code is actually really neat.

Re: Cue – A language for defining, generating, and validating data

#86
I'm feeling both really pissed and validated right now. I thought this was going to just be a normal thoughtless config language that would only be successful as a Google project. Then I looked at the theoretical basis page. I have no formal proof about this, but I've been talking about this type of a type system with my parents and high school CS teacher for a while now! My idea sounds like this: a value is simply an actual binary string. The "type" that classifies any data is described as a formal grammar, where the binary string is a formal language. If the language can parse a given binary value with the formal grammar, that value is an element of the set (type). This naturally leads to a structural type system which can be described using existing set theory and implemented using existing parsers and formal language theory. Of course, this leads to type -> type functions which describe dependent and refinement types naturally. It's great to see this idea being broadcast on the front page here, as I can see it very clearly as a superior type system. I'm really regretting not writing a formal article about it sooner!

Re: Cue – A language for defining, generating, and validating data

#87
post #65
post #3

Seems like an interesting language, but I'm very disappointed that my first attempt to view example code took 5 clicks. The most important part of any programming language website is a short example snippet: put it above the fold on the front page!

"but I'm very disappointed that my first attempt to view example code took 5 clicks." Talk about first world problems. That this caused you to be "very disappointed" would suggest you need to take a step back and reevaluate your priorities.

I can be disappointed when viewing a web page while simultaneously being disappointed in humanity's collective response to climate change. Context matters.

Re: Cue – A language for defining, generating, and validating data

#88
post #13

my time at Google has made me hate GCL so much.

I am pretty sure you placed the hate on the wrong target, you probable are hating borgcfg, instead of the GCL/BCL language. Disclaimer: was borgcfg owner 2016-2019.

you are probably right. Felt like the documentation for borgcfg was extremely hard to just find. Maybe I'm wrong about this. This is also not the place to discuss this probably.

But GCL made it so whatever variable was actually being used by borgcfg was obscured by layers upon layers of imports.

Re: Cue – A language for defining, generating, and validating data

#89
post #3

Seems like an interesting language, but I'm very disappointed that my first attempt to view example code took 5 clicks. The most important part of any programming language website is a short example snippet: put it above the fold on the front page!

Even worse, the examples are complex and incomplete.

Or make me go blacklist this project and everything to do with it (largeCapital pop >5M)

Re: Cue – A language for defining, generating, and validating data

#90
post #61
post #47

Earlier quoted context omitted.

We do indeed. XML is awful, YAML is a clusterfuck, JSON is often insufficient, and so is INI. TOML looks promising, but might not make it out of its niche. If Cue is basically a better YAML with built-in schemas, that sounds pretty good.

Schemas, interesting. I wonder where we’ve seen that before..

We could have a URI that gives you a schema and some tools to generate a skeleton for that schema for you. Then you could put a header in your request for what you want to do and send that payload.

Like a simple configuration access and management (SCAM) protocol.

Yes, yes I think we’re on to something here.

Post reply on HN