Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

Any valid json can be parsed by any 1.2 yaml parser. That's how it gained popularity in the first place: you didn't have to migrate. Like ascii and utf8.


When YAML came out there was no large JSON usage to migrate from, the incumbent in configuration was "human readable serialization" was XML.


I've tried dhall, cue and jsonet, and cue is so far my fav. It's very well designed, expressive, but restrictive enough so that config files don't look like scripts.

The way it blend types and values makes learning it super easy, yet you can do complex things with few lines.

But the main implementation exports to yaml without quoting the strings, which kinda defeat the purpose :(


I’m kind of unsure about the way CUE achieves reuse: if I understand correctly, you have files in a directory tree and the (result of processing the) bottommost files are the things you’re supposed to point your consuming tools at. So there’s no way to share structure among a collection of items if that collection is nested inside your config, the only operation available is essentially the generation of a set of similar but separate configs. Or am I wrong here? I’d very much like to be.

(Also, the type system is absolutely delicious, but it badly needs a paper with a complete description. I’m extremely interested in how it works, but fragmentary “notes on the formalism underlying” CUE are not enough.)


CUE is based on Typed Feature Structures, which predate Deep NLP, and for which there is limited literature. We do need a good writeup on the theory. I've written a bit here: https://cuetorials.com/cueology/theory/

Think of a graph with lots of attributes within which paths are searched for.


The linked page seems to be empty.


I'm seeing a few headings and links


You do have imports and functions so you can reuse what you want.

The doc is also quite clear and rich, but the way it's organized means I have to read it entirely before writting my first CUE file. It also lacks IRL examples so trials and errors were my best friends.

It can be discouraging.


cuetorials.com really helped me get there


I actually use CUE for large configuration files, used YAML before and had many issues once configurations became larger and more complex. It validates and exports JSON, which is easily readable in C++ and Python :-) have been happy doing the switch


"It's to fight terrorism, don't tell anyone"


Somes tools will parse it as a file extension


The problem is that the american politicians justify those actions by pretenting it's a moral call.

So the BS meter is rising.


I came to the same conclusion, but using an Oura ring instead. It's good to see 2 different devices and persons, but with the same results. It kinda validate that those are valid metrics.


It will also make solar even more attractive.


Solar is not great for over-night charging...


Most people buy solar panels with energy storage.


I am getting solar with battery (in Texas) and I asked all the companies I spoke to when collecting estimates. They said < 10% do. Solar saves you money on the electrical bill and has a chance of breaking even over time. Storage doesn't nearly as much since most people sleep a large portion of the night.

Additionally, I suspect you severely underestimate the additional cost ($10k in hardware alone [2], and that is before you get to permits and labor) and severely overestimate the average American family's ability to pay it [1].

[1] https://www.google.com/search?q=median+income+usa

[2] https://www.buildwithrise.com/stories/tesla-powerwall2-basic...


One of the big things of the "green" crowd is that EV batteries can be used as storage for absorbing excess solar/wind energy, and maybe even put it back into the grid. Basically the opposite of your suggestion.

For solar, cars should be charged around noon. Overnight charging is ideal if we go nuclear.

Now I am talking about global scale, on an individual scale, everyone does what's best for them. For example, if you have net metering, having solar panels and charging overnight makes a lot of sense. Having batteries at home and emptying your home battery into your car battery during the night can also make sense depending on what kind of contract you have with you utilities and the kind of subsidies you can pretend to.

Anyways, most of the people I know (not in the US) with solar panels don't have energy storage, because they have net metering, or even better, they sometimes sell for more than they buy per kWh.


rename will stop and output and error.


Thanks to all the comments in this threads, I now have "sudo apt install rename detox" in my install script, and:

    normalize_names() {
        rename "s/-/_/g" *
        detox -s lower *
    }
in my .bashrc.

I've thrown some edge cases at it, and it handles it super well. It deals with consecutive "_", remove leading garbage, normalize unicode, and even prevents naming conflicts by opting out early.

Thanks you.


> Pro tip: rename your development directory (or even better: the workspace path in CI) to put a space and/or special characters in it.

The problem with that is that YOUR code may handle it, but your tooling may not. If my code formatter break on spaces, I'm not going to change the formatter.


You could submit a PR to their repo.


I could submit a PR to 5 tools a week on average. I actually have the time and resources to do it once a year.

Last week I opened a ticket for a Firefox bug. Following up on the bug took me 2 hours in total.

FOSS is not free, you pay it with your time. And as with everything you pay for, we all have a budget.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: