[-] [email protected] 2 points 3 weeks ago* (last edited 3 weeks ago)

This blog does a fairly straight-forward job on explaining the basics. For me, I learn best in an interactive 1:1 or well-constructed video, so ChatGPT was priceless. I could ask it stupid questions all day long, and after throwing some different ideas around I started to see the essential parts and just let my prior knowledge of PS, .NET, and C# WPF take it from there.

At the end of the day, all that really matters is using the PresentationFramework assembly and creating a window:

  • Add-Type -AssemblyName PresentationFramework
  • Either use Visual Studio > WPF Project and make the UI you want. Take the XAML file and use PowerShell to get the raw content:
    • $Xaml = Get-Content -Path MainWindow.xaml -Raw
    • $SanitizedXaml = $Xaml -replace "bad syntax e.g. Foreground={x:Null}" "Foreground="Transparent" # Certain XAML syntax is incompatible with PS XML
    • [xml]$XmlReader = [System.Xml.XmlNodeReader]::new($SanitizedXaml)
    • $Window = [Windows.Markup.XamlReader]::Load($XmlReader)
  • Or, use .NET-style syntax in PS directly:
  • Then show the window:
    • $Window.ShowDialog() | Out-Null
[-] [email protected] 2 points 3 weeks ago

I appreciate the feedback. For the Linux side it's for personal projects and learning opportunities so starting with something familiar and growing from there is my goal.

I dabble in C and C++ so cli isn't out of the question for me. But .NET is my comfort zone, and I like the rapid tooling that PS offers.

I have multiple reasons to dig into Python so really I just need to get on with it.

[-] [email protected] 1 points 3 weeks ago

Python is always something I intend to learn but never get around to. Does it natively handle GUI for process tooling or does it require a third party? What makes PowerShell so useful to me is the native ability to create visual applications without the need to compile. I can create tools for my company that launches right out of ConfigMgr Software Center and other technicians can contribute without needing a programming background.

At home I want to mess around with tooling for home services without having to resort to web development.

[-] [email protected] 3 points 3 weeks ago

By far it's the object pipeline. Having structured data makes it easy to automate workflows in a predictable way. With bash everything is a string, so everything has to be parsed. It's tedious.

It took about a year of steady use before I came to enjoy the syntax. It shines in a production environment with other cooks in the kitchen. I never got into the C style, I like my code human readable at a glance. It's fine if everyone's a sage but we have a team with a mixture of skill levels and for me PowerShell gets it right.

[-] [email protected] 1 points 3 weeks ago

I did install it on one of my machines but haven't dug in yet. I'm curious to see how much of my workflow will translate to Linux, yet at the same time I want to make sure I'm actually learning Linux and not using PS as a crutch.

[-] [email protected] 1 points 3 weeks ago

Thanks for the reference. I'm looking at it and I think you're right.

[-] [email protected] 15 points 3 weeks ago

After learning PowerShell and then moving to Linux and having to learn bash...I don't get this sentiment. PS is the shit. I can make full GUI applications and automate all kinds of workflows. Their use of objects makes it so easy to extract data and utilize it. Bash feels so much more primitive and clumsy by comparison. What am I missing here?

[-] [email protected] 1 points 5 months ago

I wanted to like it and I tried it over and over but I could not for the life of me get opensuse aeon or kalpa to work on my desktop when tumbleweed works perfectly. As soon as I installed the Nvidia drivers it went belly up and I couldn't find help online.

I'm still new to Linux so I'll accept that I need more experience but I can't help but feel like a degree in computer science is a recommended prereq for this stuff since there just doesn't seem to be solid documentation to get you through it.

That experience made me take microos off my server and put in proxmox instead.

[-] [email protected] 1 points 10 months ago

I could never get a whistle when exhaling no matter what I tried. It takes no effort for me to whistle while inhaling though, but the range and volume are limited this way.

[-] [email protected] 2 points 10 months ago

Because one is an app and the others are a technology standard. I can install Signal on my phone and use it to talk to people securely.

Where do I go to get XMPP or Matrix? Can I trust app makers to have correctly implemented the protocols? When it comes to security I tend to trust larger entities versus the garage startup.

[-] [email protected] 0 points 10 months ago

This might shock you to hear it, but the US is on the same rock as your country. Sorry that so little people from your spot on this marble have something to report, but it's not a US problem, is it? Unless you consider crying to be news worthy.

[-] [email protected] -2 points 10 months ago

The US is a part of the world. If most users are from the US, then their news is going to be of the US. It's unfortunate that your country is not represented here, but maybe you can help the matter by posting local news instead of cwying about others. Nobody else is going to do it for you.

view more: next ›

discusseded

joined 11 months ago