Scott Hanselman

dotnet repl

June 10, 2021 Comment on this post [7] Posted in Learning .NET
Sponsored By

Go get .NET 5 for Windows, Mac, or Linux, over at https://dotnet.microsoft.com/

Then install Jon Sequeria's "dotnet repl" with this one line global tool install:

dotnet tool install --global dotnet-repl 

Then just type dotnet repl at the command line. Use the Windows Terminal ideally. That will drop you here!

.NET REPL

With .NET Interactive/.NET Notebooks at the heart, consider this command-line experimental REPL (Read Evaluate Print Loop) to be a text-based notebook!

Start typing! If you make a mistake and press enter, type Ctrl-UpArrow to bring that line down to try again.

for looping over fruit

You can even add NuGet packages with #r "nuget:YourPackage"

Rendering ANSI pictures in .NET REPL

Go learn more and give feedback at https://github.com/jonsequitur/dotnet-repl. You can even run .NET Notebooks with this, as a script! This REPL supports #F and C#. Love it.


Sponsor: Extend your runway and expand your reach. Oracle for Startups delivers enterprise cloud at a startup price tag with free cloud credits to help you reel in the big fish—confidently. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

The quiet rise of E Ink Tablets and Infinite Paper Note Takers - reMarkable 2 vs Onyx Boox Note Air

June 08, 2021 Comment on this post [15] Posted in Reviews
Sponsored By

Onyx Boox Note AirThere's something happening in the E Ink space, somewhat quietly, but consistently. It's going to be interesting to see if it's a fad or if E Ink tablets are here to stay. I love my Amazon Kindle and I love its E Ink display. I'd say 90% of my reading in the last 5 years has been on a Kindle with E Ink. They are bright in direct sunlight, and the newer ones have color temperature settings. The starter Kindle is about $90 and you'll often find sales.

For mostly static content like books or magazines, E Ink is an amazing paper-like technology. We seem to be putting a huge amount of technology and work into creating displays to replace paper. First the look, and most recently the feel of writing on paper. These one page digital devices promise to act as Infinite Paper.

E Ink is easier on the eyes than OLED and iPads and the like. How does it work? The simple explanation is that there's tiny capsules of negatively charged black pigment and positively charged white pigment. We can apply negative or positive charge and the black or the white pigments will jump to the top. It's kind of like an Etch a Sketch, except with electricity rather than a surface covered in aluminum powder. These displays are as close to paper as you can get, today, digitally.

This week I did a LIVE Review of three really interesting "E Ink" tablets on my YouTube.

  • The reMarkable 2 - This is the second-gen reMarkable. It's a dedicated and distraction-free note taker. It has no browser, no apps to speak of, but an enthusiastic community of hackers and 3rd party projects. This device is NOT an iPad and if your first thought is, "but I have an iPad" then this isn't for you. However, if you like Moleskine notebooks and have filled many a year and your shelves are filled with many years' worth, then take a good look. This 10.3 inch unlit screen is the best device for taking notes, reading PDFs, and...taking notes. It's incredibly well built, feels high quality, is light but substantial, it doesn't warp or feel cheap. If you pair it with a their Marker Plus that includes an eraser, the feeling is top notch. It has a great Desktop App that also has a Beta "Live View" feature where you can share your screen in Teams or Zoom and see what you're writing on your reMarkable. There's so much potential here if they'd open up the APIs and integrate into things like OneNote, Teams, etc. I'd love to see someone be able to connect two of these and write as a shared whiteboard!
    -  One small downer, I did drop a Marker and it landed just right and broke off not just the tip (no big deal, it comes with a dozen replacements) but also the tiny hole the tip goes into (not replaceable). So, treat the pens with reverence.
  • Onyx Boox Note Air - This could pass for the reMarkable from a distance, but it's actually an Android 10 devices that can have Google Play added. Also 10.3" and E Ink but adds a backlight, this hybrid device is a note taker and PDF viewer until you are suddenly installing Microsoft Office or Netflix. The surreal part is that what the device thinks its displaying doesn't always jive with what is being displayed. For example, it's a black and white device, so some shading and subtleties are lost...but they are there, in video memory. That means you can easily share this Android Device's screen to your TV or monitor and it's...Android! There is some ghosting which is a feature, not a bug, but the Onyx Boox Note Air has a surprisingly large array of basically "ghosting display choices" that allow you to select the right balance between ghosting and eventual consistency. It takes a moment to figure out but it's quite good when dialed in. Combine the Note Air with a Bluetooth Keyboard and you've got an E Ink Word Processor. If you have $500 and can't decide between a reMarkable and a Boox Note Air, it comes down to the fact that the Note Air is Android. You're getting more functionality, if slightly less software policy. As a note taker, the polish of the reMarkable 2 is the winner. But the Note Air is the best general purpose E Ink Tablet.
    • Boox Nova3 ColorOnyx Boox Nova3 Color - This device is just 7.8" but has a color Kaleido Plus E Ink screen. COLOR E Ink is really something to see. Do check out my video review on YouTube - here's a link right to the color parts. It's not a rich deep marker type color, it's a muted older comic book type color...but it works. It adds something, and reading comics on it in Comixology is magical, albeit with some ghosting. This device is also Android so consider it a 2 inch smaller version of the Note Air. It's the "color iPad Mini" to the Note Air's "black and white iPad Pro."

