5 ms·
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 programm
by flaviu2 7y ago
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!
- Semiapies 7y agoI didn't even have to scroll down to see an example of code and usage.
- Varriount 7y agoWhere? 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).
- fractalf 7y agoI gave up looking after 1min
- michaelmrose 7y agohttps://github.com/cuelang/cue/blob/master/doc/tutorial/basics/Readme.md https://github.com/cuelang/cue/blob/master/doc/tutorial/basi...
- cosmotic 7y agoEven worse, the examples are complex and incomplete.
- stefan_ 7y agoOr make me go blacklist this project and everything to do with it (largeCapital pop >5M)
- robocat 7y agoI found this comment: "In V3 the hobby field is explicitly disallowed. This is not backwards compatibly as it breaks previous field that did contain a hobby field" in https://cuelang.org/docs/usecases/datadef/ https://cuelang.org/docs/usecases/datadef/ So if you add a field, you break existing code that doesn't know about the field.
- yes-except-no 7y agoNo. That's not what it says. However, if you had code that expected to receive a `hobby` field in V1, that tries to parse it and you removed it in V3, then yes, obviously, it breaks existing code. That is basic API design
- spoondan 7y agoThis is wrong. CUE has optional closed schemas marked by a double colon. The V3 entity you’re talking about is explicitly declared to be a closed definition and therefore disallows unknown fields in entities that claim to accord to the V3 type. Not all definitions are closed. Even for those that you choose to close, it’s a matter of having different code for different definitions. The claim that it just automatically breaks isn’t true even when closed definitions are used. BTW, this feature speaks to CUE’s intended purpose as a configuration language. It is (or at least can be) nice to ignore unknown fields in transmitted payloads for forwards and backwards compatibility. But if I’m trying to configure some software and misspell a field, I probably want the configuration file to fail validation, not have the software run with an unintended configuration.
- squeaky-clean 7y agoCan't see any examples in the github readme, or even in the codebase either.
- michaelmrose 7y agohttps://github.com/cuelang/cue/blob/master/doc/tutorial/basics/Readme.md https://github.com/cuelang/cue/blob/master/doc/tutorial/basi...
- preommr 7y agoWell at least you could find an example. I couldn't find anything after like a minute of searching. Unless we're counting the gif that slowly shows you an example project letter by letter.
- evolve2k 7y agoSomeone please link to the code.
- xinau 7y agoThe website is under active development at the moment and their are incomplete parts. For the code links please take a look at the following tutorial on GitHub at the moment. * https://github.com/cuelang/cue/blob/master/doc/tutorial/basics/Readme.md https://github.com/cuelang/cue/blob/master/doc/tutorial/basi... * https://github.com/cuelang/cue/blob/master/doc/tutorial/kubernetes/README.md https://github.com/cuelang/cue/blob/master/doc/tutorial/kube...
- seanmcdirmid 7y agoYa, first rule of PL promotion is that you have an example snippet of code in the first screen seen on your web page.
- chiefalchemist 7y agoYup. Tell me what problem you solve for me, and then show me how you do that.
- farah7 7y ago"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.
- wilg 7y agoAre 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.
- EpicEng 7y agoI can be disappointed when viewing a web page while simultaneously being disappointed in humanity's collective response to climate change. Context matters.