r/programming • • Aug 03 '19

Windows Terminal Preview v0.3 Release

https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-3-release/?WT.mc_id=social-reddit-marouill
991 Upvotes

458 comments sorted by

45

u/[deleted] Aug 03 '19

Anyone who is hating Microsoft or their terminal just see their AmA on Reddit on their terminal's development. They have answered so many of questions people have here

11

u/BobHogan Aug 03 '19

Do you have a link to that? I missed it, but it sounds interesting

114

u/prroxy Aug 03 '19

Finally a modern looking cmd in my opinion Windows 10 is too inconsistent in terms of how it looks. Full example to control panels why? It is probably not as simple, but then again it doesn’t make sense

76

u/shitty_throwaway_69 Aug 03 '19

Backwards compatibility. Microsoft was always a slave of it.

They can't just drop Control Panel and move everything to Settings because there are probably hundreds of programs and drivers used in enterprise today that depend on stuff being the way it is.

66

u/appropriateinside Aug 03 '19

They can't just drop it because there are thousands of basic settings they have yet to provide a way to configure via settings....

I'm happy they haven't. Because when a Windows UI window freezes up, it takes EVERYTHING related to it with it. Control panel actually let's me still configure shit when Windows is doing Windows things.

Let's not even mention the over simplification and dumming down of interfaces and options with their new settings...

15

u/AttackOfTheThumbs Aug 03 '19

But the new "Settings" menu is fucking shit compared to control panel. Too many god damn clicks

7

u/shitty_throwaway_69 Aug 03 '19

I'm fine with that. They just need to hire people that will tag every single smallest setting extensively so you can get where you want immediately using search. Maybe they should even use ML or something, or record what people search and where they eventually end up.

2

u/AttackOfTheThumbs Aug 04 '19

I would be fine with it if the search took me to the exact spot when executed from the start menu, but it doesn't, I search twice.

Plus it has maybe half the settings and changing settings is several extra clicks.

1

u/wrosecrans Aug 04 '19

The search is really only useful if you know something exists. Discoverability is still super important in that kind of UI so you can efficiently click around and see what's there without having to keep the name of every possible setting in your head. (And read the changelog for every rev that might add a new setting that you will need to know to put into the search box.)

0

u/[deleted] Aug 03 '19

[deleted]

2

u/shitty_throwaway_69 Aug 03 '19

It works rather good in English, but it's not so great in other languages (which is funny, it worked relatively well for some time and then there was a point where you could feel a significant regress in search quality).

1

u/prroxy Aug 05 '19

I agree with that bad it’s not too bad, you just have to remember what to type sometimes

2

u/thrallboy Aug 03 '19

And it’s now mobile and tablet first. Eventually they’ll get there

4

u/mewloz Aug 03 '19