reMarkable 2

Later this month I'll take a look at Supernote which already has a enthusiastic community and promises to have a rich API for 3rd parties to explore and expand.

E Ink and "E Paper" are becoming more prominent on sites like Kickstarter and IndieGogo. This India-based company called paperd.ink is creating a low power E-paper development board. The rise of inexpensive E-paper/E Ink displays along with ESP32s with WiFi is creating tiny low power computers that blur the user's perception of what a Microcontroller can do.

What are your thoughts and opinions about E Ink? Will your next tablet be an E Ink display?

I often use Amazon Affiliate links and you're helping this blog when you use them, thanks!


Sponsor: Extend your runway and expand your reach. Oracle for Startups delivers enterprise cloud at a startup price tag with free cloud credits to help you reel in the big fish—confidently. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Watch the BUILD 2021 Application Development Keynote

May 27, 2021 Comment on this post [4] Posted in Musings
Sponsored By

We had a great time at the BUILD 2021 conference this year. My team and I worked really hard to put together a great Application Development Keynote and I think we did it in a way that might surprise you. Check it out!

There has never been a time where developers had more access to tools and services to be more productive. Join Scott Hanselman and some of his friends show all the innovative ways for developers to be successful.

  • 00:00 - Application Development with Scott Hanselman & Friends Keynote
  • 00:10 - Full video of Scott's trip to Seattle is here on TikTok: https://vm.tiktok.com/ZMeGvytrE/
  • 02:40 - To learn more about the Surface Hub 2S for business, go here
  • 04:40 - You can now set Windows Terminal as the default prompt. Learn more here
  • 05:30 - Want to learn more about the new Windows Package Manager? Check out the docs here
  • 06:35 - Visual Studio 2019 offers deep integration to your Git Repos, learn more here
  • 10:50 - You can easily apply multiple repeated edits to your codebase in Visual Studio 2019 using IntelliCode. Check out the link for more information
  • 12:00 - Blizzard builds and debugs production issues in Diablo IV using Visual Studio 2019 and Windows Subsystem for Linux. To learn more about this great partnership, go here
  • 13:30 - To learn more about about what's new in Windows 10, check out the Build session in the catalog
  • 16:00 - .NET 6 Preview 4 is out and it has some great features for developers to check out. Learn more here
  • 18:25 - The Visual Studio team is working on making the next version even better, including making it 64-bit. Read this blog post to learn more
  • 25:05 - To learn more about GitHub Codespaces, visit the docuementation here
  • 26:30 - The new Python Language Server "Pylance" is now stable, learn more about it here
  • 27:20 - Build amazing IoT solutions with Pylance and Visual Studio Code on LumiCube: https://www.abstractfoundry.com/
  • 32:00 - Window Swap is a great example of building fun apps using Visual Studio Code: https://www.window-swap.com/

Starring:

Enjoy!


Sponsor: Build your apps where your customers are. Oracle for Startups delivers enterprise cloud with no lock-in so you can go after any customer—confidently. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Running Microsoft Edge on Linux with WSLg while running Visual Studio 2019 and debugging a Linux .NET app with WSL on Windows 10

May 25, 2021 Comment on this post [2] Posted in VS2019
Sponsored By

How about that insane blog title?

You can do lots of cool things with WSLg, which allows you to seamlessly and cleanly run Linux apps on Windows. I've written about this before.

And you know that you've been able to run Linux server apps on Windows for a long time. There's even support in VS Code and VS2019 to debug those apps.

But how far can we take this? What about Debugging a .NET web app running under Linux while running Visual Studio 2019 for Windows and accessing that web app via a Linux Browser?

