DrDeadCrash

joined 2 years ago
[–] DrDeadCrash 8 points 10 hours ago

This is going to be the only answer, I'm afraid.

[–] DrDeadCrash 1 points 2 days ago

As a soda drinker, I'm always surprised by that.

[–] DrDeadCrash 27 points 3 days ago

unless the fourteenth amendment overrides both treaty and statute

It absolutely does! That's the point!

[–] DrDeadCrash 17 points 5 days ago

Let's just water down that word until it means nothing...

[–] DrDeadCrash 1 points 1 week ago (1 children)

Was just before Christmas

[–] DrDeadCrash 2 points 1 week ago (3 children)

I just bought a year of it :(

[–] DrDeadCrash 1 points 1 week ago

The president of the United States is above the law.

[–] DrDeadCrash 1 points 1 week ago (1 children)

I say fuck them and fuck their ball. The whole shit is about to burn down.

[–] DrDeadCrash 4 points 2 weeks ago (1 children)

But not everyone is known for it...

[–] DrDeadCrash 10 points 2 weeks ago (2 children)

I feel like if one tried to follow all of these "rules" at all times nothing would get done, at all.

[–] DrDeadCrash 3 points 2 weeks ago

I learned everything I know about c# by looking it up on Google, copy and paste is king. Just keep working with it until you can make sense out of the code you're copying. An llm would work similar but might feed you bs, everything you'll want to know is on stack overflow. You're unlikely to have an original, unasked question...I never have.

[–] DrDeadCrash 8 points 2 weeks ago (8 children)

Check out this reference (not mine): https://gist.github.com/DanielKoehler/606b022ec522a67a0cf3

The first difference that I would point out is c# use of static typing, where python is dynamic. This author is using the var keyword to avoid specifying a type for variables. The type is, instead infered by the code that follows the equals sign.

The next main difference is the use of whitespace. Python is very whitespace aware, it uses indentation and line breaks to organize code. C# is whitespace agnostic in most cases and separates blocks of code using curly braces {...}, statements must end with a semicolon;

In C# collections are organized by how the data is accessed and whether elements can be added or removed. Arrays are initialized with a set of items and can't be made longer, a List can be added to and can be removed. The key point is that all items in a collection are of the same type.

Complex objects (that have properties and methods) can be structs, classes, or records but they all basically do the same thing and interact in the samish way. You have to use the new keyword to make a new instance.

Classes and records can inherit from another where as structs cannot. Properties must have a type, methods must return a type or void. Method parameters must be typed, when calling a method the provided parameters must be of the proper type.

An interface describes requirements an implementing class, record or stuct must meet (i.e. properties and methods). You can't make a new interface, it's more of a qualification.

I hope this helps some

16
submitted 5 months ago* (last edited 5 months ago) by DrDeadCrash to c/csharp
 

A collection of tools for dealing with nulls, failures and the generic type issues that arise in this domain.

https://github.com/Andy3432344/SafeResults

I'm the author, let me know what you think!

*Edit: updated to show GitHub link, sorry!

 

I work for a services company, and we're not getting much right now. Just wanted to ask about work availability across the board.

 

error no posts

I have an active post in vscode right now, which I made in browser, but cannot see anything when viewing the community with Connect. Any ideas?

4
FSI Start (programming.dev)
submitted 1 year ago by DrDeadCrash to c/vscode
 

Hi everyone, I'm trying to try out F# via FSI in VS Code (Windows 10)

I have Ionide for F# installed, and have used it before, but now every time I try to start it I get a message "FSI :Start resulted in an error", it goes on to helpfully report "the option has no value".

dotnet is in path, dotnet works great. FSI? nothing.

I also have the .net workload installed for visual studio 2022 (if that matters).

I started up my Linux VM (KDE Neon) fired up vs codium and tried FSI Start...same error! So no tinkering in f# for me tonight. Does anyone have an idea what's happening, across two environments? Google is no help...

view more: next ›