« first day (3779 days earlier)      last day (1394 days later) » 

00:02
Is it currently possible to run a C# script on a fresh install of Windows 10 without downloading any additional tools or sdks?
I'm trying to gauge the availability of running C# scripts because the advent of top-level statements in C# 9 is getting me excited
I'm ultimately trying to avoid any potential recipient from getting into a "Screw it, this isn't worth the effort of downloading and setting up all this crap to run this one measly script" situation, and being able to run it out-of-the-box would basically make that situation impossible
 
4 hours later…
04:00
@AlphaDelta Windows 10 have .NET Framework 4.6.0 installed as OS component, which is installed by default.
And, higher version of Windows10 have more higher version of .NET Framework installed
mr5
mr5
@AlphaDelta make it PWA
04:28
Does anyone know the usage of .compile and .invoke
 
1 hour later…
05:34
Good morning
@Comraid Need context on this one. .Invoke is called on an action or function to invoke it, for example. You can call an Action like myAction(); but if you want to make it null-proof you go myAction?.Invoke();.
06:29
@mr5 What do you mean? PWA just means you can locally save a working state of a webapp and it has a service worker making it updatable.
mr5
mr5
he's asking how to avoid to download additional binaries as an end user in order to run a native .NET apps
And you want him to use Blazor for that? I thought the question was about providing a script to somebody on a fresh PC.
mr5
mr5
Why not? He wants C#. Running Blazor requires browser only afaik and Windows10 comes with a default browser.
First run of the demo Blazor.
06:50
Running Blazor requires UI, which is kinda the opposite of a script.
Dev version of my Blazor app is like 7MB. Gotta activate linking to reduce it for release.
07:44
@AlphaDelta If you want to be sure, use Powershell. Definitely runs on bare Windows 10.
Real men use batch scripts.
Except Microsoft themselves said not to use CMD anymore as it only exists for compatibility reasons and is obsolete.
That small company, Microsoft? You shouldn't listen to such small plebs. Listen to me. I'm so reliable, it's almost crazy, so reliable I am. I'm the most reliablest source of information since ever. People tend to so, wow, that Deathspike. He's so reliable. I know nobody that is so reliable. Yeah, listen to me. I know everything there is to know about scripts.
Hm sounds reasonable, I believe you.
08:07
ps good
08:25
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
compile .net project to asm :D
it will run on windows
asm > wasm
OTOH do you really want to compile the whole .net framework to asm? Treeshaking could probably make it way smaller, but that would have to be implemented first.
09:36
not sure what they exactly do, but .net native is a thing
if it was horrible for size/performance, then it probably wouldnt
09:48
@mr5 @Freerey cake/USD at $17.5 now
09:58
cake?
Yes please
10:31
mr5
mr5
11:18
@Sakthivel 蝙蝠汤
11:30
@Wietlol pancake swap
12:18
yay
anyone remember those ads for Cake with the extremely awful deadpan delivery by that hipster girl?
[Squirrel in Training] Feierbaend tschüß
12:40
[Hans1984] FEIERABEND
[Hans1984] DEUTSCHLAND;DEUTSCHLAND ÜBER...
[Hans1984] oh wait
I should have been more specific, what I mean by 'C# scripts' is 'C# as a scripting language', I want to distribute a .csx and I want to know if Windows 10 has the capability to compile and run it on the fly out-of-the-box
 