Why? Why the heck not? Seriously though, because choice and flexibility. If this solution isn't interesting to you, then perhaps you don't have this problem. But if you do have this problem, then here's the solution. Welcome!

Prerequisites

At some point soon, WSL and WSLg will be a part of the mainline of Windows, but at the time of this writing they are inside Windows 10 Insiders 21362+. Follow the instructions here to setup WSL2 and WSLg. This assume you're running a distro like Ubuntu.

Then add a browser like Edge for Linux or Chrome for Linux as below.

## Google Chrome
cd /tmp
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt install --fix-broken -y
sudo dpkg -i google-chrome-stable_current_amd64.deb

## Microsoft Edge Browser
sudo curl https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/microsoft-edge-dev_91.0.852.0-1_amd64.deb -o /tmp/edge.deb
sudo apt install /tmp/edge.deb -y

You'll know they are working and installed when the Linux GUI apps show up in the Windows Start Menu.

Ubuntu GUI Apps

Adding a Linux Browser to Windows Visual Studio 2019

Open up Visual Studio 2019, and either open up or create a Web Application. From Debug button there's a dropdown (chevron) where you access this menu:

Browse With

Select "Browse With..."

From the Browse With dialog, you're going to add a new Browser, selecting "C:\Windows\System32\wslg.exe" as the Program and "~ -d Ubuntu /usr/bin/microsoft-edge-dev" as the Arguments. Ignore any errors.

Browse With, adding a Browser

You should see the new Browser inside Visual Studio 2019 now and can select it like any other browser.

Microsoft Edge under WSLg under Ubuntu

Boom. Here I am running my Podcast website under Linux on .NET 5 on the server-side AND on the client-side in the Edge Browser as a Linux GUI app!

Debugging Linux Edge GUI app under WSL2 inside Visual Studio 2019

Enjoy! And please watch the BUILD 2021 Application Development Keynote, I think you'll enjoy it.


Sponsor: Build your apps where your customers are. Oracle for Startups delivers enterprise cloud with no lock-in so you can go after any customer—confidently. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Introducing The .NET Coding Pack for VS Code - Getting Started with C# for Beginners

May 20, 2021 Comment on this post [8] Posted in Learning .NET
Sponsored By

Are you trying to learn to code? Or perhaps you're an educator or a student, or you know someone who us? Sometimes it's intimidating when you consider all the things to install and run to get started.

Well, we've created a series of all-in-one installers - coding packs - that will set you up in Python, Java, or as of today - C# and .NET!

Check out http://dot.net/learntocode and https://code.visualstudio.com/learntocode

I'm happy to announce our preview of the .NET Coding Pack. You can grab it at http://dot.net/learntocode! We have a .NET Coding Pack for Windows and a .NET Coding Pack for Mac.

When you're done installing, just press Finish and Visual Studio Code will launch into this .NET Interactive Notebook!

It's like Microsoft Word, except some of the paragraphs are words and some of the paragraphs (called "cells") are code you can run! 

Getting Started with C#

Consider this a Beta Release as we want feedback and bugs from you!

We'll be developing notebooks and courseware but more importantly YOU can also make .NET Interactive Notebooks and share them on GitHub!

Add Code Cell

You can add Markdown (text) or add Code, and then share them with your friends or students!

NOTE: If you are a pro dev and already have Visual Studio or Visual Studio Code installed, you don't need to get this coding pack. The pack installs these things, locally, as anon admin user. You can just add the ones you don't have.

  1. Install the latest Visual Studio Code.
  2. Install the latest .NET 5 SDK
  3. Install the .NET Interactive Notebooks extension from the marketplace.
  4. Download our Getting Started with C# Notebook and open it in VS Code.

Give it a try at http://dot.net/learntocode and report issues here https://github.com/dotnet/vscode-dotnet-pack

Also be sure to scroll down on http://dot.net/learntocode as there are TONS of videos and docs to help you on your journey! We have courseware and training at https://docs.microsoft.com/en-us/learn/dotnet/ and a community here to help https://dotnet.microsoft.com/platform/community.

Nearly every day we have YouTube shows with real humans talking about the things they're making with .NET! Check that out at https://dotnet.microsoft.com/live and subscribe to our YouTube https://youtube.com/dotnet.


Sponsor: Extend your runway and expand your reach. Oracle for Startups delivers enterprise cloud at a startup price tag with free cloud credits to help you reel in the big fish—confidently. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.