r/sysadmin • • May 19 '20

Microsoft 📢 Windows Package Manager | winget.exe

[deleted] — view deleted post

384 Upvotes

126 comments sorted by

View all comments

12

u/ErikTheEngineer May 19 '20

Does that mean Chocolatey is dead? Or is the bar for getting packages into WinGet much higher?

It looks like Microsoft is preparing to have WSL and Windows just swap places in some future release and have Windows become a compatibility shim on top of Linux. :-)

2

u/pokemanzred May 19 '20

Seems super easy to add new packages:

https://github.com/microsoft/winget-pkgs

1

u/Atemu12 May 19 '20

Oooh YAML-based.

Not as cool as a language specifically made for package declaration like Nix but the next best thing IMO.

4

u/ErikTheEngineer May 19 '20

Oooh YAML-based.

Off topic, why does everyone love YAML so much? Or any file format where whitespace matters for that matter? I get it, XML is super-verbose, JSON isn't intuitive for non programmers...but YAML?? I don't get it...

5

u/[deleted] May 20 '20

You kind of listed the reasons there...

What else is compelling you think people are missing?

4

u/BadgersInSpace May 20 '20

Because all valid YAML is convertible to valid JSON and vice versa. It's more natural and faster (for me at least) to write something in YAML than in JSON and the whitespace makes it easy to read and makes it look consistent across editors or applications vs having to pretty-print JSON output because 9 times out of 10 it's going to have the whitespace stripped.

I interact with it on a day to day basis for configuration files, and one of the most useful things is the ability to create multi-line strings with |. Trying to do that in JSON requires manual escaping of the newlines, quotes, etc. which would be a nightmare for passing in the text of a Python script, for example, to a content parameter of a Puppet file resource.

YAML is for humans to write something to tell the machine something, where JSON is machine-speak for talking to other machines that is intelligible to humans and can be spoken relatively easily if a human needs to initiate a machine is my interpretation.

Extending that comparison, XML is speaking proper Formal English constantly, which gives you the exact unambiguous specifics... in three times as long as it would have taken to say it in vernacular.

tl;dr less of a pain in the ass to write something in YAML over JSON, and fuck XML

3

u/ExistingObligation May 20 '20

Small correction, valid YAML is not easily convertible to JSON without losing information (namely comments) but the reverse is true, i.e. JSON is a subset of YAML.

1

u/jantari May 20 '20

YAML is easy as fuck and very powerful.

Constructs like verbatim inline text are only possible because of whitespace rules:

verbatim-text: |
  I can \have\ all matter of crazy
    shit here
  and everything including  double  spaces

  Or new
  L
  INES

  \\{ will be preserved perfectly

1

u/[deleted] May 20 '20

Chocolatey could rebuild to implement this if it's in all version of Windows but it could be a year until some places see 1909 let alone a version of Win10 with this up and running and trusted vs existing tools.

I'm all for it, but it will take time to reach all corners.

-2

u/Derpicide May 19 '20

WinGet will probably just turn out like IE. People will probably just use WinGet to load the chocolatey package in the same way people just use IE to install Chrome/Firefox

-1

u/uptimefordays DevOps May 19 '20

I wouldn't think so, I somewhat suspect all of these package managers are based on NuGet. Hopefully Microsoft's bringing package management from Visual Studio to Windows will mean greater adoption of the package model in the Windows ecosystem.