Figured out how to get the X day of the week in #powershell recently. I needed to know what the 1st,2nd,3rd, etc Friday of the month is, and proceed accordingly.
You can also easily find what the 2nd Tuesday of the month is as well! Options are endless.
I think in PowerShell and can manage in Python. I want to learn Rust to the degree I can write in it directly, rather than prototyping in PowerShell and then converting.
A lot of what I do is data manipulation and analysis. (Take several CSV files as input, and output new CSV files that answer business questions based on the inputs.) I'm seriously impressed with Rust's performance here.
If you've made this transition, advice on where to begin?
I use PowerShell, BTW.
petition to make this the new high scosiety sentence, like the using arch btw one.
You just have to admit, PowerShell is way supririour (hu) to Bash and it's wrappers,
and people who have realized that and moved to using PS (on linux) are just better and smarter.
I'm gonna add a digital signiture to all my messages "I use PowerShell, BTE" regardless of context, destination, and if I really used powershell to send this message. #PowerShell#IusePowerShellBTW
I guess that's progress ... some #PowerShell on #FreeBSD at least starting up. Creating a #port out of this will be a lot of work 😞 had to patch quite some code, e.g. completely disable the "login shell" functionality, the implementations only work on either #Linux or #MacOS....
And the whole build system fails completely if not built from within a #git working copy ... WTF? This will be another challenge for porting.
Ah, this messy version is probably a result of the mess in the upstream repo, a tag v7.4.1 exists, but refers to a commit that is gone.
Well, I can certainly build #PowerShell for #FreeBSD now. I might be able to just "fake" a #git working copy for its stupid build system. This still doesn't fully solve the version issue, it insists on appending the git hash -> TODO.
The "login shell" feature can be added, an exercise left for later, the code will look pretty similar to the existing MacOS-X implementation. Maybe upstream would even accept it 😎
For a #port, it should probably be "published" as "#ReadyToRun" (I hope this has no negative impact), otherwise lang/dotnet would become a hard run dependency ... This works now as well, but requires changes in lang/dotnet ... requires some platform-specific #NuGet packages that don't exist on MS servers for FreeBSD. They are created during build of dotnet itself, but not installed anywhere by default ... I'll suggest an "on by default" port option to bundle these with lang/dotnet.
And now, "staging" and packaging for #FreeBSD works as well 😎
But this is just the "base" #Powershell with no bundled modules. Next step, find out how to build and bundle some "essential" Modules, e.g. #PSResourceGet and/or #PowerShellGet (for Install-Module), and #PSReadLine (for sane commandline editing and stuff) ... any more that absolutely NEED to be bundled? 🤔
I need some help with #powershell where we need to export some #json values all as strings. So the numbers we have in the object need to be strings, but only are exported as integers.
One-Ljner Wednesday! What is your current favorite #PowerShell one-liner? Bonus points for one-liners that would be helpful to someone getting into PowerShell