1 hour later…
13:43
[Not Li] DEUTSCHLAND MEIN HERZ IM FLAMMEN
[Not Li] I mean what
@AlphaDelta how much effort is it to install the required tools?
get yourself a clean (virtual) machine and see if things work and if not, what you require to run them
Probably not a lot of effort, but any effort is too much for a user lmao
make a shell script that does it
Actually that's a pretty solid idea
Thanks
I also use a simple shell script that wraps my scripting tool
just so I have control over how to invoke it
but that is just 1 line of bash... batch? iDunno
that is about my limit in shell scripting anyway
14:10
Am trying to define my own exception for the first time. Using VS, created a folder underneath my project folder named "exceptions", then within it "CannotOpenPortException", derived from "Exception".
When I use it, in a class in the main project folder, VS shows an error as though it cannot find the class.
If I add "Projectname.foldername." to the front of the "CannotOpenPortException" when I instantiate, the VS error goes away.
I put "using Projectname.exceptions" at the top of the project, didn't help.
What fundamental thing am I doing wrong?
(experienced in Java, not C#)
(seemed like it was probably something too simple for an SO post...)
like in Java, you do need the import, known as using
major difference, which you already spotted probably, is that in C#, you stop at the namespace rather than the class
yeah, but somehow when I do that the VS error is still there.
if new Projectname.Exceptions.CannotOpenPortException() works, then VS should be able to give you the option to convert it to a using statement
It is like I'm not doing it right or something.
keep in mind, your using statement should be outside your namespace declaration
(again, unlike in Java, where the package declaration is the first element in the file)
14:21
I put the using statement above the namespace declaration, with all the "using System...." ones
and when you let VS generate the using statement?
It doesn't give me that option on the automated "generate fix" menu
It wants to create a constructor for me (I'm passing in a string)
maybe a name clash?
I'm within a catch that caught "Exception", does that make a difference?
what is the exact message?
14:23
There's no name clash with the exception named CannotOpenPortException, sure of that
"The type caught or thrown must be derived from Sytsem.Exception"
*System
can you navigate to declaration?
Ah
I think I found the problem (with your help) -- somehow a class with the same name got created, and it has no such constructor
ok, deleted that class file, errors vanished. Thanks
Figured it was a newbie error
I set my highlighting to differentiate between not-found and other errors
not-found is red text for me, everything else is a red squiggly line
Thank you much. I also figured (correctly) that it was a poor candidate for an SO post -- you spiraled in on the problem through a series of short questions and check-this things. Trying to do that through SO posts is more painful.
it helps really much because the not found errors are special
14:28
Hmmm -- will consider that, thanks. Wouldn't have helped in this case...
the others are navigatable
Because it WAS finding it
yes
and if it can find it, you navigate to it
Isn't programming fun?
yeah, I'll remember the navigate-to-it trick.
never trust that your understanding is the same as the compiler's
also... middle mouse button is often faster than going to the other file manually
14:29
Well... yeah, but we have to assume something...
> There's no name clash with the exception named CannotOpenPortException, sure of that
sounds more like an assertion than an assumption
:p
LOL -- fair enough
And there WASN'T - that spurious class DOESN'T COUNT - because I DIDN'T MEAN IT
oh, well
I honestly don't remember creating the spurious class, and I didn't even conceive of the class until a few minutes before I had the error...
The wonders of easy code generation, esp. in unfamiliar IDEs.
When I think of "name clash" I think of creating two different things with the same name, not two instances of the same thing in different folders. But your point is taken.
What does the middle mouse button do? Mine is also my scroll wheel, and doesn't seem to do anything when I can manage to click it without scrolling
middle mouse button for me, is navigate to X
Hmmm
where it depends on what your cursor was at
if it is on usage, it navigates to declaration
14:37
yeah - not working on mine
if it is on the declaration, it navigates to usage
oh, well, gotten kind of used to left-click and f12, even though that's clumsier
ye, I have a very special keymap
ah
I tried simul left+right as well, no joy
Well, appreciate the help.
 
6 hours later…
20:45
 
2 hours later…
22:27
posted on February 19, 2021 by Phil Haack

In my last post, I wrote about some of the interesting elements of C# we take advantage of to make argument parsing in Abbot with C# nice.

 
1 hour later…
mr5
mr5
23:40
@Wietlol middle mouse button doesn't do anything by default to me.
then you too use an inferior input mapping
all my IDEs, even DataGrip do navigation on middle mouse button
mr5
mr5
it's ctrl+click by default
ctrl+b on IntelliJ which is build on VS
holyfuckingshihsdlfkajlkfjkljwhtied
what does "Pre-purchase Now" means on Blizzard context? Does it mean the game is playable after pre purchase it?
23:58
probably just buy the game before it is released... still not playable

« first day (3779 days earlier)      last day (1394 days later) »