Background: I’m a Windows user. I now use a Mac for work. I’m going to document the differences as I run into them.
First up: launching multiple instances of an app.
I was doing 3d modeling work in Blender on macOS. I have a CAD model of a vehicle (model A). I used Blender to reduce the complexity of the model (model B). Now that I’m done with model B, I want to compare model A to model B.
I have model B loaded in Blender. Now I want to load model A in a second instance of Blender. How do you do that?
Windows
There are several ways I can think of to do this on Windows
Right-click the Blender icon in the taskbar and select “Blender”
Middle-click the Blender icon
Click “Start” and select Blender
Click “Search” and type “Blender” [Enter]
macOS
I tried right-clicking the Blender icon in the Dock and selecting Blender, but it just brings up the existing Blender.
I tried middle-clicking, and playing around with modifier keys. Nothing worked.
I searched the internet and found a post that said it was possible to launch a second copy of an app…but you had to do it from the command line.
These commands allow you to create points, vectors, and matrices. You can manipulate points and vectors by multiplying them by matrices. You can view the primitives in 3D by piping (‘|’) the output to the command ‘Out-3d.’
Simple DDD example
Here is a simple example. Create a point at 1, 1, 1 and display it in 3D.
New-Point 1 1 1 | Out-3d
In the 3D view, you can rotate with the mouse, keyboard (WASD or arrow keys), or touch gestures. Press Esc to exit.
Installation
DDD has a single requirement: PowerShell 7 or higher. In the near future, PowerShell 7 will be built into Windows 10. For now, you have to add it to your system.
NOTE: Even though DDD will work on any platform supported by PowerShell 7, I have not yet created a version of Out-3d that works on Mac or Linux. I plan on working on that next.
Demos
Once you have PowerShell 7 installed, you can copy and paste these demos into the PowerShell 7 console to run the scripts. You can modify these scripts and see what results you get. If you come up with your own creation, please share it with me via me@davidlenihan.com.
Let me know what you think. I want this to be a solid product, so if you have any problems, please let me know. Post in the comments or send me an email: me@davidlenihan.com.
11/12/2020 Updates
Added “-Repository PSGallery” to Install-Module in examples. Without this, examples will fail for users that already have a default repository setup that is not PSGallery. Thanks Craig!
Updated PowerShell installation instructions for Windows 10 to use Microsoft Store
I loved Escape from New York as a kid. It was the first R-rated movie I ever saw. I own it on Blu-ray and decided to re-watch it.
The opening sequence describes the situation with an uncredited narration by Jamie Lee Curtis…
In 1988 the crime rate in the United States rises 400%. The once great city of New York becomes the one maximum security prison for the entire country. A 50-foot containment wall is erected along the New Jersey shoreline across the Harlem River and down along the Brooklyn shoreline. It completely surrounds Manhattan Island. All bridges and waterways are mined. The United States police force, like an army, is encamped around the island. There are no guards inside the prison, only prisoners and the worlds they have made. The rules are simple: once you go in, you don’t come out.
It doesn’t sound so far fetched anymore: create a place for people that do not want police.
I love John Carpenter’s synth soundtrack. Opening track here.
I did not know there was an alternate opening to the movie. This opening shows Snake getting busted for robbing the Bank of the United States…the crime that sent him to New York Maximum Security Prison. You can see that they have created “USART,” a subway that covers all of the USA (looks like it is the BART station in Berkeley to me). I like the original opening better with the focus on New York as a prison.
I watched the credits and noticed something new to me: James Cameron (Terminator, Aliens, Titanic) is listed as doing special effects and matte artwork.
I loved this show. It is really well done. Season three really got to me. Highly recommended. I put it up there with Breaking Bad as one of the greatest TV series of all time.
Dead to Me Season 2 (Netflix)
I really liked the first season. Season 2 was not as good, but still worth watching. The characters (Christina Applegate and Linda Cartdellini) are still fun to watch.
The Wrong Missy (Netflix)
This movie is dumb. But I have to admit I laughed out loud several times. Looking at the trailer, I thought Lauren Lapkus was trying too hard. After watching the movie, I thought she was hilarious. She makes this movie work.
I used WinSCP to download my old blog to my computer.
I ran this PowerShell script to update all the links to the new location (/ORIGINAL_davidlenihan.com) ls *.html,*.xml -r -files | %{(gc $_ -Raw) -replace 'davidlenihan\.com','davidlenihan.com/ORIGINAL_davidlenihan.com' | Set-Content $_}
I used Adobe Media Encoder to convert all .wmv, . mov, and .mpg to .mp4 that can play in modern browsers.
I ran this PowerShell script to change all references to videos to .mp4 ls *.html -file -r | %{(gc $_ -Raw) -replace '(?<url>\"http://(www\.|)davidlenihan\.com/[^ ]*)\.(wmv|mov|mpg)\"', '${url}.mp4"' | Set-Content $_}
I used WinSCP to upload the updated blog contents to the new location on the web server
This blog post was originally posted April 9, 2006. My old Moveable Type blog has been replaced with a new WordPress blog. In updating to the new blog, all my old posts ‘went away.’ I will periodically bring back some of them so they can live again. I had to update this post because many of the links no longer work and the JavaScript code did not work correctly with Chrome.
David
For Christmas 2000, I thought it would be a nice gift to give my family their own domains. I wanted my family to actually set up their own home pages, but I knew they probably would not. So I decided to give them a little incentive…I setup *very* annoying home pages for each of them based on the internet classic hamster dance.
Here are the original home pages, safely archived on my web site:
Of the original 4 web sites I setup, only my brother has kept his domain, but removed the “bro dance” home page. My Dad, Mom, and Joe let their domains expire and no longer own them.
Plandemic is a 24 minute “preview” of an upcoming documentary. Good luck trying to find it. Google, Facebook , YouTube, Vimeo, and Twitter have all decided you should not see the video. The video is gone. The thing you will find instead is lots of websites, articles, and videos telling you why Plandemic is wrong.
Any time someone tells me I cannot watch something….that is what I want to watch.
I “attended” the virtual Microsoft Build conference this week. Here is what I found interesting.
MakeCode Arcade
I had no idea anything like this existed. MakeCode Arcade is a website that lets you build old school 8-bit video games using blocks. In the above image, the game is running on a simulator on the left. In the middle is a list blocks you can use to build your game. On the right is where you connect your blocks to create your game.
This is a fantastic way to learn how to program. Blocks include…
Sprites (graphics)
Controller (input)
Game (game loop)
Music (audio)
Scene (background)
Info (score, player lives, timers)
Loops (for, for each, while)
Logic (if/then/else, comparisons, Boolean)
Variables
Math (basic math, random numbers, clamping, rounding)
Images
Functions
Arrays
Text (string operations)
Console (log file)
Here is the part that puts it over the top… Once you have your game ready, you can download it to standalone hardware and play your game without a computer.
The example above is called “Meowbit” and it goes for $40. There are other options listed under hardware on this page.
I know this is for kids, but I’d love to spend some time playing with this.
Windows now has a package manager called “winget.” This means you can easily setup a box to have all the apps you want by running a script. Eventually winget will be part of Windows. You can try it out now from here: https://github.com/microsoft/winget-cli/releases
Not all the apps I want are there yet, but many are. They are adding more apps quickly.
Here is the current list of supported apps as of today (5/21/2020):
The idea behind Codespaces is great: one click on the upcoming “Codespaces” button in a GitHub repo and get a VS Code editor running in a browser with everything configured and ready to go for development and debugging. The Codespace VM can also run in Visual Studio 2019 or VS Code.
Windows Virtual Desktop (WVD) lets you package up an app and run it with the OS and hardware it needs in the cloud. Users can access it on their desktop as if it was locally installed. It can be used for running 3d apps like Maya, 3ds Max on underpowered machines.
WinUI 3 is the latest/greatest UI toolkit for Windows. What is new is that it is decoupled from the OS so that you can use the latest UI controls with older OS’s. Also new, is this toolkit can be used by UWP, WPF, Windows Forms, and MFC. The idea is every Windows app should be able to access the latest UI components.
.NET MAUI (Multi-platform App UI) is Microsoft’s solution for cross platform UI development. This is going to replace Xamarin.Forms. Microsoft will support macOS, Windows, Android, and iOS. The “community” is supporting Linux as they have for Xamarin.Forms.
I was confused. I knew “Fluent” was Microsoft’s UI design language. When I heard about “Fluid,” I thought it was the same thing because it is about UI and it is a similar word.
It isn’t the same thing. Fluid is about making web apps that support collaboration. Microsoft will use it in Office (Word, Excel, PowerPoint, etc.). It is open source.
Rust is now a supported language for building system software (ie building OS’s). It is considered a safer language to use than C or C++, yet still has speed and predictable performance.
The 1.0 version of Windows Terminal was released. There is a lot to like. It is missing one feature that I use all the time: using Ctrl+Space in PowerShell to see parameters and the options for parameters. There is a bug report for this and it sounds like it is not a quick fix, so I may be waiting for a while before I switch to Windows Terminal.
NVIDIA put out an impressive demo at GTC 2020 (GPU Technology Conference) last week.
It is called “Marbles RTX.” It is a game that looks photorealistic because it uses ray tracing. Ray tracing has traditionally been used in movies, but was too slow to use in a game.
Not anymore. Check out this 3 minute video of Marbles RTX…
This game is clearly inspired by the 1984 arcade game Marble Madness. I loved that game. It had a unique 3D look and TRON-esque soundtrack. Here is a 4 minute video of someone playing from start to finish. I had never seen the later levels before.