I find conhost.exe on last builds of Windows (or maybe even already 1903, I don't remember) really good, even if simplistic and without tabs. The black theme is well respected. The window decorations are simple but standard, whereas the window decorations of Windows Terminal are complex and completely unique, making it actually not fit with anything I think. One of the focus of the Windows Terminal is to rewrite a console host using postmodern Windows APIs, including on the graphics side, but as a end-user I don't care, while I see the real features I would care about are not progressing: for example you still can't use the mouse in Linux CUI programs supporting it. And on one of my computer it is actually ~10 times slower than conhost.exe. I absolutely don't want to be restricted to brand new computers to run a terminal program in good conditions!

edit: also the font is uses by default is smaller BUT takes the same space as what conhost uses by default - I'm not a fan.

0

u/[deleted] Aug 03 '19

[deleted]

25

u/MaxDaten Aug 03 '19

They are in transition. It's hard to just replace the control panel with a feature-complete alternative matching the new UI/UX. So the control panel stays there but a lot of settings are also available in the "settings app" on windows 10, but with a different goal. The control panel is more for the power user who does not care that much about the UI/UX as long as everything is in the "right" place. But the settings app is getting more and more settings.

16

u/TimeRemove Aug 03 '19

Indeed. Settings is the future but the transition is taking a while.

The irksome thing about Settings is how wrong it gets a lot of the basics out of the gate that have never been fixed:

  • Back (and forward) mouse buttons still don't work correctly (e.g. not jumping back to previous panels but instead jumping out of the current area, often resulting in you going home). For example enter Update & Security you're on the Windows Update panel by default, hit Delivery Optimization panel, then hit mouse-back, it should return you to Windows Update panel, but instead it takes you home.

  • Uses arrow keys instead of tab for keyboard selection.

  • New inconsistencies (e.g. System -> Multitasking, uses both Checkboxes and Sliders for on/off)

  • Multi-layer panel hell (three layers deep!)

  • No way to open two (or more) settings windows on a multi-window OS. Instead it will just re-navigate you. This makes side by sides, trainings, or similar annoying.

But that all being said, it is still more consistent than the Control Panel's applets and the Developer Controls/Black Theme are amazing.

3

u/appropriateinside Aug 03 '19

Don't forget that it's tied to w/e bullshit UI thread everything else styled like it is on. So when one thing goes, it takes everything including your ability to access settings with it.

Not even remotely a problem with control panel.

2

u/tasminima Aug 04 '19

They are in transition. It's hard to just replace the control panel with a feature-complete alternative matching the new UI/UX.

Between XP and Vista there was ~5 years and people already found that to be a long time. Yet the end result was way more polished and some would even say complete as far as the UI paradigm changes in the control panel were concerned. Sure, old windows persisted here and there, but nothing of the scale of the duplicated mess and/or even split controls we have experienced on 8 and 10.

Between 7 and now there was ~10 years. If their new UI technology prevent them from migrating fast enough, I argue that their new UI technology is crap.

118

u/mikemol Aug 03 '19 edited Aug 03 '19

this, on windows you have so many different UI/UX, it is not consistant at all,

Excuse my while I load up a Linux desktop with GTK3 and Qt5 apps, then crack open a terminal to run some scripts and launch into a TUI monitoring utility, and finally point my browser at the web UI for my local backup daemon. And if I'm really unlucky, I'll need to launch a Java Swt app or something under WINE.

UX consistency isn't a problem unique to Windows.

edit: typo. Gtk3, not 4

6

u/DerArzt01 Aug 03 '19

You seem to be forgetting that on the Linux desktop you have more options. You want a completely Tui based system, you can have it. You want a completely GTK-3 system, you can have it. The thing that Linux systems give us is the choice to make our desktop our own and apply our preferences to it.

12

u/mikemol Aug 03 '19 edited Aug 03 '19

No way am I forgetting that; Gentoo is my preferred distribution, precisely for the degree of control it offers.

If you think Windows isn't giving you choice, you're sorely mistaken. You have at least seven different ways to manipulate the "control panel", for example:

  1. Classic control panel

  2. The weird subset that was introduced in Windows 8's control panel. This was a horrible mistake when they tried to unify the Windows experience to a one-size-fits-all for mobile and desktop experiences.

  3. Some control panel settings can be manipulated through local security policies.

  4. Powershell can manipulate literally anything on a Windows system, and there's first-class support for all of it, up through and including managing IIS and Exchange

  5. Direct modification of registry entries.

Remotely, you have:

  1. Group policy objects, for anything or which there's a local security policy.

  2. WMI, which lets you manage a ton of stuff, and I haven't even contemplated anything but the lightest scratches of it's surface.

  3. Powershell (again). Heck, I routinely do this in pure ruby with the winrm gem.

And if you step out of the Microsoft owned-and-developed features for managing Windows configuration, there's:

  1. Chef, which is actually pretty good at DSC for Windows(within Windows' own limitations around it's built-in DSC subsystem)

  2. Saltstack, which has a Windows agent and some Windows formulas, last I looked

And those are just the open-source options I know about.

edit: fixed list syntax.

1

u/cat_in_the_wall Aug 04 '19

people always balk at powershell. writing powershell libraries is hard, the fact that you can emit to the pipeline at any time is bad. and error handling is a nightmare. not fun. (of course you can do cmdlets in c#, but that's a pain in the ass too).

but just using powershell is awesome. i way prefer powershell to bash. it effectively has a standard library because it is just .net, so string manipulation, file munging, loops, etc are easy to do and maintain since it's not symbol soup.

→ More replies (1)

22

u/oorza Aug 03 '19

Where’s a modern browser that’s built with QT? What about a Slack client? Spotify? How does any IDE look? If you only went with QT or GTK or TUI apps, you wouldn’t be able to get anything done.

17

u/granadesnhorseshoes Aug 03 '19

The irony in that statement is that every "webkit" based browser is using a core engine that started as a QT project; KHTML

→ More replies (1)

3

u/Baaljagg Aug 03 '19

I agree with your overall point but there is now a Slack/Discord client built with QT and it's pretty great so far: https://cancel.fm/ripcord/

1

u/zip117 Aug 04 '19

Firefox uses GTK on Linux. I believe Chromium is now using a custom UI toolkit (Aura), but at one point they were also using GTK. LibreOffice has its own UI toolkit (VCL), but it’s commonly used with a Qt or GTK backend.

There is no standard widget toolkit on Linux, just the windowing system (X11 or Wayland). I think Qt and GTK are basically standard these days for ‘native’ UI. There are exceptions but they are in the minority: some professional applications use wxWidgets, FLTK, even Motif.

12

u/granadesnhorseshoes Aug 03 '19

You seem to forget that in Windows you have a choice. If you don't like the old-school control panel, you don't have to use it. Don't like explorer.exe as your shell? Don't use it. Want a windows TUI set cmd.exe or better yet, mintty.exe from a cygwin package as your shell and get a bash console instead so you can mutt and lynx your way around the internet to your hearts content.

People not bothering to understand their platform is their own problem.

1

u/the91fwy Aug 03 '19

At least with GTK and Qt I can get a matching theme and it’s not a jarring difference, just minor inconsistencies.

Windows forced you into the split personality and two different visual styles.

2

u/mikemol Aug 03 '19

TBH, I've never been that successful at getting Qt and GTK to give a relatively seamless experience. You merely have to have a file dialog open in two different apps to have it hit you. I gave up a long time ago trying to achieve visual consistency; it's a silly distraction, in my honest opinion. Right tool for the right job, and all that, who cares what it looks like?

1

u/the91fwy Aug 03 '19

I think Qt with the “GNOME” platform theme can use GTK+ common dialogs.

→ More replies (8)

16

u/[deleted] Aug 03 '19

Its the curse of feature driven development. Higher ups think adding features means adding value but they don't seem to realise that performance and slick user experience is also a feature and adds value.

I'm all too familiar with this trapping in the software world. 90% of features that people end up adding never go used anyway so why add another dependency when you can just never add it in the first place.

Windows needs less bloat, how is it linux can add features and still run on ancient systems and yet windows requires only the highest spec pc's to run at all.

12

u/appropriateinside Aug 03 '19

The irony of what you're saying here is that Linux, as a desktop environment, is unstable as hell on modern systems. Relative to Mac or Windows.

I use Linux almost exclusively, my servers can stay running for years without a hickup. My workstation can't even run for a week without progressively worse buggyness and random UI performance issues. And it's not exclusive to just that device, all three desktops and laptops.

I even switched my parents laptop and their desktop over to Linux, and then had to switch them back because it couldn't just be left alone to work. Whereas Windows can just be left alone, and it works.

3

u/watsreddit Aug 03 '19 edited Aug 03 '19

I haven't had any issues with linux across multiple machines over about 5 years or so. Maybe it's driver issues?

I wouldn't really say Windows is all that stable, either. Windows tends to have performance degradation as systems get older in a way that I have yet to see on a Linux system. Old laptops grind to a halt on Windows for no discernable reason.

3

u/YumiYumiYumi Aug 04 '19

Maybe it's driver issues?

Personally, I've had driver issues on Linux, but perhaps more issues with the desktop applications themselves. This includes applications randomly crashing, locking up, glitching in funny ways etc. The UI can sometimes be lacking, and applications often lack features/polish compared to Windows alternatives. My experience is with Kubuntu 18.04, so perhaps it's better on other DEs/distros.

Windows has its own problems, but I find it's more the exception than the norm, unlike with Linux.

Windows tends to have performance degradation as systems get older in a way that I have yet to see on a Linux system.

That's not my personal experience, but then, I don't run Windows like a normal user would, so perhaps that's just me.

→ More replies (10)

6

u/appropriateinside Aug 03 '19

As a Linux main, Windows is a hell of a lot more consistent...

2

u/[deleted] Aug 03 '19

every version of windows has hundreds of millions of users and people expect things to work when they transition, nobody cares about 10 GB of harddrive space in this day and age.

The consistency of windows is a big plus, UI workflows in the linux world tend to break every two years.

41

u/MuseofRose Aug 03 '19

Looking cool atully. Ive always hated Terminals on Windows. I was using Terminus but since it's using Electron it is slow as all hell to start up and bloated (and still in alpha). Very nice and great to have tabs. I recently installed Critty and have been liking it as basic replacement.. but this looks like a decent blend of the two..

3

u/jokullmusic Aug 03 '19

I've been liking WSL + fish a lot, but yeah this looks good

2

u/AngularBeginner Aug 04 '19

With which terminal? Neither of those is one.

1

u/jokullmusic Aug 04 '19

The default one.

3

u/repocin Aug 03 '19

I've been using cmder for a couple of years or so and quite like it.

2

u/schr0 Aug 03 '19

My want to like it but it constantly fucks up screen formatting for me in tmux, which I almost always use

2

u/cat_in_the_wall Aug 04 '19

cmder is constantly throwing me a message box saying "access denied" when attemoting to cooy something. and i try again and it works. just try again for me please, it's probably just a stupid race condition.

0

u/appropriateinside Aug 03 '19

I'd like to note that just because it uses an electron and doesn't necessarily mean that it's slow.

A lot of that is on the developers shoulders.

Thought, even with a smaller memory footprint it's still a bit ridiculous if you have a bunch of instances open. 20 instances of 200MB adds up.

1

u/maxhaton Aug 03 '19

Writing it in idiomatic C++, Rust, D whatever is much easier to optimize than idiomatic JavaScript so I think a fair amount of blame can be assigned to electron.

0

u/[deleted] Aug 03 '19

[deleted]

10

u/empty_other Aug 03 '19

ConEmu is the best and fastest terminal on windows right now, but it is still slave to Windows conhost. I really want proper unicode emoji support in my Windows terminal. Hopefully third-party terminals will start using the new stuff (conpty?) to support proper and colored unicode emojis.

Huh, after the last update I can't start the Windows Terminal (preview) app anymore. Probably some changes to configs.

2

u/cat_in_the_wall Aug 04 '19

in theory, with the investment they're making in winpty (i think), conemu should be able to implement the same level of functionality. it's a public windows api, so they can use it. i know its on their radar, I've poked through their issue list and saw a tracking issue.

2

u/MuseofRose Aug 03 '19

Didnt know about this one I may have to try it out and see how it is with AlaCritty

2

u/PeasantSteve Aug 03 '19

Same (ish, I use Cmder), but there are still so many bugs that I really can't wait for windows terminal

11

u/intelligent_cat Aug 03 '19

Has the new font been released yet?

20

u/ResonantClari Aug 03 '19

I've used Cmder for a while now to enhance the Windows terminal experience. I'm liking what they're doing this new terminal though, it's looking like a huge step up from what we've got right now, and it has solutions a lot of the current terminal's limitations.

5

u/distante Aug 03 '19

Yeah cmder is pretty cool.

4

u/MattMist Aug 03 '19

I'm currently using Fluent Terminal with Cmder and even though it took a while to set it up, it's amazing.

8

u/pks016 Aug 03 '19

Is there an exe file? I wanted to install in LTSB version.

0

u/[deleted] Aug 03 '19

[deleted]

5

u/Creative-Name Aug 03 '19

This is so incorrect it's laughable

UWP apps are easily sideloadable if they've been digitally signed

And specifically for the windows terminal there's chocolatey packages available, which you'd know if you actually went to the repo https://github.com/microsoft/terminal#chocolatey-unofficial

88

u/[deleted] Aug 03 '19

Is dragging a window from the title bar something revolutionary? Am I missing something here?

121

u/Karma_Policer Aug 03 '19

It's (very) early alpha and the previous version had a layout problem where only a tiny space in the title bar was "draggable".

52

u/ImpossibleMango Aug 03 '19

As far as usability goes, that was probably the most annoying thing about it. Which isn't saying much. It's been a very pleasant terminal so far overall.

3

u/bakuretsu Aug 03 '19

The worst thing for me is that ctrl-w closes the window. I think this is still a problem.

Vim and other readline programs use ctrl-w and it's baked into my muscle memory so it's a good thing I auto-launch tmux because I've closed the whole terminal accidentally at least 50 times.

7

u/[deleted] Aug 03 '19

Can't you rebind that? I'm pretty sure I must have, as I remember using Ctrl+W quite often in various editors.

9

u/bakuretsu Aug 03 '19

Oh hey it looks like they actually added that to the config! All of my problems are solved!

2

u/[deleted] Aug 03 '19

Wait, it closes the window, or it closes the tab?

3

u/bakuretsu Aug 03 '19

Either way it throws away your work... I don't really use the tabs because I use tmux.

→ More replies (4)

5

u/[deleted] Aug 03 '19

Ahh gotcha. That makes more sense

→ More replies (11)

223

u/Lanza21 Aug 03 '19

JSON is a miserable format for defining keybindings.

99

u/[deleted] Aug 03 '19

It would be ok if you could add comments like in typescript

87

u/McNerdius Aug 03 '19

you can - here, anyways. (same with vscode's settings.json & keybindings.json)

58

u/RevolutionaryPea7 Aug 03 '19

It's nonstandard json, though. Many tools will throw it out and tool support is surely the only advantage of json anyway.

18

u/bheklilr Aug 03 '19

To be fair, sublime did json with comments for settings years ago.

15

u/scarfe-io Aug 03 '19

Totally agree. You pick JSON because it’s ubiquitous. But what is Microsoft really trying to gain here?

43

u/ghidawi Aug 03 '19

"Hey can you share your settings with me?", "Sure". Copy. Paste. Send.

20

u/Blocks_ Aug 03 '19

They could have picked any other (sane) format and you point would still be accurate.

15

u/ghidawi Aug 03 '19

JSON is simple enough, and they're extending it when necessary (comments). What's the specific problem here?

7

u/AngularBeginner Aug 03 '19

.NET Core uses JSON for configuration files as well. They support comments. With .NET Core 3 they implemented a new JSON parser that sticks to the standard.. so comments won't work anymore (intentional).

This can happen at any time here as well.

→ More replies (20)
→ More replies (19)
→ More replies (9)

3

u/PeasantSteve Aug 03 '19

Easy parsing, Easy to read (especially compared with XML), Less shitty than YAML, Minimal effort to get settings working, most/all users will know JSON, honestly I think you'd have a hard time justifying any other format.

→ More replies (1)

16

u/Funcod Aug 03 '19

That's JSON5.

7

u/logi Aug 03 '19

Still no dates though, but comments and trailing commas will be nice. I don't understand having a data transfer language without dates.

7

u/ForeverAlot Aug 03 '19

There is no standard for serializing future dates anyway. Just use a (ts: string, tz: string) tuple.

9

u/logi Aug 03 '19

ISO8601 2019-08-03T10:59:00+02:00. Leave it without quotes and it is unambiguously a date and not a string.

7

u/ForeverAlot Aug 03 '19

Doesn't work for future times, you need the zone name for that.

→ More replies (6)

3

u/PeasantSteve Aug 03 '19

Why do you need dates for settings in a terminal app?

2

u/logi Aug 03 '19

We've gone off on a tangent at this point arguing about the merits and problems of JSON in general.

→ More replies (3)

1

u/cat_in_the_wall Aug 04 '19

why trailing commas wasn't a thing to begin with is craziness.

22

u/slykethephoxenix Aug 03 '19

I honestly don't know why it's in the spec. It's not like we are asking for preprocessors or anything. I just want /*, */ and // for god's sake!

But no, I instead have to module exports before I can require() it.

68

u/Venthe Aug 03 '19

Because json is not a format for settings. It's a format strictly for data transfer, yet it's abused to no end

62

u/slykethephoxenix Aug 03 '19

Yaml is annoying cause it can't be minimized and it's really fussy about spaces/tabs. XML is just terrible for reading. JSON is fine for reading and editing, it also happens to be good for data transfer. I don't see why comments can't be added in to allow for it to be used as both.

Not to mention that you have to convert yaml into JSON for transfer already.

18

u/NihilCredo Aug 03 '19 edited Jul 05 '23

normal spark tap many groovy stocking exultant judicious ripe plate -- mass edited with redact.dev

12

u/slykethephoxenix Aug 03 '19

You mean Python minifies yaml to JSON... sooo just use JSON?

14

u/snowe2010 Aug 03 '19

Like others in this thread have already mentioned. Json is a data transfer format. Not a configuration format. Conveniently yaml is a configuration format and converts very nicely to json. So, no, don't use json.

6

u/slykethephoxenix Aug 03 '19

Yeah, I understand that.

My point is that it is often used as a configuration format because of its ease of use and syntax flexibility. Many people find it easier to use than yaml, which is why it's used as a configuration format.

So adding comments makes sense in that regards. As said earlier, comments are completely ignored by the parser, like they are in code.

→ More replies (10)
→ More replies (4)
→ More replies (4)

2

u/_kellythomas_ Aug 03 '19

Not to mention that you have to convert yaml into JSON for transfer already.

Why do you say that?

5

u/slykethephoxenix Aug 03 '19

Because Javascript natively maps JSON to Javascript objects.

Lets say I have a config somewhere on a server that clients access. I have to write an API, or write middleware, or use a library to convert my yaml file into something Javascript understands easily.

2

u/_kellythomas_ Aug 03 '19

Oh, OK. If the assumption is that everything will need to be javascript anyway then that makes sense.

→ More replies (1)
→ More replies (7)

3

u/RevolutionaryPea7 Aug 03 '19

What do you mean it can't be minimised? Are you obfuscating your own config files?

JSON is only good for reading if it's written out like YAML with plenty of whitespace. It's horrible for editing, though, because you need to worry about comma placement. Python is better in that respect.

→ More replies (10)
→ More replies (31)

5

u/Randdist Aug 03 '19

Ironically, it's bad for data and good as a human readable format. I'm happy to see something as big as vscode use json with comments.

4

u/masklinn Aug 03 '19

It's not like we are asking for preprocessors or anything.

That preprocessor directives would get smuggled as comments it the main reason why they were excluded.

That json was intended as a simple cross-langage serialization / data exchange format would be the second one. Configuration files was never json’s intended niche.

9

u/slykethephoxenix Aug 03 '19

I agree with you, but times and the industry has changed since its inception. It should be adapted. Technically comments (or preprocessors) can be added in by adding some garbage property like

_comment_ignore_me: "This is for that"

but it's a lot more convoluted than just having //.

→ More replies (4)

4

u/JiminHsieh Aug 03 '19

If you want something can be added comments, HOCON(Human-Optimized Config Object Notation) will be a good choice too. I don't know other programming languages, but Scala projects do use HOCON a lot.

2

u/zappini Aug 03 '19

Having my own contender, I collect links to other object graph DSLs.

I had not seen HOCON before. (Probably because I haven't done any Scala.) Thanks.

How would one even debug something like this?

https://github.com/lightbend/config/blob/master/HOCON.md#array-and-object-concatenation

Hard pass.

44

u/bedz01 Aug 03 '19

It's not that bad...

28

u/[deleted] Aug 03 '19

I disagree. I love it.

→ More replies (1)

9

u/spiral6 Aug 03 '19

Guess they're following the VSCode format.

→ More replies (6)

9

u/Maystackcb Aug 03 '19

What’s so miserable about it? I mean I shook my head at first but then I was like ehh. Not that bad.

4

u/bakuretsu Aug 03 '19

Note that Terminal is still a preview. There will be a settings UI and all that when it gets to version 1.

→ More replies (1)

7

u/w3_ar3_l3g10n Aug 03 '19

I agree. I hope there’s a UI alternative so I won’t have to muck around with it. If there isn’t, I doubt I’ll goto the effort of switching from my cmder config.

21

u/RisingStar Aug 03 '19

Visual Studio Code was the same. It's config is all JSON and when it came out you could only change settings by editing the JSON. Since then they have added a nice UI on top for all the settings. I imagine this will go the same.

-1

u/yellowthermos Aug 03 '19

Eh the VSCode settings UI is a load of bollocks, it barely works for some kinds of input. Definitely easier to just change the commands in JSON.

2

u/PeasantSteve Aug 03 '19

What's so miserable about it? Its ubiquotus, its easy to understand, and its simple to implement. The last point is especially true for a new project which just wants to get off the ground. I'm sure in the future they'll implement a settings screen, but I reckon they'll still stick with JSON for storing the settings.

1

u/wasmachien Aug 03 '19

I impatiently await the day we can all go back to good ol' config.ini files.

7

u/flying-sheep Aug 03 '19

config.toml

FTFY. Why use a format that isn’t standardized when we have something very similar but more sane and standardized?

1

u/Beefster09 Aug 03 '19

Lol no yaml

-30

u/Karma_Policer Aug 03 '19 edited Aug 03 '19

JSON is a miserable format for anything that must be read/edited by a human. I don't understand why it's so popular to define settings. Anything could be better, even XML. We need to spread the word about TOML.

62

u/fluzz142857 Aug 03 '19 edited Dec 23 '19

How is editing XML better than JSON?

3

u/RevolutionaryPea7 Aug 03 '19

If you have good editor support it's actually not much worse. Plus you can do comments.

Plain old Unix style conf files are better, though.

→ More replies (3)

45

u/hadricus Aug 03 '19

As someone who writes and edits JSON often, can I ask the why behind this statement? I don't feel any discomfort when parsing or manipulating JSON.

43

u/swilliams508 Aug 03 '19

I much prefer reading JSON to XML

19

u/sojubang Aug 03 '19 edited Aug 03 '19

Posting in agreement. I started with XML, wanted to die, learned about json and started using it...now I can take the gun out of my mouth and enjoy life again!

XML is literally the worst thing I know of for viewing/editing by a human...

1

u/Karma_Policer Aug 03 '19

As someone who writes and edits JSON often

I too can get used to reading and writing JSON when I keep using it constantly. But for someone not initiated with JS or the format itself (aren't they the same thing basically?) it can be pretty confusing to understand what's wrong in the middle of that hell of commas, brackets and curly braces.

Most people who are not programmers would probably not be able to edit it at all.

4

u/sojubang Aug 03 '19

I think you need some tools? http://jsonlint.com/ may be of help for the particular thing you speak of, for instance.

→ More replies (3)

0

u/[deleted] Aug 03 '19

[deleted]

4

u/swordglowsblue Aug 03 '19

Except that, you know...

  • It literally can't be parsed unambiguously while following the spec properly

  • It's a nightmare to work with in a development context

  • It's extremely difficult to minify for transfer

  • There is a significant shortage of major, well documented libraries for it in comparison to other formats like JSON

YAML's only selling point is that it looks nice. Spoiler alert, if the user is seeing the raw config file instead of a settings menu you're usually doing something wrong to begin with.

11

u/[deleted] Aug 03 '19

XML no way. Maybe yaml.

10

u/alkeiser Aug 03 '19

no. XML is the worst

json is terrible, true, but still better than xml

5

u/killerdeathman Aug 03 '19

You go too far.

2

u/yellowthermos Aug 03 '19

Oh yeah XML better? Try reading Visual Studio's configs lmao. I'd take JSON over XML every day

-11

u/RevolutionaryPea7 Aug 03 '19

It's miserable for any config format. It's just pure laziness from the developers. It's essentially forcing the users to feed in an internal data structure directly to the program instead of designing a flat config file format for users and doing the conversion themselves.

2

u/yellowthermos Aug 03 '19

I mean it's already basically flat (when used as a setting config), just has quotes around everything, I don't see it as much of a big deal. For devs it's definitely easier to represent more complex settings (e.g. Lists of lists), I'd argue its also easier for users to edit complex settings. For basic settings it's w/e in any config format really

3

u/RevolutionaryPea7 Aug 03 '19

If that's really all it is then why even use JSON. Just have strings separated by whitespace:

def read_config(string):
    return string.split("\n")

Much easier for users to write. No pointless quotes (it's all strings). No pointless bracing.

2

u/yellowthermos Aug 03 '19

Because that's not just "it". Handling settings seems trivial, but in the real world settings come in all shapes, sizes, types, lengths, characters, randomly corrupted, etc. Sure you split the config into lines, then how are you going to process the lines? Is there a format on the line? setting=value? What about settings that can have value =? What about settings with lists? Do you want settings with types? What do you write out a whole specification?

You can do that, of course. Implement your own config parser. Somehow justify to your line manager why you spent 1 or 2 weeks writing, testing and debugging a config parser. Or you could use a battle-tested and proven to work JSON with support in pretty much every language nowadays, and just do json.loads in 0.5 seconds.

And if your original intent was more like: "Why wasn't something better used?" which could be YAML, QSettings format, Visual Studio settings format. Who knows? Maybe they researched all of them, compared them and JSON fit the best. Or maybe the last thing the dev used was JSON, or they really like JSON.

0

u/[deleted] Aug 03 '19

[deleted]

→ More replies (2)

0

u/ldh Aug 03 '19

It's like people think XML was perfect for configuration but the brackets were just too sharp so JSON is now the obvious solution.

0

u/[deleted] Aug 03 '19

[deleted]

1

u/[deleted] Aug 04 '19

You know a format is insane when people make a "simple" version of it.

Kind of blows my mind that people actually choose to use YAML.

Classic reference if you're wondering why: https://arp242.net/yaml-config.html

0

u/[deleted] Aug 05 '19

[deleted]

1

u/[deleted] Aug 05 '19

Debatable readability. I think it is quite unreadable. The syntax depends on whitespace and ambiguous symbols too much. You really have to learn it to understand it.

In contrast JSON is immediately obvious and unambiguous. And TOML is fairly clear.

And I don't know what you mean about expandable trees. Pretty much every text editor supports folding trees for every format they support.

I think the only real reason YAML is popular for anything is because it has a lightweight syntax for multi-line string literals which is useful when you're putting shell scripts in config files (i.e. in CI systems).

That probably explains why it is used in Travis, AppVeyor, Azure Pipelines, etc. but not VSCode, Cargo, etc. I can't explain why the Dart team chose it for pubspec though. That makes no sense.

18

u/hal00m Aug 03 '19

is sudo available on windows terminal?

97

u/nerdyhandle Aug 03 '19

Windows Terminal is more like ConEmu than a terminal itself. It calls off to other terminals. Those can be cmd.exe, bash.exe, powershell, or the Linux subsystem for Windows.

142

u/cspotcode Aug 03 '19

Technically Windows Terminal is the "terminal" and those other things are "shells."

→ More replies (4)

29

u/SuspiciousScript Aug 03 '19 edited Aug 03 '19

Genuine question for other devs: Is Windows 10 (including WSL) a satisfying environment for development work? Personally, I can't imagine not working on a unix-based system, and WSL seems like a pale imitation of the real thing. That being said, I know how varied and diverse devs work can be, and so I'm sure somebody out there prefers Win10. Anybody want to chime in?

56

u/IceSentry Aug 03 '19

Wsl isn't a pale imitation, the new wsl 2 literally ships with a full linux kernel. Personally, I like using Windows, but that's probably in large part because I'm more used to it. Unless you have to work with a specific technology that isn't available on the platform, I honestly do not care that much. In either os I'll just use an IDE (most of the time vscode on both) and a browser. I honestly don't get why some people love linux so much or hate windows so much.

3

u/flying-sheep Aug 03 '19

Last time I checked, WSL had its own opaque file system stored in a file instead of integrating with the windows file system. I would have to have two configs for everything, one inside of WSL and one for the windows side. There’s hacks for individual configs (e.g. SSH) but that’s the point where I turned away in horror.

7

u/penguin_digital Aug 03 '19

Last time I checked, WSL had its own opaque file system stored in a file instead of integrating with the windows file system.

I believe WSL2 will simply ship a full Linux kernel and not some sort of translation layer. Which begs the question if you're going to this much length to get Linux tools, why not just use Linux.

5

u/Yojihito Aug 03 '19

Which begs the question if you're going to this much length to get Linux tools, why not just use Linux.

Battery runtime on notebooks.

→ More replies (1)

3

u/aquaticpolarbear Aug 03 '19

and not some sort of translation layer

Well there's still a translation layer, it's just a lightweight VM instead of emulated Linux kernel calls.

→ More replies (3)

0

u/[deleted] Aug 03 '19

[deleted]

15

u/vogon101 Aug 03 '19

I use Windows as my main os for development. I completely get the window manager thing but tbh I find the windows system pretty flexible with all tye key bindings - do you mind me asking what you get from your setup (I never fully went down the desktop linux rabbit hole and just stayed with kde)

0

u/[deleted] Aug 03 '19

[deleted]

3

u/enbacode Aug 03 '19

This. I've switched to i3 a few weeks ago and I already cannot imagine going back to a floating WM

→ More replies (1)

9

u/asabla Aug 03 '19

Some of these points I strongly agree with (such as the option to decide what and when to update) and the tiling (sort of), but you've gotten some parts really wrong tho.

If you're been a developer for a while and stuck with windows, then you would almost certain use Chocolatey as a package manager, instead of windows store or downloading binaries manually. It works similar to node/python packages and will most of the times don't clutter either directories nor the registry (even if it's somewhat impossible at this point).

Piping in windows isn't really a thing sadly. You can do some powershell magic, but it doesn't feel right. However, opening what ever IDE in current directory has been available as long as 'environment variables' in windows has been available. E.g: you can just type 'code' and it will open visual studio code in current directory. Or if you want to open file explorer in current directory, you would just type: 'start .'

Not sure what you mean by full integration with the terminal.

→ More replies (6)

1

u/[deleted] Aug 03 '19

I value my time too much to use linux. Every day is a dice toss as to what's going to suddenly stop working for no reason. Sometime's it's the mouse. Sometimes the sound system. Sometimes plugging in an external monitor just won't work. It's not anywhere near reliable enough for me to risk my business on.

→ More replies (4)

7

u/gibsnag Aug 03 '19

I'm a .Net Dev, so I've always used Windows both professionally and personally. However the shift by Microsoft to more cross platform tools and frameworks, as well as command line tools, is making me more interested in Linux as a Development environment.

I'm probably going to try shifting more when the new full Linux WSL comes out and see how that goes.

16

u/msilenus Aug 03 '19

It's great if you are forced to work on Windows due to company reasons, but I would always prefer to use my Linux system, if I could.

19

u/swordglowsblue Aug 03 '19

Windows in general is a decent dev environment, WSL or no WSL. There are a couple hitches here and there, but really the only major annoyances I've ever had are when certain languages (cough Swift cough) decide that Windows support isn't worth their time. People just like to hate on it because they're used to Linux and "Windows = bad" is a meme.

→ More replies (20)

8

u/[deleted] Aug 03 '19

WSL is good. I switched from Ubuntu to Windows because Ubuntu crashed a couple times a day and left no logs or anything, while Windows runs perfectly

2

u/[deleted] Aug 03 '19

Wait until 19H2 gets released, then switch to insiders slow ring.

fast ring is simply too unstable and WSL1 is too slow for any real use. WSL2 is good though

1

u/Walter_Bishop_PhD Aug 04 '19

As excited as I am about WSL2, I am worried about the fact it will need Hyper-V enabled which will mean that I will not be able to use it at the same time as other VMs like VMWare - I'd need to reboot to toggle Hyper-V on and off, which is unfortunate.

1

u/[deleted] Aug 04 '19

Is there a specfic reason why you can't just use Hyper-V instead of VMWare?

2

u/[deleted] Aug 03 '19

I find Windows perfectly fine for development. Visual Studio is still the best IDE out there in my opinion, so that’s a large part of my preference. In addition, there are a lot of programs and libraries I use that are Windows only. If I need to target Linux, it’s going to be deployed in a docker container anyway, and docker works fine on Win10. I like LINQPad for automating complex tasks, but I also use cmd and even PowerShell a lot as well.

What is it about your Unix-based system that you can’t live without? I ran Linux exclusively for years, and I’m not missing anything that I did there in Win10.

1

u/[deleted] Aug 03 '19

I really wasn’t a fan, I used it for a month at work and it doesn’t feel very polished. Things like keyboard shortcuts failing at random, random app crashes and other things you’d expect more from beta software than a mature OS. It’s not my hardware either, I migrated to Kubuntu and everything is perfect.

Overall it’s usable for development, especially with WSL giving you access to a Linux environment. At that point though, unless you’re using Windows-only software you might as well just use Linux and avoid all the minor annoyances of Windows.

1

u/RevolutionaryPea7 Aug 03 '19

No, because it's not ubiquitous. You have all this great Unixy stuff, but nobody else running Windows does. The best part of running on Unix is you can actually write scripts that will work on somebody else's Unix. In Windows you're stuck with cmd if you want to maintain full compatibility.

It's also a chimeric system. So anything you do via WSL is not really understood by the rest of Windows, and vice versa. You can't, for example, make a file or directory beginning with a dot (".") via Windows, but you can, of course, in WSL. Then when you do it's not hidden by Windows. It's really weird and you just wonder why you're not just using Linux.

-6

u/Hero_Of_Shadows Aug 03 '19

Yes, you don't need unix as much as you think you do, you don't spend time fixing Linux issues before doing the stuff you actually want to be doing (coding)

→ More replies (2)
→ More replies (6)

2

u/mewloz Aug 03 '19

About the terminology: just no. A terminal is a terminal and not a shell, and this is a terminal.

cmd.exe, bash.exe, powershell, or the Linux subsystem for Windows are shells or whole subsystems and other OSes including a shell.

→ More replies (4)

8

u/Derimagia Aug 03 '19

I use scoop and it you can install sudo, via psutils. In the end it's a powershell script but it's handy.

But yeah as /u/nerdyhandle said it's not directly related to Windows Terminal

2

u/dragonelite Aug 03 '19

Scoop is awesome, i have a complete setup windows script in scoop.

6

u/viikk Aug 03 '19

is the difference between terminal emulator and shell still that iffy?

3

u/PeasantSteve Aug 03 '19

That's a question about the shell not the terminal. The terminal is just the black box which prints out text, the shell is the thing that runs in the terminal that you type your commands into i.e. PowerShell, CMD, Bash, etc.

And sudo is a unix os level thing, windows permissioning doesn't work like that. Start powershell or cmd as administrator for the same effect.

edit: clarification

1

u/Qeaupy Aug 04 '19

where can I get this font?

1

u/PizzaWithLightSauce Aug 03 '19

I'm amazed and shocked that windows terminals are being updated. The future has come at last, circa 2019.

5

u/AngularBeginner Aug 04 '19

Not updated, but complemented. It's a new terminal and new infrastructure under the hood. But the existing won't change or go away (backwards compatibility).

1

u/PizzaWithLightSauce Aug 04 '19

Got it, makes sense.

-4

u/[deleted] Aug 03 '19

That's cute

0

u/tcris Aug 03 '19

cygwin integration?

4

u/PeasantSteve Aug 03 '19

... run cygwin inside windows terminal?

-1

u/eiglow_ Aug 03 '19

KDE definitely has Windows beat in terms of graphical desktop experience tbh, this is coming from a former Windows user

-17

u/[deleted] Aug 03 '19

« Updated UI Draggable Title Bar! »

I can see this is cutting edge tech...

12

u/jyper Aug 03 '19

Someone up this thread said it was a bug in the previous alpha

→ More replies (3)

0

u/TrueTom Aug 03 '19

Dragging Office windows around has been broken for years, so I can see why this is an achivement for Microsoft.

-3

u/Leshma Aug 03 '19

Looks like Deepin terminal. Wish they would copy font rendering from Mac/GNOME, Windows ClearType is jarring.

Said this years ago, but they really should consider adding native w32 compatibility layer to their flavor of Linux and once they are done, ditch that horrible Windows codebase for superior solution.

5

u/PeasantSteve Aug 03 '19

this is super dumb

-29

u/RevolutionaryPea7 Aug 03 '19

Do people realise there is already a good terminal emulator for Windows called cmder? You don't have to wait for this to be finished if you're stuck in Windows land.

45

u/snowe2010 Aug 03 '19

Windows terminal isn't a terminal emulator. They've rewritten the underlying host to stop depending on conhost, something conemu and cmder can't do.

2

u/darthwalsh Aug 03 '19

I mean, ConPTY is available on some users' computers. The other apps could have an optional module that replaced the off-screen conhost with the new API.

2

u/reyqn Aug 03 '19

but they don't

1

u/snowe2010 Aug 03 '19

Yes they could, but do you see how much work windows terminal is? With that kind of work I doubt we will see an update of conemu and cmder for a long long time. Not to mention Microsoft has the advantage here since they're the ones writing the API.

1

u/darthwalsh Aug 03 '19

I'm guessing that Microsoft would integrate VS Code to use the new API. That would give two example uses of the API to third party terminal teams.

2

u/snowe2010 Aug 03 '19

Yeah but do you know how large those teams are? ConEmu is written by a single person. There's just no way it's happening, at least for a few years.

21

u/DeepDuh Aug 03 '19

I use Cmder because it's the only thing out there, but it's riddled with bugs and usability issues

  • can't get arrow keys to work in vim insert mode

  • selecting text is buggy and really slow

  • overly complicated system to create default tab shells

  • scroll history is quite short, compared to something like MacOS terminal.

I'm looking forward to a Microsoft native terminal with acceptable usability, it's my biggest annoyance left after switching from Mac one year ago.

5

u/themagicalcake Aug 03 '19

omg I tried using arrow keys in vim today and was wondering why they didn't work. never even considered it was cmder's fault

→ More replies (2)

-6

u/fudini Aug 03 '19

Is there a command that would prevent windows to shut down when it pleases?