James Brundage | MVP
@mrpowershell.com
1.5K followers 440 following 2.5K posts
Jack of all Trades, Master of PowerShell. Prolific Programmer Microsoft MVP in Azure / PowerShell https://mrpowershell.com/ https://github.com/StartAutomating https://github.com/PowerShellWeb NB, Neurodivergent, Nerdy, Newsjunkie. Ask me anything.
Posts Media Videos Starter Packs
Just a bit of #Fibonacci #Friday #Fun #Math #PowerShell

Here's a _really_ fast Fibonacci Sequence generator.

It gets me the first 1024 numbers in around ([TimeSpan]'00:00:00.0002212') seconds.

On a #RaspberryPi 😉😎

gist.github.com/StartAutomat...

Enjoy!
Gist a fast Fibonacci
Gist a fast Fibonacci. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
I believe everyone needs to share their knowledge:

You can't take it with you, and hoarding your knowledge hurts the human race.
💯

I helped build a language ( #PowerShell ), and I am still _constantly_ having to double-check a thing.

Just because I know a language like the back of my hand doesn't mean I know _everything_ about it.

Even if you make languages, you'll be constantly surprised by them.
For nerdy reference / understanding...

STL is basically a series of triangles. There are two "unfortunate" parts of this.

1. It repeats intersecting coordinates
2. It does not make the vertices clear

So 3MF uses less space, and is more clear to read.
#TodayILearned #TIL that .3mf files are just a .zip file in a trenchcoat.

This one I like 😉

A .3mf file is "mostly" just a compressed #XML file representing the model.

It mainly contains the vertices and triangles between them.

Very simple and easier to understand than STL. 😀

#3DPrinting
Exactly what I mean.

en.wikipedia.org/wiki/Open_Pa...

(wrote an OpenXML module the other day, and seeing what else in this area might be useful)
Open Packaging Conventions - Wikipedia
en.wikipedia.org
Yep, and I'm just trying to encourage and hopefully steer anyone away from the rocks.

Some things in tech are easy.

Lots of things in tech are an endless rabbit hole to wonderland, and it helps to have a friend holding a rope to the real world.
Yeah, I feel like a bunch of that list is "I use this most weeks", and the rest of that list is "what file format is this and does anyone actually use it nowadays?"

(hence asking the internets)
Today I learned that #PowerBI files (*.pbix, *.pbit) are zip files in a trenchcoat.

😀

Sadly, I also learned that they are (mostly) full of byte[]s

🤔😞

Any PowerBI geeks know how I might decode those bytes?
Hey #PowerShell people:

How many of these file formats do you use? Which ones?

en.wikipedia.org/wiki/Open_Pa...

Thinking about making a module for Open Packaging.
Open Packaging Conventions - Wikipedia
en.wikipedia.org
Yeah, I wasn't suggesting copy/paste.

I was suggesting looking at the techniques being used.

And I'm serious about the compliment.

Learning to dev is all about minmaxing pain of implementation vs gain of functionality.

And it's an endless process.

You're getting better.

Keep at it!
To highlight a compliment:

I think that GUST is the most useful tool I've seen from you yet.

Part of why is that it builds upon existing technology (git), to do something that's of everyday use (simplifying interactivity).

It's not reinventing the wheel.... it's improving it's traction.
One should always be open to inspiration, wherever you find it.

And one should always look at similar tools, even if you've made your own, just to understand differences in approach and technique.

Also, since I put stuff out as MIT, you can probably grab functionality it has that you don't yet.
Ok, I added a new entry to the party yesterday.

Can crack open Word, Excel, and PowerPoint.

Can get cells from all worksheets.

Doing more is gonna require more work on the module.

So now is the time to call out what you want, _exactly_.

github.com/PowerShellWe...
GitHub - PowerShellWeb/OpenXML: Automate OpenXML with PowerShell
Automate OpenXML with PowerShell. Contribute to PowerShellWeb/OpenXML development by creating an account on GitHub.
github.com
Kinda crazy to note, but `[DateTime]::MaxValue.Year -eq 9999`

Makes me wonder why they switched.

We could represent any StarDate in a `[DateTime]`, if they were consistent enough to calculate (hint, hint @mdowst.dowst.dev )
Honestly efficient grayscaling is pretty friggin useful. Essentially it gives you just a luma channel to work with and it can make all the matrix math for edges easier to compute.

Got a link?

Do wonder how much smaller / more scalable it might be as a vector...
Comparing and contrasting:

A "server" OS tends to not give this gift, based off of two ideas:

1. Requests should generally be of equal priority.
2. Almost nobody watches server GUIs

This is why for ~50% of computing history it's been apples and oranges.
The only other major difference between GUIs and shells is an OS decision to prioritize the currently focused process. Thread priorities for it get slightly bumped.

This is sometimes called "the gift of user focus".

Fun fact: lacking this is what made Vista so slow.
Yeah, a lot of early GUI devs fled the CLI as soon as they could (on Mac and Windows).

This is a little sad, as it let a lot of people forget how things work.

Did deep enough, and both Windows and MacOS call themselves "shells" (as in for a cli).
Thank you!

I just wish most programs gave equal weight to the CLI / UI scenarios, and focused more on usable data structures and interoperability.

Sadly, they mostly don't (on both Windows and Linux).

In ye olden days of #PowerShell, @jsnover.com called this the "30 year hole".

(it's now 50)